pub struct AcceptFlags { /* private fields */ }
Implementations§
Source§impl AcceptFlags
impl AcceptFlags
Sourcepub fn empty() -> AcceptFlags
pub fn empty() -> AcceptFlags
Returns an empty set of flags.
Sourcepub fn all() -> AcceptFlags
pub fn all() -> AcceptFlags
Returns the set containing all flags.
Sourcepub fn from_bits(bits: c_int) -> Option<AcceptFlags>
pub fn from_bits(bits: c_int) -> Option<AcceptFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub fn from_bits_truncate(bits: c_int) -> AcceptFlags
pub fn from_bits_truncate(bits: c_int) -> AcceptFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub fn intersects(&self, other: AcceptFlags) -> bool
pub fn intersects(&self, other: AcceptFlags) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub fn contains(&self, other: AcceptFlags) -> bool
pub fn contains(&self, other: AcceptFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: AcceptFlags)
pub fn insert(&mut self, other: AcceptFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: AcceptFlags)
pub fn remove(&mut self, other: AcceptFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: AcceptFlags)
pub fn toggle(&mut self, other: AcceptFlags)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: AcceptFlags, value: bool)
pub fn set(&mut self, other: AcceptFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl BitAnd for AcceptFlags
impl BitAnd for AcceptFlags
Source§fn bitand(self, other: AcceptFlags) -> AcceptFlags
fn bitand(self, other: AcceptFlags) -> AcceptFlags
Returns the intersection between the two sets of flags.
Source§type Output = AcceptFlags
type Output = AcceptFlags
&
operator.Source§impl BitAndAssign for AcceptFlags
impl BitAndAssign for AcceptFlags
Source§fn bitand_assign(&mut self, other: AcceptFlags)
fn bitand_assign(&mut self, other: AcceptFlags)
Disables all flags disabled in the set.
Source§impl BitOr for AcceptFlags
impl BitOr for AcceptFlags
Source§fn bitor(self, other: AcceptFlags) -> AcceptFlags
fn bitor(self, other: AcceptFlags) -> AcceptFlags
Returns the union of the two sets of flags.
Source§type Output = AcceptFlags
type Output = AcceptFlags
|
operator.Source§impl BitOrAssign for AcceptFlags
impl BitOrAssign for AcceptFlags
Source§fn bitor_assign(&mut self, other: AcceptFlags)
fn bitor_assign(&mut self, other: AcceptFlags)
Adds the set of flags.
Source§impl BitXor for AcceptFlags
impl BitXor for AcceptFlags
Source§fn bitxor(self, other: AcceptFlags) -> AcceptFlags
fn bitxor(self, other: AcceptFlags) -> AcceptFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = AcceptFlags
type Output = AcceptFlags
^
operator.Source§impl BitXorAssign for AcceptFlags
impl BitXorAssign for AcceptFlags
Source§fn bitxor_assign(&mut self, other: AcceptFlags)
fn bitxor_assign(&mut self, other: AcceptFlags)
Toggles the set of flags.
Source§impl Clone for AcceptFlags
impl Clone for AcceptFlags
Source§fn clone(&self) -> AcceptFlags
fn clone(&self) -> AcceptFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AcceptFlags
impl Debug for AcceptFlags
Source§impl Extend<AcceptFlags> for AcceptFlags
impl Extend<AcceptFlags> for AcceptFlags
Source§fn extend<T: IntoIterator<Item = AcceptFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = AcceptFlags>>(&mut self, iterator: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl FromIterator<AcceptFlags> for AcceptFlags
impl FromIterator<AcceptFlags> for AcceptFlags
Source§fn from_iter<T: IntoIterator<Item = AcceptFlags>>(iterator: T) -> AcceptFlags
fn from_iter<T: IntoIterator<Item = AcceptFlags>>(iterator: T) -> AcceptFlags
Source§impl Hash for AcceptFlags
impl Hash for AcceptFlags
Source§impl Not for AcceptFlags
impl Not for AcceptFlags
Source§fn not(self) -> AcceptFlags
fn not(self) -> AcceptFlags
Returns the complement of this set of flags.
Source§type Output = AcceptFlags
type Output = AcceptFlags
!
operator.Source§impl Ord for AcceptFlags
impl Ord for AcceptFlags
Source§fn cmp(&self, other: &AcceptFlags) -> Ordering
fn cmp(&self, other: &AcceptFlags) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for AcceptFlags
impl PartialEq for AcceptFlags
Source§impl PartialOrd for AcceptFlags
impl PartialOrd for AcceptFlags
Source§impl Sub for AcceptFlags
impl Sub for AcceptFlags
Source§fn sub(self, other: AcceptFlags) -> AcceptFlags
fn sub(self, other: AcceptFlags) -> AcceptFlags
Returns the set difference of the two sets of flags.
Source§type Output = AcceptFlags
type Output = AcceptFlags
-
operator.Source§impl SubAssign for AcceptFlags
impl SubAssign for AcceptFlags
Source§fn sub_assign(&mut self, other: AcceptFlags)
fn sub_assign(&mut self, other: AcceptFlags)
Disables all flags enabled in the set.