photon-ring-derive 2.5.0

Derive macro for photon-ring's Pod trait
Documentation

Derive macros for [photon_ring::Pod] and [photon_ring::Message].

Pod derive

#[derive(photon_ring::Pod)]
struct Quote {
    price: f64,
    volume: u32,
}

This generates compile-time assertions that every field implements Pod, plus unsafe impl photon_ring::Pod for Quote {}.

Note: The macro does not add #[repr(C)] or Clone/Copy derives. You must add those yourself for the Pod contract to hold.

Message derive

#[derive(photon_ring::Message)]
struct Order {
    price: f64,
    qty: u32,
    #[photon(as_enum)]
    side: Side,        // any #[repr(u8)] enum — requires #[photon(as_enum)]
    filled: bool,
    tag: Option<u32>,
}

Generates a Pod-compatible wire struct (OrderWire) plus From conversions in both directions. See [derive_message] for details.