pub struct KernelVersion {
pub major: u32,
pub minor: u32,
pub patch: u32,
}Expand description
Linux kernel version.
Parsed from /proc/version or uname -r.
Fields§
§major: u32Major version (e.g., 5 in 5.15.0)
minor: u32Minor version (e.g., 15 in 5.15.0)
patch: u32Patch version (e.g., 0 in 5.15.0)
Implementations§
Source§impl KernelVersion
impl KernelVersion
Sourcepub fn detect() -> Option<Self>
pub fn detect() -> Option<Self>
Detects the current kernel version.
Returns None on non-Linux platforms or if detection fails.
Sourcepub fn supports_io_uring(&self) -> bool
pub fn supports_io_uring(&self) -> bool
Check if basic io_uring is supported (Linux 5.1+).
Sourcepub fn supports_io_uring_fixed_files(&self) -> bool
pub fn supports_io_uring_fixed_files(&self) -> bool
Check if io_uring with fixed files is supported (Linux 5.1+).
Sourcepub fn supports_io_uring_registered_buffers(&self) -> bool
pub fn supports_io_uring_registered_buffers(&self) -> bool
Check if io_uring with registered buffers is supported (Linux 5.1+).
Sourcepub fn supports_io_uring_sqpoll(&self) -> bool
pub fn supports_io_uring_sqpoll(&self) -> bool
Check if io_uring SQPOLL mode is supported (Linux 5.11+).
SQPOLL uses a dedicated kernel thread to poll the submission queue, eliminating syscalls under load.
Sourcepub fn supports_io_uring_iopoll(&self) -> bool
pub fn supports_io_uring_iopoll(&self) -> bool
Check if io_uring IOPOLL mode is supported for NVMe (Linux 5.19+).
IOPOLL polls completions directly from the NVMe queue without interrupts.
Sourcepub fn supports_io_uring_multishot(&self) -> bool
pub fn supports_io_uring_multishot(&self) -> bool
Check if io_uring multishot operations are supported (Linux 5.19+).
Sourcepub fn supports_io_uring_coop_taskrun(&self) -> bool
pub fn supports_io_uring_coop_taskrun(&self) -> bool
Check if io_uring COOP_TASKRUN is supported (Linux 5.19+).
Sourcepub fn supports_io_uring_single_issuer(&self) -> bool
pub fn supports_io_uring_single_issuer(&self) -> bool
Check if io_uring SINGLE_ISSUER is supported (Linux 6.0+).
Sourcepub fn supports_xdp(&self) -> bool
pub fn supports_xdp(&self) -> bool
Check if XDP is supported (Linux 4.8+).
Sourcepub fn supports_xdp_generic(&self) -> bool
pub fn supports_xdp_generic(&self) -> bool
Check if XDP generic mode (SKB) is supported (Linux 4.12+).
Sourcepub fn supports_xdp_native(&self) -> bool
pub fn supports_xdp_native(&self) -> bool
Check if XDP native mode is widely supported (Linux 5.3+).
Sourcepub fn supports_xdp_cpumap(&self) -> bool
pub fn supports_xdp_cpumap(&self) -> bool
Check if XDP redirect to CPU map is supported (Linux 4.15+).
Sourcepub fn supports_thp(&self) -> bool
pub fn supports_thp(&self) -> bool
Check if transparent huge pages are available (Linux 2.6.38+).
Sourcepub fn supports_madv_hugepage(&self) -> bool
pub fn supports_madv_hugepage(&self) -> bool
Check if madvise MADV_HUGEPAGE is supported (Linux 2.6.38+).
Sourcepub fn supports_cpu_affinity(&self) -> bool
pub fn supports_cpu_affinity(&self) -> bool
Check if CPU affinity syscalls are supported (Linux 2.5.8+).
Sourcepub fn supports_numa_policy(&self) -> bool
pub fn supports_numa_policy(&self) -> bool
Check if NUMA memory policy is supported (Linux 2.6.7+).
Sourcepub const fn minimum_recommended() -> Self
pub const fn minimum_recommended() -> Self
Returns the minimum kernel version for basic LaminarDB operation.
Sourcepub const fn optimal_recommended() -> Self
pub const fn optimal_recommended() -> Self
Returns the recommended kernel version for optimal performance.
Sourcepub fn meets_minimum(&self) -> bool
pub fn meets_minimum(&self) -> bool
Check if this version meets the minimum requirements for LaminarDB.
Sourcepub fn is_optimal(&self) -> bool
pub fn is_optimal(&self) -> bool
Check if this version is optimal for LaminarDB performance.
Trait Implementations§
Source§impl Clone for KernelVersion
impl Clone for KernelVersion
Source§fn clone(&self) -> KernelVersion
fn clone(&self) -> KernelVersion
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for KernelVersion
impl Debug for KernelVersion
Source§impl Display for KernelVersion
impl Display for KernelVersion
Source§impl Hash for KernelVersion
impl Hash for KernelVersion
Source§impl Ord for KernelVersion
impl Ord for KernelVersion
Source§impl PartialEq for KernelVersion
impl PartialEq for KernelVersion
Source§impl PartialOrd for KernelVersion
impl PartialOrd for KernelVersion
impl Copy for KernelVersion
impl Eq for KernelVersion
impl StructuralPartialEq for KernelVersion
Auto Trait Implementations§
impl Freeze for KernelVersion
impl RefUnwindSafe for KernelVersion
impl Send for KernelVersion
impl Sync for KernelVersion
impl Unpin for KernelVersion
impl UnwindSafe for KernelVersion
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.