pub trait FeatureBits:
Flags<Bits = le128>
+ From<F>
+ Into<F>
+ AsRef<F>
+ AsMut<F>
+ Sealed {
// Provided methods
fn requirements_satisfied(&self) -> bool { ... }
fn recommendations_satisfied(&self) -> bool { ... }
}Expand description
Feature Bits
Provided Methods§
Sourcefn requirements_satisfied(&self) -> bool
fn requirements_satisfied(&self) -> bool
Returns true if all internal feature requirements are satisfied.
§Driver Requirements
The driver MUST NOT accept a feature which requires another feature which was not accepted.
§Device Requirements
The device MUST NOT offer a feature which requires another feature which was not offered.
§Examples
use virtio::FeatureBits;
assert!((virtio::net::F::GUEST_TSO4 | virtio::net::F::GUEST_CSUM).requirements_satisfied());
assert!(
(virtio::net::F::GUEST_ECN | virtio::net::F::GUEST_TSO4 | virtio::net::F::GUEST_CSUM)
.requirements_satisfied()
);Sourcefn recommendations_satisfied(&self) -> bool
fn recommendations_satisfied(&self) -> bool
Returns true if all internal feature recommendations are satisfied.
§Driver Requirements
The driver SHOULD NOT accept a feature which recommends another feature which was not accepted.
§Device Requirements
The device SHOULD NOT offer a feature which recommends another feature which was not offered.
§Examples
use virtio::FeatureBits;
assert!((virtio::net::F::HASH_REPORT | virtio::net::F::CTRL_VQ).recommendations_satisfied());Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".