Struct gilrs::ff::Ticks [−][src]
pub struct Ticks(_);
Represents duration.
This type is only useful as input parameter for other functions in force feedback module. To
create it, use from_ms()
method. Keep in mind that Ticks
is not precise representation
of time.
Example
use gilrs::ff::Ticks; use std::time::Duration; let t1 = Ticks::from_ms(110); let t2 = Ticks::from(Duration::from_millis(130)); /// `Ticks` is not precise. assert_eq!(t1, t2);
Methods
impl Ticks
[src]
impl Ticks
Trait Implementations
impl Copy for Ticks
[src]
impl Copy for Ticks
impl Clone for Ticks
[src]
impl Clone for Ticks
fn clone(&self) -> Ticks
[src]
fn clone(&self) -> Ticks
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 Debug for Ticks
[src]
impl Debug for Ticks
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 PartialEq for Ticks
[src]
impl PartialEq for Ticks
fn eq(&self, other: &Ticks) -> bool
[src]
fn eq(&self, other: &Ticks) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Ticks) -> bool
[src]
fn ne(&self, other: &Ticks) -> bool
This method tests for !=
.
impl Eq for Ticks
[src]
impl Eq for Ticks
impl PartialOrd for Ticks
[src]
impl PartialOrd for Ticks
fn partial_cmp(&self, other: &Ticks) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Ticks) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Ticks) -> bool
[src]
fn lt(&self, other: &Ticks) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Ticks) -> bool
[src]
fn le(&self, other: &Ticks) -> 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: &Ticks) -> bool
[src]
fn gt(&self, other: &Ticks) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Ticks) -> bool
[src]
fn ge(&self, other: &Ticks) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Ticks
[src]
impl Ord for Ticks
fn cmp(&self, other: &Ticks) -> Ordering
[src]
fn cmp(&self, other: &Ticks) -> 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 Default for Ticks
[src]
impl Default for Ticks
impl From<Duration> for Ticks
[src]
impl From<Duration> for Ticks
impl Add for Ticks
[src]
impl Add for Ticks
type Output = Ticks
The resulting type after applying the +
operator.
fn add(self, rhs: Ticks) -> Self::Output
[src]
fn add(self, rhs: Ticks) -> Self::Output
Performs the +
operation.
impl AddAssign for Ticks
[src]
impl AddAssign for Ticks
fn add_assign(&mut self, rhs: Ticks)
[src]
fn add_assign(&mut self, rhs: Ticks)
Performs the +=
operation.
impl Sub for Ticks
[src]
impl Sub for Ticks
type Output = Ticks
The resulting type after applying the -
operator.
fn sub(self, rhs: Ticks) -> Self::Output
[src]
fn sub(self, rhs: Ticks) -> Self::Output
Performs the -
operation.
impl SubAssign for Ticks
[src]
impl SubAssign for Ticks
fn sub_assign(&mut self, rhs: Ticks)
[src]
fn sub_assign(&mut self, rhs: Ticks)
Performs the -=
operation.
impl Mul<u32> for Ticks
[src]
impl Mul<u32> for Ticks
type Output = Ticks
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> Self::Output
[src]
fn mul(self, rhs: u32) -> Self::Output
Performs the *
operation.
impl MulAssign<u32> for Ticks
[src]
impl MulAssign<u32> for Ticks
fn mul_assign(&mut self, rhs: u32)
[src]
fn mul_assign(&mut self, rhs: u32)
Performs the *=
operation.
impl Rem for Ticks
[src]
impl Rem for Ticks