Crate lain_derive

Crate lain_derive 

Source

Derive Macros§

BinarySerialize
Implements [lain::traits::BinarySerialize] on the given struct/enum. The byteorder of fields can be overridden with #[byteorder(big)] or #[byteorder(little)]
FuzzerObject
A “catch-all” derive for NewFuzzed, Mutatable, and VariableObjectSize
Mutatable
Automatically implements [trait@lain::traits::Mutatable] with basic randomization
NewFuzzed
Implements [rand::distributions::Standard] for enums that derive this trait. This will allow you to use rand::gen() to randomly select an enum value.
ToPrimitiveU8
Implements ToPrimitive<u8> for the given enum.
ToPrimitiveU16
Implements ToPrimitive<u16> for the given enum.
ToPrimitiveU32
Implements ToPrimitive<u32> for the given enum.
ToPrimitiveU64
Implements ToPrimitive<u64> for the given enum.
VariableSizeObject
Automatically implements [trait@lain::traits::VariableSizeObject]