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§
fn into_listener(self) -> Result<Self::Listener>
Implementations on Foreign Types§
Source§impl IntoListener for TcpListener
impl IntoListener for TcpListener
type Listener = TcpListener
fn into_listener(self) -> Result<Self::Listener>
Source§impl IntoListener for UnixListener
Available on Unix only.
impl IntoListener for UnixListener
Available on Unix only.