Enum libp2p_tcp::TcpListenerEvent
source · [−]pub enum TcpListenerEvent<S> {
NewAddress(Multiaddr),
Upgrade {
upgrade: Ready<Result<S, Error>>,
local_addr: Multiaddr,
remote_addr: Multiaddr,
},
AddressExpired(Multiaddr),
Error(Error),
}
Expand description
Event produced by a TcpListenStream
.
Variants
NewAddress(Multiaddr)
The listener is listening on a new additional [Multiaddr
].
Upgrade
Fields
An upgrade, consisting of the upgrade future, the listener address and the remote address.
AddressExpired(Multiaddr)
A [Multiaddr
] is no longer used for listening.
Error(Error)
A non-fatal error has happened on the listener.
This event should be generated in order to notify the user that something wrong has happened. The listener, however, continues to run.
Trait Implementations
Auto Trait Implementations
impl<S> !RefUnwindSafe for TcpListenerEvent<S>
impl<S> Send for TcpListenerEvent<S>where
S: Send,
impl<S> Sync for TcpListenerEvent<S>where
S: Sync,
impl<S> Unpin for TcpListenerEvent<S>
impl<S> !UnwindSafe for TcpListenerEvent<S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more