pub struct Route {
pub destination: IpAddr,
pub prefix: u8,
pub gateway: IpAddr,
pub ifindex: Option<u32>,
pub metric: Option<u32>,
pub luid: Option<u64>,
pub version: u8,
}
Expand description
Routing data structure, including destination address, gateway and other information
Fields§
§destination: IpAddr
Network address of the destination. 0.0.0.0
with a prefix of 0
is considered a default route.
prefix: u8
Prefix for the destination IP address of this route.
gateway: IpAddr
The address of the next hop
ifindex: Option<u32>
The local index value for the network interface associated with this IP route entry.
metric: Option<u32>
The route metric offset value for this IP route entry.
luid: Option<u64>
The locally unique identifier (LUID) for the network interface associated with this IP route entry.
version: u8
The IP version number, the value is 4 or 6
Implementations§
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 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