pub struct SystemCapabilities {
pub platform: Platform,
pub kernel_version: Option<KernelVersion>,
pub cpu_count: usize,
pub physical_cores: usize,
pub numa_nodes: usize,
pub cache_line_size: usize,
pub cpu_features: CpuFeatures,
pub io_uring: IoUringCapabilities,
pub xdp: XdpCapabilities,
pub storage: StorageInfo,
pub memory: MemoryInfo,
}Expand description
Detected system capabilities.
This struct aggregates all detected hardware and software capabilities
into a single view, making it easy to configure LaminarDB optimally.
Detection is performed lazily and cached for efficiency.
Fields§
§platform: PlatformDetected platform.
kernel_version: Option<KernelVersion>Detected kernel version (Linux/macOS only).
cpu_count: usizeNumber of logical CPUs.
physical_cores: usizeNumber of physical CPU cores.
numa_nodes: usizeNumber of NUMA nodes.
cache_line_size: usizeCache line size in bytes.
cpu_features: CpuFeaturesCPU feature flags.
io_uring: IoUringCapabilitiesio_uring capabilities.
xdp: XdpCapabilitiesXDP capabilities.
storage: StorageInfoStorage information (for data directory).
memory: MemoryInfoMemory information.
Implementations§
Source§impl SystemCapabilities
impl SystemCapabilities
Sourcepub fn detect() -> &'static Self
pub fn detect() -> &'static Self
Detect all system capabilities.
This method is safe to call multiple times - results are cached after the first detection.
Sourcepub fn detect_uncached() -> Self
pub fn detect_uncached() -> Self
Detect capabilities without caching.
Use detect() for normal usage.
Sourcepub fn detect_with_storage<P: AsRef<Path>>(data_path: P) -> Self
pub fn detect_with_storage<P: AsRef<Path>>(data_path: P) -> Self
Detect capabilities with storage detection for a specific path.
Sourcepub fn update_storage<P: AsRef<Path>>(&mut self, data_path: P)
pub fn update_storage<P: AsRef<Path>>(&mut self, data_path: P)
Update storage detection for a new path.
Sourcepub fn recommended_config(&self) -> RecommendedConfig
pub fn recommended_config(&self) -> RecommendedConfig
Get recommended configuration based on detected capabilities.
Sourcepub fn is_fully_optimized(&self) -> bool
pub fn is_fully_optimized(&self) -> bool
Check if all advanced features are available.
Sourcepub fn meets_minimum_requirements(&self) -> bool
pub fn meets_minimum_requirements(&self) -> bool
Check if the system meets minimum requirements for LaminarDB.
Sourcepub fn missing_features(&self) -> Vec<&'static str>
pub fn missing_features(&self) -> Vec<&'static str>
Get a list of missing features that would improve performance.
Sourcepub fn log_summary(&self)
pub fn log_summary(&self)
Log the detected capabilities.
Trait Implementations§
Source§impl Clone for SystemCapabilities
impl Clone for SystemCapabilities
Source§fn clone(&self) -> SystemCapabilities
fn clone(&self) -> SystemCapabilities
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for SystemCapabilities
impl RefUnwindSafe for SystemCapabilities
impl Send for SystemCapabilities
impl Sync for SystemCapabilities
impl Unpin for SystemCapabilities
impl UnsafeUnpin for SystemCapabilities
impl UnwindSafe for SystemCapabilities
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more