pub struct Time<R: RealField>(/* private fields */);Expand description
Time (Seconds).
Implementations§
Source§impl<R: RealField> Time<R>
impl<R: RealField> Time<R>
pub fn new(val: R) -> Result<Self, PhysicsError>
pub fn new_unchecked(val: R) -> Self
pub fn value(&self) -> R
Source§impl<R: RealField + FromPrimitive> Time<R>
impl<R: RealField + FromPrimitive> Time<R>
pub fn from_minutes(minutes: R) -> Result<Self, PhysicsError>
pub fn from_hours(hours: R) -> Result<Self, PhysicsError>
pub fn from_days(days: R) -> Result<Self, PhysicsError>
pub fn from_years(years: R) -> Result<Self, PhysicsError>
pub fn as_minutes(&self) -> R
pub fn as_hours(&self) -> R
pub fn as_days(&self) -> R
pub fn as_years(&self) -> R
Trait Implementations§
impl<R: Copy + RealField> Copy for Time<R>
Source§impl<R: PartialOrd + RealField> PartialOrd for Time<R>
impl<R: PartialOrd + RealField> PartialOrd for Time<R>
impl<R: RealField> StructuralPartialEq for Time<R>
Auto Trait Implementations§
impl<R> Freeze for Time<R>where
R: Freeze,
impl<R> RefUnwindSafe for Time<R>where
R: RefUnwindSafe,
impl<R> Send for Time<R>where
R: Send,
impl<R> Sync for Time<R>where
R: Sync,
impl<R> Unpin for Time<R>where
R: Unpin,
impl<R> UnsafeUnpin for Time<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for Time<R>where
R: 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