pub struct Dkim2Signer<State = NeedDomain> {
pub keys: Vec<KeyEntry>,
pub domain: String,
pub flags: Vec<Flag>,
pub nonce: Option<String>,
/* private fields */
}Fields§
§keys: Vec<KeyEntry>§domain: String§flags: Vec<Flag>§nonce: Option<String>Implementations§
Source§impl Dkim2Signer<NeedDomain>
impl Dkim2Signer<NeedDomain>
pub fn from_key(key: impl Into<DkimKey>) -> Dkim2Signer<NeedDomain>
Sourcepub fn domain(self, domain: impl Into<String>) -> Dkim2Signer<NeedSelector>
pub fn domain(self, domain: impl Into<String>) -> Dkim2Signer<NeedSelector>
Sets the domain to use for signing.
Source§impl Dkim2Signer<Done>
impl Dkim2Signer<Done>
Sourcepub fn additional_key(
self,
key: impl Into<DkimKey>,
selector: impl Into<String>,
) -> Self
pub fn additional_key( self, key: impl Into<DkimKey>, selector: impl Into<String>, ) -> Self
Adds an additional signing key and selector.
Sourcepub fn flags(self, flags: impl IntoIterator<Item = Flag>) -> Self
pub fn flags(self, flags: impl IntoIterator<Item = Flag>) -> Self
Sets the flags (f= tag) to add to the signature.
Source§impl Dkim2Signer<Done>
impl Dkim2Signer<Done>
Sourcepub fn sign<'x, M, A, R, I>(
&self,
message: M,
hop: Hop<A, R, I>,
) -> Result<Dkim2Signed>where
M: TryInto<AuthenticatedMessage<'x>, Error = Error>,
A: AsRef<str>,
R: IntoIterator<Item: AsRef<str>>,
I: Into<String>,
pub fn sign<'x, M, A, R, I>(
&self,
message: M,
hop: Hop<A, R, I>,
) -> Result<Dkim2Signed>where
M: TryInto<AuthenticatedMessage<'x>, Error = Error>,
A: AsRef<str>,
R: IntoIterator<Item: AsRef<str>>,
I: Into<String>,
Signs a message whose content has not changed (Originator or transparent Forwarder). Adds a DKIM2-Signature, and a Message-Instance only if none is present yet.
Sourcepub fn sign_revised<'x, O, M, A, R, I>(
&self,
original: O,
modified: M,
hop: Hop<A, R, I>,
) -> Result<Dkim2Signed>where
O: TryInto<AuthenticatedMessage<'x>, Error = Error>,
M: TryInto<AuthenticatedMessage<'x>, Error = Error>,
A: AsRef<str>,
R: IntoIterator<Item: AsRef<str>>,
I: Into<String>,
pub fn sign_revised<'x, O, M, A, R, I>(
&self,
original: O,
modified: M,
hop: Hop<A, R, I>,
) -> Result<Dkim2Signed>where
O: TryInto<AuthenticatedMessage<'x>, Error = Error>,
M: TryInto<AuthenticatedMessage<'x>, Error = Error>,
A: AsRef<str>,
R: IntoIterator<Item: AsRef<str>>,
I: Into<String>,
Signs a message whose content changed, computing the recipe by diffing
original against modified (the form to be sent).
Sourcepub fn sign_with_recipe<'x, M, A, R, I>(
&self,
modified: M,
recipe: Recipe,
hop: Hop<A, R, I>,
) -> Result<Dkim2Signed>where
M: TryInto<AuthenticatedMessage<'x>, Error = Error>,
A: AsRef<str>,
R: IntoIterator<Item: AsRef<str>>,
I: Into<String>,
pub fn sign_with_recipe<'x, M, A, R, I>(
&self,
modified: M,
recipe: Recipe,
hop: Hop<A, R, I>,
) -> Result<Dkim2Signed>where
M: TryInto<AuthenticatedMessage<'x>, Error = Error>,
A: AsRef<str>,
R: IntoIterator<Item: AsRef<str>>,
I: Into<String>,
Signs a changed message using a caller-supplied recipe describing how to
reconstruct the previous state from modified.
Sourcepub fn sign_with_message_instance<'x, A, R, I>(
&self,
modified: &AuthenticatedMessage<'x>,
instance: Option<&MessageInstance>,
hop: Hop<A, R, I>,
) -> Result<Signature>
pub fn sign_with_message_instance<'x, A, R, I>( &self, modified: &AuthenticatedMessage<'x>, instance: Option<&MessageInstance>, hop: Hop<A, R, I>, ) -> Result<Signature>
Signs a message with a caller-supplied Message-Instance header.
Auto Trait Implementations§
impl<State> Freeze for Dkim2Signer<State>
impl<State> RefUnwindSafe for Dkim2Signer<State>where
State: RefUnwindSafe,
impl<State> Send for Dkim2Signer<State>where
State: Send,
impl<State> Sync for Dkim2Signer<State>where
State: Sync,
impl<State> Unpin for Dkim2Signer<State>where
State: Unpin,
impl<State> UnsafeUnpin for Dkim2Signer<State>
impl<State> UnwindSafe for Dkim2Signer<State>where
State: UnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more