pub enum ID {
Reserved,
Default,
Custom(u8),
Control,
Config,
Status,
DMX,
Broadcast,
}Expand description
Protocol ID used to identify the purpose of a packet.
IDs are used to differentiate between pixel data, control messages, configuration queries, and other packet types. The ID space is divided into several ranges:
- 0: Reserved
- 1: Default (standard pixel data)
- 2-245, 247-249: Custom IDs for application-specific use
- 246: Control messages (JSON control read/write)
- 250: Configuration messages (JSON config read/write)
- 251: Status messages (JSON status read-only)
- 254: DMX data
- 255: Broadcast to all displays
§Examples
use ddp_rs::protocol::ID;
// Standard pixel data
let pixel_id = ID::Default;
// Control message
let control_id = ID::Control;
// Custom application ID
let custom_id = ID::Custom(42);Variants§
Reserved
Reserved, should not be used
Default
Default ID for standard pixel data
Custom(u8)
Custom ID in ranges 2-245 and 247-249
Control
Control message ID (246) for JSON control read/write
Config
Configuration message ID (250) for JSON config read/write
Status
Status message ID (251) for JSON status read-only
DMX
DMX data ID (254)
Broadcast
Broadcast to all displays (255)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ID
impl<'de> Deserialize<'de> for ID
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for ID
impl Eq for ID
impl StructuralPartialEq for ID
Auto Trait Implementations§
impl Freeze for ID
impl RefUnwindSafe for ID
impl Send for ID
impl Sync for ID
impl Unpin for ID
impl UnwindSafe for ID
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