pub struct RouteTarget<I: Ip> {
pub outbound_interface: u64,
pub next_hop: Option<SpecifiedAddr<I::Addr>>,
}
Expand description
A target of a route, abstracting over fnet_routes::RouteTargetV4
and
fnet_routes::RouteTargetV6
.
The next_hop
address is required to be unicast. IPv4 addresses can only be
determined to be unicast within the broader context of a subnet, hence they
are only guaranteed to be specified in this context. IPv6 addresses,
however, will be confirmed to be unicast.
Fields§
§outbound_interface: u64
The outbound_interface to use when forwarding packets.
next_hop: Option<SpecifiedAddr<I::Addr>>
The next-hop IP address of the route.
Trait Implementations§
Source§impl<I: Clone + Ip> Clone for RouteTarget<I>
impl<I: Clone + Ip> Clone for RouteTarget<I>
Source§fn clone(&self) -> RouteTarget<I>
fn clone(&self) -> RouteTarget<I>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl From<RouteTarget<Ipv4>> for RouteTargetV4
impl From<RouteTarget<Ipv4>> for RouteTargetV4
Source§fn from(target: RouteTarget<Ipv4>) -> RouteTargetV4
fn from(target: RouteTarget<Ipv4>) -> RouteTargetV4
Converts to this type from the input type.
Source§impl From<RouteTarget<Ipv6>> for RouteTargetV6
impl From<RouteTarget<Ipv6>> for RouteTargetV6
Source§fn from(target: RouteTarget<Ipv6>) -> RouteTargetV6
fn from(target: RouteTarget<Ipv6>) -> RouteTargetV6
Converts to this type from the input type.
Source§impl<I: Ord + Ip> Ord for RouteTarget<I>
impl<I: Ord + Ip> Ord for RouteTarget<I>
Source§fn cmp(&self, other: &RouteTarget<I>) -> Ordering
fn cmp(&self, other: &RouteTarget<I>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<I: PartialOrd + Ip> PartialOrd for RouteTarget<I>where
I::Addr: PartialOrd,
impl<I: PartialOrd + Ip> PartialOrd for RouteTarget<I>where
I::Addr: PartialOrd,
Source§impl TryFrom<RouteTargetV4> for RouteTarget<Ipv4>
impl TryFrom<RouteTargetV4> for RouteTarget<Ipv4>
Source§type Error = FidlConversionError<NeverMissingFields>
type Error = FidlConversionError<NeverMissingFields>
The type returned in the event of a conversion error.
Source§impl TryFrom<RouteTargetV6> for RouteTarget<Ipv6>
impl TryFrom<RouteTargetV6> for RouteTarget<Ipv6>
Source§type Error = FidlConversionError<NeverMissingFields>
type Error = FidlConversionError<NeverMissingFields>
The type returned in the event of a conversion error.
impl<I: Copy + Ip> Copy for RouteTarget<I>
impl<I: Eq + Ip> Eq for RouteTarget<I>
impl<I: Ip> StructuralPartialEq for RouteTarget<I>
Auto Trait Implementations§
impl<I> Freeze for RouteTarget<I>
impl<I> RefUnwindSafe for RouteTarget<I>
impl<I> Send for RouteTarget<I>
impl<I> Sync for RouteTarget<I>
impl<I> Unpin for RouteTarget<I>
impl<I> UnwindSafe for RouteTarget<I>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§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
)Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§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>
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
Source§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.