#[derive(DDS)]
{
// Attributes available to this derive:
#[dds]
}
Expand description
#[derive(DDS)] macro: generates TypeDescriptor + encode/decode impl
Supports:
- Primitive types: i8, i16, i32, i64, u8, u16, u32, u64, f32, f64, bool
- String type: variable-length UTF-8 string
- Vec
: variable-length byte array
§Panics
Panics if struct contains unsupported field types or unnamed fields
Example:
ⓘ
use hdds_codegen::DDS;
#[derive(DDS)]
struct ImageMeta {
image_id: u32,
width: u16,
height: u16,
format: String, // Variable-length string
data: Vec<u8>, // Variable-length byte array
}