pub struct CapabilityProfile {
pub cpu_capabilities: CpuCapabilities,
pub gpu_capabilities: GpuCapabilities,
pub memory_capabilities: MemoryCapabilities,
pub storage_capabilities: StorageCapabilities,
pub network_capabilities: NetworkCapabilities,
pub scores: CapabilityScores,
pub metadata: CapabilityMetadata,
}Expand description
Comprehensive capability profile for a system
Fields§
§cpu_capabilities: CpuCapabilitiesCPU capabilities
gpu_capabilities: GpuCapabilitiesGPU capabilities
memory_capabilities: MemoryCapabilitiesMemory capabilities
storage_capabilities: StorageCapabilitiesStorage capabilities
network_capabilities: NetworkCapabilitiesNetwork capabilities
scores: CapabilityScoresOverall capability scores
metadata: CapabilityMetadataCapability metadata
Implementations§
Source§impl CapabilityProfile
impl CapabilityProfile
Sourcepub fn from_system_info(system_info: &SystemInfo) -> Self
pub fn from_system_info(system_info: &SystemInfo) -> Self
Create a capability profile from system information
Sourcepub fn get_capability_level(
&self,
resource_type: &ResourceType,
) -> CapabilityLevel
pub fn get_capability_level( &self, resource_type: &ResourceType, ) -> CapabilityLevel
Get capability level for a specific resource type
Sourcepub fn get_resource_amount(
&self,
resource_type: &ResourceType,
) -> Option<ResourceAmount>
pub fn get_resource_amount( &self, resource_type: &ResourceType, ) -> Option<ResourceAmount>
Get resource amount for a specific resource type
Sourcepub fn supports_feature(&self, feature: &SystemFeature) -> bool
pub fn supports_feature(&self, feature: &SystemFeature) -> bool
Check if system supports specific features
Trait Implementations§
Source§impl Clone for CapabilityProfile
impl Clone for CapabilityProfile
Source§fn clone(&self) -> CapabilityProfile
fn clone(&self) -> CapabilityProfile
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 CapabilityProfile
impl Debug for CapabilityProfile
Source§impl<'de> Deserialize<'de> for CapabilityProfile
impl<'de> Deserialize<'de> for CapabilityProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CapabilityProfile
impl RefUnwindSafe for CapabilityProfile
impl Send for CapabilityProfile
impl Sync for CapabilityProfile
impl Unpin for CapabilityProfile
impl UnwindSafe for CapabilityProfile
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> 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> 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