pub struct AtomicCommitFlags(/* private fields */);Expand description
Commit flags for atomic mode setting
Limited to the values in ffi::drm_sys::DRM_MODE_ATOMIC_FLAGS.
Implementations§
Source§impl AtomicCommitFlags
impl AtomicCommitFlags
Sourcepub const PAGE_FLIP_EVENT: AtomicCommitFlags
pub const PAGE_FLIP_EVENT: AtomicCommitFlags
Generate a page flip event, when the changes are applied
Sourcepub const PAGE_FLIP_ASYNC: AtomicCommitFlags
pub const PAGE_FLIP_ASYNC: AtomicCommitFlags
Request page flip when the changes are applied, not waiting for vblank
Sourcepub const TEST_ONLY: AtomicCommitFlags
pub const TEST_ONLY: AtomicCommitFlags
Test only validity of the request, do not actually apply the requested changes
Sourcepub const NONBLOCK: AtomicCommitFlags
pub const NONBLOCK: AtomicCommitFlags
Do not block on the request and return early
Sourcepub const ALLOW_MODESET: AtomicCommitFlags
pub const ALLOW_MODESET: AtomicCommitFlags
Allow the changes to trigger a modeset, if necessary
Changes requiring a modeset are rejected otherwise.
Source§impl AtomicCommitFlags
impl AtomicCommitFlags
Sourcepub const fn empty() -> AtomicCommitFlags
pub const fn empty() -> AtomicCommitFlags
Get a flags value with all bits unset.
Sourcepub const fn all() -> AtomicCommitFlags
pub const fn all() -> AtomicCommitFlags
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u32) -> Option<AtomicCommitFlags>
pub const fn from_bits(bits: u32) -> Option<AtomicCommitFlags>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> AtomicCommitFlags
pub const fn from_bits_truncate(bits: u32) -> AtomicCommitFlags
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> AtomicCommitFlags
pub const fn from_bits_retain(bits: u32) -> AtomicCommitFlags
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<AtomicCommitFlags>
pub fn from_name(name: &str) -> Option<AtomicCommitFlags>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: AtomicCommitFlags) -> bool
pub const fn intersects(&self, other: AtomicCommitFlags) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: AtomicCommitFlags) -> bool
pub const fn contains(&self, other: AtomicCommitFlags) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn insert(&mut self, other: AtomicCommitFlags)
pub fn insert(&mut self, other: AtomicCommitFlags)
The bitwise or (|) of the bits in self and other.
Sourcepub fn remove(&mut self, other: AtomicCommitFlags)
pub fn remove(&mut self, other: AtomicCommitFlags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: AtomicCommitFlags)
pub fn toggle(&mut self, other: AtomicCommitFlags)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: AtomicCommitFlags, value: bool)
pub fn set(&mut self, other: AtomicCommitFlags, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: AtomicCommitFlags) -> AtomicCommitFlags
pub const fn intersection(self, other: AtomicCommitFlags) -> AtomicCommitFlags
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: AtomicCommitFlags) -> AtomicCommitFlags
pub const fn union(self, other: AtomicCommitFlags) -> AtomicCommitFlags
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: AtomicCommitFlags) -> AtomicCommitFlags
pub const fn difference(self, other: AtomicCommitFlags) -> AtomicCommitFlags
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(
self,
other: AtomicCommitFlags,
) -> AtomicCommitFlags
pub const fn symmetric_difference( self, other: AtomicCommitFlags, ) -> AtomicCommitFlags
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> AtomicCommitFlags
pub const fn complement(self) -> AtomicCommitFlags
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl AtomicCommitFlags
impl AtomicCommitFlags
Sourcepub const fn iter(&self) -> Iter<AtomicCommitFlags> ⓘ
pub const fn iter(&self) -> Iter<AtomicCommitFlags> ⓘ
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<AtomicCommitFlags> ⓘ
pub const fn iter_names(&self) -> IterNames<AtomicCommitFlags> ⓘ
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for AtomicCommitFlags
impl Binary for AtomicCommitFlags
Source§impl BitAnd for AtomicCommitFlags
impl BitAnd for AtomicCommitFlags
Source§fn bitand(self, other: AtomicCommitFlags) -> AtomicCommitFlags
fn bitand(self, other: AtomicCommitFlags) -> AtomicCommitFlags
The bitwise and (&) of the bits in self and other.
Source§type Output = AtomicCommitFlags
type Output = AtomicCommitFlags
& operator.Source§impl BitAndAssign for AtomicCommitFlags
impl BitAndAssign for AtomicCommitFlags
Source§fn bitand_assign(&mut self, other: AtomicCommitFlags)
fn bitand_assign(&mut self, other: AtomicCommitFlags)
The bitwise and (&) of the bits in self and other.
Source§impl BitOr for AtomicCommitFlags
impl BitOr for AtomicCommitFlags
Source§fn bitor(self, other: AtomicCommitFlags) -> AtomicCommitFlags
fn bitor(self, other: AtomicCommitFlags) -> AtomicCommitFlags
The bitwise or (|) of the bits in self and other.
Source§type Output = AtomicCommitFlags
type Output = AtomicCommitFlags
| operator.Source§impl BitOrAssign for AtomicCommitFlags
impl BitOrAssign for AtomicCommitFlags
Source§fn bitor_assign(&mut self, other: AtomicCommitFlags)
fn bitor_assign(&mut self, other: AtomicCommitFlags)
The bitwise or (|) of the bits in self and other.
Source§impl BitXor for AtomicCommitFlags
impl BitXor for AtomicCommitFlags
Source§fn bitxor(self, other: AtomicCommitFlags) -> AtomicCommitFlags
fn bitxor(self, other: AtomicCommitFlags) -> AtomicCommitFlags
The bitwise exclusive-or (^) of the bits in self and other.
Source§type Output = AtomicCommitFlags
type Output = AtomicCommitFlags
^ operator.Source§impl BitXorAssign for AtomicCommitFlags
impl BitXorAssign for AtomicCommitFlags
Source§fn bitxor_assign(&mut self, other: AtomicCommitFlags)
fn bitxor_assign(&mut self, other: AtomicCommitFlags)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl Clone for AtomicCommitFlags
impl Clone for AtomicCommitFlags
Source§fn clone(&self) -> AtomicCommitFlags
fn clone(&self) -> AtomicCommitFlags
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AtomicCommitFlags
Source§impl Debug for AtomicCommitFlags
impl Debug for AtomicCommitFlags
impl Eq for AtomicCommitFlags
Source§impl Extend<AtomicCommitFlags> for AtomicCommitFlags
impl Extend<AtomicCommitFlags> for AtomicCommitFlags
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = AtomicCommitFlags>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = AtomicCommitFlags>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for AtomicCommitFlags
impl Flags for AtomicCommitFlags
Source§const FLAGS: &'static [Flag<AtomicCommitFlags>]
const FLAGS: &'static [Flag<AtomicCommitFlags>]
Source§fn from_bits_retain(bits: u32) -> AtomicCommitFlags
fn from_bits_retain(bits: u32) -> AtomicCommitFlags
Source§fn all_named() -> AtomicCommitFlags
fn all_named() -> AtomicCommitFlags
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self> ⓘ
fn iter_names(&self) -> IterNames<Self> ⓘ
Source§fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
Self::FLAGS.Source§fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.Source§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
Source§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl FromIterator<AtomicCommitFlags> for AtomicCommitFlags
impl FromIterator<AtomicCommitFlags> for AtomicCommitFlags
Source§fn from_iter<T>(iterator: T) -> AtomicCommitFlagswhere
T: IntoIterator<Item = AtomicCommitFlags>,
fn from_iter<T>(iterator: T) -> AtomicCommitFlagswhere
T: IntoIterator<Item = AtomicCommitFlags>,
The bitwise or (|) of the bits in each flags value.
Source§impl Hash for AtomicCommitFlags
impl Hash for AtomicCommitFlags
Source§impl IntoIterator for AtomicCommitFlags
impl IntoIterator for AtomicCommitFlags
Source§type Item = AtomicCommitFlags
type Item = AtomicCommitFlags
Source§type IntoIter = Iter<AtomicCommitFlags>
type IntoIter = Iter<AtomicCommitFlags>
Source§fn into_iter(self) -> <AtomicCommitFlags as IntoIterator>::IntoIter
fn into_iter(self) -> <AtomicCommitFlags as IntoIterator>::IntoIter
Source§impl LowerHex for AtomicCommitFlags
impl LowerHex for AtomicCommitFlags
Source§impl Not for AtomicCommitFlags
impl Not for AtomicCommitFlags
Source§fn not(self) -> AtomicCommitFlags
fn not(self) -> AtomicCommitFlags
The bitwise negation (!) of the bits in self, truncating the result.
Source§type Output = AtomicCommitFlags
type Output = AtomicCommitFlags
! operator.Source§impl Octal for AtomicCommitFlags
impl Octal for AtomicCommitFlags
Source§impl PartialEq for AtomicCommitFlags
impl PartialEq for AtomicCommitFlags
impl StructuralPartialEq for AtomicCommitFlags
Source§impl Sub for AtomicCommitFlags
impl Sub for AtomicCommitFlags
Source§fn sub(self, other: AtomicCommitFlags) -> AtomicCommitFlags
fn sub(self, other: AtomicCommitFlags) -> AtomicCommitFlags
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = AtomicCommitFlags
type Output = AtomicCommitFlags
- operator.Source§impl SubAssign for AtomicCommitFlags
impl SubAssign for AtomicCommitFlags
Source§fn sub_assign(&mut self, other: AtomicCommitFlags)
fn sub_assign(&mut self, other: AtomicCommitFlags)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.