#[repr(u16)]pub enum AFI {
IPV4 = 1,
IPV6 = 2,
L2VPN = 25,
BGPLS = 16_388,
}
Expand description
Represents an Address Family Identifier. Currently only IPv4 and IPv6 are supported. Currently only IPv4, IPv6, and L2VPN are supported.
Variants§
IPV4 = 1
Internet Protocol version 4 (32 bits)
IPV6 = 2
Internet Protocol version 6 (128 bits)
L2VPN = 25
L2VPN
BGPLS = 16_388
BGPLS
Trait Implementations§
Source§impl Display for AFI
Display AFI in a human-friendly format
impl Display for AFI
Display AFI in a human-friendly format
use bgp_rs::AFI;
let afi = AFI::IPV6;
assert_eq!(&afi.to_string(), "IPv6");
Source§impl TryFrom<u16> for AFI
Convert u16 to AFI
impl TryFrom<u16> for AFI
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);
impl Copy for AFI
impl Eq for AFI
impl StructuralPartialEq for AFI
Auto Trait Implementations§
impl Freeze for AFI
impl RefUnwindSafe for AFI
impl Send for AFI
impl Sync for AFI
impl Unpin for AFI
impl UnwindSafe for AFI
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