pub trait QualifierFlag:
BitOr<Self, Output = Self>
+ Ord
+ Hash
+ Shareable {
// Required methods
fn contains(&self, other: &Self) -> bool;
fn intersects(&self, other: &Self) -> bool;
fn set_equals(&self, other: &Self) -> bool;
fn none() -> Self;
fn is_none(&self) -> bool;
// Provided method
fn is_none_or_intersects(&self, other: &Self) -> bool { ... }
}
Expand description
A flags like Qualifier
for stats, normally bitflags or a set.
An application should ideally implement one QualifierFlag
and multiple Stat
s,
since different types of stats can still interop if they use the same QualifierFlag
.
Required Methods§
fn contains(&self, other: &Self) -> bool
fn intersects(&self, other: &Self) -> bool
fn set_equals(&self, other: &Self) -> bool
fn none() -> Self
fn is_none(&self) -> bool
Provided Methods§
fn is_none_or_intersects(&self, other: &Self) -> bool
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.