pub struct RouteEntry {
pub family: RouteFamily,
pub destination: RouteDestination,
pub gateway: Option<IpAddr>,
pub on_link: bool,
pub ifindex: Option<u32>,
pub ifname: Option<String>,
pub metric: Option<u32>,
pub flags: Vec<RouteFlag>,
pub protocol: Option<RouteProtocol>,
pub scope: Option<RouteScope>,
pub table: Option<u32>,
pub lifetime_ms: Option<u64>,
}Expand description
A single entry from the operating system routing table.
Fields§
§family: RouteFamilyIP protocol family (IPv4 or IPv6).
destination: RouteDestinationDestination network.
gateway: Option<IpAddr>Gateway IP address if the route is not on-link.
on_link: boolWhether the next hop resides on the local link.
ifindex: Option<u32>Interface index associated with the route.
ifname: Option<String>Human readable interface name, when available.
metric: Option<u32>Routing metric provided by the OS.
flags: Vec<RouteFlag>Flags describing additional route characteristics.
protocol: Option<RouteProtocol>Routing protocol that installed the route.
scope: Option<RouteScope>Visibility scope of the route.
table: Option<u32>Routing table identifier (platform specific).
lifetime_ms: Option<u64>Remaining lifetime of the route in milliseconds, if available.
Trait Implementations§
Source§impl Clone for RouteEntry
impl Clone for RouteEntry
Source§fn clone(&self) -> RouteEntry
fn clone(&self) -> RouteEntry
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 moreAuto Trait Implementations§
impl Freeze for RouteEntry
impl RefUnwindSafe for RouteEntry
impl Send for RouteEntry
impl Sync for RouteEntry
impl Unpin for RouteEntry
impl UnwindSafe for RouteEntry
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