pub enum Protocol {
}
Expand description
Represents different transport protocols found in multiaddrs
Variants§
TCP
UDP
DCCP
SCTP
UTP
QUIC
QuicV1
WS
WSS
WebSocket
TLS
Noise
Yamux
MPLEX
HTTP
HTTPS
HTTPPath
P2PCircuit
P2PWebSocket
P2PWebSocketStar
P2PStardust
WebRTC
WebRTCDirect
WebTransport
Certhash
Plaintextv2
Unknown(String, bool)
Unknown protocol with string name and optional port requirement
Implementations§
Source§impl Protocol
impl Protocol
Sourcepub fn word_index(&self) -> usize
pub fn word_index(&self) -> usize
Get word index for this protocol (for quality words)
Sourcepub fn from_word_index(index: usize) -> Option<Self>
pub fn from_word_index(index: usize) -> Option<Self>
Get protocol from word index
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Protocol
impl<'de> Deserialize<'de> for Protocol
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
impl Eq for Protocol
impl StructuralPartialEq for Protocol
Auto Trait Implementations§
impl Freeze for Protocol
impl RefUnwindSafe for Protocol
impl Send for Protocol
impl Sync for Protocol
impl Unpin for Protocol
impl UnwindSafe for Protocol
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