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]
fn clone(&self) -> LastStateDummyPin
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for LastStateDummyPin
[src]
impl Debug for LastStateDummyPin
[src]
impl InputPin for LastStateDummyPin
[src]
type Error = Infallible
Error type
fn is_high(&self) -> Result<bool, Self::Error>
[src]
fn is_low(&self) -> Result<bool, Self::Error>
[src]
impl OutputPin for LastStateDummyPin
[src]
type Error = Infallible
Error type
fn set_high(&mut self) -> Result<(), Self::Error>
[src]
fn set_low(&mut self) -> Result<(), Self::Error>
[src]
impl StatefulOutputPin for LastStateDummyPin
[src]
fn is_set_high(&self) -> Result<bool, Self::Error>
[src]
fn is_set_low(&self) -> Result<bool, Self::Error>
[src]
impl ToggleableOutputPin for LastStateDummyPin
[src]
Auto Trait Implementations
impl RefUnwindSafe for LastStateDummyPin
impl Send for LastStateDummyPin
impl Sync for LastStateDummyPin
impl Unpin for LastStateDummyPin
impl UnwindSafe for LastStateDummyPin
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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
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>,