pub unsafe trait EnumSetTypeWithRepr: EnumSetType + EnumSetTypePrivate<Repr = Self::Repr> {
    type Repr: EnumSetTypeRepr;
}
Expand description

An EnumSetType for which EnumSets have a guaranteed in-memory representation.

An implementation of this trait is generated by using #[derive(EnumSetType)] with the annotation #[enumset(repr = "…")], where is u8, u16, u32, u64 or u128.

For any type T that implements this trait, the in-memory representation of EnumSet<T> is guaranteed to be Repr. This guarantee is useful for FFI. See the EnumSet documentation under “FFI, Safety and repr for an example.

Required Associated Types§

source

type Repr: EnumSetTypeRepr

The guaranteed representation.

Object Safety§

This trait is not object safe.

Implementors§