pub enum NetworkEvent<P> {
PeerJoined(P, PeerInfo),
PeerLeft(P),
DhtReady,
}Expand description
Network events that the network will report when subscribing
Variants§
PeerJoined(P, PeerInfo)
A connection to a new peer has been started
PeerLeft(P)
A peer disconnected
DhtReady
DHT is ready (bootstrapped and in server mode) to publish records
Trait Implementations§
Source§impl<P: Clone> Clone for NetworkEvent<P>
impl<P: Clone> Clone for NetworkEvent<P>
Source§fn clone(&self) -> NetworkEvent<P>
fn clone(&self) -> NetworkEvent<P>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<P> Freeze for NetworkEvent<P>where
P: Freeze,
impl<P> RefUnwindSafe for NetworkEvent<P>where
P: RefUnwindSafe,
impl<P> Send for NetworkEvent<P>where
P: Send,
impl<P> Sync for NetworkEvent<P>where
P: Sync,
impl<P> Unpin for NetworkEvent<P>where
P: Unpin,
impl<P> UnsafeUnpin for NetworkEvent<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for NetworkEvent<P>where
P: 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