[][src]Enum multiaddr::AddrComponent

pub enum AddrComponent {
    IP4(Ipv4Addr),
    TCP(u16),
    UDP(u16),
    DCCP(u16),
    IP6(Ipv6Addr),
    DNS4(String),
    DNS6(String),
    SCTP(u16),
    UDT,
    UTP,
    UNIX(String),
    P2P(Vec<u8>),
    IPFS(Vec<u8>),
    HTTP,
    HTTPS,
    ONION(Vec<u8>),
    QUIC,
    WS,
    WSS,
    Libp2pWebsocketStar,
    Libp2pWebrtcStar,
    Libp2pWebrtcDirect,
    P2pCircuit,
}

Variants

IP4(Ipv4Addr)TCP(u16)UDP(u16)DCCP(u16)IP6(Ipv6Addr)DNS4(String)DNS6(String)SCTP(u16)UDTUTPUNIX(String)P2P(Vec<u8>)IPFS(Vec<u8>)HTTPHTTPSONION(Vec<u8>)QUICWSWSSLibp2pWebsocketStarLibp2pWebrtcStarLibp2pWebrtcDirectP2pCircuit

Methods

impl AddrComponent
[src]

pub fn protocol_id(&self) -> Protocol
[src]

Returns the Protocol corresponding to this AddrComponent.

pub fn from_bytes(input: &[u8]) -> Result<(AddrComponent, &[u8])>
[src]

Builds an AddrComponent from an array that starts with a bytes representation. On success, also returns the rest of the slice.

pub fn write_bytes<W: Write>(self, out: &mut W) -> IoResult<()>
[src]

Turns this address component into bytes by writing it to a Write.

Trait Implementations

impl From<AddrComponent> for Multiaddr
[src]

impl Eq for AddrComponent
[src]

impl PartialEq<AddrComponent> for AddrComponent
[src]

impl Clone for AddrComponent
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for AddrComponent
[src]

impl Display for AddrComponent
[src]

impl FromIterator<AddrComponent> for Multiaddr
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same for T

type Output = T

Should always be Self