pub struct Command {
pub actions: Vec<Action>,
}
Expand description
ALP request that can be sent to an ALP compatible device.
Fields§
§actions: Vec<Action>
Implementations§
source§impl Command
impl Command
pub fn encoded_size(&self) -> usize
sourcepub unsafe fn encode_in(&self, out: &mut [u8]) -> usize
pub unsafe fn encode_in(&self, out: &mut [u8]) -> usize
Encode the item into a given byte array.
§Safety
You have to ensure there is enough space in the given array (compared to what encoded_size returns) or this method will panic.
§Panics
Panics if the given out
array is too small.
pub fn encode(&self) -> Box<[u8]>
pub fn decode(out: &[u8]) -> Result<Self, WithOffset<CommandParseFail>>
pub fn request_id(&self) -> Option<u8>
pub fn response_id(&self) -> Option<u8>
pub fn is_last_response(&self) -> bool
Trait Implementations§
source§impl PartialEq for Command
impl PartialEq for Command
impl StructuralPartialEq for Command
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