pub struct Command {
pub cmd_type: CommandType,
pub payload: Vec<u8>,
}Expand description
Command characteristic data
Fields§
§cmd_type: CommandTypeCommand type
payload: Vec<u8>Command payload (variable length)
Implementations§
Source§impl Command
impl Command
Sourcepub fn new(cmd_type: CommandType) -> Self
pub fn new(cmd_type: CommandType) -> Self
Create a new command
Sourcepub fn with_payload(cmd_type: CommandType, payload: Vec<u8>) -> Self
pub fn with_payload(cmd_type: CommandType, payload: Vec<u8>) -> Self
Create a command with payload
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
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