DkimSigner

Struct DkimSigner 

Source
pub struct DkimSigner<T: SigningKey, State = NeedDomain> {
    pub key: T,
    pub template: Signature,
    /* private fields */
}

Fields§

§key: T§template: Signature

Implementations§

Source§

impl<T: SigningKey> DkimSigner<T>

Source

pub fn from_key(key: T) -> DkimSigner<T, NeedDomain>

Source§

impl<T: SigningKey> DkimSigner<T, NeedDomain>

Source

pub fn domain(self, domain: impl Into<String>) -> DkimSigner<T, NeedSelector>

Sets the domain to use for signing.

Source§

impl<T: SigningKey> DkimSigner<T, NeedSelector>

Source

pub fn selector(self, selector: impl Into<String>) -> DkimSigner<T, NeedHeaders>

Sets the selector to use for signing.

Source§

impl<T: SigningKey> DkimSigner<T, NeedHeaders>

Source

pub fn headers( self, headers: impl IntoIterator<Item = impl Into<String>>, ) -> DkimSigner<T, Done>

Sets the headers to sign.

Source§

impl<T: SigningKey> DkimSigner<T, Done>

Source

pub fn atps(self, atps: impl Into<String>) -> Self

Sets the third party signature.

Source

pub fn atpsh(self, atpsh: HashAlgorithm) -> Self

Sets the third-party signature hashing algorithm.

Source

pub fn agent_user_identifier(self, auid: impl Into<String>) -> Self

Sets the selector to use for signing.

Source

pub fn expiration(self, expiration: u64) -> Self

Sets the number of seconds from now to use for the signature expiration.

Source

pub fn body_length(self, body_length: bool) -> Self

Include the body length in the signature.

Source

pub fn reporting(self, reporting: bool) -> Self

Request reports.

Source

pub fn header_canonicalization(self, ch: Canonicalization) -> Self

Sets header canonicalization algorithm.

Source

pub fn body_canonicalization(self, cb: Canonicalization) -> Self

Sets header canonicalization algorithm.

Source§

impl<T: SigningKey> DkimSigner<T, Done>

Source

pub fn sign(&self, message: &[u8]) -> Result<Signature>

Signs a message.

Source

pub fn sign_chained<'x>( &self, chunks: impl Iterator<Item = &'x [u8]>, ) -> Result<Signature>

Signs a chained message.

Trait Implementations§

Source§

impl<T: Clone + SigningKey, State: Clone> Clone for DkimSigner<T, State>

Source§

fn clone(&self) -> DkimSigner<T, State>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T: Debug + SigningKey, State: Debug> Debug for DkimSigner<T, State>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: Default + SigningKey, State: Default> Default for DkimSigner<T, State>

Source§

fn default() -> DkimSigner<T, State>

Returns the “default value” for a type. Read more
Source§

impl<T: PartialEq + SigningKey, State: PartialEq> PartialEq for DkimSigner<T, State>

Source§

fn eq(&self, other: &DkimSigner<T, State>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<T: Eq + SigningKey, State: Eq> Eq for DkimSigner<T, State>

Source§

impl<T: SigningKey, State> StructuralPartialEq for DkimSigner<T, State>

Auto Trait Implementations§

§

impl<T, State> Freeze for DkimSigner<T, State>
where T: Freeze,

§

impl<T, State> RefUnwindSafe for DkimSigner<T, State>
where T: RefUnwindSafe, State: RefUnwindSafe,

§

impl<T, State> Send for DkimSigner<T, State>
where T: Send, State: Send,

§

impl<T, State> Sync for DkimSigner<T, State>
where T: Sync, State: Sync,

§

impl<T, State> Unpin for DkimSigner<T, State>
where T: Unpin, State: Unpin,

§

impl<T, State> UnwindSafe for DkimSigner<T, State>
where T: UnwindSafe, State: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,