pub enum LabeledNlriMode {
SingleLabel,
MultiLabel,
}Expand description
RFC 8277 parsing mode for labeled NLRI
RFC 8277 defines two distinct encoding modes that are NOT compatible on the wire:
-
SingleLabel (§2.2): No Multiple Labels Capability negotiated. Exactly one label, S-bit MUST be ignored on reception.
-
MultiLabel (§2.3): Multiple Labels Capability negotiated. Multiple labels allowed, use BoS bit to delimit stack.
Variants§
SingleLabel
RFC 8277 §2.2: Single-label encoding (no Multiple Labels Capability negotiated). In this mode, exactly one label is expected and the S-bit is ignored. Note: Using this mode with multi-label data will result in parse errors.
MultiLabel
RFC 8277 §2.3: Multi-label encoding (Multiple Labels Capability negotiated). This is the default as it correctly handles both single-label and multi-label prefixes.
Trait Implementations§
Source§impl Clone for LabeledNlriMode
impl Clone for LabeledNlriMode
Source§fn clone(&self) -> LabeledNlriMode
fn clone(&self) -> LabeledNlriMode
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 LabeledNlriMode
impl Debug for LabeledNlriMode
Source§impl Default for LabeledNlriMode
impl Default for LabeledNlriMode
Source§fn default() -> LabeledNlriMode
fn default() -> LabeledNlriMode
Returns the “default value” for a type. Read more
Source§impl PartialEq for LabeledNlriMode
impl PartialEq for LabeledNlriMode
Source§fn eq(&self, other: &LabeledNlriMode) -> bool
fn eq(&self, other: &LabeledNlriMode) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for LabeledNlriMode
impl Eq for LabeledNlriMode
impl StructuralPartialEq for LabeledNlriMode
Auto Trait Implementations§
impl Freeze for LabeledNlriMode
impl RefUnwindSafe for LabeledNlriMode
impl Send for LabeledNlriMode
impl Sync for LabeledNlriMode
impl Unpin for LabeledNlriMode
impl UnsafeUnpin for LabeledNlriMode
impl UnwindSafe for LabeledNlriMode
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more