Struct mailin_embedded::Server
source · Expand description
Server
is used to configure and start the SMTP server
Implementations
sourceimpl<H> Server<H>where
H: Handler + Clone + Send + 'static,
impl<H> Server<H>where
H: Handler + Clone + Send + 'static,
sourcepub fn with_ssl(&mut self, ssl_config: SslConfig) -> &mut Self
pub fn with_ssl(&mut self, ssl_config: SslConfig) -> &mut Self
Set the SSL configuration of the server
sourcepub fn with_num_threads(&mut self, num_threads: usize) -> &mut Self
pub fn with_num_threads(&mut self, num_threads: usize) -> &mut Self
Set the size of the threadpool which is equal to the maximum number of concurrent SMTP sessions.
sourcepub fn with_auth(&mut self, auth: AuthMechanism) -> &mut Self
pub fn with_auth(&mut self, auth: AuthMechanism) -> &mut Self
Set the authentication mechanism supported by the server
sourcepub fn serve<A: ToSocketAddrs + Display>(
self,
address: A
) -> Result<RunningServer, Error>
pub fn serve<A: ToSocketAddrs + Display>(
self,
address: A
) -> Result<RunningServer, Error>
Start the SMTP server in a background thread at the given address
sourcepub fn serve_forever<A: ToSocketAddrs + Display>(
self,
address: A
) -> Result<(), Error>
pub fn serve_forever<A: ToSocketAddrs + Display>(
self,
address: A
) -> Result<(), Error>
Start the SMTP server and run forever at the given address
Auto Trait Implementations
impl<H> RefUnwindSafe for Server<H>where
H: RefUnwindSafe,
impl<H> Send for Server<H>
impl<H> Sync for Server<H>where
H: Sync,
impl<H> Unpin for Server<H>where
H: Unpin,
impl<H> UnwindSafe for Server<H>where
H: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more