pub enum Protocol {
}Expand description
A protocol segment used to build layered network addresses.
Each variant represents a well-known protocol at different layers (L2–L7),
or a custom protocol. All variants are rendered as /<name>/<value> strings.
Variants§
Mac(MacAddr)
MAC address (layer 2)
Ip4(Ipv4Addr)
IPv4 address (layer 3)
Ip6(Ipv6Addr)
IPv6 address (layer 3)
Dns(String)
DNS (unspecified family)
Dns4(String)
DNS (IPv4)
Dns6(String)
DNS (IPv6)
Tcp(u16)
TCP port (layer 4)
Udp(u16)
UDP port (layer 4)
Tls
TLS (over TCP)
Quic
QUIC (over UDP)
Http
HTTP protocol
Https
HTTPS (alias for /tls/http)
Ws(u16)
WebSocket (with port)
Wss(u16)
Secure WebSocket (with port)
WebTransport(u16)
WebTransport (over QUIC or HTTP/3)
WebRTC
WebRTC
Onion(String)
Tor Onion address (v2 or v3)
Custom(String)
Arbitrary custom protocol
Trait Implementations§
Source§impl Ord for Protocol
impl Ord for Protocol
Source§impl PartialOrd for Protocol
impl PartialOrd for Protocol
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