Struct new_tokio_smtp::EhloData
source · pub struct EhloData { /* private fields */ }
Expand description
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§
source§impl EhloData
impl EhloData
sourcepub fn new(domain: Domain, data: HashMap<Capability, Vec<EhloParam>>) -> Self
pub fn new(domain: Domain, data: HashMap<Capability, Vec<EhloParam>>) -> Self
create a new Ehlo data from the domain with which the server responded and the ehlo parameters of the response
sourcepub fn has_capability<A>(&self, cap: A) -> boolwhere
A: AsRef<str>,
pub fn has_capability<A>(&self, cap: A) -> boolwhere
A: AsRef<str>,
check if a ehlo contained a specific capability e.g. SMTPUTF8
sourcepub fn get_capability_params<A>(&self, cap: A) -> Option<&[EhloParam]>where
A: AsRef<str>,
pub fn get_capability_params<A>(&self, cap: A) -> Option<&[EhloParam]>where
A: AsRef<str>,
get the parameters for a specific capability e.g. the size of SIZE
sourcepub fn capability_map(&self) -> &HashMap<Capability, Vec<EhloParam>>
pub fn capability_map(&self) -> &HashMap<Capability, Vec<EhloParam>>
return a reference to the inner hash map