Skip to main content

Crate photon_ring_derive

Crate photon_ring_derive 

Source
Expand description

Derive macro for [photon_ring::Pod].

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

This generates #[repr(C)], #[derive(Clone, Copy)], and unsafe impl photon_ring::Pod for Quote {} — with a compile-time check that every field type implements Pod.

Derive Macros§

Pod
Derive Pod for a struct.