[−][src]Struct embedded_async_timer::Interval
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,
<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,
<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,
<CLOCK as Timer>::Duration: Unpin,
<CLOCK as Timer>::Instant: 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>,