pub struct BitFlags<F, U>{ /* private fields */ }Implementations§
Source§impl<F, U> BitFlags<F, U>
impl<F, U> BitFlags<F, U>
pub const unsafe fn from_flags_unchecked(flags: U) -> Self
Sourcepub fn try_from_flags(flags: U) -> Option<Self>
pub fn try_from_flags(flags: U) -> Option<Self>
Return None if the flags contains unknow toggled bit (greater than F::MAX)
pub fn from_flags(flags: U) -> Self
pub fn from_flag(flag: F) -> Self
pub fn new() -> Self
pub fn flags(self) -> U
Trait Implementations§
Source§impl<F, U> BitAndAssign<F> for BitFlags<F, U>
impl<F, U> BitAndAssign<F> for BitFlags<F, U>
Source§fn bitand_assign(&mut self, rhs: F)
fn bitand_assign(&mut self, rhs: F)
Performs the
&= operation. Read moreSource§impl<F, U> BitAndAssign for BitFlags<F, U>
impl<F, U> BitAndAssign for BitFlags<F, U>
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl<F, U> BitOrAssign<F> for BitFlags<F, U>
impl<F, U> BitOrAssign<F> for BitFlags<F, U>
Source§fn bitor_assign(&mut self, rhs: F)
fn bitor_assign(&mut self, rhs: F)
Performs the
|= operation. Read moreSource§impl<F, U> BitOrAssign for BitFlags<F, U>
impl<F, U> BitOrAssign for BitFlags<F, U>
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl<F, U> BitXorAssign<F> for BitFlags<F, U>
impl<F, U> BitXorAssign<F> for BitFlags<F, U>
Source§fn bitxor_assign(&mut self, rhs: F)
fn bitxor_assign(&mut self, rhs: F)
Performs the
^= operation. Read moreSource§impl<F, U> BitXorAssign for BitFlags<F, U>
impl<F, U> BitXorAssign for BitFlags<F, U>
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreSource§impl<F, U> Debug for BitFlags<F, U>where
U: BitFlagsIntegerUnsigned + From<F>,
F: MaxValue + Copy + TryFrom<U> + Debug,
RangeInclusive<U>: Iterator<Item = U>,
impl<F, U> Debug for BitFlags<F, U>where
U: BitFlagsIntegerUnsigned + From<F>,
F: MaxValue + Copy + TryFrom<U> + Debug,
RangeInclusive<U>: Iterator<Item = U>,
Source§impl<'de, F, U> Deserialize<'de> for BitFlags<F, U>
impl<'de, F, U> Deserialize<'de> for BitFlags<F, U>
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<F, U> IntoIterator for BitFlags<F, U>where
U: BitFlagsIntegerUnsigned + From<F>,
F: MaxValue + Copy + TryFrom<U>,
RangeInclusive<U>: Iterator<Item = U>,
impl<F, U> IntoIterator for BitFlags<F, U>where
U: BitFlagsIntegerUnsigned + From<F>,
F: MaxValue + Copy + TryFrom<U>,
RangeInclusive<U>: Iterator<Item = U>,
Source§impl<F, U> Ord for BitFlags<F, U>
impl<F, U> Ord for BitFlags<F, U>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<F, U> PartialOrd for BitFlags<F, U>
impl<F, U> PartialOrd for BitFlags<F, U>
impl<F, U> Copy for BitFlags<F, U>
impl<F, U> Eq for BitFlags<F, U>
impl<F, U> StructuralPartialEq for BitFlags<F, U>
Auto Trait Implementations§
impl<F, U> Freeze for BitFlags<F, U>where
U: Freeze,
impl<F, U> RefUnwindSafe for BitFlags<F, U>where
U: RefUnwindSafe,
F: RefUnwindSafe,
impl<F, U> Send for BitFlags<F, U>
impl<F, U> Sync for BitFlags<F, U>
impl<F, U> Unpin for BitFlags<F, U>
impl<F, U> UnwindSafe for BitFlags<F, U>where
U: UnwindSafe,
F: UnwindSafe,
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