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]
PD: PortDriver + PortDriverTotemPole,
MUTEX: BusMutex<Bus = PD>,
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]
PD: PortDriver,
MUTEX: BusMutex<Bus = PD>,
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]
PD: PortDriver,
MUTEX: BusMutex<Bus = PD>,
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]
PD: PortDriver,
MUTEX: BusMutex<Bus = PD>,
type Error = PD::Error
Error type
fn is_high(&self) -> Result<bool, Self::Error>
[src]
fn is_low(&self) -> Result<bool, Self::Error>
[src]
impl<'a, MODE: HasOutput, MUTEX, PD> OutputPin for Pin<'a, MODE, MUTEX> where
PD: PortDriver,
MUTEX: BusMutex<Bus = PD>,
[src]
PD: PortDriver,
MUTEX: BusMutex<Bus = PD>,
type Error = PD::Error
Error type
fn set_low(&mut self) -> Result<(), Self::Error>
[src]
fn set_high(&mut self) -> Result<(), Self::Error>
[src]
impl<'a, MODE: HasOutput, MUTEX, PD> StatefulOutputPin for Pin<'a, MODE, MUTEX> where
PD: PortDriver,
MUTEX: BusMutex<Bus = PD>,
[src]
PD: PortDriver,
MUTEX: BusMutex<Bus = PD>,
fn is_set_high(&self) -> Result<bool, Self::Error>
[src]
fn is_set_low(&self) -> Result<bool, Self::Error>
[src]
impl<'a, MODE: HasOutput, MUTEX, PD> ToggleableOutputPin for Pin<'a, MODE, MUTEX> where
PD: PortDriver,
MUTEX: BusMutex<Bus = PD>,
[src]
PD: PortDriver,
MUTEX: BusMutex<Bus = PD>,
Auto Trait Implementations
impl<'a, MODE, MUTEX> Send for Pin<'a, MODE, MUTEX> where
MODE: Send,
MUTEX: Sync,
MODE: Send,
MUTEX: Sync,
impl<'a, MODE, MUTEX> Sync for Pin<'a, MODE, MUTEX> where
MODE: Sync,
MUTEX: Sync,
MODE: Sync,
MUTEX: Sync,
impl<'a, MODE, MUTEX> Unpin for Pin<'a, MODE, MUTEX> where
MODE: Unpin,
MODE: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,