Trait IntoListener

Source
pub trait IntoListener: Send {
    type Listener: Listen;

    // Required method
    fn into_listener(self) -> Result<Self::Listener>;
}
Expand description

Helper trait for converting listener types and register them to xitca-server By delay the conversion and make the process happen in server thread(s) it avoid possible panic due to runtime locality.

This trait is often utilized together with Listen trait. Please reference it’s doc for examples.

Required Associated Types§

Required Methods§

Implementations on Foreign Types§

Source§

impl IntoListener for TcpListener

Source§

impl IntoListener for UnixListener

Implementors§