Trait pretty_bit_mask::BitMaskable
[−]
[src]
pub trait BitMaskable where
Self: Copy + BitOrAssign + BitXorAssign + BitAndAssign + Not<Output = Self> + BitAnd<Self, Output = Self> + Eq, { fn mask(&mut self, mask: Self); fn flip(&mut self, mask: Self); fn unmask(&mut self, mask: Self); fn masked(self, mask: Self) -> bool; }
The trait describing things which can have
bit masks applied to them. All integer types
(and bool
) implement this trait.
Required Methods
fn mask(&mut self, mask: Self)
Applies a bit mask.
fn flip(&mut self, mask: Self)
Flips the value of a bit mask.
fn unmask(&mut self, mask: Self)
Removes a bit mask.
fn masked(self, mask: Self) -> bool
Checks whether a certain mask is currently applied.
Implementors
impl<B> BitMaskable for B where
B: Copy + BitOrAssign + BitXorAssign + BitAndAssign + Not<Output = B> + BitAnd<B, Output = B> + Eq,