pub trait Flag: Copy + Clone + Debug + Display + 'static {
    type Primitive: Primitive;

    const ITEMS: &'static [Self];

    fn bits(self) -> Self::Primitive;
    fn none() -> Flags<Self>;
    fn all() -> Flags<Self>;
}
Expand description

A trait implemented by all flag enums.

Required Associated Types

Associated primitive numeric type

Required Associated Constants

A list of all flag variants in the enum

Required Methods

Numeric representation of the variant

Flag value when no variants are set

Flag value when all variants are set

Implementors