pub struct StaticRoute { /* private fields */ }Expand description
A static route’s destination and next-hop address.
Implementations§
Source§impl StaticRoute
impl StaticRoute
Sourcepub fn new(
destination: IpPrefix,
next_hop: IpAddr,
) -> Result<Self, StaticRouteError>
pub fn new( destination: IpPrefix, next_hop: IpAddr, ) -> Result<Self, StaticRouteError>
Creates a route, requiring destination and next hop to use the same IP family.
Sourcepub const fn destination(self) -> IpPrefix
pub const fn destination(self) -> IpPrefix
Returns the route destination.
Trait Implementations§
Source§impl Clone for StaticRoute
impl Clone for StaticRoute
impl Copy for StaticRoute
Source§impl Debug for StaticRoute
impl Debug for StaticRoute
impl Eq for StaticRoute
Source§impl Hash for StaticRoute
impl Hash for StaticRoute
Source§impl PartialEq for StaticRoute
impl PartialEq for StaticRoute
impl StructuralPartialEq for StaticRoute
Auto Trait Implementations§
impl Freeze for StaticRoute
impl RefUnwindSafe for StaticRoute
impl Send for StaticRoute
impl Sync for StaticRoute
impl Unpin for StaticRoute
impl UnsafeUnpin for StaticRoute
impl UnwindSafe for StaticRoute
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