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