pub enum Listener {
Tcp(TcpListener),
Unix(UnixListener),
}Expand description
A bound listener ready to accept connections.
Variants§
Tcp(TcpListener)
TCP listener (may be wrapped in TLS by the caller).
Unix(UnixListener)
Unix domain socket listener.
Implementations§
Source§impl Listener
impl Listener
Sourcepub async fn bind(config: &ListenConfig) -> Result<Self, ListenError>
pub async fn bind(config: &ListenConfig) -> Result<Self, ListenError>
Bind a listener from configuration.
Auto Trait Implementations§
impl !Freeze for Listener
impl RefUnwindSafe for Listener
impl Send for Listener
impl Sync for Listener
impl Unpin for Listener
impl UnsafeUnpin for Listener
impl UnwindSafe for Listener
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