Struct kumo_dkim::SignerBuilder
source · pub struct SignerBuilder { /* private fields */ }
Expand description
Builder for the Signer
Implementations§
source§impl SignerBuilder
impl SignerBuilder
sourcepub fn with_signed_headers(
self,
headers: impl IntoIterator<Item = impl Into<String>>,
) -> Result<Self, DKIMError>
pub fn with_signed_headers( self, headers: impl IntoIterator<Item = impl Into<String>>, ) -> Result<Self, DKIMError>
Specify headers to be used in the DKIM signature The From: header is required.
sourcepub fn with_over_signing(self, over_sign: bool) -> Self
pub fn with_over_signing(self, over_sign: bool) -> Self
Enable automatic over-signing. Each configured header in the list of headers to sign will be counted in the message, and it will be signed N+1 times so that the resultant signature will be proof against a replay attack that inserts an additional header of the same name.
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: impl Into<String>) -> Self
pub fn with_selector(self, value: impl Into<String>) -> Self
Specify the private key used to sign the email
sourcepub fn with_signing_domain(self, value: impl Into<String>) -> Self
pub fn with_signing_domain(self, value: impl Into<String>) -> 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_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
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SignerBuilder
impl RefUnwindSafe for SignerBuilder
impl Send for SignerBuilder
impl Sync for SignerBuilder
impl Unpin for SignerBuilder
impl UnwindSafe for SignerBuilder
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