Struct fidl_fuchsia_net_stack::ForwardingEntry
source · pub struct ForwardingEntry {
pub subnet: Subnet,
pub device_id: u64,
pub next_hop: Option<Box<IpAddress>>,
pub metric: u32,
}
Expand description
An entry in the forwarding table for the network stack.
Valid if at least one of [device_id
] and [next_hop
] is specified.
Fields§
§subnet: Subnet
The destination subnet this route can be used to send to.
device_id: u64
The opaque identifier of the device to which packets should be forwarded. The zero value is
interpreted as unspecified. If unspecified, [next_hop
] must be set, and will be used by
the server to select an appropriate device.
next_hop: Option<Box<IpAddress>>
The IP address of the next hop. Used for link-layer address resolution, if present.
metric: u32
This entry’s metric.
UNSPECIFIED_METRIC
is interpreted as unspecified.
Trait Implementations§
source§impl Clone for ForwardingEntry
impl Clone for ForwardingEntry
source§fn clone(&self) -> ForwardingEntry
fn clone(&self) -> ForwardingEntry
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 Debug for ForwardingEntry
impl Debug for ForwardingEntry
source§impl Decode<ForwardingEntry> for ForwardingEntry
impl Decode<ForwardingEntry> for ForwardingEntry
source§impl Encode<ForwardingEntry> for &ForwardingEntry
impl Encode<ForwardingEntry> for &ForwardingEntry
source§impl<T0: Encode<Subnet>, T1: Encode<u64>, T2: Encode<OptionalUnion<IpAddress>>, T3: Encode<u32>> Encode<ForwardingEntry> for (T0, T1, T2, T3)
impl<T0: Encode<Subnet>, T1: Encode<u64>, T2: Encode<OptionalUnion<IpAddress>>, T3: Encode<u32>> Encode<ForwardingEntry> for (T0, T1, T2, T3)
source§impl PartialEq<ForwardingEntry> for ForwardingEntry
impl PartialEq<ForwardingEntry> for ForwardingEntry
source§fn eq(&self, other: &ForwardingEntry) -> bool
fn eq(&self, other: &ForwardingEntry) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TypeMarker for ForwardingEntry
impl TypeMarker for ForwardingEntry
§type Owned = ForwardingEntry
type Owned = ForwardingEntry
The owned Rust type which this FIDL type decodes into.
source§fn inline_align(context: Context) -> usize
fn inline_align(context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
source§fn inline_size(context: Context) -> usize
fn inline_size(context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.source§impl ValueTypeMarker for ForwardingEntry
impl ValueTypeMarker for ForwardingEntry
§type Borrowed<'a> = &'a <ForwardingEntry as TypeMarker>::Owned
type Borrowed<'a> = &'a <ForwardingEntry as TypeMarker>::Owned
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read moreimpl Persistable for ForwardingEntry
impl StructuralPartialEq for ForwardingEntry
Auto Trait Implementations§
impl RefUnwindSafe for ForwardingEntry
impl Send for ForwardingEntry
impl Sync for ForwardingEntry
impl Unpin for ForwardingEntry
impl UnwindSafe for ForwardingEntry
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