Struct rustc_resolve::DefModifiersUnstable
[-] [+]
[src]
pub struct DefModifiers { // some fields omitted }
Methods
impl DefModifiers
fn empty() -> DefModifiers
Returns an empty set of flags.
fn all() -> DefModifiers
Returns the set containing all flags.
fn bits(&self) -> u8
Returns the raw value of the flags currently stored.
fn from_bits(bits: u8) -> Option<DefModifiers>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
fn from_bits_truncate(bits: u8) -> DefModifiers
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
fn is_all(&self) -> bool
Returns true
if all flags are currently set.
fn intersects(&self, other: DefModifiers) -> bool
Returns true
if there are flags common to both self
and other
.
fn contains(&self, other: DefModifiers) -> bool
Returns true
all of the flags in other
are contained within self
.
fn insert(&mut self, other: DefModifiers)
Inserts the specified flags in-place.
fn remove(&mut self, other: DefModifiers)
Removes the specified flags in-place.
fn toggle(&mut self, other: DefModifiers)
Toggles the specified flags in-place.
Trait Implementations
impl BitOr for DefModifiers
type Output = DefModifiers
fn bitor(self, other: DefModifiers) -> DefModifiers
Returns the union of the two sets of flags.
impl BitXor for DefModifiers
type Output = DefModifiers
fn bitxor(self, other: DefModifiers) -> DefModifiers
Returns the left flags, but with all the right flags toggled.
impl BitAnd for DefModifiers
type Output = DefModifiers
fn bitand(self, other: DefModifiers) -> DefModifiers
Returns the intersection between the two sets of flags.
impl Sub for DefModifiers
type Output = DefModifiers
fn sub(self, other: DefModifiers) -> DefModifiers
Returns the set difference of the two sets of flags.
impl Not for DefModifiers
type Output = DefModifiers
fn not(self) -> DefModifiers
Returns the complement of this set of flags.