pub struct Routes<'d> { /* private fields */ }Expand description
The stack’s routing table, returned by Stack::routes.
Implementations§
Source§impl<'d> Routes<'d>
impl<'d> Routes<'d>
Sourcepub fn add(&self, route: Route) -> Result<(), Full>
pub fn add(&self, route: Route) -> Result<(), Full>
Add a route to the table.
Errors:
Fullif the table has no room for another route.
Sourcepub fn add_default_ipv4_route(
&self,
gateway: Ipv4Address,
iface: IfaceHandle,
) -> Result<Option<Route>, Full>
pub fn add_default_ipv4_route( &self, gateway: Ipv4Address, iface: IfaceHandle, ) -> Result<Option<Route>, Full>
Set the default IPv4 route, via gateway out of iface.
Replaces the existing default IPv4 route, which is returned.
Sourcepub fn add_default_ipv6_route(
&self,
gateway: Ipv6Address,
iface: IfaceHandle,
) -> Result<Option<Route>, Full>
pub fn add_default_ipv6_route( &self, gateway: Ipv6Address, iface: IfaceHandle, ) -> Result<Option<Route>, Full>
Set the default IPv6 route, via gateway out of iface.
Replaces the existing default IPv6 route, which is returned.
Sourcepub fn get_default_ipv4_route(&self) -> Option<Route>
pub fn get_default_ipv4_route(&self) -> Option<Route>
The default IPv4 route, if there is one.
Sourcepub fn get_default_ipv6_route(&self) -> Option<Route>
pub fn get_default_ipv6_route(&self) -> Option<Route>
The default IPv6 route, if there is one.
Sourcepub fn remove_default_ipv4_route(&self) -> Option<Route>
pub fn remove_default_ipv4_route(&self) -> Option<Route>
Remove the default IPv4 route, returning it.
Sourcepub fn remove_default_ipv6_route(&self) -> Option<Route>
pub fn remove_default_ipv6_route(&self) -> Option<Route>
Remove the default IPv6 route, returning it.
Trait Implementations§
Auto Trait Implementations§
impl<'d> !RefUnwindSafe for Routes<'d>
impl<'d> !Send for Routes<'d>
impl<'d> !Sync for Routes<'d>
impl<'d> !UnwindSafe for Routes<'d>
impl<'d> Freeze for Routes<'d>
impl<'d> Unpin for Routes<'d>
impl<'d> UnsafeUnpin for Routes<'d>
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