Struct network_time::TickDuration [−][src]
pub struct TickDuration(_);
A tick duration; relative time.
Methods
impl TickDuration
[src]
impl TickDuration
pub const Zero: Self
Zero: Self = TickDuration(0)
Zero.
pub const fn new(ticks: u64) -> Self
[src]
pub const fn new(ticks: u64) -> Self
New instance.
pub fn milliseconds_to_ticks_rounded_down(
milliseconds: MillisecondDuration
) -> Self
[src]
pub fn milliseconds_to_ticks_rounded_down(
milliseconds: MillisecondDuration
) -> Self
Milliseconds to ticks rounded down.
pub fn milliseconds_to_ticks_rounded_up(
milliseconds: MillisecondDuration
) -> Self
[src]
pub fn milliseconds_to_ticks_rounded_up(
milliseconds: MillisecondDuration
) -> Self
Milliseconds to ticks rounded up.
pub fn is_zero(self) -> bool
[src]
pub fn is_zero(self) -> bool
Is zero?
Trait Implementations
impl Into<TickDuration> for MillisecondDuration
[src]
impl Into<TickDuration> for MillisecondDuration
fn into(self) -> TickDuration
[src]
fn into(self) -> TickDuration
Performs the conversion.
impl Add<TickDuration> for Tick
[src]
impl Add<TickDuration> for Tick
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: TickDuration) -> Self::Output
[src]
fn add(self, rhs: TickDuration) -> Self::Output
Performs the +
operation.
impl Default for TickDuration
[src]
impl Default for TickDuration
fn default() -> TickDuration
[src]
fn default() -> TickDuration
Returns the "default value" for a type. Read more
impl Debug for TickDuration
[src]
impl Debug for TickDuration
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for TickDuration
[src]
impl Copy for TickDuration
impl Clone for TickDuration
[src]
impl Clone for TickDuration
fn clone(&self) -> TickDuration
[src]
fn clone(&self) -> TickDuration
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Ord for TickDuration
[src]
impl Ord for TickDuration
fn cmp(&self, other: &TickDuration) -> Ordering
[src]
fn cmp(&self, other: &TickDuration) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for TickDuration
[src]
impl PartialOrd for TickDuration
fn partial_cmp(&self, other: &TickDuration) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &TickDuration) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &TickDuration) -> bool
[src]
fn lt(&self, other: &TickDuration) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &TickDuration) -> bool
[src]
fn le(&self, other: &TickDuration) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &TickDuration) -> bool
[src]
fn gt(&self, other: &TickDuration) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &TickDuration) -> bool
[src]
fn ge(&self, other: &TickDuration) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for TickDuration
[src]
impl Eq for TickDuration
impl PartialEq for TickDuration
[src]
impl PartialEq for TickDuration
fn eq(&self, other: &TickDuration) -> bool
[src]
fn eq(&self, other: &TickDuration) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &TickDuration) -> bool
[src]
fn ne(&self, other: &TickDuration) -> bool
This method tests for !=
.
impl Hash for TickDuration
[src]
impl Hash for TickDuration
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Display for TickDuration
[src]
impl Display for TickDuration
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Mul<u64> for TickDuration
[src]
impl Mul<u64> for TickDuration
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: u64) -> Self::Output
[src]
fn mul(self, rhs: u64) -> Self::Output
Performs the *
operation.
impl From<u64> for TickDuration
[src]
impl From<u64> for TickDuration
impl Into<u64> for TickDuration
[src]
impl Into<u64> for TickDuration
Auto Trait Implementations
impl Send for TickDuration
impl Send for TickDuration
impl Sync for TickDuration
impl Sync for TickDuration