Enum nvml_wrapper::enums::device::PowerSource
source · [−]pub enum PowerSource {
Ac,
Battery,
}Expand description
Returned by crate::Device::power_source().
Variants
Ac
AC power (receiving power from some external source).
Battery
Battery power.
Implementations
sourceimpl PowerSource
impl PowerSource
sourcepub fn as_c(&self) -> nvmlPowerSource_t
pub fn as_c(&self) -> nvmlPowerSource_t
Returns the C constant equivalent for the given Rust enum variant.
Trait Implementations
sourceimpl Clone for PowerSource
impl Clone for PowerSource
sourcefn clone(&self) -> PowerSource
fn clone(&self) -> PowerSource
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 more
sourceimpl Debug for PowerSource
impl Debug for PowerSource
sourceimpl Hash for PowerSource
impl Hash for PowerSource
sourceimpl PartialEq<PowerSource> for PowerSource
impl PartialEq<PowerSource> for PowerSource
sourceimpl TryFrom<u32> for PowerSource
impl TryFrom<u32> for PowerSource
impl Eq for PowerSource
impl StructuralEq for PowerSource
impl StructuralPartialEq for PowerSource
Auto Trait Implementations
impl RefUnwindSafe for PowerSource
impl Send for PowerSource
impl Sync for PowerSource
impl Unpin for PowerSource
impl UnwindSafe for PowerSource
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more