pub struct LinkStateAttribute {
pub node_attributes: HashMap<NodeAttributeType, Vec<u8>>,
pub link_attributes: HashMap<LinkAttributeType, Vec<u8>>,
pub prefix_attributes: HashMap<PrefixAttributeType, Vec<u8>>,
pub unknown_attributes: Vec<Tlv>,
}Expand description
BGP Link-State Attributes
Fields§
§node_attributes: HashMap<NodeAttributeType, Vec<u8>>§link_attributes: HashMap<LinkAttributeType, Vec<u8>>§prefix_attributes: HashMap<PrefixAttributeType, Vec<u8>>§unknown_attributes: Vec<Tlv>Implementations§
Source§impl LinkStateAttribute
impl LinkStateAttribute
pub fn new() -> Self
pub fn add_node_attribute( &mut self, attr_type: NodeAttributeType, value: Vec<u8>, )
pub fn add_link_attribute( &mut self, attr_type: LinkAttributeType, value: Vec<u8>, )
pub fn add_prefix_attribute( &mut self, attr_type: PrefixAttributeType, value: Vec<u8>, )
pub fn add_unknown_attribute(&mut self, tlv: Tlv)
pub fn get_node_name(&self) -> Option<String>
pub fn get_link_name(&self) -> Option<String>
pub fn get_node_flags(&self) -> Option<u8>
pub fn get_administrative_group(&self) -> Option<u32>
pub fn get_maximum_link_bandwidth(&self) -> Option<f32>
pub fn get_igp_metric(&self) -> Option<u32>
pub fn get_prefix_metric(&self) -> Option<u32>
Sourcepub fn get_unidirectional_link_delay(&self) -> Option<u32>
pub fn get_unidirectional_link_delay(&self) -> Option<u32>
Get unidirectional link delay in microseconds - RFC 8571
Sourcepub fn get_min_max_unidirectional_link_delay(&self) -> Option<(u32, u32)>
pub fn get_min_max_unidirectional_link_delay(&self) -> Option<(u32, u32)>
Get min/max unidirectional link delay in microseconds - RFC 8571 Returns (min_delay, max_delay)
Sourcepub fn get_unidirectional_delay_variation(&self) -> Option<u32>
pub fn get_unidirectional_delay_variation(&self) -> Option<u32>
Get unidirectional delay variation in microseconds - RFC 8571
Sourcepub fn get_unidirectional_link_loss(&self) -> Option<f32>
pub fn get_unidirectional_link_loss(&self) -> Option<f32>
Get unidirectional link loss percentage - RFC 8571 Returns loss as a percentage (0.000003% to 50.331642%)
Sourcepub fn get_unidirectional_residual_bandwidth(&self) -> Option<f32>
pub fn get_unidirectional_residual_bandwidth(&self) -> Option<f32>
Get unidirectional residual bandwidth in bytes per second - RFC 8571
Sourcepub fn get_unidirectional_available_bandwidth(&self) -> Option<f32>
pub fn get_unidirectional_available_bandwidth(&self) -> Option<f32>
Get unidirectional available bandwidth in bytes per second - RFC 8571
Sourcepub fn get_unidirectional_utilized_bandwidth(&self) -> Option<f32>
pub fn get_unidirectional_utilized_bandwidth(&self) -> Option<f32>
Get unidirectional utilized bandwidth in bytes per second - RFC 8571
Trait Implementations§
Source§impl Clone for LinkStateAttribute
impl Clone for LinkStateAttribute
Source§fn clone(&self) -> LinkStateAttribute
fn clone(&self) -> LinkStateAttribute
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 LinkStateAttribute
impl Debug for LinkStateAttribute
Source§impl Default for LinkStateAttribute
impl Default for LinkStateAttribute
Source§fn default() -> LinkStateAttribute
fn default() -> LinkStateAttribute
Returns the “default value” for a type. Read more
Source§impl PartialEq for LinkStateAttribute
impl PartialEq for LinkStateAttribute
impl Eq for LinkStateAttribute
impl StructuralPartialEq for LinkStateAttribute
Auto Trait Implementations§
impl Freeze for LinkStateAttribute
impl RefUnwindSafe for LinkStateAttribute
impl Send for LinkStateAttribute
impl Sync for LinkStateAttribute
impl Unpin for LinkStateAttribute
impl UnwindSafe for LinkStateAttribute
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