[][src]Struct gilrs::ff::Ticks

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]

pub fn from_ms(dur: u32) -> Self
[src]

Trait Implementations

impl From<Duration> for Ticks
[src]

impl Eq for Ticks
[src]

impl PartialOrd<Ticks> for Ticks
[src]

impl Copy for Ticks
[src]

impl Default for Ticks
[src]

impl PartialEq<Ticks> for Ticks
[src]

impl Clone for Ticks
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl Ord for Ticks
[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Debug for Ticks
[src]

impl Add<Ticks> for Ticks
[src]

type Output = Ticks

The resulting type after applying the + operator.

impl Sub<Ticks> for Ticks
[src]

type Output = Ticks

The resulting type after applying the - operator.

impl Mul<u32> for Ticks
[src]

type Output = Ticks

The resulting type after applying the * operator.

impl Rem<Ticks> for Ticks
[src]

type Output = Ticks

The resulting type after applying the % operator.

impl AddAssign<Ticks> for Ticks
[src]

impl SubAssign<Ticks> for Ticks
[src]

impl MulAssign<u32> for Ticks
[src]

Auto Trait Implementations

impl Send for Ticks

impl Sync for Ticks

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]