pub struct ButtonEvent { /* private fields */ }
Expand description
Represents a button event from the protocol.
Implementations
sourceimpl ButtonEvent
impl ButtonEvent
pub fn state(&self) -> &ButtonState
Trait Implementations
sourceimpl Debug for ButtonEvent
impl Debug for ButtonEvent
sourceimpl Format for ButtonEvent
impl Format for ButtonEvent
sourceimpl PartialEq<ButtonEvent> for ButtonEvent
impl PartialEq<ButtonEvent> for ButtonEvent
sourcefn eq(&self, other: &ButtonEvent) -> bool
fn eq(&self, other: &ButtonEvent) -> bool
sourceimpl TryFrom<&[u8]> for ButtonEvent
impl TryFrom<&[u8]> for ButtonEvent
sourcefn try_from(input: &[u8]) -> Result<Self, Self::Error>
fn try_from(input: &[u8]) -> Result<Self, Self::Error>
Parse the data section of a button command.
The full command is not validated here, identifying the command as a button command and CRC validation is the responsibility of the caller!
type Error = ProtocolParseError
type Error = ProtocolParseError
The type returned in the event of a conversion error.
impl Eq for ButtonEvent
impl StructuralEq for ButtonEvent
impl StructuralPartialEq for ButtonEvent
Auto Trait Implementations
impl RefUnwindSafe for ButtonEvent
impl Send for ButtonEvent
impl Sync for ButtonEvent
impl Unpin for ButtonEvent
impl UnwindSafe for ButtonEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more