Struct Server

Source
pub struct Server<B: Backend> {
Show 16 fields pub addr: String, pub tls_acceptor: Option<TlsAcceptor>, pub domain: String, pub max_recipients: usize, pub max_message_bytes: usize, pub max_line_length: usize, pub allow_insecure_auth: bool, pub strict: bool, pub read_timeout: Duration, pub write_timeout: Duration, pub enable_smtputf8: bool, pub enable_requiretls: bool, pub enable_binarymime: bool, pub auth_disabled: bool, pub backend: B, pub caps: Vec<String>,
}

Fields§

§addr: String§tls_acceptor: Option<TlsAcceptor>§domain: String§max_recipients: usize§max_message_bytes: usize§max_line_length: usize§allow_insecure_auth: bool§strict: bool§read_timeout: Duration§write_timeout: Duration§enable_smtputf8: bool§enable_requiretls: bool§enable_binarymime: bool§auth_disabled: bool§backend: B§caps: Vec<String>

Implementations§

Source§

impl<B: Backend> Server<B>

Source

pub fn new(be: B) -> Self

Source

pub async fn serve(self, l: TcpListener) -> Result<()>

Source

pub async fn handle_conn(&self, c: Conn<B>) -> Result<()>

Source

pub async fn listen_and_serve(self) -> Result<()>

Auto Trait Implementations§

§

impl<B> Freeze for Server<B>
where B: Freeze,

§

impl<B> !RefUnwindSafe for Server<B>

§

impl<B> Send for Server<B>

§

impl<B> Sync for Server<B>

§

impl<B> Unpin for Server<B>
where B: Unpin,

§

impl<B> !UnwindSafe for Server<B>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.