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]
Trait Implementations
impl Copy for Ticks
[src]
impl Clone for Ticks
[src]
fn clone(&self) -> Ticks
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Ticks
[src]
impl PartialEq for Ticks
[src]
fn eq(&self, __arg_0: &Ticks) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Ticks) -> bool
[src]
This method tests for !=
.
impl Eq for Ticks
[src]
impl PartialOrd for Ticks
[src]
fn partial_cmp(&self, __arg_0: &Ticks) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Ticks) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Ticks) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Ticks) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Ticks) -> bool
[src]
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]
fn cmp(&self, __arg_0: &Ticks) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl Default for Ticks
[src]
impl From<Duration> for Ticks
[src]
impl Add for Ticks
[src]
type Output = Ticks
The resulting type after applying the +
operator.
fn add(self, rhs: Ticks) -> Self::Output
[src]
Performs the +
operation.
impl AddAssign for Ticks
[src]
fn add_assign(&mut self, rhs: Ticks)
[src]
Performs the +=
operation.
impl Sub for Ticks
[src]
type Output = Ticks
The resulting type after applying the -
operator.
fn sub(self, rhs: Ticks) -> Self::Output
[src]
Performs the -
operation.
impl SubAssign for Ticks
[src]
fn sub_assign(&mut self, rhs: Ticks)
[src]
Performs the -=
operation.
impl Mul<u32> for Ticks
[src]
type Output = Ticks
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> Self::Output
[src]
Performs the *
operation.
impl MulAssign<u32> for Ticks
[src]
fn mul_assign(&mut self, rhs: u32)
[src]
Performs the *=
operation.