pub enum Listener {
Tcp(TcpListener),
Unix(UnixListener),
}
Expand description
Unified listener. Either a TcpListener
or std::os::unix::net::UnixListener
Variants§
Tcp(TcpListener)
Unix(UnixListener)
Trait Implementations§
Source§impl From<TcpListener> for Listener
impl From<TcpListener> for Listener
Source§fn from(s: TcpListener) -> Self
fn from(s: TcpListener) -> Self
Converts to this type from the input type.
Source§impl From<UnixListener> for Listener
impl From<UnixListener> for Listener
Source§fn from(s: UnixListener) -> Self
fn from(s: UnixListener) -> Self
Converts to this type from the input type.
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