Trait Device

Source
pub trait Device {
    type Error;

    // Required method
    fn step(&mut self, ctx: &StepContext) -> Result<(), Self::Error>;
}
Expand description

An interface to the stepper motor.

Required Associated Types§

Source

type Error

The type of error that may be encountered when taking a step.

Use ! (or void::Void on stable) if stepping can never fail.

Required Methods§

Source

fn step(&mut self, ctx: &StepContext) -> Result<(), Self::Error>

Implementations on Foreign Types§

Source§

impl<'a, D: Device> Device for &'a mut D

Source§

type Error = <D as Device>::Error

Source§

fn step(&mut self, ctx: &StepContext) -> Result<(), Self::Error>

Implementors§

Source§

impl<Step, Direction, E> Device for StepAndDirection<Step, Direction>
where Step: OutputPin<Error = E>, Direction: OutputPin<Error = E>,

Source§

type Error = E