pub struct DMSCDeviceDiscovery { /* private fields */ }Expand description
Main device discovery engine
Implementations§
Source§impl DMSCDeviceDiscovery
impl DMSCDeviceDiscovery
Sourcepub async fn new(config: DiscoveryConfig) -> DMSCResult<Self>
pub async fn new(config: DiscoveryConfig) -> DMSCResult<Self>
Creates a new device discovery engine
Sourcepub async fn with_defaults() -> DMSCResult<Self>
pub async fn with_defaults() -> DMSCResult<Self>
Creates a discovery engine with default configuration
Sourcepub async fn discover_all(&self) -> DMSCResult<Vec<DMSCDevice>>
pub async fn discover_all(&self) -> DMSCResult<Vec<DMSCDevice>>
Discovers all enabled device categories
Sourcepub async fn discover_category(
&self,
category: HardwareCategory,
) -> DMSCResult<Vec<DMSCDevice>>
pub async fn discover_category( &self, category: HardwareCategory, ) -> DMSCResult<Vec<DMSCDevice>>
Discovers devices of a specific category
Sourcepub async fn discover_with_plugins(&self) -> DMSCResult<Vec<DMSCDevice>>
pub async fn discover_with_plugins(&self) -> DMSCResult<Vec<DMSCDevice>>
Discovers devices using registered plugins
Sourcepub async fn discover_cpus(&self) -> DMSCResult<Vec<DMSCDevice>>
pub async fn discover_cpus(&self) -> DMSCResult<Vec<DMSCDevice>>
Discovers CPU devices
Sourcepub async fn discover_memory(&self) -> DMSCResult<Vec<DMSCDevice>>
pub async fn discover_memory(&self) -> DMSCResult<Vec<DMSCDevice>>
Discovers memory devices
Sourcepub async fn discover_storage(&self) -> DMSCResult<Vec<DMSCDevice>>
pub async fn discover_storage(&self) -> DMSCResult<Vec<DMSCDevice>>
Discovers storage devices
Sourcepub async fn discover_network(&self) -> DMSCResult<Vec<DMSCDevice>>
pub async fn discover_network(&self) -> DMSCResult<Vec<DMSCDevice>>
Discovers network devices
Sourcepub async fn discover_gpus(&self) -> DMSCResult<Vec<DMSCDevice>>
pub async fn discover_gpus(&self) -> DMSCResult<Vec<DMSCDevice>>
Discovers GPU devices
Sourcepub async fn discover_usb(&self) -> DMSCResult<Vec<DMSCDevice>>
pub async fn discover_usb(&self) -> DMSCResult<Vec<DMSCDevice>>
Discovers USB devices
Sourcepub fn platform_info(&self) -> &PlatformInfo
pub fn platform_info(&self) -> &PlatformInfo
Returns platform information
Sourcepub async fn stats(&self) -> DiscoveryStats
pub async fn stats(&self) -> DiscoveryStats
Returns discovery statistics
Sourcepub async fn get_discovered_devices(&self) -> Vec<DMSCDevice>
pub async fn get_discovered_devices(&self) -> Vec<DMSCDevice>
Returns all discovered devices
Sourcepub async fn get_device(&self, id: &str) -> Option<DMSCDevice>
pub async fn get_device(&self, id: &str) -> Option<DMSCDevice>
Returns a device by ID
Sourcepub async fn clear_cache(&self)
pub async fn clear_cache(&self)
Clears all discovered devices
Sourcepub async fn register_provider<P: DMSCHardwareProvider + 'static>(
&self,
provider: P,
)
pub async fn register_provider<P: DMSCHardwareProvider + 'static>( &self, provider: P, )
Registers a custom hardware provider
Sourcepub async fn register_plugin(
&mut self,
plugin: Box<dyn DMSCHardwareDiscoveryPlugin>,
)
pub async fn register_plugin( &mut self, plugin: Box<dyn DMSCHardwareDiscoveryPlugin>, )
Registers a custom discovery plugin
Sourcepub async fn enable_plugin(&self, name: &str)
pub async fn enable_plugin(&self, name: &str)
Enables a plugin by name
Sourcepub async fn disable_plugin(&self, name: &str)
pub async fn disable_plugin(&self, name: &str)
Disables a plugin by name
Sourcepub async fn provider_count(&self) -> usize
pub async fn provider_count(&self) -> usize
Returns the number of registered providers
Sourcepub async fn plugin_count(&self) -> usize
pub async fn plugin_count(&self) -> usize
Returns the number of registered plugins
Sourcepub fn platform_compatibility(&self) -> PlatformCompatibility
pub fn platform_compatibility(&self) -> PlatformCompatibility
Returns platform compatibility information
Trait Implementations§
Source§impl Clone for DMSCDeviceDiscovery
impl Clone for DMSCDeviceDiscovery
Source§fn clone(&self) -> DMSCDeviceDiscovery
fn clone(&self) -> DMSCDeviceDiscovery
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 DMSCDeviceDiscovery
impl !RefUnwindSafe for DMSCDeviceDiscovery
impl Send for DMSCDeviceDiscovery
impl Sync for DMSCDeviceDiscovery
impl Unpin for DMSCDeviceDiscovery
impl !UnwindSafe for DMSCDeviceDiscovery
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request