Enum TxAcceleration
pub enum TxAcceleration {
ComputeEthernetFcs,
ComputeIpv4Checksum,
ComputeTcpChecksum,
ComputeUdpChecksum,
// some variants omitted
}
Expand description
Available tx acceleration features.
Features are mapped to the TX_ACCEL_*
bits in descriptors by the available
values reported in [Info.tx_accel
].
Variants§
ComputeEthernetFcs
Request that device calculate the Ethernet Frame Check Sequence and write it in place.
ComputeIpv4Checksum
Request that the device calculate the IPv4 checksum and write it in place.
ComputeTcpChecksum
Request that the device calculate the TCP checksum and write it in place.
ComputeUdpChecksum
Request that the device calculate the UDP checksum and write it in place.
Implementations§
§impl TxAcceleration
impl TxAcceleration
pub fn from_primitive(prim: u8) -> Option<TxAcceleration>
pub fn from_primitive_allow_unknown(prim: u8) -> TxAcceleration
pub fn unknown() -> TxAcceleration
pub const fn into_primitive(self) -> u8
pub fn is_unknown(&self) -> bool
Trait Implementations§
§impl Clone for TxAcceleration
impl Clone for TxAcceleration
§fn clone(&self) -> TxAcceleration
fn clone(&self) -> TxAcceleration
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 more§impl Debug for TxAcceleration
impl Debug for TxAcceleration
§impl<D> Decode<TxAcceleration, D> for TxAccelerationwhere
D: ResourceDialect,
impl<D> Decode<TxAcceleration, D> for TxAccelerationwhere
D: ResourceDialect,
§fn new_empty() -> TxAcceleration
fn new_empty() -> TxAcceleration
Creates a valid instance of
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<TxAcceleration, D> for TxAccelerationwhere
D: ResourceDialect,
impl<D> Encode<TxAcceleration, D> for TxAccelerationwhere
D: ResourceDialect,
§impl Hash for TxAcceleration
impl Hash for TxAcceleration
§impl Ord for TxAcceleration
impl Ord for TxAcceleration
§impl PartialEq for TxAcceleration
impl PartialEq for TxAcceleration
§impl PartialOrd for TxAcceleration
impl PartialOrd for TxAcceleration
§impl TypeMarker for TxAcceleration
impl TypeMarker for TxAcceleration
§type Owned = TxAcceleration
type Owned = TxAcceleration
The owned Rust type which this FIDL type decodes into.
§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.
§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.§impl ValueTypeMarker for TxAcceleration
impl ValueTypeMarker for TxAcceleration
§type Borrowed<'a> = TxAcceleration
type Borrowed<'a> = TxAcceleration
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<TxAcceleration as TypeMarker>::Owned,
) -> <TxAcceleration as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<TxAcceleration as TypeMarker>::Owned, ) -> <TxAcceleration as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl Copy for TxAcceleration
impl Eq for TxAcceleration
impl StructuralPartialEq for TxAcceleration
Auto Trait Implementations§
impl Freeze for TxAcceleration
impl RefUnwindSafe for TxAcceleration
impl Send for TxAcceleration
impl Sync for TxAcceleration
impl Unpin for TxAcceleration
impl UnwindSafe for TxAcceleration
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