#[repr(C)]pub struct Event { /* private fields */ }Expand description
Represents an event Message sent by the device.
Implementations§
source§impl Event
impl Event
sourcepub const fn message_type(&self) -> MessageType
pub const fn message_type(&self) -> MessageType
Gets the MessageType of the Event.
sourcepub const fn event_type(&self) -> EventType
pub const fn event_type(&self) -> EventType
sourcepub fn set_event_type(&mut self, event_type: EventType)
pub fn set_event_type(&mut self, event_type: EventType)
sourcepub fn with_event_type(self, event_type: EventType) -> Self
pub fn with_event_type(self, event_type: EventType) -> Self
sourcepub const fn message_code(&self) -> MessageCode
pub const fn message_code(&self) -> MessageCode
Gets the MessageCode of the Event.
sourcepub const fn event_code(&self) -> EventCode
pub const fn event_code(&self) -> EventCode
sourcepub fn set_event_code(&mut self, code: EventCode)
pub fn set_event_code(&mut self, code: EventCode)
sourcepub fn with_event_code(self, code: EventCode) -> Self
pub fn with_event_code(self, code: EventCode) -> Self
sourcepub fn additional(&self) -> &[u8] ⓘ
pub fn additional(&self) -> &[u8] ⓘ
Gets a reference to the additional data of the Event.
sourcepub fn set_additional(&mut self, additional: &[u8])
pub fn set_additional(&mut self, additional: &[u8])
Sets the additional data of the Event.
sourcepub fn with_additional(self, additional: &[u8]) -> Self
pub fn with_additional(self, additional: &[u8]) -> Self
Builder function that sets the additional data of the Event.
Trait Implementations§
source§impl PartialEq for Event
impl PartialEq for Event
impl Eq for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnwindSafe for Event
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