# Cancel in embedded_hal::timer - Rust
Trait for cancelable countdowns.
Keywords: rust, rustlang, rust-lang, Cancel

# Trait embedded_hal::timer::Cancel

source · [−]

    pub trait Cancel: CountDown {
        fn try_cancel(&mut self) -> Result<(), Self::Error>;
    }

Expand description

Trait for cancelable countdowns.

## Required methods

source

#### fn try_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.

## Implementors