Struct litep2p::types::SubstreamId
source · pub struct SubstreamId(/* private fields */);
Expand description
Substream ID.
Implementations§
source§impl SubstreamId
impl SubstreamId
sourcepub fn new() -> Self
pub fn new() -> Self
Create new SubstreamId
.
sourcepub fn from<T: Into<usize>>(value: T) -> Self
pub fn from<T: Into<usize>>(value: T) -> Self
Get SubstreamId
from a number that can be converted into a usize
.
Trait Implementations§
source§impl Clone for SubstreamId
impl Clone for SubstreamId
source§fn clone(&self) -> SubstreamId
fn clone(&self) -> SubstreamId
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 moresource§impl Debug for SubstreamId
impl Debug for SubstreamId
source§impl Default for SubstreamId
impl Default for SubstreamId
source§impl Hash for SubstreamId
impl Hash for SubstreamId
source§impl PartialEq for SubstreamId
impl PartialEq for SubstreamId
source§fn eq(&self, other: &SubstreamId) -> bool
fn eq(&self, other: &SubstreamId) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SubstreamId
impl Eq for SubstreamId
impl StructuralPartialEq for SubstreamId
Auto Trait Implementations§
impl Freeze for SubstreamId
impl RefUnwindSafe for SubstreamId
impl Send for SubstreamId
impl Sync for SubstreamId
impl Unpin for SubstreamId
impl UnwindSafe for SubstreamId
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> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.