[−][src]Struct async_stm32f1xx::timer::AsyncTimer
An asynchronous abstraction over a timer.
Examples
let mut timer: AsyncTimer<_> = Timer::tim2(dp.TIM2, &clocks, &mut apb1).into(); loop { led.toggle(); timer.delay_for(2.hz()).await; }
Implementations
impl<T> AsyncTimer<T> where
T: CountDown,
[src]
T: CountDown,
pub fn delay_for<C>(&mut self, count: C) -> Delay<T> where
C: Into<T::Time>,
[src]
C: Into<T::Time>,
Creates a Future
that resolves after the given time has been count down.
impl AsyncTimer<CountDownTimer<TIM2>>
[src]
impl AsyncTimer<CountDownTimer<TIM3>>
[src]
Trait Implementations
impl<T> AsMut<T> for AsyncTimer<T>
[src]
impl From<Timer<TIM2>> for AsyncTimer<CountDownTimer<TIM2>>
[src]
impl From<Timer<TIM3>> for AsyncTimer<CountDownTimer<TIM3>>
[src]
Auto Trait Implementations
impl<T> Send for AsyncTimer<T> where
T: Send,
T: Send,
impl<T> Sync for AsyncTimer<T> where
T: Sync,
T: Sync,
impl<T> Unpin for AsyncTimer<T> where
T: Unpin,
T: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,