pub trait Api: Support<usize> + Send {
    // Required methods
    fn arm(timer: Id<Self>, command: &Command) -> Result<(), Error>;
    fn disarm(timer: Id<Self>) -> Result<(), Error>;
}
Available on crate feature api-timer only.
Expand description

Timer interface.

Required Methods§

source

fn arm(timer: Id<Self>, command: &Command) -> Result<(), Error>

Arms a timer to trigger according to a command.

source

fn disarm(timer: Id<Self>) -> Result<(), Error>

Disarms a timer regardless of whether it already triggered.

The timer won’t trigger further events.

Object Safety§

This trait is not object safe.

Implementors§