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