#[derive(Unit)]
{
// Attributes available to this derive:
#[spongefish]
}
Expand description
Derive Units for structs.
use spongefish::Unit;
#[derive(Clone, Unit)]
struct Rgb {
r: u8,
g: u8,
b: u8,
}
assert_eq!((Rgb::ZERO.r, Rgb::ZERO.g, Rgb::ZERO.b), (0, 0, 0));