pub struct TimeSpan(pub Seconds, pub FemtoSeconds);
Tuple Fields§
§0: Seconds
§1: FemtoSeconds
Implementations§
source§impl TimeSpan
impl TimeSpan
pub const ZERO: TimeSpan = _
pub const fn new(secs: u64, femtos: u64) -> TimeSpan
pub const fn from_secs(secs: u64) -> TimeSpan
pub const fn from_femtos(femtos: u64) -> TimeSpan
pub const fn from_nanos(nanos: u64) -> TimeSpan
pub fn as_nanos(&self) -> u128
pub fn as_femtos(&self) -> u128
pub const fn checked_sub(&self, other: TimeSpan) -> Option<TimeSpan>
Trait Implementations§
impl Copy for TimeSpan
impl StructuralPartialEq for TimeSpan
Auto Trait Implementations§
impl Freeze for TimeSpan
impl ObjSafe for TimeSpan
impl RefUnwindSafe for TimeSpan
impl Send for TimeSpan
impl Sync for TimeSpan
impl Unpin for TimeSpan
impl UnwindSafe for TimeSpan
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)