[−][src]Struct mailin_embedded::Server
Server
is used to configure and start the SMTP server
Methods
impl<H> Server<H> where
H: Handler + Clone + Send + 'static,
[src]
impl<H> Server<H> where
H: Handler + Clone + Send + 'static,
pub fn new(handler: H) -> Self
[src]
pub fn new(handler: H) -> Self
Create a new server with the given Handler
pub fn with_name(&mut self, name: String) -> &mut Self
[src]
pub fn with_name(&mut self, name: String) -> &mut Self
Give the server a name
pub fn with_ssl(&mut self, ssl_config: SslConfig) -> &mut Self
[src]
pub fn with_ssl(&mut self, ssl_config: SslConfig) -> &mut Self
Set the SSL configuration of the server
pub fn with_num_threads(&mut self, num_threads: usize) -> &mut Self
[src]
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.
pub fn with_auth(&mut self, auth: AuthMechanism) -> &mut Self
[src]
pub fn with_auth(&mut self, auth: AuthMechanism) -> &mut Self
Set the authentication mechanism supported by the server
pub fn serve<A: ToSocketAddrs + Display>(
self,
address: A
) -> Result<RunningServer, Error>
[src]
pub fn serve<A: ToSocketAddrs + Display>(
self,
address: A
) -> Result<RunningServer, Error>
Start the SMTP server in a background thread at the given address
pub fn serve_forever<A: ToSocketAddrs + Display>(
self,
address: A
) -> Result<(), Error>
[src]
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
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId