pub enum PinState {
Low,
High,
}
Expand description
Digital output pin state.
Conversion from bool
and logical negation are also implemented
for this type.
let state = PinState::from(false);
assert_eq!(state, PinState::Low);
assert_eq!(!state, PinState::High);
Variants§
Trait Implementations§
impl Copy for PinState
impl Eq for PinState
impl StructuralPartialEq for PinState
Auto Trait Implementations§
impl Freeze for PinState
impl RefUnwindSafe for PinState
impl Send for PinState
impl Sync for PinState
impl Unpin for PinState
impl UnwindSafe for PinState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Low
: 0 bytesHigh
: 0 bytes