Enum omnisensor::powerstate::PowerState
source · [−]pub enum PowerState {
On,
BiosPost,
Always,
ChassisOn,
}
Expand description
Represents a setting of a sensor indicating in which host power states it is enabled.
Variants
On
Sensor enabled any time the host is powered on.
BiosPost
Sensor enabled When the host is powered on and has completed its BIOS POST phase.
Always
Sensor always enabled, regardless of host state.
ChassisOn
Sensor enabled when host chassis power is on.
Implementations
sourceimpl PowerState
impl PowerState
sourcepub fn active_now(&self) -> bool
pub fn active_now(&self) -> bool
Test if a sensor whose power state is self
should currently be enabled,
based on our tracking of the host’s current power state.
If the hostpower
feature is disabled, this behaves as if the host is always
(fully) powered off.
Trait Implementations
sourceimpl Clone for PowerState
impl Clone for PowerState
sourcefn clone(&self) -> PowerState
fn clone(&self) -> PowerState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for PowerState
impl Debug for PowerState
sourceimpl TryFrom<&String> for PowerState
impl TryFrom<&String> for PowerState
impl Copy for PowerState
Auto Trait Implementations
impl RefUnwindSafe for PowerState
impl Send for PowerState
impl Sync for PowerState
impl Unpin for PowerState
impl UnwindSafe for PowerState
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more