Struct stepper::MoveToFuture [−][src]
The “future” returned by Stepper::move_to_position
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> MoveToFuture<Driver> where
Driver: MotionControl,
[src]
Driver: MotionControl,
pub fn new(
driver: Driver,
max_velocity: Driver::Velocity,
target_step: i32
) -> Self
[src]
driver: Driver,
max_velocity: Driver::Velocity,
target_step: i32
) -> Self
Create new instance of MoveToFuture
This constructor is public to provide maximum flexibility for
non-standard use cases. Most users can ignore this and just use
Stepper::move_to_position
instead.
pub fn poll(&mut self) -> Poll<Result<(), Driver::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<(), Driver::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
[src]
Drop the future and release the resources that were moved into it
Auto Trait Implementations
impl<Driver> Send for MoveToFuture<Driver> where
Driver: Send,
<Driver as MotionControl>::Velocity: Send,
Driver: Send,
<Driver as MotionControl>::Velocity: Send,
impl<Driver> Sync for MoveToFuture<Driver> where
Driver: Sync,
<Driver as MotionControl>::Velocity: Sync,
Driver: Sync,
<Driver as MotionControl>::Velocity: Sync,
impl<Driver> Unpin for MoveToFuture<Driver> where
Driver: Unpin,
<Driver as MotionControl>::Velocity: Unpin,
Driver: Unpin,
<Driver as MotionControl>::Velocity: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Az for T
[src]
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> CheckedAs for T
[src]
pub fn checked_as<Dst>(self) -> Option<Dst> where
T: CheckedCast<Dst>,
[src]
T: CheckedCast<Dst>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]
Dst: LosslessTryFrom<Src>,
pub fn lossless_try_into(self) -> Option<Dst>
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]
Dst: LossyFrom<Src>,
pub fn lossy_into(self) -> Dst
[src]
impl<T> OverflowingAs for T
[src]
pub fn overflowing_as<Dst>(self) -> (Dst, bool) where
T: OverflowingCast<Dst>,
[src]
T: OverflowingCast<Dst>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> SaturatingAs for T
[src]
pub fn saturating_as<Dst>(self) -> Dst where
T: SaturatingCast<Dst>,
[src]
T: SaturatingCast<Dst>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> UnwrappedAs for T
[src]
pub fn unwrapped_as<Dst>(self) -> Dst where
T: UnwrappedCast<Dst>,
[src]
T: UnwrappedCast<Dst>,
impl<T> WrappingAs for T
[src]
pub fn wrapping_as<Dst>(self) -> Dst where
T: WrappingCast<Dst>,
[src]
T: WrappingCast<Dst>,