viiper_client/
wire.rs

1// This file is auto-generated by VIIPER codegen. DO NOT EDIT.
2
3/// Trait for device input types that can be serialized to wire protocol bytes.
4///
5/// Input types represent data sent from the client to the device (client-to-server).
6pub trait DeviceInput {
7    /// Serialize this input to wire protocol bytes (little-endian).
8    fn to_bytes(&self) -> Vec<u8>;
9}
10
11/// Trait for device output types that can be deserialized from wire protocol bytes.
12///
13/// Output types represent data received from the device (server-to-client).
14pub trait DeviceOutput: Sized {
15    /// Deserialize this output from wire protocol bytes (little-endian).
16    fn from_bytes(buf: &[u8]) -> Result<Self, crate::error::ViiperError>;
17}