Enum bgpkit_parser::community::ExtendedCommunity
source · [−]pub enum ExtendedCommunity {
TransitiveTwoOctetAsSpecific(TwoOctetAsSpecific),
TransitiveIpv4AddressSpecific(Ipv4AddressSpecific),
TransitiveFourOctetAsSpecific(FourOctetAsSpecific),
TransitiveOpaque(Opaque),
NonTransitiveTwoOctetAsSpecific(TwoOctetAsSpecific),
NonTransitiveIpv4AddressSpecific(Ipv4AddressSpecific),
NonTransitiveFourOctetAsSpecific(FourOctetAsSpecific),
NonTransitiveOpaque(Opaque),
Ipv6AddressSpecific(Ipv6AddressSpecific),
Raw([u8; 8]),
}
Expand description
Extended Communities.
It is a 8-octet data that has flexible definition based on the types: https://datatracker.ietf.org/doc/html/rfc4360
For more up-to-date definitions, see IANA’ website.
Each Extended Community is encoded as an 8-octet quantity, as
follows:
- Type Field : 1 or 2 octets
- Value Field : Remaining octets
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type high | Type low(*) | |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Value |
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
(*) Present for Extended types only, used for the Value field
otherwise.
Variants
TransitiveTwoOctetAsSpecific(TwoOctetAsSpecific)
TransitiveIpv4AddressSpecific(Ipv4AddressSpecific)
TransitiveFourOctetAsSpecific(FourOctetAsSpecific)
TransitiveOpaque(Opaque)
NonTransitiveTwoOctetAsSpecific(TwoOctetAsSpecific)
NonTransitiveIpv4AddressSpecific(Ipv4AddressSpecific)
NonTransitiveFourOctetAsSpecific(FourOctetAsSpecific)
NonTransitiveOpaque(Opaque)
Ipv6AddressSpecific(Ipv6AddressSpecific)
Raw([u8; 8])
Trait Implementations
sourceimpl Clone for ExtendedCommunity
impl Clone for ExtendedCommunity
sourcefn clone(&self) -> ExtendedCommunity
fn clone(&self) -> ExtendedCommunity
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ExtendedCommunity
impl Debug for ExtendedCommunity
sourceimpl Display for ExtendedCommunity
impl Display for ExtendedCommunity
sourceimpl PartialEq<ExtendedCommunity> for ExtendedCommunity
impl PartialEq<ExtendedCommunity> for ExtendedCommunity
sourcefn eq(&self, other: &ExtendedCommunity) -> bool
fn eq(&self, other: &ExtendedCommunity) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ExtendedCommunity) -> bool
fn ne(&self, other: &ExtendedCommunity) -> bool
This method tests for !=
.
sourceimpl Serialize for ExtendedCommunity
impl Serialize for ExtendedCommunity
sourcefn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Copy for ExtendedCommunity
impl Eq for ExtendedCommunity
impl StructuralEq for ExtendedCommunity
impl StructuralPartialEq for ExtendedCommunity
Auto Trait Implementations
impl RefUnwindSafe for ExtendedCommunity
impl Send for ExtendedCommunity
impl Sync for ExtendedCommunity
impl Unpin for ExtendedCommunity
impl UnwindSafe for ExtendedCommunity
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more