[−][src]Struct stspin220::StepFuture
A "future" that can be polled to complete a Driver::step
call
Please note that this type provides a custom API and does not implement
core::future::Future
. This might change, as using futures for embedded
development becomes more practical.
Implementations
impl<'r, T, Timer> StepFuture<'r, T, Timer> where
Timer: CountDown,
T: Step,
<Timer as CountDown>::Time: TryFrom<Nanoseconds<u32>>,
[src]
Timer: CountDown,
T: Step,
<Timer as CountDown>::Time: TryFrom<Nanoseconds<u32>>,
pub fn poll(
&mut self
) -> Poll<Result<(), Error<<T as Step>::Error, <<Timer as CountDown>::Time as TryFrom<Nanoseconds<u32>>>::Error, <Timer as CountDown>::Error>>>
[src]
&mut self
) -> Poll<Result<(), Error<<T as Step>::Error, <<Timer as CountDown>::Time as TryFrom<Nanoseconds<u32>>>::Error, <Timer as CountDown>::Error>>>
Poll the future
The future must be polled for the operation to make progress. The
operation won't start, until this method has been called once. Returns
Poll::Pending
, if the operation is not finished yet, or
Poll::Ready
, once it is
If this method returns Poll::Pending
, the user can opt to keep
calling it at a high frequency (see Self::wait
) until the operation
completes, or set up an interrupt that fires once the timer finishes
counting down, and call this method again once it does.
pub fn wait(
&mut self
) -> Result<(), Error<<T as Step>::Error, <<Timer as CountDown>::Time as TryFrom<Nanoseconds<u32>>>::Error, <Timer as CountDown>::Error>>
[src]
&mut self
) -> Result<(), Error<<T as Step>::Error, <<Timer as CountDown>::Time as TryFrom<Nanoseconds<u32>>>::Error, <Timer as CountDown>::Error>>
Wait until the operation completes
This method will call Self::poll
in a busy loop until the operation
has finished.
Auto Trait Implementations
impl<'r, T, Timer> Send for StepFuture<'r, T, Timer> where
T: Send,
Timer: Send,
[src]
T: Send,
Timer: Send,
impl<'r, T, Timer> Sync for StepFuture<'r, T, Timer> where
T: Sync,
Timer: Sync,
[src]
T: Sync,
Timer: Sync,
impl<'r, T, Timer> Unpin for StepFuture<'r, T, Timer>
[src]
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,
pub 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, 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.
pub 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>,