Enum maddr::Segment
[−]
[src]
pub enum Segment { Dccp(u16), Http, Https, IP4(Ipv4Addr), IP6(Ipv6Addr), Ipfs(MultiHash<Vec<u8>>), Sctp(u16), Tcp(u16), Udp(u16), Udt, Utp, }
The possible multiaddr segments.
Variants
Dccp(u16)
Datagram Congestion Control Protocol, a transport layer protocol. The argument is the port number.
Http
Hypertext Transfer Protocol, an application layer protocol.
Https
Hypertext Transfer Protocol layered on top of Transport Layer Security, an application layer protocol.
IP4(Ipv4Addr)
Internet Protocol version 4, an internet layer protocol. The argument is the IPv4 address.
IP6(Ipv6Addr)
Internet Protocol version 6, an internet layer protocol. The argument is the IPv6 address.
Ipfs(MultiHash<Vec<u8>>)
The InterPlanetary File System, an application layer protocol. The argument is the public hash of an IPFS node.
Sctp(u16)
Stream Control Transmission Protocol, a transport layer protocol. The argument is the port number.
Tcp(u16)
Transmission Control Protocol, a transport layer protocol. The argument is the port number.
Udp(u16)
User Datagram Protocol, a transport layer protocol. The argument is the port number.
Udt
UDP-based Data Transfer Protocol, an application layer protocol.
Utp
Micro Transport Protocol, an application? layer protocol.
Methods
impl Segment
[src]
fn code(&self) -> u64
The code used in the binary representation of this segment.
fn name(&self) -> &'static str
The name used in the string representation of this segment.
Trait Implementations
impl PartialEq for Segment
[src]
fn eq(&self, __arg_0: &Segment) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Segment) -> bool
This method tests for !=
.
impl Eq for Segment
[src]
impl Clone for Segment
[src]
fn clone(&self) -> Segment
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more