Struct netsim::RouteV4
[−]
[src]
pub struct RouteV4 { /* fields omitted */ }
Represents an IPv4 route.
Methods
impl RouteV4
[src]
pub fn new(destination: SubnetV4, gateway: Option<Ipv4Addr>) -> RouteV4
[src]
Create a new route with the given destination and gateway
pub fn destination(&self) -> SubnetV4
[src]
Get the destination subnet of the route.
pub fn gateway(&self) -> Option<Ipv4Addr>
[src]
Get the route's gateway (if any).
pub fn add_to_routing_table(self, iface_name: &str) -> Result<(), AddRouteError>
[src]
Add the route to the routing table of the current network namespace.
Trait Implementations
impl Debug for RouteV4
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for RouteV4
[src]
fn clone(&self) -> RouteV4
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more