#[repr(transparent)]pub struct SecondsSince<S>where
S: TimeScale,{
pub value: Quantity<dyn Dimension<Th = Z0, I = Z0, Kind = dyn Kind, M = Z0, L = Z0, J = Z0, N = Z0, T = PInt<UInt<UTerm, B1>>>, dyn Units<f64, length = meter, luminous_intensity = candela, thermodynamic_temperature = kelvin, mass = kilogram, time = second, electric_current = ampere, amount_of_substance = mole>, f64>,
/* private fields */
}Expand description
Seconds elapsed in the named time scale, measured from that scale’s epoch.
The wrapped Time is uom::si::f64::Time so unit arithmetic works
naturally (e.g. SecondsSince<TAI>::new(1.0.hours())).
Fields§
§value: Quantity<dyn Dimension<Th = Z0, I = Z0, Kind = dyn Kind, M = Z0, L = Z0, J = Z0, N = Z0, T = PInt<UInt<UTerm, B1>>>, dyn Units<f64, length = meter, luminous_intensity = candela, thermodynamic_temperature = kelvin, mass = kilogram, time = second, electric_current = ampere, amount_of_substance = mole>, f64>Seconds in scale S. Stored as a uom Time so dimensionally-safe
multiplications (velocity × time → position) compose out of the box.
Implementations§
Source§impl<S> SecondsSince<S>where
S: TimeScale,
impl<S> SecondsSince<S>where
S: TimeScale,
Sourcepub fn new(
t: Quantity<dyn Dimension<Th = Z0, I = Z0, Kind = dyn Kind, M = Z0, L = Z0, J = Z0, N = Z0, T = PInt<UInt<UTerm, B1>>>, dyn Units<f64, length = meter, luminous_intensity = candela, thermodynamic_temperature = kelvin, mass = kilogram, time = second, electric_current = ampere, amount_of_substance = mole>, f64>,
) -> SecondsSince<S>
pub fn new( t: Quantity<dyn Dimension<Th = Z0, I = Z0, Kind = dyn Kind, M = Z0, L = Z0, J = Z0, N = Z0, T = PInt<UInt<UTerm, B1>>>, dyn Units<f64, length = meter, luminous_intensity = candela, thermodynamic_temperature = kelvin, mass = kilogram, time = second, electric_current = ampere, amount_of_substance = mole>, f64>, ) -> SecondsSince<S>
Construct from a uom Time.
Sourcepub fn from_seconds(s: f64) -> SecondsSince<S>
pub fn from_seconds(s: f64) -> SecondsSince<S>
Construct from raw SI seconds.
Sourcepub fn as_seconds(self) -> f64
pub fn as_seconds(self) -> f64
Raw SI seconds.
Trait Implementations§
Source§impl<S> Clone for SecondsSince<S>
impl<S> Clone for SecondsSince<S>
Source§fn clone(&self) -> SecondsSince<S>
fn clone(&self) -> SecondsSince<S>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<S> Debug for SecondsSince<S>
impl<S> Debug for SecondsSince<S>
Source§impl<S> PartialEq for SecondsSince<S>
impl<S> PartialEq for SecondsSince<S>
Source§fn eq(&self, other: &SecondsSince<S>) -> bool
fn eq(&self, other: &SecondsSince<S>) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<S> PartialOrd for SecondsSince<S>where
S: PartialOrd + TimeScale,
impl<S> PartialOrd for SecondsSince<S>where
S: PartialOrd + TimeScale,
impl<S> Copy for SecondsSince<S>
impl<S> StructuralPartialEq for SecondsSince<S>where
S: TimeScale,
Auto Trait Implementations§
impl<S> Freeze for SecondsSince<S>
impl<S> RefUnwindSafe for SecondsSince<S>where
S: RefUnwindSafe,
impl<S> Send for SecondsSince<S>where
S: Send,
impl<S> Sync for SecondsSince<S>where
S: Sync,
impl<S> Unpin for SecondsSince<S>where
S: Unpin,
impl<S> UnsafeUnpin for SecondsSince<S>
impl<S> UnwindSafe for SecondsSince<S>where
S: UnwindSafe,
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