pub enum LinkEvent {
PeerConnected {
peer: PeerId,
caps: Capabilities,
},
PeerDisconnected {
peer: PeerId,
reason: DisconnectReason,
},
ExternalAddressUpdated {
addr: SocketAddr,
},
CapabilityUpdated {
peer: PeerId,
caps: Capabilities,
},
RelayRequest {
from: PeerId,
to: PeerId,
budget_bytes: u64,
},
CoordinationRequest {
peer_a: PeerId,
peer_b: PeerId,
round: u64,
},
BootstrapCacheUpdated {
peer_count: usize,
},
}Expand description
Events emitted by the link transport layer.
These events notify the overlay about significant transport-level changes.
Variants§
PeerConnected
A new peer has connected.
Fields
§
caps: CapabilitiesInitial capabilities (may be updated later).
PeerDisconnected
A peer has disconnected.
ExternalAddressUpdated
Our observed external address has been updated.
Fields
§
addr: SocketAddrThe new external address.
CapabilityUpdated
A peer’s capabilities have been updated.
RelayRequest
A relay request has been received.
Fields
CoordinationRequest
A NAT traversal coordination request has been received.
Fields
BootstrapCacheUpdated
The bootstrap cache has been updated.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinkEvent
impl RefUnwindSafe for LinkEvent
impl Send for LinkEvent
impl Sync for LinkEvent
impl Unpin for LinkEvent
impl UnwindSafe for LinkEvent
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