#[non_exhaustive]pub struct Capabilities {
pub medium: Medium,
pub max_transmission_unit: usize,
pub checksum: ChecksumCapabilities,
pub tx_headroom: usize,
}Expand description
A description of a device’s capabilities.
This is #[non_exhaustive] so that capabilities can be added later without breaking
every driver. Drivers live outside this crate and so cannot use a struct expression,
they start from Default and overwrite the fields they care about:
let mut caps = Capabilities::default();
caps.max_transmission_unit = 1514;
// caps.medium = Medium::Ethernet; is the defaultFields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.medium: MediumMedium of the device.
max_transmission_unit: usizeMaximum transmission unit.
The network device is unable to send or receive frames larger than the value returned by this function.
checksum: ChecksumCapabilitiesChecksum offload.
Which checksums the device’s hardware verifies or computes, so the stack skips them in software.
tx_headroom: usizeHeadroom the driver needs in front of each frame it transmits, in bytes.
For drivers that put a header of their own in front of the frame. Every
buffer the stack hands to transmit has at least this
much headroom.
Default: 0.
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Source§fn clone(&self) -> Capabilities
fn clone(&self) -> Capabilities
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more