[][src]Struct rttrust::timer::Timer

pub struct Timer { /* fields omitted */ }

All methods use immutable self since the safety is guaranteed by rt-thread internal

TODO: timer control

Implementations

impl Timer[src]

pub fn create<EP, P>(
    name: &str,
    entry: TimerEntry<EP>,
    parameter: P,
    time: u32,
    flag: TimerFlags
) -> Result<Timer> where
    EP: Into<TimerParameter>,
    P: Into<TimerParameter>, 
[src]

pub fn create_closure<F>(
    name: &str,
    entry: F,
    time: u32,
    flag: TimerFlags
) -> Result<Timer> where
    F: FnOnce(),
    F: Send + 'static, 
[src]

pub fn start(&self) -> Result<()>[src]

pub fn delete(self) -> Result<()>[src]

Wanring:

Rust timer has no cleanup function and is not able to unwind. Directly stopping a Rust timer may lead to resoucre leak.

pub fn stop(&self) -> Result<()>[src]

Wanring:

Rust timer has no cleanup function and is not able to unwind. Directly stopping a Rust timer may lead to resoucre leak.

Trait Implementations

impl Clone for Timer[src]

impl Copy for Timer[src]

impl Object for Timer[src]

impl Send for Timer[src]

Auto Trait Implementations

impl !Sync for Timer

impl Unpin for Timer

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.