pub struct SignerBuilder<'a> { /* private fields */ }Expand description
Builder for the Signer
Implementations§
Source§impl<'a> SignerBuilder<'a>
impl<'a> SignerBuilder<'a>
Sourcepub fn with_signed_headers(
self,
headers: &'a [&'a str],
) -> Result<Self, DKIMError>
pub fn with_signed_headers( self, headers: &'a [&'a str], ) -> Result<Self, DKIMError>
Specify headers to be used in the DKIM signature The From: header is required.
Sourcepub fn with_private_key(self, key: DkimPrivateKey) -> Self
pub fn with_private_key(self, key: DkimPrivateKey) -> Self
Specify the private key used to sign the email
Sourcepub fn with_selector(self, value: &'a str) -> Self
pub fn with_selector(self, value: &'a str) -> Self
Specify the private key used to sign the email
Sourcepub fn with_signing_domain(self, value: &'a str) -> Self
pub fn with_signing_domain(self, value: &'a str) -> Self
Specify for which domain the email should be signed for
Sourcepub fn with_header_canonicalization(self, value: Type) -> Self
pub fn with_header_canonicalization(self, value: Type) -> Self
Specify the header canonicalization
Sourcepub fn with_body_canonicalization(self, value: Type) -> Self
pub fn with_body_canonicalization(self, value: Type) -> Self
Specify the body canonicalization
Sourcepub fn with_logger(self, logger: &'a Logger) -> Self
pub fn with_logger(self, logger: &'a Logger) -> Self
Specify a logger
Sourcepub fn with_time(self, value: DateTime<Utc>) -> Self
pub fn with_time(self, value: DateTime<Utc>) -> Self
Specify current time. Mostly used for testing
Sourcepub fn with_expiry(self, value: Duration) -> Self
pub fn with_expiry(self, value: Duration) -> Self
Specify a expiry duration for the signature validity
Sourcepub fn build(self) -> Result<DKIMSigner<'a>, DKIMError>
pub fn build(self) -> Result<DKIMSigner<'a>, DKIMError>
Build an instance of the Signer Must be provided: signed_headers, private_key, selector, logger and signing_domain.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SignerBuilder<'a>
impl<'a> RefUnwindSafe for SignerBuilder<'a>
impl<'a> Send for SignerBuilder<'a>
impl<'a> Sync for SignerBuilder<'a>
impl<'a> Unpin for SignerBuilder<'a>
impl<'a> UnwindSafe for SignerBuilder<'a>
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