Struct drv8825::StepFuture[][src]

#[must_use]pub struct StepFuture<Driver, Timer> { /* fields omitted */ }

The “future” returned by Stepper::step

Please note that this type provides a custom API and does not implement core::future::Future. This might change, when using futures for embedded development becomes more practical.

Implementations

impl<Driver, Timer> StepFuture<Driver, Timer> where
    Timer: CountDown,
    Driver: Step,
    <Timer as CountDown>::Time: TryFrom<Nanoseconds<u32>>, 
[src]

pub fn new(driver: Driver, timer: Timer) -> StepFuture<Driver, Timer>[src]

Create new instance of StepFuture

This constructor is public to provide maximum flexibility for non-standard use cases. Most users can ignore this and just use Stepper::step instead.

pub fn poll(
    &mut self
) -> Poll<Result<(), SignalError<<Driver as Step>::Error, <<Timer as CountDown>::Time as TryFrom<Nanoseconds<u32>>>::Error, <Timer as CountDown>::Error>>>
[src]

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<(), SignalError<<Driver as Step>::Error, <<Timer as CountDown>::Time as TryFrom<Nanoseconds<u32>>>::Error, <Timer as CountDown>::Error>>
[src]

Wait until the operation completes

This method will call Self::poll in a busy loop until the operation has finished.

pub fn release(self) -> (Driver, Timer)[src]

Drop the future and release the resources that were moved into it

Auto Trait Implementations

impl<Driver, Timer> Send for StepFuture<Driver, Timer> where
    Driver: Send,
    Timer: Send

impl<Driver, Timer> Sync for StepFuture<Driver, Timer> where
    Driver: Sync,
    Timer: Sync

impl<Driver, Timer> Unpin for StepFuture<Driver, Timer> where
    Driver: Unpin,
    Timer: Unpin

Blanket Implementations

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

impl<T> Az for T[src]

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

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

impl<T> CheckedAs for T[src]

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

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

impl<Src, Dst> LosslessTryInto<Dst> for Src where
    Dst: LosslessTryFrom<Src>, 
[src]

impl<Src, Dst> LossyInto<Dst> for Src where
    Dst: LossyFrom<Src>, 
[src]

impl<T> OverflowingAs for T[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SaturatingAs for T[src]

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.

impl<T> UnwrappedAs for T[src]

impl<T> WrappingAs for T[src]