#[non_exhaustive]pub struct Capabilities {
pub medium: Medium,
pub max_transmission_unit: usize,
pub checksum: ChecksumCapabilities,
}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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
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.
Trait Implementations§
Source§impl Clone for Capabilities
impl Clone for Capabilities
Source§fn clone(&self) -> Capabilities
fn clone(&self) -> Capabilities
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 Capabilities
impl Debug for Capabilities
Auto Trait Implementations§
impl Freeze for Capabilities
impl RefUnwindSafe for Capabilities
impl Send for Capabilities
impl Sync for Capabilities
impl Unpin for Capabilities
impl UnsafeUnpin for Capabilities
impl UnwindSafe for Capabilities
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