[][src]Struct embedded_async_timer::Interval

pub struct Interval<CLOCK: Timer> { /* fields omitted */ }

A repeating delay with a fixed start and fixed segment duration.

Implementations

impl<CLOCK: Timer> Interval<CLOCK>[src]

pub fn new(duration: CLOCK::Duration, timer: &AsyncTimer<CLOCK>) -> Self[src]

Create a new interval starting now.

Awaiting this new Interval will yield for the first time after now + duration.

pub fn wait<'a>(&mut self, timer: &'a AsyncTimer<CLOCK>) -> impl Future + 'a[src]

Await until some time after the end of the next interval segment.

Note: if an interval segment has already completely passed it will return immediately without yielding.

Auto Trait Implementations

impl<CLOCK> Send for Interval<CLOCK> where
    <CLOCK as Timer>::Duration: Send,
    <CLOCK as Timer>::Instant: Send

impl<CLOCK> Sync for Interval<CLOCK> where
    <CLOCK as Timer>::Duration: Sync,
    <CLOCK as Timer>::Instant: Sync

impl<CLOCK> Unpin for Interval<CLOCK> where
    <CLOCK as Timer>::Duration: Unpin,
    <CLOCK as Timer>::Instant: Unpin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.