#[repr(u8)]
pub enum AnotherTestEnum {
    Alice,
    Bob,
    Charlie,
}
Available on trace_macros only.
Expand description

Another example enum type implementing FromBits.

This one has a fallible FromBits::try_from_bits method, because some bit patterns are not valid enum variants.

Variants

Alice

Bob

Charlie

Trait Implementations

Formats the value using the given formatter. Read more

The number of bits required to represent a value of this type.

The error type returned by Self::try_from_bits when an invalid bit pattern is encountered. Read more

Attempt to convert bits into a value of this type. Read more

Convert self into a raw bit representation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.