pub struct ResourceDiscovery { /* private fields */ }
Expand description
Resource discovery manager with caching
Implementations§
Source§impl ResourceDiscovery
impl ResourceDiscovery
Sourcepub fn new(config: DiscoveryConfig) -> Self
pub fn new(config: DiscoveryConfig) -> Self
Create a new resource discovery manager
Source§impl ResourceDiscovery
impl ResourceDiscovery
Sourcepub fn discover(&self) -> CoreResult<SystemResources>
pub fn discover(&self) -> CoreResult<SystemResources>
Discover system resources with caching
Sourcepub fn discover_fresh(&self) -> CoreResult<SystemResources>
pub fn discover_fresh(&self) -> CoreResult<SystemResources>
Force fresh discovery without cache
Sourcepub fn clear_cache(&self) -> CoreResult<()>
pub fn clear_cache(&self) -> CoreResult<()>
Clear cache
Sourcepub fn cache_status(&self) -> CoreResult<Option<Duration>>
pub fn cache_status(&self) -> CoreResult<Option<Duration>>
Get cache status
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ResourceDiscovery
impl RefUnwindSafe for ResourceDiscovery
impl Send for ResourceDiscovery
impl Sync for ResourceDiscovery
impl Unpin for ResourceDiscovery
impl UnwindSafe for ResourceDiscovery
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> 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