#[non_exhaustive]pub enum RouteAttribute {
Show 24 variants
Metrics(Vec<RouteMetric>),
MfcStats(RouteMfcStats),
MultiPath(Vec<RouteNextHop>),
CacheInfo(RouteCacheInfo),
Destination(RouteAddress),
Source(RouteAddress),
Gateway(RouteAddress),
PrefSource(RouteAddress),
Via(RouteVia),
NewDestination(Vec<MplsLabel>),
Preference(RoutePreference),
EncapType(RouteLwEnCapType),
Encap(Vec<RouteLwTunnelEncap>),
Expires(u32),
MulticastExpires(u64),
Uid(u32),
TtlPropagate(RouteMplsTtlPropagation),
Iif(u32),
Oif(u32),
Priority(u32),
Realm(RouteRealm),
Table(u32),
Mark(u32),
Other(DefaultNla),
}
Expand description
Netlink attributes for RTM_NEWROUTE
, RTM_DELROUTE
,
RTM_GETROUTE
netlink messages.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Metrics(Vec<RouteMetric>)
MfcStats(RouteMfcStats)
MultiPath(Vec<RouteNextHop>)
CacheInfo(RouteCacheInfo)
Destination(RouteAddress)
Source(RouteAddress)
Gateway(RouteAddress)
PrefSource(RouteAddress)
Via(RouteVia)
NewDestination(Vec<MplsLabel>)
Only for MPLS for destination label(u32) to forward the packet with
Preference(RoutePreference)
EncapType(RouteLwEnCapType)
Encap(Vec<RouteLwTunnelEncap>)
Expires(u32)
This is only for non-multicast route
MulticastExpires(u64)
This is only for multicast route
Uid(u32)
TtlPropagate(RouteMplsTtlPropagation)
Iif(u32)
Oif(u32)
Priority(u32)
Realm(RouteRealm)
IPv4 Realm
Table(u32)
Mark(u32)
Other(DefaultNla)
Trait Implementations§
source§impl Clone for RouteAttribute
impl Clone for RouteAttribute
source§fn clone(&self) -> RouteAttribute
fn clone(&self) -> RouteAttribute
Returns a copy 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 RouteAttribute
impl Debug for RouteAttribute
source§impl Nla for RouteAttribute
impl Nla for RouteAttribute
source§impl<'a, T: AsRef<[u8]> + ?Sized> ParseableParametrized<NlaBuffer<&'a T>, (AddressFamily, RouteType, RouteLwEnCapType)> for RouteAttribute
impl<'a, T: AsRef<[u8]> + ?Sized> ParseableParametrized<NlaBuffer<&'a T>, (AddressFamily, RouteType, RouteLwEnCapType)> for RouteAttribute
source§fn parse_with_param(
buf: &NlaBuffer<&'a T>,
(address_family, route_type, encap_type): (AddressFamily, RouteType, RouteLwEnCapType),
) -> Result<Self, DecodeError>
fn parse_with_param( buf: &NlaBuffer<&'a T>, (address_family, route_type, encap_type): (AddressFamily, RouteType, RouteLwEnCapType), ) -> Result<Self, DecodeError>
Deserialize the current type.
source§impl PartialEq for RouteAttribute
impl PartialEq for RouteAttribute
impl Eq for RouteAttribute
impl StructuralPartialEq for RouteAttribute
Auto Trait Implementations§
impl Freeze for RouteAttribute
impl RefUnwindSafe for RouteAttribute
impl Send for RouteAttribute
impl Sync for RouteAttribute
impl Unpin for RouteAttribute
impl UnwindSafe for RouteAttribute
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)