Struct swarm_nl::ConnectionId
pub struct ConnectionId(/* private fields */);
Expand description
Connection identifier.
Implementations§
§impl ConnectionId
impl ConnectionId
pub fn new_unchecked(id: usize) -> ConnectionId
pub fn new_unchecked(id: usize) -> ConnectionId
Creates an unchecked ConnectionId
.
Swarm
enforces that ConnectionId
s are unique and not reused.
This constructor does not, hence the unchecked.
It is primarily meant for allowing manual tests of NetworkBehaviour
s.
Trait Implementations§
§impl Clone for ConnectionId
impl Clone for ConnectionId
§fn clone(&self) -> ConnectionId
fn clone(&self) -> ConnectionId
Returns a copy 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 more§impl Debug for ConnectionId
impl Debug for ConnectionId
§impl Display for ConnectionId
impl Display for ConnectionId
§impl Hash for ConnectionId
impl Hash for ConnectionId
§impl Ord for ConnectionId
impl Ord for ConnectionId
§impl PartialEq for ConnectionId
impl PartialEq for ConnectionId
§fn eq(&self, other: &ConnectionId) -> bool
fn eq(&self, other: &ConnectionId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for ConnectionId
impl PartialOrd for ConnectionId
§fn partial_cmp(&self, other: &ConnectionId) -> Option<Ordering>
fn partial_cmp(&self, other: &ConnectionId) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ConnectionId
impl Eq for ConnectionId
impl StructuralPartialEq for ConnectionId
Auto Trait Implementations§
impl Freeze for ConnectionId
impl RefUnwindSafe for ConnectionId
impl Send for ConnectionId
impl Sync for ConnectionId
impl Unpin for ConnectionId
impl UnwindSafe for ConnectionId
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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