pub enum NetworkPeerEvent {
Joined(NetworkPeer),
Left(String),
Updated(NetworkPeer),
AuthRequired {
url: String,
},
}Expand description
Events emitted when network peers change state.
Variants§
Joined(NetworkPeer)
A new peer appeared on the network.
Left(String)
A peer left the network (by stable node ID).
Updated(NetworkPeer)
A peer’s metadata changed (IP, relay, online status, etc.).
AuthRequired
Authentication is required. The URL should be shown to the user.
Emitted during start() — the provider keeps waiting for auth to complete.
May be emitted multiple times if the URL expires and is refreshed.
Trait Implementations§
Source§impl Clone for NetworkPeerEvent
impl Clone for NetworkPeerEvent
Source§fn clone(&self) -> NetworkPeerEvent
fn clone(&self) -> NetworkPeerEvent
Returns a duplicate of the value. Read more
1.0.0 · 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 Freeze for NetworkPeerEvent
impl RefUnwindSafe for NetworkPeerEvent
impl Send for NetworkPeerEvent
impl Sync for NetworkPeerEvent
impl Unpin for NetworkPeerEvent
impl UnsafeUnpin for NetworkPeerEvent
impl UnwindSafe for NetworkPeerEvent
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