Enum sc_network_types::multiaddr::Protocol
source · pub enum Protocol<'a> {
Show 31 variants
Dccp(u16),
Dns(Cow<'a, str>),
Dns4(Cow<'a, str>),
Dns6(Cow<'a, str>),
Dnsaddr(Cow<'a, str>),
Http,
Https,
Ip4(Ipv4Addr),
Ip6(Ipv6Addr),
P2pWebRtcDirect,
P2pWebRtcStar,
WebRTC,
Certhash(Multihash),
P2pWebSocketStar,
Memory(u64),
Onion(Cow<'a, [u8; 10]>, u16),
Onion3(Cow<'a, [u8; 35]>, u16),
P2p(Multihash),
P2pCircuit,
Quic,
QuicV1,
Sctp(u16),
Tcp(u16),
Tls,
Noise,
Udp(u16),
Udt,
Unix(Cow<'a, str>),
Utp,
Ws(Cow<'a, str>),
Wss(Cow<'a, str>),
}
Expand description
Protocol
describes all possible multiaddress protocols.
Variants§
Dccp(u16)
Dns(Cow<'a, str>)
Dns4(Cow<'a, str>)
Dns6(Cow<'a, str>)
Dnsaddr(Cow<'a, str>)
Http
Https
Ip4(Ipv4Addr)
Ip6(Ipv6Addr)
P2pWebRtcDirect
P2pWebRtcStar
WebRTC
Certhash(Multihash)
P2pWebSocketStar
Memory(u64)
Contains the “port” to contact. Similar to TCP or UDP, 0 means “assign me a port”.
Onion(Cow<'a, [u8; 10]>, u16)
Onion3(Cow<'a, [u8; 35]>, u16)
P2p(Multihash)
P2pCircuit
Quic
QuicV1
Sctp(u16)
Tcp(u16)
Tls
Noise
Udp(u16)
Udt
Unix(Cow<'a, str>)
Utp
Ws(Cow<'a, str>)
Wss(Cow<'a, str>)
Trait Implementations§
source§impl<'a> From<Protocol<'a>> for Protocol<'a>
impl<'a> From<Protocol<'a>> for Protocol<'a>
source§fn from(protocol: LibP2pProtocol<'a>) -> Self
fn from(protocol: LibP2pProtocol<'a>) -> Self
Converts to this type from the input type.
source§impl<'a> From<Protocol<'a>> for Protocol<'a>
impl<'a> From<Protocol<'a>> for Protocol<'a>
source§fn from(protocol: LiteP2pProtocol<'a>) -> Self
fn from(protocol: LiteP2pProtocol<'a>) -> Self
Converts to this type from the input type.
source§impl<'a> FromIterator<Protocol<'a>> for Multiaddr
impl<'a> FromIterator<Protocol<'a>> for Multiaddr
source§impl<'a> PartialEq for Protocol<'a>
impl<'a> PartialEq for Protocol<'a>
impl<'a> Eq for Protocol<'a>
impl<'a> StructuralPartialEq for Protocol<'a>
Auto Trait Implementations§
impl<'a> Freeze for Protocol<'a>
impl<'a> RefUnwindSafe for Protocol<'a>
impl<'a> Send for Protocol<'a>
impl<'a> Sync for Protocol<'a>
impl<'a> Unpin for Protocol<'a>
impl<'a> UnwindSafe for Protocol<'a>
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§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.