Trait Flag

Source
pub trait Flag:
    Debug
    + Sized
    + Clone
    + Copy
    + Hash
    + Eq {
    type FlagClass: FlagClass;

    // Required methods
    fn name(&self) -> Cow<'_, str>;
    fn role(&self, class: Option<Self::FlagClass>) -> FlagRole;
    fn id(&self) -> FlagId;
}

Required Associated Types§

Required Methods§

Source

fn name(&self) -> Cow<'_, str>

Source

fn role(&self, class: Option<Self::FlagClass>) -> FlagRole

Source

fn id(&self) -> FlagId

Unique identifier for this Flag.

MUST be in the range [0, 0x7fff_ffff]

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§