[−][src]Struct bitflags::example_generated::Flags
This is the same Flags
struct defined in the crate level example.
Note that this struct is just for documentation purposes only, it must not be used outside
this crate.
Methods
impl Flags
[src][−]
pub fn empty() -> Flags
[src][−]
Returns an empty set of flags.
pub fn all() -> Flags
[src][−]
Returns the set containing all flags.
pub fn bits(&self) -> u32
[src][−]
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u32) -> Option<Flags>
[src][−]
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u32) -> Flags
[src][−]
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
[src][−]
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
[src][−]
Returns true
if all flags are currently set.
pub fn intersects(&self, other: Flags) -> bool
[src][−]
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: Flags) -> bool
[src][−]
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: Flags)
[src][−]
Inserts the specified flags in-place.
pub fn remove(&mut self, other: Flags)
[src][−]
Removes the specified flags in-place.
pub fn toggle(&mut self, other: Flags)
[src][−]
Toggles the specified flags in-place.
pub fn set(&mut self, other: Flags, value: bool)
[src][−]
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Binary for Flags
[src][+]
impl BitAnd<Flags> for Flags
[src][+]
impl BitAndAssign<Flags> for Flags
[src][+]
impl BitOr<Flags> for Flags
[src][+]
impl BitOrAssign<Flags> for Flags
[src][+]
impl BitXor<Flags> for Flags
[src][+]
impl BitXorAssign<Flags> for Flags
[src][+]
impl Clone for Flags
[src][+]
impl Copy for Flags
[src]
impl Debug for Flags
[src][+]
impl Eq for Flags
[src]
impl Extend<Flags> for Flags
[src][+]
impl FromIterator<Flags> for Flags
[src][+]
impl Hash for Flags
[src][+]
impl LowerHex for Flags
[src][+]
impl Not for Flags
[src][+]
impl Octal for Flags
[src][+]
impl Ord for Flags
[src][+]
impl PartialEq<Flags> for Flags
[src][+]
impl PartialOrd<Flags> for Flags
[src][+]
impl StructuralEq for Flags
[src]
impl StructuralPartialEq for Flags
[src]
impl Sub<Flags> for Flags
[src][+]
impl SubAssign<Flags> for Flags
[src][+]
impl UpperHex for Flags
[src][+]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,