pub struct Route {
pub cidr: IpCidr,
pub via_router: IpAddress,
pub preferred_until: Option<Instant>,
pub expires_at: Option<Instant>,
}
Expand description
A prefix of addresses that should be routed via a router
Fields§
§cidr: IpCidr
§via_router: IpAddress
§preferred_until: Option<Instant>
None
means “forever”.
expires_at: Option<Instant>
None
means “forever”.
Implementations§
Source§impl Route
impl Route
Sourcepub fn new_ipv4_gateway(gateway: Ipv4Address) -> Route
pub fn new_ipv4_gateway(gateway: Ipv4Address) -> Route
Returns a route to 0.0.0.0/0 via the gateway
, with no expiry.
Trait Implementations§
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§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)