pub struct RefMut<'r, T>(pub &'r mut T);
Expand description

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.

Tuple Fields

0: &'r mut T

Trait Implementations

The type used by the driver to represent velocity

The type error that can happen when using this trait

Move to the given position Read more

Reset internal position to the given value Read more

Update an ongoing motion Read more

The time that the DIR signal must be held for a change to apply

The type of the DIR pin

The error that can occur while accessing the DIR pin

Provides access to the DIR pin

The time the mode signals need to be held before re-enabling the driver

The time the mode signals need to be held after re-enabling the driver

The error that can occur while using this trait

The type that defines the microstepping mode Read more

Apply the new step mode configuration Read more

Re-enable the driver after the mode has been set

The minimum length of a STEP pulse

The type of the STEP pin

The error that can occur while accessing the STEP pin

Provides access to the STEP pin

An error that might happen during waiting

Return current time Instant

Start timer with a duration

Tries to stop this timer. An error will be returned if the timer has already been canceled or was never started. An error is also returned if the timer is not Periodic and has already expired. Read more

Wait until timer duration has expired. Must return nb::Error::WouldBlock if timer duration is not yet over. Must return OK(()) as soon as timer duration has expired. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Casts the value.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Casts the value.

Casts the value.

Casts the value.

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the conversion.

Performs the conversion.

Casts the value.

Casts the value.

Should always be Self

Casts the value.

Casts the value.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Casts the value.

Casts the value.

Casts the value.

Casts the value.