Struct port_expander::Pin[][src]

pub struct Pin<'a, MODE, MUTEX> { /* fields omitted */ }

Representation of a port-expander pin.

Pin is not constructed directly, this type is created by instanciating a port-expander and then getting access to all its pins using the .split() method.

Implementations

impl<'a, MODE, MUTEX, PD> Pin<'a, MODE, MUTEX> where
    PD: PortDriver + PortDriverTotemPole,
    MUTEX: BusMutex<Bus = PD>, 
[src]

pub fn into_input(self) -> Result<Pin<'a, Input, MUTEX>, PD::Error>[src]

pub fn into_output(self) -> Result<Pin<'a, Output, MUTEX>, PD::Error>[src]

impl<'a, MODE: HasInput, MUTEX, PD> Pin<'a, MODE, MUTEX> where
    PD: PortDriver,
    MUTEX: BusMutex<Bus = PD>, 
[src]

pub fn is_high(&self) -> Result<bool, PD::Error>[src]

pub fn is_low(&self) -> Result<bool, PD::Error>[src]

impl<'a, MODE: HasOutput, MUTEX, PD> Pin<'a, MODE, MUTEX> where
    PD: PortDriver,
    MUTEX: BusMutex<Bus = PD>, 
[src]

pub fn set_high(&mut self) -> Result<(), PD::Error>[src]

pub fn set_low(&mut self) -> Result<(), PD::Error>[src]

pub fn is_set_high(&self) -> Result<bool, PD::Error>[src]

pub fn is_set_low(&self) -> Result<bool, PD::Error>[src]

pub fn toggle(&mut self) -> Result<(), PD::Error>[src]

Trait Implementations

impl<'a, MODE: HasInput, MUTEX, PD> InputPin for Pin<'a, MODE, MUTEX> where
    PD: PortDriver,
    MUTEX: BusMutex<Bus = PD>, 
[src]

type Error = PD::Error

Error type

impl<'a, MODE: HasOutput, MUTEX, PD> OutputPin for Pin<'a, MODE, MUTEX> where
    PD: PortDriver,
    MUTEX: BusMutex<Bus = PD>, 
[src]

type Error = PD::Error

Error type

impl<'a, MODE: HasOutput, MUTEX, PD> StatefulOutputPin for Pin<'a, MODE, MUTEX> where
    PD: PortDriver,
    MUTEX: BusMutex<Bus = PD>, 
[src]

impl<'a, MODE: HasOutput, MUTEX, PD> ToggleableOutputPin for Pin<'a, MODE, MUTEX> where
    PD: PortDriver,
    MUTEX: BusMutex<Bus = PD>, 
[src]

type Error = PD::Error

Error type

Auto Trait Implementations

impl<'a, MODE, MUTEX> Send for Pin<'a, MODE, MUTEX> where
    MODE: Send,
    MUTEX: Sync

impl<'a, MODE, MUTEX> Sync for Pin<'a, MODE, MUTEX> where
    MODE: Sync,
    MUTEX: Sync

impl<'a, MODE, MUTEX> Unpin for Pin<'a, MODE, MUTEX> where
    MODE: Unpin

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, 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.