[][src]Trait esp32_hal::prelude::Cancel

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

Trait for cancelable countdowns.

Associated Types

type Error

Error returned when a countdown can't be canceled.

Loading content...

Required methods

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.

Loading content...

Implementors

impl<TIMG: TimerGroup> Cancel for Timer<TIMG, Timer0>[src]

type Error = Error

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

Cancel running timer.

This will stop the timer if running and returns error when not running.

impl<TIMG: TimerGroup> Cancel for Timer<TIMG, Timer1>[src]

type Error = Error

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

Cancel running timer.

This will stop the timer if running and returns error when not running.

impl<TIMG: TimerGroup> Cancel for Timer<TIMG, TimerLact>[src]

type Error = Error

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

Cancel running timer.

This will stop the timer if running and returns error when not running.

Loading content...