pub struct Multiaddr { /* private fields */ }
Implementations§
Source§impl Multiaddr
impl Multiaddr
pub fn is_tls(&self) -> bool
pub fn is_http(&self) -> bool
pub fn is_udp(&self) -> bool
pub fn is_quic(&self) -> bool
pub fn socket_addr(&self) -> Result<SocketAddr, Error>
pub fn ip_addr(&self) -> Result<IpAddr, Error>
pub fn port(&self) -> Result<u16, Error>
pub fn host(&self) -> Result<String, Error>
pub fn protocol_name(&self) -> &'static str
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Multiaddr
impl<'de> Deserialize<'de> for Multiaddr
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
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<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.