pub enum PathAttribute {
Show 13 variants
Origin(Origin),
AsPath(AsPath),
NextHop(Ipv4Addr),
LocalPref(u32),
Med(u32),
Communities(Vec<u32>),
ExtendedCommunities(Vec<ExtendedCommunity>),
LargeCommunities(Vec<LargeCommunity>),
OriginatorId(Ipv4Addr),
ClusterList(Vec<Ipv4Addr>),
MpReachNlri(MpReachNlri),
MpUnreachNlri(MpUnreachNlri),
Unknown(RawAttribute),
}Expand description
A known path attribute or raw preserved bytes.
Known attributes are decoded into typed variants. Unknown attributes
are preserved as RawAttribute for pass-through with the Partial bit.
Variants§
Origin(Origin)
ORIGIN attribute (type 1).
AsPath(AsPath)
AS_PATH attribute (type 2).
NextHop(Ipv4Addr)
NEXT_HOP attribute (type 3).
LocalPref(u32)
LOCAL_PREF attribute (type 5).
Med(u32)
MULTI_EXIT_DISC attribute (type 4).
Communities(Vec<u32>)
RFC 1997 COMMUNITIES — each u32 is high16=ASN, low16=value.
ExtendedCommunities(Vec<ExtendedCommunity>)
RFC 4360 EXTENDED COMMUNITIES.
LargeCommunities(Vec<LargeCommunity>)
RFC 8092 LARGE COMMUNITIES.
OriginatorId(Ipv4Addr)
RFC 4456 ORIGINATOR_ID — original router-id of the route.
ClusterList(Vec<Ipv4Addr>)
RFC 4456 CLUSTER_LIST — list of cluster-ids traversed.
MpReachNlri(MpReachNlri)
RFC 4760 MP_REACH_NLRI.
MpUnreachNlri(MpUnreachNlri)
RFC 4760 MP_UNREACH_NLRI.
Unknown(RawAttribute)
Unknown or unrecognized attribute, preserved for re-advertisement.
Implementations§
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 · 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 Hash for PathAttribute
impl Hash for PathAttribute
Source§impl PartialEq for PathAttribute
impl PartialEq for PathAttribute
impl Eq 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