Derive Macro UnitTrait

Source
#[derive(UnitTrait)]
{
    // Attributes available to this derive:
    #[unit]
}
Expand description

Creates a custom trait for CSS unit <name>Value

§Used on

  • units

§Purpose

Quickly generates a trait with bounds and the “contstructor” method, to use on any data type that relies on this targetted unit.