pub struct FeatureFlags { /* private fields */ }
Implementations§
Source§impl FeatureFlags
impl FeatureFlags
pub const TEXTURE_NPOT: FeatureFlags
pub const SYNC_TO_VBLANK: FeatureFlags
pub const TEXTURE_YUV: FeatureFlags
pub const TEXTURE_READ_PIXELS: FeatureFlags
pub const STAGE_STATIC: FeatureFlags
pub const STAGE_USER_RESIZE: FeatureFlags
pub const STAGE_CURSOR: FeatureFlags
pub const SHADERS_GLSL: FeatureFlags
pub const OFFSCREEN: FeatureFlags
pub const STAGE_MULTIPLE: FeatureFlags
pub const SWAP_EVENTS: FeatureFlags
Sourcepub const fn empty() -> FeatureFlags
pub const fn empty() -> FeatureFlags
Returns an empty set of flags
Sourcepub const fn all() -> FeatureFlags
pub const fn all() -> FeatureFlags
Returns the set containing all flags.
Sourcepub fn from_bits(bits: u32) -> Option<FeatureFlags>
pub fn from_bits(bits: u32) -> Option<FeatureFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u32) -> FeatureFlags
pub const fn from_bits_truncate(bits: u32) -> FeatureFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> FeatureFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> FeatureFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: FeatureFlags) -> bool
pub const fn intersects(&self, other: FeatureFlags) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: FeatureFlags) -> bool
pub const fn contains(&self, other: FeatureFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: FeatureFlags)
pub fn insert(&mut self, other: FeatureFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: FeatureFlags)
pub fn remove(&mut self, other: FeatureFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: FeatureFlags)
pub fn toggle(&mut self, other: FeatureFlags)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: FeatureFlags, value: bool)
pub fn set(&mut self, other: FeatureFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for FeatureFlags
impl Binary for FeatureFlags
Source§impl BitAnd for FeatureFlags
impl BitAnd for FeatureFlags
Source§fn bitand(self, other: FeatureFlags) -> FeatureFlags
fn bitand(self, other: FeatureFlags) -> FeatureFlags
Returns the intersection between the two sets of flags.
Source§type Output = FeatureFlags
type Output = FeatureFlags
&
operator.Source§impl BitAndAssign for FeatureFlags
impl BitAndAssign for FeatureFlags
Source§fn bitand_assign(&mut self, other: FeatureFlags)
fn bitand_assign(&mut self, other: FeatureFlags)
Disables all flags disabled in the set.
Source§impl BitOr for FeatureFlags
impl BitOr for FeatureFlags
Source§fn bitor(self, other: FeatureFlags) -> FeatureFlags
fn bitor(self, other: FeatureFlags) -> FeatureFlags
Returns the union of the two sets of flags.
Source§type Output = FeatureFlags
type Output = FeatureFlags
|
operator.Source§impl BitOrAssign for FeatureFlags
impl BitOrAssign for FeatureFlags
Source§fn bitor_assign(&mut self, other: FeatureFlags)
fn bitor_assign(&mut self, other: FeatureFlags)
Adds the set of flags.
Source§impl BitXor for FeatureFlags
impl BitXor for FeatureFlags
Source§fn bitxor(self, other: FeatureFlags) -> FeatureFlags
fn bitxor(self, other: FeatureFlags) -> FeatureFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = FeatureFlags
type Output = FeatureFlags
^
operator.Source§impl BitXorAssign for FeatureFlags
impl BitXorAssign for FeatureFlags
Source§fn bitxor_assign(&mut self, other: FeatureFlags)
fn bitxor_assign(&mut self, other: FeatureFlags)
Toggles the set of flags.
Source§impl Clone for FeatureFlags
impl Clone for FeatureFlags
Source§fn clone(&self) -> FeatureFlags
fn clone(&self) -> FeatureFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for FeatureFlags
impl Debug for FeatureFlags
Source§impl Extend<FeatureFlags> for FeatureFlags
impl Extend<FeatureFlags> for FeatureFlags
Source§fn extend<T: IntoIterator<Item = FeatureFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = FeatureFlags>>(&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<FeatureFlags> for FeatureFlags
impl FromIterator<FeatureFlags> for FeatureFlags
Source§fn from_iter<T: IntoIterator<Item = FeatureFlags>>(iterator: T) -> FeatureFlags
fn from_iter<T: IntoIterator<Item = FeatureFlags>>(iterator: T) -> FeatureFlags
Source§impl<'a> FromValue<'a> for FeatureFlags
impl<'a> FromValue<'a> for FeatureFlags
Source§unsafe fn from_value(value: &Value) -> Self
unsafe fn from_value(value: &Value) -> Self
Source§impl<'a> FromValueOptional<'a> for FeatureFlags
impl<'a> FromValueOptional<'a> for FeatureFlags
Source§impl Hash for FeatureFlags
impl Hash for FeatureFlags
Source§impl LowerHex for FeatureFlags
impl LowerHex for FeatureFlags
Source§impl Not for FeatureFlags
impl Not for FeatureFlags
Source§fn not(self) -> FeatureFlags
fn not(self) -> FeatureFlags
Returns the complement of this set of flags.
Source§type Output = FeatureFlags
type Output = FeatureFlags
!
operator.Source§impl Octal for FeatureFlags
impl Octal for FeatureFlags
Source§impl Ord for FeatureFlags
impl Ord for FeatureFlags
Source§fn cmp(&self, other: &FeatureFlags) -> Ordering
fn cmp(&self, other: &FeatureFlags) -> 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 FeatureFlags
impl PartialEq for FeatureFlags
Source§impl PartialOrd for FeatureFlags
impl PartialOrd for FeatureFlags
Source§impl SetValue for FeatureFlags
impl SetValue for FeatureFlags
Source§impl StaticType for FeatureFlags
impl StaticType for FeatureFlags
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.Source§impl Sub for FeatureFlags
impl Sub for FeatureFlags
Source§fn sub(self, other: FeatureFlags) -> FeatureFlags
fn sub(self, other: FeatureFlags) -> FeatureFlags
Returns the set difference of the two sets of flags.
Source§type Output = FeatureFlags
type Output = FeatureFlags
-
operator.Source§impl SubAssign for FeatureFlags
impl SubAssign for FeatureFlags
Source§fn sub_assign(&mut self, other: FeatureFlags)
fn sub_assign(&mut self, other: FeatureFlags)
Disables all flags enabled in the set.
Source§impl UpperHex for FeatureFlags
impl UpperHex for FeatureFlags
impl Copy for FeatureFlags
impl Eq for FeatureFlags
impl StructuralPartialEq for FeatureFlags
Auto Trait Implementations§
impl Freeze for FeatureFlags
impl RefUnwindSafe for FeatureFlags
impl Send for FeatureFlags
impl Sync for FeatureFlags
impl Unpin for FeatureFlags
impl UnwindSafe for FeatureFlags
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ToSendValue for T
impl<T> ToSendValue for T
Source§fn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
SendValue
clone of self
.