Struct dummy_pin::LastStateDummyPin[][src]

pub struct LastStateDummyPin { /* fields omitted */ }

Dummy pin implementation which stores the last level set to it and returns it when read.

Note that this implementation is not zero-cost due to the need to update the level dynamically.

Implementations

impl LastStateDummyPin[src]

pub fn new(is_high: bool) -> Self[src]

Create new instance of pin with the initial level provided.

true corresponds to a high level and false to low level.

pub fn new_low() -> Self[src]

Create new instance of pin initially set low.

pub fn new_high() -> Self[src]

Create new instance of pin initially set high.

Trait Implementations

impl Clone for LastStateDummyPin[src]

impl Copy for LastStateDummyPin[src]

impl Debug for LastStateDummyPin[src]

impl InputPin for LastStateDummyPin[src]

type Error = Infallible

Error type

impl OutputPin for LastStateDummyPin[src]

type Error = Infallible

Error type

impl StatefulOutputPin for LastStateDummyPin[src]

impl ToggleableOutputPin for LastStateDummyPin[src]

type Error = Infallible

Error type

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.