pub struct SignedDataBuilder { /* private fields */ }Expand description
Builder for SignedData.
Implementations§
Source§impl SignedDataBuilder
impl SignedDataBuilder
Sourcepub fn content_type(self, oid: impl Into<String>) -> Self
pub fn content_type(self, oid: impl Into<String>) -> Self
Set the encapsulated content type OID.
Sourcepub fn content(self, content: Option<Vec<u8>>) -> Self
pub fn content(self, content: Option<Vec<u8>>) -> Self
Set the encapsulated content (None = detached signature).
Sourcepub fn signer(self, signer: SignerInfo) -> Self
pub fn signer(self, signer: SignerInfo) -> Self
Add a signer.
Sourcepub fn certificate(self, cert_der: Vec<u8>) -> Self
pub fn certificate(self, cert_der: Vec<u8>) -> Self
Add a certificate (DER bytes).
Sourcepub fn build(self) -> Result<SignedData, CmsError>
pub fn build(self) -> Result<SignedData, CmsError>
Build the SignedData.
Trait Implementations§
Source§impl Debug for SignedDataBuilder
impl Debug for SignedDataBuilder
Source§impl Default for SignedDataBuilder
impl Default for SignedDataBuilder
Source§fn default() -> SignedDataBuilder
fn default() -> SignedDataBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SignedDataBuilder
impl RefUnwindSafe for SignedDataBuilder
impl Send for SignedDataBuilder
impl Sync for SignedDataBuilder
impl Unpin for SignedDataBuilder
impl UnsafeUnpin for SignedDataBuilder
impl UnwindSafe for SignedDataBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more