#[non_exhaustive]pub enum Event {
AddressBanned {
address: Multiaddr,
},
AddressUnbanned {
address: Multiaddr,
},
AddressBound {
address: Multiaddr,
},
CommandFailed {
command: Command,
reason: Error,
},
LocalIdCreated {
local_id: PeerId,
},
PeerAdded {
peer_id: PeerId,
info: PeerInfo,
},
PeerBanned {
peer_id: PeerId,
},
PeerConnected {
peer_id: PeerId,
info: PeerInfo,
gossip_in: GossipReceiver,
gossip_out: GossipSender,
},
PeerDisconnected {
peer_id: PeerId,
},
PeerRemoved {
peer_id: PeerId,
},
PeerUnbanned {
peer_id: PeerId,
},
}Expand description
Describes the public events produced by the networking layer.
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.
AddressBanned
An address was banned.
AddressUnbanned
An address was unbanned.
AddressBound
An address was bound.
CommandFailed
A command failed.
LocalIdCreated
The local peer id was created.
PeerAdded
A peer was added.
PeerBanned
A peer was banned.
PeerConnected
A peer was connected.
Fields
§
gossip_in: GossipReceiverThe peer’s message recv channel.
§
gossip_out: GossipSenderThe peer’s message send channel.
PeerDisconnected
A peer was disconnected.
PeerRemoved
A peer was removed.
PeerUnbanned
A peer was unbanned.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more