[−][src]Struct rotary_encoder_hal::Rotary
Holds current/old state and both InputPin
Methods
impl<A, B> Rotary<A, B> where
A: InputPin,
B: InputPin,
[src]
A: InputPin,
B: InputPin,
pub fn new(pin_a: A, pin_b: B) -> Self
[src]
Accepts two InputPin
s, these will be read on every update()
InputPin: https://docs.rs/embedded-hal/0.2.3/embedded_hal/digital/v2/trait.InputPin.html
pub fn update(&mut self) -> Result<Direction, Either<A::Error, B::Error>>
[src]
Call update
to evaluate the next state of the encoder, propagates errors from InputPin
read
Trait Implementations
impl<A: Debug, B: Debug> Debug for Rotary<A, B>
[src]
impl<A: PartialEq, B: PartialEq> PartialEq<Rotary<A, B>> for Rotary<A, B>
[src]
impl<A: Eq, B: Eq> Eq for Rotary<A, B>
[src]
impl<A: Clone, B: Clone> Clone for Rotary<A, B>
[src]
fn clone(&self) -> Rotary<A, B>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl<A, B> Unpin for Rotary<A, B> where
A: Unpin,
B: Unpin,
A: Unpin,
B: Unpin,
impl<A, B> Send for Rotary<A, B> where
A: Send,
B: Send,
A: Send,
B: Send,
impl<A, B> Sync for Rotary<A, B> where
A: Sync,
B: Sync,
A: Sync,
B: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
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.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,