pub enum ExtendedCommunity {
AsSpecific {
typ: u8,
sub_typ: u8,
global_admin: u16,
local_admin: u32,
},
Ipv4AddrSpecific {
typ: u8,
sub_typ: u8,
global_admin: u32,
local_admin: u16,
},
Opaque {
typ: u8,
sub_typ: u8,
value: [u8; 5],
},
RouteTarget {
typ: u8,
sub_typ: u8,
global_admin: u32,
local_admin: u16,
},
RouteOrigin {
typ: u8,
sub_typ: u8,
global_admin: u16,
local_admin: u32,
},
}Variants§
AsSpecific
AS Specific Extended Community as specified in Section 3.1 of RFC4360.
Ipv4AddrSpecific
Ipv4 Address Specific Extended Community as specified in Section 3.2 of RFC4360.
Opaque
Opaque Extended Community as specified in Section 3.3 of RFC4360.
RouteTarget
Route Target Community as specified in Section 4 of RFC4360.
RouteOrigin
Route Origin Community as specified in Section 5 of RFC4360.
Implementations§
Source§impl ExtendedCommunity
impl ExtendedCommunity
pub fn from_wire<'a>( _: &ParserContext, buf: &'a [u8], ) -> IResult<&'a [u8], Self, BgpParserError<&'a [u8]>>
pub fn to_wire(&self, _: &ParserContext, out: &mut BytesMut) -> Result<()>
pub fn wire_len(&self, _: &ParserContext) -> Result<u16>
Trait Implementations§
Source§impl Clone for ExtendedCommunity
impl Clone for ExtendedCommunity
Source§fn clone(&self) -> ExtendedCommunity
fn clone(&self) -> ExtendedCommunity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExtendedCommunity
impl Debug for ExtendedCommunity
Source§impl<'de> Deserialize<'de> for ExtendedCommunity
impl<'de> Deserialize<'de> for ExtendedCommunity
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ExtendedCommunity
Source§impl PartialEq for ExtendedCommunity
impl PartialEq for ExtendedCommunity
Source§fn eq(&self, other: &ExtendedCommunity) -> bool
fn eq(&self, other: &ExtendedCommunity) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ExtendedCommunity
impl Serialize for ExtendedCommunity
impl StructuralPartialEq for ExtendedCommunity
Auto Trait Implementations§
impl Freeze for ExtendedCommunity
impl RefUnwindSafe for ExtendedCommunity
impl Send for ExtendedCommunity
impl Sync for ExtendedCommunity
impl Unpin for ExtendedCommunity
impl UnsafeUnpin for ExtendedCommunity
impl UnwindSafe for ExtendedCommunity
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