pub struct Varflags<E, B>(/* private fields */)
where
E: Sized + Clone + TryFrom<Index<B>>,
B: Bitset + Copy,
B::Repr: From<E>;Expand description
Struct representing set over variants of some enum E implemented using bitworks bitset B.
Implementations§
source§impl<E, B> Varflags<E, B>
impl<E, B> Varflags<E, B>
sourcepub const fn _from_inner(bitset: B) -> Self
pub const fn _from_inner(bitset: B) -> Self
Constructs Varflags from the inner Bitset.
sourcepub fn includes(&self, other: &Self) -> bool
pub fn includes(&self, other: &Self) -> bool
Returns true, if self contains all variants of other.
sourcepub fn intersects(&self, other: &Self) -> bool
pub fn intersects(&self, other: &Self) -> bool
Returns true, if both self and other share at least 1 variant.
Trait Implementations§
source§impl<E, B> BitAndAssign<E> for Varflags<E, B>
impl<E, B> BitAndAssign<E> for Varflags<E, B>
source§fn bitand_assign(&mut self, rhs: E)
fn bitand_assign(&mut self, rhs: E)
Performs the
&= operation. Read moresource§impl<E, B> BitAndAssign for Varflags<E, B>
impl<E, B> BitAndAssign for Varflags<E, B>
source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moresource§impl<E, B> BitOrAssign<E> for Varflags<E, B>
impl<E, B> BitOrAssign<E> for Varflags<E, B>
source§fn bitor_assign(&mut self, rhs: E)
fn bitor_assign(&mut self, rhs: E)
Performs the
|= operation. Read moresource§impl<E, B> BitOrAssign for Varflags<E, B>
impl<E, B> BitOrAssign for Varflags<E, B>
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moresource§impl<E, B> BitXorAssign<E> for Varflags<E, B>
impl<E, B> BitXorAssign<E> for Varflags<E, B>
source§fn bitxor_assign(&mut self, rhs: E)
fn bitxor_assign(&mut self, rhs: E)
Performs the
^= operation. Read moresource§impl<E, B> BitXorAssign for Varflags<E, B>
impl<E, B> BitXorAssign for Varflags<E, B>
source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moresource§impl<E, B> FromIterator<E> for Varflags<E, B>
impl<E, B> FromIterator<E> for Varflags<E, B>
source§fn from_iter<T: IntoIterator<Item = E>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = E>>(iter: T) -> Self
Creates a value from an iterator. Read more
impl<E, B> Copy for Varflags<E, B>
impl<E, B> Eq for Varflags<E, B>
impl<E, B> StructuralPartialEq for Varflags<E, B>
Auto Trait Implementations§
impl<E, B> Freeze for Varflags<E, B>
impl<E, B> RefUnwindSafe for Varflags<E, B>
impl<E, B> Send for Varflags<E, B>
impl<E, B> Sync for Varflags<E, B>
impl<E, B> Unpin for Varflags<E, B>
impl<E, B> UnwindSafe for Varflags<E, B>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)