[][src]Enum bgp_rs::AFI

#[repr(u16)]pub enum AFI {
    IPV4,
    IPV6,
    L2VPN,
    BGPLS,
}

Represents an Address Family Identifier. Currently only IPv4 and IPv6 are supported. Currently only IPv4, IPv6, and L2VPN are supported.

Variants

IPV4

Internet Protocol version 4 (32 bits)

IPV6

Internet Protocol version 6 (128 bits)

L2VPN

L2VPN

BGPLS

BGPLS

Trait Implementations

impl Clone for AFI[src]

impl Copy for AFI[src]

impl Debug for AFI[src]

impl Display for AFI[src]

Display AFI in a human-friendly format

use bgp_rs::AFI;
let afi = AFI::IPV6;
assert_eq!(&afi.to_string(), "IPv6");

impl Eq for AFI[src]

impl Hash for AFI[src]

impl PartialEq<AFI> for AFI[src]

impl StructuralEq for AFI[src]

impl StructuralPartialEq for AFI[src]

impl TryFrom<u16> for AFI[src]

Convert u16 to AFI

use std::convert::TryFrom;
use bgp_rs::AFI;
let val = 2u16;
let afi = AFI::try_from(val).unwrap();
assert_eq!(afi, AFI::IPV6);

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for AFI

impl Send for AFI

impl Sync for AFI

impl Unpin for AFI

impl UnwindSafe for AFI

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.