pub enum Listener {
Inet(TcpListener),
Unix(UnixListener),
}
Expand description
A socket server, listening for connections.
You can accept a new connection by using the Listener::accept
method.
Variants§
Inet(TcpListener)
A TCP socket server, listening for connections.
Unix(UnixListener)
A Unix socket which can accept connections from other Unix sockets.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Listener
impl RefUnwindSafe for Listener
impl Send for Listener
impl Sync for Listener
impl Unpin 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