Struct mailin_embedded::Server
source · pub struct Server<H>{ /* private fields */ }
Expand description
Server
is used to configure and start the SMTP server
Implementations§
source§impl<H> Server<H>
impl<H> Server<H>
sourcepub fn with_ssl(&mut self, ssl_config: SslConfig) -> Result<&mut Self, Error>
pub fn with_ssl(&mut self, ssl_config: SslConfig) -> Result<&mut Self, Error>
Set the SSL configuration of the server
sourcepub fn with_num_threads(&mut self, num_threads: u32) -> &mut Self
pub fn with_num_threads(&mut self, num_threads: u32) -> &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
Add an authentication mechanism that will supported by the server
sourcepub fn with_tcp_listener(&mut self, listener: TcpListener) -> &mut Self
pub fn with_tcp_listener(&mut self, listener: TcpListener) -> &mut Self
Set a tcp listener from an already open socket
Auto Trait Implementations§
impl<H> !RefUnwindSafe for Server<H>
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>
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