pub enum EitherListener<T, U> {
Tcp(T),
Unix(U),
}Expand description
A listener being either the one or the other listener type.
The variant names Tcp and Unix suggest the intended usage with
tokio::net::TcpListener and tokio::net::UnixListener, but technically
may hold any type implementing Listener.
Variants§
Trait Implementations§
Auto Trait Implementations§
impl<T, U> Freeze for EitherListener<T, U>
impl<T, U> RefUnwindSafe for EitherListener<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for EitherListener<T, U>
impl<T, U> Sync for EitherListener<T, U>
impl<T, U> Unpin for EitherListener<T, U>
impl<T, U> UnwindSafe for EitherListener<T, U>where
T: UnwindSafe,
U: UnwindSafe,
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