Crate qbsp_macros

Crate qbsp_macros 

Source

Derive Macrosยง

BspValue
Automatically implements BspValue on structs in the order of the fields, or unit enums with #[repr(...)] and explicit discriminants (e.g. Foo = 1).
BspVariableValue
Automatically implement BspVariableValue on single-field tuple structs. Note: This will additionally implement From<T> where (inner field type): From<T> for the type, in order to convert from the individual format types, and will implement {Deref,DerefMut}<Target = (inner field type)>. Specify the variant types per BSP format with #[bsp2(..)], #[bsp29(..)], #[bsp30(..)] and #[bsp38(..)] annotations respectively. All format variants must be specified, if a field does not exist in a format use NoField and implement From<NoField> for the inner field type.