Derive Macro ByteEq

#[derive(ByteEq)]
{
    // Attributes available to this derive:
    #[zerocopy]
}
Expand description

Derives an optimized implementation of PartialEq and Eq for types that implement IntoBytes and Immutable.

The standard library’s derive for PartialEq generates a recursive descent into the fields of the type it is applied to. Instead, the implementation derived by this macro performs a single slice comparison of the bytes of the two values being compared.