Struct netstack3_core::routes::Entry
source · pub struct Entry<A: IpAddress, D> {
pub subnet: Subnet<A>,
pub device: D,
pub gateway: Option<SpecifiedAddr<A>>,
pub metric: Metric,
}
Expand description
A forwarding entry.
Entry
is a Subnet
with an egress device and optional gateway.
Fields§
§subnet: Subnet<A>
The matching subnet.
device: D
The destination device.
gateway: Option<SpecifiedAddr<A>>
An optional gateway if the subnet is not on link.
metric: Metric
The metric of the entry.
Implementations§
source§impl<A: IpAddress, D> Entry<A, D>
impl<A: IpAddress, D> Entry<A, D>
sourcepub fn map_device_id<D2>(self, f: impl FnOnce(D) -> D2) -> Entry<A, D2>
pub fn map_device_id<D2>(self, f: impl FnOnce(D) -> D2) -> Entry<A, D2>
Maps the device ID held by this Entry
.
sourcepub fn with_generation(self, generation: Generation) -> EntryAndGeneration<A, D>
pub fn with_generation(self, generation: Generation) -> EntryAndGeneration<A, D>
Sets the generation on an entry.
Trait Implementations§
source§impl<A: IpAddress, D> From<Entry<A, D>> for EntryEither<D>
impl<A: IpAddress, D> From<Entry<A, D>> for EntryEither<D>
source§fn from(entry: Entry<A, D>) -> EntryEither<D>
fn from(entry: Entry<A, D>) -> EntryEither<D>
Converts to this type from the input type.
source§impl<A: PartialEq + IpAddress, D: PartialEq> PartialEq for Entry<A, D>
impl<A: PartialEq + IpAddress, D: PartialEq> PartialEq for Entry<A, D>
impl<A: Copy + IpAddress, D: Copy> Copy for Entry<A, D>
impl<A: Eq + IpAddress, D: Eq> Eq for Entry<A, D>
impl<A: IpAddress, D> StructuralPartialEq for Entry<A, D>
Auto Trait Implementations§
impl<A, D> Freeze for Entry<A, D>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static + Freeze,
D: Freeze,
impl<A, D> RefUnwindSafe for Entry<A, D>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static + RefUnwindSafe,
D: RefUnwindSafe,
impl<A, D> Send for Entry<A, D>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static,
D: Send,
impl<A, D> Sync for Entry<A, D>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static,
D: Sync,
impl<A, D> Unpin for Entry<A, D>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static + Unpin,
D: Unpin,
impl<A, D> UnwindSafe for Entry<A, D>where
A: Sealed + GenericOverIp<Ipv6, Type = Ipv6Addr, Type = Ipv4Addr, Type = A> + GenericOverIp<Ipv4> + GenericOverIp<<A as IpAddress>::Version> + ScopeableAddress + LinkLocalAddress + Send + Sync + Default + Debug + Display + Copy + Clone + Hash + Ord + PartialOrd + PartialEq + Eq + 'static + UnwindSafe,
D: UnwindSafe,
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
source§fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
Handle a timer firing.