pub enum AbstractListener {
Tcp(TcpListener),
Unix(UnixListener),
}Expand description
Like TcpListener
Either a TcpListener
or UnixListener
Instead of calling TcpListener::bind(address), you would call address.bind_any.
Variants§
Tcp(TcpListener)
Unix(UnixListener)
Implementations§
Source§impl AbstractListener
Like TcpListener
impl AbstractListener
Like TcpListener
Either a TcpListener
or an UnixListener
pub fn local_addr(&self) -> Result<AbstractAddr>
pub fn accept(&self) -> Result<(AbstractStream, AbstractAddr)>
Trait Implementations§
Source§impl Into<AbstractListener> for TcpListener
impl Into<AbstractListener> for TcpListener
Source§fn into(self) -> AbstractListener
fn into(self) -> AbstractListener
Converts this type into the (usually inferred) input type.
Source§impl Into<AbstractListener> for UnixListener
impl Into<AbstractListener> for UnixListener
Source§fn into(self) -> AbstractListener
fn into(self) -> AbstractListener
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for AbstractListener
impl RefUnwindSafe for AbstractListener
impl Send for AbstractListener
impl Sync for AbstractListener
impl Unpin for AbstractListener
impl UnwindSafe for AbstractListener
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