pub struct Route {
pub dst: RouteDst,
pub gateway: Option<IpAddr>,
pub oif: Option<String>,
pub metric: Option<u32>,
pub table: u32,
pub protocol: String,
pub scope: RouteScope,
pub prefsrc: Option<IpAddr>,
pub flags: Vec<String>,
}Expand description
A kernel routing table entry.
Fields§
§dst: RouteDstDestination prefix or Default for the default route.
gateway: Option<IpAddr>Next-hop gateway IP, when present.
oif: Option<String>Output interface name, when known.
metric: Option<u32>Route metric (lower = preferred among equal destinations).
table: u32Routing table number (254 = main).
protocol: StringProtocol that installed this route (e.g. "dhcp", "kernel").
scope: RouteScope§prefsrc: Option<IpAddr>Preferred source address for packets using this route.
flags: Vec<String>Route flags as strings (e.g. "onlink").
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Route
impl<'de> Deserialize<'de> for Route
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Route
impl StructuralPartialEq for Route
Auto Trait Implementations§
impl Freeze for Route
impl RefUnwindSafe for Route
impl Send for Route
impl Sync for Route
impl Unpin for Route
impl UnsafeUnpin for Route
impl UnwindSafe for Route
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