Struct drv8825::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 as CountDown>::Error
An enumeration of CountDown
errors. Read more
type Time = <T as CountDown>::Time
The unit of time used by this timer
pub fn try_start<Time>(
&mut self,
count: Time
) -> Result<(), <RefMut<'r, T> as CountDown>::Error> where
Time: Into<<RefMut<'r, T> as CountDown>::Time>,
[src]
&mut self,
count: Time
) -> Result<(), <RefMut<'r, T> as CountDown>::Error> where
Time: Into<<RefMut<'r, T> as CountDown>::Time>,
pub fn try_wait(
&mut self
) -> Result<(), Error<<RefMut<'r, T> as CountDown>::Error>>
[src]
&mut self
) -> Result<(), Error<<RefMut<'r, T> as CountDown>::Error>>
impl<'r, T> MotionControl for RefMut<'r, T> where
T: MotionControl,
[src]
T: MotionControl,
type Velocity = <T as MotionControl>::Velocity
The type used by the driver to represent velocity
type Error = <T as MotionControl>::Error
The type error that can happen when using this trait
pub fn move_to_position(
&mut self,
max_velocity: <RefMut<'r, T> as MotionControl>::Velocity,
target_step: i32
) -> Result<(), <RefMut<'r, T> as MotionControl>::Error>
[src]
&mut self,
max_velocity: <RefMut<'r, T> as MotionControl>::Velocity,
target_step: i32
) -> Result<(), <RefMut<'r, T> as MotionControl>::Error>
pub fn reset_position(
&mut self,
step: i32
) -> Result<(), <RefMut<'r, T> as MotionControl>::Error>
[src]
&mut self,
step: i32
) -> Result<(), <RefMut<'r, T> as MotionControl>::Error>
pub fn update(
&mut self
) -> Result<bool, <RefMut<'r, T> as MotionControl>::Error>
[src]
&mut self
) -> Result<bool, <RefMut<'r, T> as MotionControl>::Error>
impl<'r, T> SetDirection for RefMut<'r, T> where
T: SetDirection,
[src]
T: SetDirection,
pub const SETUP_TIME: Nanoseconds<u32>
[src]
type Dir = <T as SetDirection>::Dir
The type of the DIR pin
type Error = <T as SetDirection>::Error
The error that can occur while using this trait
pub fn dir(&mut self) -> &mut <RefMut<'r, T> as SetDirection>::Dir
[src]
impl<'r, T> SetStepMode for RefMut<'r, T> where
T: SetStepMode,
[src]
T: SetStepMode,
pub const SETUP_TIME: Nanoseconds<u32>
[src]
pub const HOLD_TIME: Nanoseconds<u32>
[src]
type Error = <T as SetStepMode>::Error
The error that can occur while using this trait
type StepMode = <T as SetStepMode>::StepMode
The type that defines the microstepping mode Read more
pub fn apply_mode_config(
&mut self,
step_mode: <RefMut<'r, T> as SetStepMode>::StepMode
) -> Result<(), <RefMut<'r, T> as SetStepMode>::Error>
[src]
&mut self,
step_mode: <RefMut<'r, T> as SetStepMode>::StepMode
) -> Result<(), <RefMut<'r, T> as SetStepMode>::Error>
pub fn enable_driver(
&mut self
) -> Result<(), <RefMut<'r, T> as SetStepMode>::Error>
[src]
&mut self
) -> Result<(), <RefMut<'r, T> as SetStepMode>::Error>
impl<'r, T> Step for RefMut<'r, T> where
T: Step,
[src]
T: Step,
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>,