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