#[non_exhaustive]pub enum Event<Id> {
NewPeer(PeerId<Id>, Connection),
PeerGone(PeerId<Id>),
UniStream(PeerId<Id>, RecvStream),
BiStream(PeerId<Id>, SendStream, RecvStream),
}Expand description
A network event on the correspondent Socket
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NewPeer(PeerId<Id>, Connection)
Fired when a new peer has connected
PeerGone(PeerId<Id>)
Fired when a peer has disconnected
UniStream(PeerId<Id>, RecvStream)
Fired when a peer opens a new unidirectional stream
BiStream(PeerId<Id>, SendStream, RecvStream)
Fired when a peer opens a new bidirectional stream
Auto Trait Implementations§
impl<Id> Freeze for Event<Id>where
Id: Freeze,
impl<Id> !RefUnwindSafe for Event<Id>
impl<Id> Send for Event<Id>where
Id: Send,
impl<Id> Sync for Event<Id>where
Id: Sync,
impl<Id> Unpin for Event<Id>where
Id: Unpin,
impl<Id> !UnwindSafe for Event<Id>
Blanket Implementations§
Source§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
Source§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
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