Skip to main content

BitPattern

Derive Macro BitPattern 

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

Derive the BitPattern trait for a struct

The macro ensures that the struct follows all the the safety requirements for the BitPattern trait.

The following constraints need to be satisfied for the macro to succeed

  • All fields in the struct must to implement BitPattern