Enum libp2p_core::nodes::node::NodeEvent
source · pub enum NodeEvent<TMuxer, TUserData>where
TMuxer: StreamMuxer,{
InboundSubstream {
substream: Substream<TMuxer>,
},
OutboundSubstream {
user_data: TUserData,
substream: Substream<TMuxer>,
},
OutboundClosed {
user_data: TUserData,
},
InboundClosed,
}Expand description
Event that can happen on the NodeStream.
Variants
InboundSubstream
Fields
substream: Substream<TMuxer>The newly-opened substream.
A new inbound substream arrived.
OutboundSubstream
Fields
substream: Substream<TMuxer>The newly-opened substream.
An outbound substream has successfully been opened.
OutboundClosed
An outbound substream couldn’t be opened because the muxer is no longer capable of opening more substreams.
InboundClosed
The inbound side of the muxer has been closed. No more inbound substreams will be produced.
Trait Implementations
Auto Trait Implementations
impl<TMuxer, TUserData> RefUnwindSafe for NodeEvent<TMuxer, TUserData>where
TMuxer: RefUnwindSafe,
TUserData: RefUnwindSafe,
<TMuxer as StreamMuxer>::Substream: RefUnwindSafe,
impl<TMuxer, TUserData> Send for NodeEvent<TMuxer, TUserData>where
TMuxer: Send + Sync,
TUserData: Send,
<TMuxer as StreamMuxer>::Substream: Send,
impl<TMuxer, TUserData> Sync for NodeEvent<TMuxer, TUserData>where
TMuxer: Send + Sync,
TUserData: Sync,
<TMuxer as StreamMuxer>::Substream: Sync,
impl<TMuxer, TUserData> Unpin for NodeEvent<TMuxer, TUserData>where
TUserData: Unpin,
<TMuxer as StreamMuxer>::Substream: Unpin,
impl<TMuxer, TUserData> UnwindSafe for NodeEvent<TMuxer, TUserData>where
TMuxer: RefUnwindSafe,
TUserData: UnwindSafe,
<TMuxer as StreamMuxer>::Substream: UnwindSafe,
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