pub struct RingVersion(/* private fields */);Expand description
An IORING_VERSION value.
Wraps the raw value rather than a closed Rust enum, because the running
system can report a version this crate does not yet name: a spike found
QueryIoRingCapabilities reporting MaxVersion = 400 on a machine current
as of this writing, while windows-sys 0.61.2 only names up to
RingVersion::V3 (IORING_VERSION_3 = 300). Hardcoding the highest
named version as a hard ceiling would silently cap this crate the moment
a newer system shipped, rather than only until the next windows-sys
bump.
Implementations§
Source§impl RingVersion
impl RingVersion
Sourcepub const V1: RingVersion
pub const V1: RingVersion
IORING_VERSION_1.
Sourcepub const V2: RingVersion
pub const V2: RingVersion
IORING_VERSION_2.
Sourcepub const V3: RingVersion
pub const V3: RingVersion
IORING_VERSION_3.
Sourcepub const HIGHEST_KNOWN: RingVersion = Self::V3
pub const HIGHEST_KNOWN: RingVersion = Self::V3
The highest version this crate can name. IoRing::new
negotiates down to min(HIGHEST_KNOWN, capabilities()?.max_version)
rather than assuming this is what the running system supports.
Sourcepub fn from_raw(value: i32) -> Self
pub fn from_raw(value: i32) -> Self
Wrap a raw IORING_VERSION value, for example one reported by
Capabilities::max_version that this crate does not name.