#[repr(u8)]pub enum PathAttribute {
Show 13 variants
Origin(OriginPathAttribute),
AsPath(AsPathAttribute),
NextHop(NextHopPathAttribute),
MultiExitDisc(MultiExitDiscPathAttribute),
LocalPref(LocalPrefPathAttribute),
AtomicAggregate(AtomicAggregatePathAttribute),
Aggregator(AggregatorPathAttribute),
Communitites(CommunitiesPathAttribute),
MpReachNlri(MpReachNlriPathAttribute),
MpUnreachNlri(MpUnreachNlriPathAttribute),
ExtendedCommunities(ExtendedCommunitiesPathAttribute),
LargeCommunities(LargeCommunitiesPathAttribute),
UnknownPathAttribute {
flags: PathAttributeFlags,
type_code: u8,
payload: Vec<u8>,
},
}Variants§
Origin(OriginPathAttribute)
AsPath(AsPathAttribute)
NextHop(NextHopPathAttribute)
MultiExitDisc(MultiExitDiscPathAttribute)
LocalPref(LocalPrefPathAttribute)
AtomicAggregate(AtomicAggregatePathAttribute)
Aggregator(AggregatorPathAttribute)
Communitites(CommunitiesPathAttribute)
MpReachNlri(MpReachNlriPathAttribute)
MpUnreachNlri(MpUnreachNlriPathAttribute)
ExtendedCommunities(ExtendedCommunitiesPathAttribute)
LargeCommunities(LargeCommunitiesPathAttribute)
UnknownPathAttribute
Implementations§
Source§impl PathAttribute
impl PathAttribute
Sourcepub fn from_wire<'a>(
ctx: &ParserContext,
buf: &'a [u8],
) -> IResult<&'a [u8], Self, BgpParserError<&'a [u8]>>
pub fn from_wire<'a>( ctx: &ParserContext, buf: &'a [u8], ) -> IResult<&'a [u8], Self, BgpParserError<&'a [u8]>>
The from_wire parser for PathAttribute consumes type and length which it uses to
determine how many bytes to take and pass down to the corresponding sub-parser.
pub fn to_wire(&self, ctx: &ParserContext, out: &mut BytesMut) -> Result<()>
Trait Implementations§
Source§impl Clone for PathAttribute
impl Clone for PathAttribute
Source§fn clone(&self) -> PathAttribute
fn clone(&self) -> PathAttribute
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 PathAttribute
impl Debug for PathAttribute
Source§impl<'de> Deserialize<'de> for PathAttribute
impl<'de> Deserialize<'de> for PathAttribute
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 PathAttribute
Source§impl<'_enum> From<&'_enum PathAttribute> for PathAttributeDiscriminants
impl<'_enum> From<&'_enum PathAttribute> for PathAttributeDiscriminants
Source§fn from(val: &'_enum PathAttribute) -> PathAttributeDiscriminants
fn from(val: &'_enum PathAttribute) -> PathAttributeDiscriminants
Converts to this type from the input type.
Source§impl From<PathAttribute> for PathAttributeDiscriminants
impl From<PathAttribute> for PathAttributeDiscriminants
Source§fn from(val: PathAttribute) -> PathAttributeDiscriminants
fn from(val: PathAttribute) -> PathAttributeDiscriminants
Converts to this type from the input type.
Source§impl IntoDiscriminant for PathAttribute
impl IntoDiscriminant for PathAttribute
Source§type Discriminant = PathAttributeDiscriminants
type Discriminant = PathAttributeDiscriminants
Enum listing the same variants as this enum but without any data fields
fn discriminant(&self) -> Self::Discriminant
Source§impl PartialEq for PathAttribute
impl PartialEq for PathAttribute
Source§fn eq(&self, other: &PathAttribute) -> bool
fn eq(&self, other: &PathAttribute) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PathAttribute
impl Serialize for PathAttribute
impl StructuralPartialEq for PathAttribute
Auto Trait Implementations§
impl Freeze for PathAttribute
impl RefUnwindSafe for PathAttribute
impl Send for PathAttribute
impl Sync for PathAttribute
impl Unpin for PathAttribute
impl UnsafeUnpin for PathAttribute
impl UnwindSafe for PathAttribute
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