DENAR

Struct DENAR 

Source
pub struct DENAR { /* private fields */ }

Methods from Deref<Target = Unit>§

Source

pub fn name(&self) -> &str

The unit name.

Source

pub fn symbol(&self) -> &str

The unit symbol.

Source

pub fn convert_to(&self, scalar: f64, to: &Unit) -> Result<f64, String>

Convert the unit to the new scalar.

§Arguments
  • scalar The new scalar value.
  • to The new unit to convert too.
§Returns

The new scalar value.

Source

pub fn is_byte_unit(&self) -> bool

Returns true if the unit is for bytes.

§Returns

True if the unit is for bytes.

Trait Implementations§

Source§

impl Deref for DENAR

Source§

type Target = Unit

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Unit

Dereferences the value.
Source§

impl LazyStatic for DENAR

Auto Trait Implementations§

§

impl Freeze for DENAR

§

impl RefUnwindSafe for DENAR

§

impl Send for DENAR

§

impl Sync for DENAR

§

impl Unpin for DENAR

§

impl UnwindSafe for DENAR

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.