pub struct ton_long;Expand description
long tons
Trait Implementations§
Source§impl Conversion<f32> for ton_long
impl Conversion<f32> for ton_long
Source§fn coefficient() -> <ton_long as Conversion<f32>>::T
fn coefficient() -> <ton_long as Conversion<f32>>::T
Coefficient portion of conversion factor for
converting the given unit. To convert to the base unit for the quantity use
(value + constant()) * coefficient(). To convert from the base unit, (value / coefficient()) - constant() is used. Implementation should return the multiplicative identity
(Self::T::one()) if no coefficient exists.Source§fn constant(op: ConstantOp) -> <ton_long as Conversion<f32>>::T
fn constant(op: ConstantOp) -> <ton_long as Conversion<f32>>::T
Constant portion of conversion factor for
converting the given unit. To convert to the base unit for the quantity use
(value + constant()) * coefficient(). To convert from the base unit, (value / coefficient()) - constant() is used. Implementation should return the additive identity (Self::T::zero())
if no constant exists. See ConstantOp documentation for details about parameter use to
ensure the method optimizes correctly.Source§fn conversion(&self) -> Self::Twhere
Self: Sized,
fn conversion(&self) -> Self::Twhere
Self: Sized,
Instance conversion factor. Read more
Source§impl Conversion<f64> for ton_long
impl Conversion<f64> for ton_long
Source§fn coefficient() -> <ton_long as Conversion<f64>>::T
fn coefficient() -> <ton_long as Conversion<f64>>::T
Coefficient portion of conversion factor for
converting the given unit. To convert to the base unit for the quantity use
(value + constant()) * coefficient(). To convert from the base unit, (value / coefficient()) - constant() is used. Implementation should return the multiplicative identity
(Self::T::one()) if no coefficient exists.Source§fn constant(op: ConstantOp) -> <ton_long as Conversion<f64>>::T
fn constant(op: ConstantOp) -> <ton_long as Conversion<f64>>::T
Constant portion of conversion factor for
converting the given unit. To convert to the base unit for the quantity use
(value + constant()) * coefficient(). To convert from the base unit, (value / coefficient()) - constant() is used. Implementation should return the additive identity (Self::T::zero())
if no constant exists. See ConstantOp documentation for details about parameter use to
ensure the method optimizes correctly.Source§fn conversion(&self) -> Self::Twhere
Self: Sized,
fn conversion(&self) -> Self::Twhere
Self: Sized,
Instance conversion factor. Read more
impl Conversion<f32> for ton_long
impl Conversion<f64> for ton_long
impl Copy for ton_long
impl Unit for ton_long
Auto Trait Implementations§
impl Freeze for ton_long
impl RefUnwindSafe for ton_long
impl Send for ton_long
impl Sync for ton_long
impl Unpin for ton_long
impl UnwindSafe for ton_long
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more