[−][src]Struct ucum::quantity::Quantity
Implementations
impl<T> Quantity<T>
[src]
pub fn new(magnitude: T, dimension: Dimension) -> Self
[src]
pub fn magnitude(&self) -> T where
T: Clone,
[src]
T: Clone,
pub fn borrow_magnitude(&self) -> &T
[src]
pub fn dimension(&self) -> Dimension
[src]
pub fn cast<U>(self) -> Quantity<U> where
U: From<T>,
[src]
U: From<T>,
pub fn raise(&mut self, power: i8) where
T: Clone + Div<T, Output = T> + From<i32> + MulAssign,
[src]
T: Clone + Div<T, Output = T> + From<i32> + MulAssign,
pub fn raised(&self, power: i8) -> Quantity<T> where
T: Clone + Div<T, Output = T> + From<i32> + MulAssign,
[src]
T: Clone + Div<T, Output = T> + From<i32> + MulAssign,
pub fn invert(&mut self) where
T: Clone + Div<T, Output = T> + From<i32> + MulAssign,
[src]
T: Clone + Div<T, Output = T> + From<i32> + MulAssign,
pub fn inverted(&self) -> Quantity<T> where
T: Clone + Div<T, Output = T> + From<i32> + MulAssign,
[src]
T: Clone + Div<T, Output = T> + From<i32> + MulAssign,
pub fn abs(&self) -> Quantity<T> where
T: Clone + From<i32> + MulAssign + PartialOrd,
[src]
T: Clone + From<i32> + MulAssign + PartialOrd,
Trait Implementations
impl<T: Clone> Clone for Quantity<T>
[src]
impl<T: Copy> Copy for Quantity<T>
[src]
impl<T: Debug> Debug for Quantity<T>
[src]
impl<T: Default> Default for Quantity<T>
[src]
impl<T> Display for Quantity<T> where
T: Display,
[src]
T: Display,
impl<T: Display> Div<Dimension> for Quantity<T>
[src]
Panic
Both self and rhs must have a standard dimension, otherwise this operation will panic.
type Output = Quantity<T>
The resulting type after applying the /
operator.
fn div(self, rhs: Dimension) -> Quantity<T>
[src]
impl<T> Div<Quantity<T>> for Quantity<T> where
T: Div<T, Output = T>,
[src]
T: Div<T, Output = T>,
Panic
Both self and rhs must have a standard dimension, otherwise this operation will panic.
type Output = Quantity<T>
The resulting type after applying the /
operator.
fn div(self, rhs: Quantity<T>) -> Quantity<T>
[src]
impl<T> Div<f64> for Quantity<T> where
T: Clone + From<f64> + Div<T, Output = T>,
[src]
T: Clone + From<f64> + Div<T, Output = T>,
type Output = Quantity<T>
The resulting type after applying the /
operator.
fn div(self, rhs: f64) -> Quantity<T>
[src]
impl<T> Div<i32> for Quantity<T> where
T: Clone + From<i32> + Div<T, Output = T>,
[src]
T: Clone + From<i32> + Div<T, Output = T>,
type Output = Quantity<T>
The resulting type after applying the /
operator.
fn div(self, rhs: i32) -> Quantity<T>
[src]
impl<T, U> DivAssign<U> for Quantity<T> where
T: DivAssign<T> + From<U>,
[src]
T: DivAssign<T> + From<U>,
fn div_assign(&mut self, rhs: U)
[src]
impl<T: Eq> Eq for Quantity<T>
[src]
impl<T: Hash> Hash for Quantity<T>
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<T> Mul<Dimension> for Quantity<T>
[src]
Panic
Both self and rhs must have a standard dimension, otherwise this operation will panic.
type Output = Quantity<T>
The resulting type after applying the *
operator.
fn mul(self, rhs: Dimension) -> Quantity<T>
[src]
impl<T> Mul<Quantity<T>> for f64 where
T: Clone + From<f64> + Mul<T, Output = T>,
[src]
T: Clone + From<f64> + Mul<T, Output = T>,
type Output = Quantity<T>
The resulting type after applying the *
operator.
fn mul(self, rhs: Quantity<T>) -> Quantity<T>
[src]
impl<T> Mul<Quantity<T>> for i32 where
T: Clone + From<i32> + Mul<T, Output = T>,
[src]
T: Clone + From<i32> + Mul<T, Output = T>,
type Output = Quantity<T>
The resulting type after applying the *
operator.
fn mul(self, rhs: Quantity<T>) -> Quantity<T>
[src]
impl<T> Mul<Quantity<T>> for Quantity<T> where
T: Mul<T, Output = T>,
[src]
T: Mul<T, Output = T>,
Panic
Both self and rhs must have a standard dimension, otherwise this operation will panic.
type Output = Quantity<T>
The resulting type after applying the *
operator.
fn mul(self, rhs: Quantity<T>) -> Quantity<T>
[src]
impl<T, U> MulAssign<U> for Quantity<T> where
T: MulAssign<T> + From<U>,
[src]
T: MulAssign<T> + From<U>,
fn mul_assign(&mut self, rhs: U)
[src]
impl<T: PartialEq> PartialEq<Quantity<T>> for Quantity<T>
[src]
impl<T> PartialOrd<Quantity<T>> for Quantity<T> where
T: PartialOrd,
[src]
T: PartialOrd,
fn partial_cmp(&self, other: &Quantity<T>) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T> StructuralEq for Quantity<T>
[src]
impl<T> StructuralPartialEq for Quantity<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Quantity<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Quantity<T> where
T: Send,
T: Send,
impl<T> Sync for Quantity<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Quantity<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Quantity<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,