[][src]Crate lain_derive

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)]

FixupChildren

Automatically implements [trait@lain::traits::FixupChildren] for the given type. Custom implementations of [trait@lain::traits::Fixup] should call this function at the end of the fixup operations to ensure that all child fields are properly handled.

FuzzerObject

A "catch-all" derive for NewFuzzed, Mutatable, PostFuzzerIteration, FixupChildren, 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.

PostFuzzerIteration
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]