pub struct TickDuration<T>where
T: TickInstant,{ /* private fields */ }Implementations§
Source§impl<T> TickDuration<T>where
T: TickInstant,
impl<T> TickDuration<T>where
T: TickInstant,
pub const ZERO: TickDuration<T>
pub const MAX: TickDuration<T>
pub const fn from_ticks(ticks: u64) -> TickDuration<T>
pub const fn ticks(&self) -> u64
pub fn from_nanos(timeout: u32) -> TickDuration<T>
pub fn as_nanos(&self) -> u32
pub fn from_micros(timeout: u32) -> TickDuration<T>
pub fn as_micros(&self) -> u32
pub fn from_millis(timeout: u32) -> TickDuration<T>
pub fn as_millis(&self) -> u32
pub const fn is_zero(&self) -> bool
Trait Implementations§
Source§impl<T> Add for &TickDuration<T>where
T: TickInstant,
impl<T> Add for &TickDuration<T>where
T: TickInstant,
Source§type Output = TickDuration<T>
type Output = TickDuration<T>
The resulting type after applying the
+ operator.Source§fn add(self, rhs: &TickDuration<T>) -> <&TickDuration<T> as Add>::Output
fn add(self, rhs: &TickDuration<T>) -> <&TickDuration<T> as Add>::Output
Performs the
+ operation. Read moreSource§impl<T> Clone for TickDuration<T>where
T: Clone + TickInstant,
impl<T> Clone for TickDuration<T>where
T: Clone + TickInstant,
Source§fn clone(&self) -> TickDuration<T>
fn clone(&self) -> TickDuration<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> PartialEq for TickDuration<T>where
T: TickInstant,
impl<T> PartialEq for TickDuration<T>where
T: TickInstant,
Source§impl<T> PartialOrd for TickDuration<T>where
T: TickInstant,
impl<T> PartialOrd for TickDuration<T>where
T: TickInstant,
Source§impl<T> Sub for &TickDuration<T>where
T: TickInstant,
impl<T> Sub for &TickDuration<T>where
T: TickInstant,
Source§type Output = TickDuration<T>
type Output = TickDuration<T>
The resulting type after applying the
- operator.Source§fn sub(self, rhs: &TickDuration<T>) -> <&TickDuration<T> as Sub>::Output
fn sub(self, rhs: &TickDuration<T>) -> <&TickDuration<T> as Sub>::Output
Performs the
- operation. Read moreimpl<T> Copy for TickDuration<T>where
T: Copy + TickInstant,
Auto Trait Implementations§
impl<T> Freeze for TickDuration<T>
impl<T> RefUnwindSafe for TickDuration<T>where
T: RefUnwindSafe,
impl<T> Send for TickDuration<T>where
T: Send,
impl<T> Sync for TickDuration<T>where
T: Sync,
impl<T> Unpin for TickDuration<T>where
T: Unpin,
impl<T> UnwindSafe for TickDuration<T>where
T: 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