pub struct Flags<T: PartialEq, const SEP: char = '|'>(/* private fields */);Expand description
A set of string-enums
Implementations§
source§impl<T: PartialEq, const S: char> Flags<T, S>
impl<T: PartialEq, const S: char> Flags<T, S>
pub const EMPTY: Self = _
pub fn new(value: T) -> Self
pub fn pair(value1: T, value2: T) -> Self
pub fn len(&self) -> usize
pub fn is_some(&self) -> bool
pub fn is_none(&self) -> bool
pub fn contains(&self, t: impl Query<T>) -> boolwhere T: FlagsMarker,
pub fn iter<'t>(&'t self) -> impl Iterator<Item = &'t T>
Trait Implementations§
source§impl<T: PartialEq, const S: char> AddAssign<Flags<T, S>> for Flags<T, S>
impl<T: PartialEq, const S: char> AddAssign<Flags<T, S>> for Flags<T, S>
source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moresource§impl<T: PartialEq, const S: char> AddAssign<T> for Flags<T, S>
impl<T: PartialEq, const S: char> AddAssign<T> for Flags<T, S>
source§fn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
Performs the
+= operation. Read moresource§impl<T: PartialEq, const S: char> BitAndAssign<Flags<T, S>> for Flags<T, S>
impl<T: PartialEq, const S: char> BitAndAssign<Flags<T, S>> for Flags<T, S>
source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moresource§impl<T: PartialEq, const S: char> BitAndAssign<T> for Flags<T, S>
impl<T: PartialEq, const S: char> BitAndAssign<T> for Flags<T, S>
source§fn bitand_assign(&mut self, rhs: T)
fn bitand_assign(&mut self, rhs: T)
Performs the
&= operation. Read moresource§impl<T: PartialEq, const S: char> BitOrAssign<Flags<T, S>> for Flags<T, S>
impl<T: PartialEq, const S: char> BitOrAssign<Flags<T, S>> for Flags<T, S>
source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moresource§impl<T: PartialEq, const S: char> BitOrAssign<T> for Flags<T, S>
impl<T: PartialEq, const S: char> BitOrAssign<T> for Flags<T, S>
source§fn bitor_assign(&mut self, rhs: T)
fn bitor_assign(&mut self, rhs: T)
Performs the
|= operation. Read moresource§impl<T: PartialEq, const S: char> BitXorAssign<Flags<T, S>> for Flags<T, S>
impl<T: PartialEq, const S: char> BitXorAssign<Flags<T, S>> for Flags<T, S>
source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moresource§impl<T: PartialEq, const S: char> BitXorAssign<T> for Flags<T, S>
impl<T: PartialEq, const S: char> BitXorAssign<T> for Flags<T, S>
source§fn bitxor_assign(&mut self, rhs: T)
fn bitxor_assign(&mut self, rhs: T)
Performs the
^= operation. Read moresource§impl<T, const S: char> PartialEq<Flags<T, S>> for Flags<T, S>where
T: PartialEq,
impl<T, const S: char> PartialEq<Flags<T, S>> for Flags<T, S>where T: PartialEq,
Auto Trait Implementations§
impl<T, const SEP: char> RefUnwindSafe for Flags<T, SEP>where T: RefUnwindSafe,
impl<T, const SEP: char> Send for Flags<T, SEP>where T: Send,
impl<T, const SEP: char> Sync for Flags<T, SEP>where T: Sync,
impl<T, const SEP: char> Unpin for Flags<T, SEP>where T: Unpin,
impl<T, const SEP: char> UnwindSafe for Flags<T, SEP>where T: UnwindSafe + RefUnwindSafe,
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