[][src]Struct macsmc::Watt

pub struct Watt(pub f32);

Value wrapper for values that are W units

Examples

let w = Watt(42.0);
assert_eq!(*w, 42.0);

Implementations

impl Watt[src]

pub fn thresholds() -> [Self; 4][src]

Thresholds that might be sensible to partition a power value into one of 4 buckets.

Examples

let huge = Watt::thresholds()[3];
let lot = Watt::thresholds()[2];
let some = Watt::thresholds()[1];
let little = Watt::thresholds()[0];

Trait Implementations

impl Clone for Watt[src]

impl Copy for Watt[src]

impl Debug for Watt[src]

impl Default for Watt[src]

impl Deref for Watt[src]

type Target = f32

The resulting type after dereferencing.

impl Into<f64> for Watt[src]

impl PartialEq<Watt> for Watt[src]

impl PartialOrd<Watt> for Watt[src]

impl StructuralPartialEq for Watt[src]

Auto Trait Implementations

impl RefUnwindSafe for Watt

impl Send for Watt

impl Sync for Watt

impl Unpin for Watt

impl UnwindSafe for Watt

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.