Struct fidl_fuchsia_net_routes_ext::RouteTarget
source · 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: PartialEq + Ip> PartialEq for RouteTarget<I>
impl<I: PartialEq + Ip> PartialEq for RouteTarget<I>
source§fn eq(&self, other: &RouteTarget<I>) -> bool
fn eq(&self, other: &RouteTarget<I>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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§fn partial_cmp(&self, other: &RouteTarget<I>) -> Option<Ordering>
fn partial_cmp(&self, other: &RouteTarget<I>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<RouteTargetV4> for RouteTarget<Ipv4>
impl TryFrom<RouteTargetV4> for RouteTarget<Ipv4>
§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>
§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> Encode<Ambiguous1> for T
impl<T> Encode<Ambiguous1> for T
source§impl<T> Encode<Ambiguous2> for T
impl<T> Encode<Ambiguous2> for T
§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.