embedded_hal::timer

Trait Cancel

source
pub trait Cancel: CountDown {
    type Error;

    // Required method
    fn cancel(&mut self) -> Result<(), Self::Error>;
}
Expand description

Trait for cancelable countdowns.

Required Associated Types§

source

type Error

Error returned when a countdown can’t be canceled.

Required Methods§

source

fn cancel(&mut self) -> Result<(), Self::Error>

Tries to cancel this countdown.

§Errors

An error will be returned if the countdown has already been canceled or was never started. An error is also returned if the countdown is not Periodic and has already expired.

Object Safety§

This trait is not object safe.

Implementors§