[][src]Struct dkim::dkim::Header

pub struct Header { /* fields omitted */ }

A struct reprensenting a DKIM-Signature header.
It can be build using the builder syntax.

Implementations

impl Header[src]

pub fn new(sdid: String, selector: String) -> Header[src]

Initialize a new DKIM-Signature header with default fields. The first argument must be the signing domain (ex: "example.com") and the second argument must be the selector (ex: "dkim"). Making a txt lookup to "{selector}._domainkey.{sdid}" must return a DKIM record.

Uses relaxed canonicalization algorithms, Sha256 hash algorithm and signed headers will be ["mime-version", "references", "in-reply-to", "from", "date", "message-id", "subject", "to"]. Optionnal fields are unset.

The signature and body_hash fields can't be set manually (the sign method on an Email will do it).

pub fn parse(name: &str, value: &str) -> Result<Header, DkimParsingError>[src]

pub fn with_algorithm(self, algorithm: SigningAlgorithm) -> Header[src]

pub fn with_canonicalization(
    self,
    canonicalization: (CanonicalizationType, CanonicalizationType)
) -> Header
[src]

pub fn with_signed_headers(self, signed_headers: Vec<String>) -> Header[src]

pub fn with_copied_headers(self, copied_headers: String) -> Header[src]

Unstable

pub fn with_auid(self, auid: String) -> Header[src]

pub fn with_body_lenght(self, body_lenght: usize) -> Header[src]

pub fn with_signature_timestamp(self, signature_timestamp: usize) -> Header[src]

pub fn with_signature_expiration(self, signature_expiration: usize) -> Header[src]

Trait Implementations

impl Debug for Header[src]

impl ToString for Header[src]

Auto Trait Implementations

impl RefUnwindSafe for Header

impl Send for Header

impl Sync for Header

impl Unpin for Header

impl UnwindSafe for Header

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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