pub struct Ipv4Route {
pub interface: Option<String>,
pub source: Option<Ipv4Addr>,
pub gateway: Option<Ipv4Addr>,
pub is_local: bool,
pub prefix_len: u8,
pub metric: u32,
}Expand description
Routing information for an IPv4 destination.
Fields§
§interface: Option<String>The outgoing interface name.
source: Option<Ipv4Addr>The source IP address to use.
gateway: Option<Ipv4Addr>The next-hop gateway IP (if not on local network).
is_local: boolWhether the destination is on the local network.
prefix_len: u8The network mask (prefix length).
metric: u32Route metric (lower is better).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Ipv4Route
impl RefUnwindSafe for Ipv4Route
impl Send for Ipv4Route
impl Sync for Ipv4Route
impl Unpin for Ipv4Route
impl UnsafeUnpin for Ipv4Route
impl UnwindSafe for Ipv4Route
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