Trait sawp_pop3::Flag

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

    const ITEMS: &'static [Self];

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

Re-export of the Flags struct that is used to represent bit flags in this crate. A trait implemented by all flag enums.

Required Associated Types§

source

type Primitive: Primitive

Associated primitive numeric type

Required Associated Constants§

source

const ITEMS: &'static [Self]

A list of all flag variants in the enum

Required Methods§

source

fn bits(self) -> Self::Primitive

Numeric representation of the variant

source

fn none() -> Flags<Self>

Flag value when no variants are set

source

fn all() -> Flags<Self>

Flag value when all variants are set

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Flag for ErrorFlag

§

type Primitive = u8

source§

const ITEMS: &'static [Self] = _

source§

impl Flag for Test

§

type Primitive = u8

source§

const ITEMS: &'static [Test] = _