Struct stepper::util::ref_mut::RefMut [−][src]
Generic wrapper around a mutable reference
This is used as a means of implementing traits that are already implemented
for T
for &mut T
too. While this is redundant for the traits from this
crate, we couldn’t do this for embedded_hal::timer::CountDown
without a
crate-local type.
The purpose of this is to make the future types more flexible, making it possible to move types into them, or just provide mutable references.
Trait Implementations
impl<'r, T> CountDown for RefMut<'r, T> where
T: CountDown,
[src]
T: CountDown,
type Error = T::Error
An enumeration of CountDown
errors. Read more
type Time = T::Time
The unit of time used by this timer
fn try_start<Time>(&mut self, count: Time) -> Result<(), Self::Error> where
Time: Into<Self::Time>,
[src]
Time: Into<Self::Time>,
fn try_wait(&mut self) -> Result<(), Self::Error>
[src]
impl<'r, T> MotionControl for RefMut<'r, T> where
T: MotionControl,
[src]
T: MotionControl,
type Velocity = T::Velocity
The type used by the driver to represent velocity
type Error = T::Error
The type error that can happen when using this trait
fn move_to_position(
&mut self,
max_velocity: Self::Velocity,
target_step: i32
) -> Result<(), Self::Error>
[src]
&mut self,
max_velocity: Self::Velocity,
target_step: i32
) -> Result<(), Self::Error>
fn reset_position(&mut self, step: i32) -> Result<(), Self::Error>
[src]
fn update(&mut self) -> Result<bool, Self::Error>
[src]
impl<'r, T> SetDirection for RefMut<'r, T> where
T: SetDirection,
[src]
T: SetDirection,
const SETUP_TIME: Nanoseconds
[src]
type Dir = T::Dir
The type of the DIR pin
type Error = T::Error
The error that can occur while using this trait
fn dir(&mut self) -> &mut Self::Dir
[src]
impl<'r, T> SetStepMode for RefMut<'r, T> where
T: SetStepMode,
[src]
T: SetStepMode,
const SETUP_TIME: Nanoseconds
[src]
const HOLD_TIME: Nanoseconds
[src]
type Error = T::Error
The error that can occur while using this trait
type StepMode = T::StepMode
The type that defines the microstepping mode Read more
fn apply_mode_config(
&mut self,
step_mode: Self::StepMode
) -> Result<(), Self::Error>
[src]
&mut self,
step_mode: Self::StepMode
) -> Result<(), Self::Error>
fn enable_driver(&mut self) -> Result<(), Self::Error>
[src]
impl<'r, T> Step for RefMut<'r, T> where
T: Step,
[src]
T: Step,
const PULSE_LENGTH: Nanoseconds
[src]
type Step = T::Step
The type of the STEP pin
type Error = T::Error
The error that can occur while using this trait
fn step(&mut self) -> &mut Self::Step
[src]
Auto Trait Implementations
impl<'r, T> Send for RefMut<'r, T> where
T: Send,
T: Send,
impl<'r, T> Sync for RefMut<'r, T> where
T: Sync,
T: Sync,
impl<'r, T> Unpin for RefMut<'r, T>
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>,