pub trait PowerProvider {
// Required methods
fn new() -> Result<Self>
where Self: Sized;
fn refresh(&mut self) -> Result<()>;
fn info(&self) -> &PowerInfo;
// Provided method
fn is_supported() -> bool
where Self: Sized { ... }
}Expand description
Trait for platform-specific power providers.
Required Methods§
Provided Methods§
Sourcefn is_supported() -> boolwhere
Self: Sized,
fn is_supported() -> boolwhere
Self: Sized,
Check if power monitoring is supported on this system.
Returns false if the required hardware/permissions are not available.