Enum sc_peerset::Message
source · pub enum Message {
Connect {
set_id: SetId,
peer_id: PeerId,
},
Drop {
set_id: SetId,
peer_id: PeerId,
},
Accept(IncomingIndex),
Reject(IncomingIndex),
}
Expand description
Message that can be sent by the peer set manager (PSM).
Variants§
Connect
Request to open a connection to the given peer. From the point of view of the PSM, we are immediately connected.
Drop
Drop the connection to the given peer, or cancel the connection attempt after a Connect
.
Accept(IncomingIndex)
Equivalent to Connect
for the peer corresponding to this incoming index.
Reject(IncomingIndex)
Equivalent to Drop
for the peer corresponding to this incoming index.
Trait Implementations§
source§impl PartialEq for Message
impl PartialEq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnwindSafe for Message
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