[][src]Struct new_tokio_smtp::EhloData

pub struct EhloData { /* fields omitted */ }

A type representing the ehlo response of the last ehlo call

This is mainly used to check if a certain capability/command is supported. E.g. if SMTPUTF8 is supported.

Implementations

impl EhloData[src]

pub fn new(domain: Domain, data: HashMap<Capability, Vec<EhloParam>>) -> Self[src]

create a new Ehlo data from the domain with which the server responded and the ehlo parameters of the response

pub fn has_capability<A>(&self, cap: A) -> bool where
    A: AsRef<str>, 
[src]

check if a ehlo contained a specific capability e.g. SMTPUTF8

pub fn get_capability_params<A>(&self, cap: A) -> Option<&[EhloParam]> where
    A: AsRef<str>, 
[src]

get the parameters for a specific capability e.g. the size of SIZE

pub fn capability_map(&self) -> &HashMap<Capability, Vec<EhloParam>>[src]

return a reference to the inner hash map

pub fn domain(&self) -> &Domain[src]

the domain for which the server acts

Trait Implementations

impl Clone for EhloData[src]

impl Debug for EhloData[src]

impl From<(Domain, HashMap<Capability, Vec<EhloParam>, RandomState>)> for EhloData[src]

impl Into<(Domain, HashMap<Capability, Vec<EhloParam>, RandomState>)> for EhloData[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.