pub struct EmapiCommand {
pub command_type: u8,
pub parent: u8,
pub child: u8,
pub payload: Vec<u8>,
}Fields§
§command_type: u8§parent: u8§child: u8§payload: Vec<u8>Implementations§
Source§impl EmapiCommand
impl EmapiCommand
pub fn new( command_type: u8, parent: u8, child: u8, payload: impl Into<Vec<u8>>, ) -> Self
pub fn try_new( command_type: u16, parent: u16, child: u16, payload: impl Into<Vec<u8>>, ) -> Result<Self>
pub fn is_ack_for(&self, parent: u8, child: u8) -> bool
pub fn is_response_for(&self, command_type: u8, parent: u8, child: u8) -> bool
pub fn is_error(&self) -> bool
pub fn is_protocol_error(&self) -> bool
pub fn is_passthrough_error(&self) -> bool
Trait Implementations§
Source§impl Clone for EmapiCommand
impl Clone for EmapiCommand
Source§fn clone(&self) -> EmapiCommand
fn clone(&self) -> EmapiCommand
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EmapiCommand
impl Debug for EmapiCommand
impl Eq for EmapiCommand
Source§impl PartialEq for EmapiCommand
impl PartialEq for EmapiCommand
Source§fn eq(&self, other: &EmapiCommand) -> bool
fn eq(&self, other: &EmapiCommand) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for EmapiCommand
Auto Trait Implementations§
impl Freeze for EmapiCommand
impl RefUnwindSafe for EmapiCommand
impl Send for EmapiCommand
impl Sync for EmapiCommand
impl Unpin for EmapiCommand
impl UnsafeUnpin for EmapiCommand
impl UnwindSafe for EmapiCommand
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