pub struct Multiaddr { /* private fields */ }
Implementations§
Source§impl Multiaddr
impl Multiaddr
pub fn empty() -> Self
pub fn with_capacity(n: usize) -> Self
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn to_vec(&self) -> Vec<u8> ⓘ
pub fn push(&mut self, p: Protocol<'_>)
pub fn pop<'a>(&mut self) -> Option<Protocol<'a>>
pub fn with(self, p: Protocol<'_>) -> Self
pub fn with_peer(self, peer: PeerId) -> Result<Self, Self>
pub fn iter(&self) -> Iter<'_> ⓘ
pub fn replace<'a, F>(&self, at: usize, by: F) -> Option<Multiaddr>
pub fn ends_with(&self, other: &Multiaddr) -> bool
pub fn starts_with(&self, other: &Multiaddr) -> bool
pub fn protocol_stack(&self) -> ProtoStackIter<'_> ⓘ
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Multiaddr
impl<'de> Deserialize<'de> for Multiaddr
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> FromIterator<Protocol<'a>> for Multiaddr
impl<'a> FromIterator<Protocol<'a>> for Multiaddr
Source§impl<'a> IntoIterator for &'a Multiaddr
impl<'a> IntoIterator for &'a Multiaddr
Source§impl Ord for Multiaddr
impl Ord for Multiaddr
Source§impl PartialOrd for Multiaddr
impl PartialOrd for Multiaddr
impl Eq for Multiaddr
impl StructuralPartialEq for Multiaddr
Auto Trait Implementations§
impl !Freeze for Multiaddr
impl RefUnwindSafe for Multiaddr
impl Send for Multiaddr
impl Sync for Multiaddr
impl Unpin for Multiaddr
impl UnwindSafe for Multiaddr
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: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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