pub struct DiscoveryConfig {
pub detect_cpu: bool,
pub detect_memory: bool,
pub detect_gpu: bool,
pub detect_network: bool,
pub detectstorage: bool,
pub cache_results: bool,
pub cache_duration: Duration,
pub detailed_detection: bool,
}Expand description
Resource discovery configuration
Fields§
§detect_cpu: boolEnable CPU detection
detect_memory: boolEnable memory detection
detect_gpu: boolEnable GPU detection
detect_network: boolEnable network detection
detectstorage: boolEnable storage detection
cache_results: boolCache discovery results
cache_duration: DurationCache duration
detailed_detection: boolEnable detailed detection (may be slower)
Implementations§
Source§impl DiscoveryConfig
impl DiscoveryConfig
Sourcepub fn detect_all(self) -> Self
pub fn detect_all(self) -> Self
Enable all detection
Sourcepub fn detect_none(self) -> Self
pub fn detect_none(self) -> Self
Disable all detection
Sourcepub fn detect_essential(self) -> Self
pub fn detect_essential(self) -> Self
Enable only essential detection (CPU and memory)
Sourcepub fn with_cache_duration(self, duration: Duration) -> Self
pub fn with_cache_duration(self, duration: Duration) -> Self
Enable caching with custom duration
Sourcepub fn with_detailed_detection(self, enabled: bool) -> Self
pub fn with_detailed_detection(self, enabled: bool) -> Self
Enable detailed detection
Trait Implementations§
Source§impl Clone for DiscoveryConfig
impl Clone for DiscoveryConfig
Source§fn clone(&self) -> DiscoveryConfig
fn clone(&self) -> DiscoveryConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 DiscoveryConfig
impl Debug for DiscoveryConfig
Auto Trait Implementations§
impl Freeze for DiscoveryConfig
impl RefUnwindSafe for DiscoveryConfig
impl Send for DiscoveryConfig
impl Sync for DiscoveryConfig
impl Unpin for DiscoveryConfig
impl UnwindSafe for DiscoveryConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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