Struct enumflags::BitFlags [] [src]

pub struct BitFlags<T: EnumFlagSize> { /* fields omitted */ }

Methods

impl<T> BitFlags<T> where
    T: EnumFlagSize
[src]

Create a new BitFlags unsafely. Consider using from_bits or from_bits_truncate.

impl<T> BitFlags<T> where
    T: EnumFlagSize,
    T::Size: InnerBitFlags + Into<BitFlags<T>>, 
[src]

Create an empty BitFlags. Empty means 0.

Sets all flags.

Returns true if all flags are set

Returns true if no flag is set

Returns the underlying type value

Returns true if at least one flag is shared.

Returns true iff all flags are contained.

Flips all flags

Returns a BitFlags iff the bits value does not contain any illegal flags.

Truncates flags that are illegal

Trait Implementations

impl<T: Eq + EnumFlagSize> Eq for BitFlags<T> where
    T::Size: Eq
[src]

impl<T: Copy + EnumFlagSize> Copy for BitFlags<T> where
    T::Size: Copy
[src]

impl<T: Clone + EnumFlagSize> Clone for BitFlags<T> where
    T::Size: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T> Debug for BitFlags<T> where
    T: EnumFlagSize,
    T::Size: Debug
[src]

Formats the value using the given formatter.

impl<T> PartialEq for BitFlags<T> where
    T: EnumFlagSize
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T, B> BitOr<B> for BitFlags<T> where
    T: EnumFlagSize,
    B: Into<BitFlags<T>>,
    T::Size: BitOr<T::Size, Output = T::Size> + Into<BitFlags<T>>, 
[src]

The resulting type after applying the | operator

The method for the | operator

impl<T, B> BitAnd<B> for BitFlags<T> where
    T: EnumFlagSize,
    B: Into<BitFlags<T>>,
    T::Size: BitAnd<T::Size, Output = T::Size> + Into<BitFlags<T>>, 
[src]

The resulting type after applying the & operator

The method for the & operator

impl<T, B> BitXor<B> for BitFlags<T> where
    T: EnumFlagSize,
    B: Into<BitFlags<T>>,
    T::Size: BitXor<T::Size, Output = T::Size> + Into<BitFlags<T>>, 
[src]

The resulting type after applying the ^ operator

The method for the ^ operator

impl<T> Not for BitFlags<T> where
    T: EnumFlagSize,
    T::Size: Not<Output = T::Size> + Into<BitFlags<T>>, 
[src]

The resulting type after applying the ! operator

The method for the unary ! operator