pub struct Service { /* private fields */ }
Expand description
Service implements all the mandatory mail services
- IoService so it can be used with
TcpServer
orUnixServer
.
Build it using the Builder
Implementations§
Trait Implementations§
Source§impl MailDispatch for Service
impl MailDispatch for Service
Source§fn open_mail_body<'a, 's, 'f>(
&'a self,
session: &'s mut SmtpSession,
) -> S1Fut<'f, DispatchResult>where
'a: 'f,
's: 'f,
fn open_mail_body<'a, 's, 'f>(
&'a self,
session: &'s mut SmtpSession,
) -> S1Fut<'f, DispatchResult>where
'a: 'f,
's: 'f,
Add a mail data sink to mail transaction. Read more
Source§impl MailGuard for Service
impl MailGuard for Service
Source§fn add_recipient<'a, 's, 'f>(
&'a self,
session: &'s mut SmtpSession,
rcpt: Recipient,
) -> S2Fut<'f, AddRecipientResult>where
'a: 'f,
's: 'f,
fn add_recipient<'a, 's, 'f>(
&'a self,
session: &'s mut SmtpSession,
rcpt: Recipient,
) -> S2Fut<'f, AddRecipientResult>where
'a: 'f,
's: 'f,
Add given RCPT to the list. Here we can immediately add and further processing will stop with success.
Or we can refuse and stop further processing with a failure.
Last option is to return
Inconclusive
in which case other MailGuards will have a chance.
If all MailGuards return Inconclusive
, the caller should assume success and add the RCPT to the list.Source§fn start_mail<'a, 's, 'f>(
&'a self,
session: &'s mut SmtpSession,
) -> S2Fut<'f, StartMailResult>where
'a: 'f,
's: 'f,
fn start_mail<'a, 's, 'f>(
&'a self,
session: &'s mut SmtpSession,
) -> S2Fut<'f, StartMailResult>where
'a: 'f,
's: 'f,
Open the mail transaction. Here we have the opportunity to check the sender, adjust transaction ID…
Source§impl SessionService for Service
impl SessionService for Service
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,
Auto Trait Implementations§
impl Freeze for Service
impl !RefUnwindSafe for Service
impl Send for Service
impl Sync for Service
impl Unpin for Service
impl !UnwindSafe for Service
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