pub enum Command {
GetFullInfo,
EnableBufferSizeResponseOnData(bool),
SetOutput(bool),
GetRingbufferEmptySampleCount,
SampleData(SampleData),
}Expand description
Command structure for the LaserCube protocol.
Variants§
GetFullInfo
Get detailed device information.
EnableBufferSizeResponseOnData(bool)
Enable/disable buffer size responses on data packets.
SetOutput(bool)
Enable/disable laser output.
GetRingbufferEmptySampleCount
Get the number of free samples in the device’s ring buffer.
SampleData(SampleData)
Send point data to render.
Implementations§
Source§impl Command
impl Command
Sourcepub fn command_type(&self) -> CommandType
pub fn command_type(&self) -> CommandType
Get the command type associated with this command.
Sourcepub fn write_bytes(&self, buffer: &mut Vec<u8>) -> usize
pub fn write_bytes(&self, buffer: &mut Vec<u8>) -> usize
Write this command into the provided byte buffer.
Returns the number of bytes written.
Trait Implementations§
impl Eq 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