Struct rpki_rtr::payload::Ipv4Prefix
source · [−]Expand description
An IPv4 route origin authorisation.
Values of this type authorise the autonomous system given in asn
to
announce routes for the prefixes covered via the three other fields.
Fields
prefix: Ipv4Addr
The IPv4 address of the prefix.
Only the most significant prefix_len
bits are used. All other bits
should be zero.
prefix_len: u8
The prefix length.
The number of bits in prefix
that are used. Obviously, this cannot
be larger than 32.
max_len: u8
The maximum length of an more specific prefix covered.
The value will cover all prefixes that are covered by
prefix
/prefix_len
and have a prefix length of up to this value.
asn: u32
The autonomous system allowed to announce the prefixes.
Trait Implementations
sourceimpl Clone for Ipv4Prefix
impl Clone for Ipv4Prefix
sourcefn clone(&self) -> Ipv4Prefix
fn clone(&self) -> Ipv4Prefix
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 Ipv4Prefix
impl Debug for Ipv4Prefix
sourceimpl Hash for Ipv4Prefix
impl Hash for Ipv4Prefix
sourceimpl Ord for Ipv4Prefix
impl Ord for Ipv4Prefix
sourcefn cmp(&self, other: &Ipv4Prefix) -> Ordering
fn cmp(&self, other: &Ipv4Prefix) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Ipv4Prefix> for Ipv4Prefix
impl PartialEq<Ipv4Prefix> for Ipv4Prefix
sourcefn eq(&self, other: &Ipv4Prefix) -> bool
fn eq(&self, other: &Ipv4Prefix) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourceimpl PartialOrd<Ipv4Prefix> for Ipv4Prefix
impl PartialOrd<Ipv4Prefix> for Ipv4Prefix
sourcefn partial_cmp(&self, other: &Ipv4Prefix) -> Option<Ordering>
fn partial_cmp(&self, other: &Ipv4Prefix) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Ipv4Prefix
impl Eq for Ipv4Prefix
impl StructuralEq for Ipv4Prefix
impl StructuralPartialEq for Ipv4Prefix
Auto Trait Implementations
impl RefUnwindSafe for Ipv4Prefix
impl Send for Ipv4Prefix
impl Sync for Ipv4Prefix
impl Unpin for Ipv4Prefix
impl UnwindSafe for Ipv4Prefix
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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