pub struct Name { /* private fields */ }
Expand description
MailSetup that uses the given service name for a session. It can also attach the instance ID and session ID for better diagnostics.
Using the default instance or setting name to empty string will reuse the incoming service name already set.
Implementations§
Source§impl Name
impl Name
Sourcepub fn new(name: impl ToString) -> Self
pub fn new(name: impl ToString) -> Self
Construct a name MailSetup
to use the given service name.
This name is used in SMTP responses and will be seen in logs.
It is also used to identify a mail transaction.
Sourcepub fn identify_instance(self, enable: bool) -> Self
pub fn identify_instance(self, enable: bool) -> Self
Switch if instance ID should be included in the service name
Sourcepub fn identify_session(self, enable: bool) -> Self
pub fn identify_session(self, enable: bool) -> Self
Switch if instance ID should be included in the service name
Trait Implementations§
Source§impl SessionService for Name
impl SessionService for Name
Source§fn prepare_session<'a, 'i, 's, 'f>(
&'a self,
_io: &'i mut Box<dyn MayBeTls>,
state: &'s mut SmtpContext,
) -> S1Fut<'f, ()>where
'a: 'f,
'i: 'f,
's: 'f,
fn prepare_session<'a, 'i, 's, 'f>(
&'a self,
_io: &'i mut Box<dyn MayBeTls>,
state: &'s mut SmtpContext,
) -> S1Fut<'f, ()>where
'a: 'f,
'i: 'f,
's: 'f,
Use a given name as a service name in the session.
Auto Trait Implementations§
impl Freeze for Name
impl RefUnwindSafe for Name
impl Send for Name
impl Sync for Name
impl Unpin for Name
impl UnwindSafe for Name
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