#[repr(transparent)]pub struct BufferUsagesWebGPU(<BufferUsagesWebGPU as PublicFlags>::Internal);Expand description
Buffer usages that are defined in the WebGPU specification.
For all usages, see BufferUsages.
Corresponds to WebGPU GPUBufferUsage.
Tuple Fields§
§0: <BufferUsagesWebGPU as PublicFlags>::InternalImplementations§
Source§impl BufferUsagesWebGPU
impl BufferUsagesWebGPU
Sourcepub const MAP_READ: Self
pub const MAP_READ: Self
Allow a buffer to be mapped for reading using Buffer::map_async + Buffer::get_mapped_range.
This does not include creating a buffer with BufferDescriptor::mapped_at_creation set.
If Features::MAPPABLE_PRIMARY_BUFFERS isn’t enabled, the only other usage a buffer
may have is COPY_DST.
Sourcepub const MAP_WRITE: Self
pub const MAP_WRITE: Self
Allow a buffer to be mapped for writing using Buffer::map_async + Buffer::get_mapped_range_mut.
This does not include creating a buffer with BufferDescriptor::mapped_at_creation set.
If Features::MAPPABLE_PRIMARY_BUFFERS feature isn’t enabled, the only other usage a buffer
may have is COPY_SRC.
Sourcepub const COPY_SRC: Self
pub const COPY_SRC: Self
Allow a buffer to be the source buffer for a CommandEncoder::copy_buffer_to_buffer or CommandEncoder::copy_buffer_to_texture
operation.
Sourcepub const COPY_DST: Self
pub const COPY_DST: Self
Allow a buffer to be the destination buffer for a CommandEncoder::copy_buffer_to_buffer, CommandEncoder::copy_texture_to_buffer,
CommandEncoder::clear_buffer or Queue::write_buffer operation.
Sourcepub const UNIFORM: Self
pub const UNIFORM: Self
Allow a buffer to be a BufferBindingType::Uniform inside a bind group.
Sourcepub const STORAGE: Self
pub const STORAGE: Self
Allow a buffer to be a BufferBindingType::Storage inside a bind group.
Sourcepub const QUERY_RESOLVE: Self
pub const QUERY_RESOLVE: Self
Allow a buffer to be the destination buffer for a CommandEncoder::resolve_query_set operation.
Source§impl BufferUsagesWebGPU
impl BufferUsagesWebGPU
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<Self>
pub const fn from_bits(bits: u32) -> Option<Self>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> Self
pub const fn from_bits_truncate(bits: u32) -> Self
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> Self
pub const fn from_bits_retain(bits: u32) -> Self
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<Self>
pub fn from_name(name: &str) -> Option<Self>
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: Self) -> bool
pub const fn intersects(&self, other: Self) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: Self) -> bool
pub const fn contains(&self, other: Self) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn remove(&mut self, other: Self)
pub fn remove(&mut self, other: Self)
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: Self)
pub fn toggle(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: Self, value: bool)
pub fn set(&mut self, other: Self, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: Self) -> Self
pub const fn intersection(self, other: Self) -> Self
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: Self) -> Self
pub const fn union(self, other: Self) -> Self
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: Self) -> Self
pub const fn difference(self, other: Self) -> Self
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: Self) -> Self
pub const fn symmetric_difference(self, other: Self) -> Self
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> Self
pub const fn complement(self) -> Self
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl BufferUsagesWebGPU
impl BufferUsagesWebGPU
Sourcepub const fn iter(&self) -> Iter<BufferUsagesWebGPU>
pub const fn iter(&self) -> Iter<BufferUsagesWebGPU>
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<BufferUsagesWebGPU>
pub const fn iter_names(&self) -> IterNames<BufferUsagesWebGPU>
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 BufferUsagesWebGPU
impl Binary for BufferUsagesWebGPU
Source§impl BitAnd for BufferUsagesWebGPU
impl BitAnd for BufferUsagesWebGPU
Source§impl BitAndAssign for BufferUsagesWebGPU
impl BitAndAssign for BufferUsagesWebGPU
Source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
The bitwise and (&) of the bits in self and other.
Source§impl BitOr for BufferUsagesWebGPU
impl BitOr for BufferUsagesWebGPU
Source§fn bitor(self, other: BufferUsagesWebGPU) -> Self
fn bitor(self, other: BufferUsagesWebGPU) -> Self
The bitwise or (|) of the bits in self and other.
Source§type Output = BufferUsagesWebGPU
type Output = BufferUsagesWebGPU
| operator.Source§impl BitOrAssign for BufferUsagesWebGPU
impl BitOrAssign for BufferUsagesWebGPU
Source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
The bitwise or (|) of the bits in self and other.
Source§impl BitXor for BufferUsagesWebGPU
impl BitXor for BufferUsagesWebGPU
Source§impl BitXorAssign for BufferUsagesWebGPU
impl BitXorAssign for BufferUsagesWebGPU
Source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl Clone for BufferUsagesWebGPU
impl Clone for BufferUsagesWebGPU
Source§fn clone(&self) -> BufferUsagesWebGPU
fn clone(&self) -> BufferUsagesWebGPU
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BufferUsagesWebGPU
impl Debug for BufferUsagesWebGPU
Source§impl<'de> Deserialize<'de> for BufferUsagesWebGPU
impl<'de> Deserialize<'de> for BufferUsagesWebGPU
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Extend<BufferUsagesWebGPU> for BufferUsagesWebGPU
impl Extend<BufferUsagesWebGPU> for BufferUsagesWebGPU
Source§fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = Self>>(&mut self, iterator: T)
The bitwise or (|) of the bits in each flags value.
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 Flags for BufferUsagesWebGPU
impl Flags for BufferUsagesWebGPU
Source§const FLAGS: &'static [Flag<BufferUsagesWebGPU>]
const FLAGS: &'static [Flag<BufferUsagesWebGPU>]
Source§fn from_bits_retain(bits: u32) -> BufferUsagesWebGPU
fn from_bits_retain(bits: u32) -> BufferUsagesWebGPU
Source§fn all_named() -> BufferUsagesWebGPU
fn all_named() -> BufferUsagesWebGPU
§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
§fn iter_names(&self) -> IterNames<Self>
fn iter_names(&self) -> IterNames<Self>
§fn iter_defined_names() -> IterDefinedNames<Self>
fn iter_defined_names() -> IterDefinedNames<Self>
Self::FLAGS].§fn iter_equal_names(&self) -> IterEqualNames<Self>
fn iter_equal_names(&self) -> IterEqualNames<Self>
§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.§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.§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.§fn set(&mut self, other: Self, value: bool)where
Self: Sized,
fn set(&mut self, other: Self, value: bool)where
Self: Sized,
Flags::insert] when value is true or [Flags::remove] when value is false.§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl From<BufferUsagesWebGPU> for BufferUsages
impl From<BufferUsagesWebGPU> for BufferUsages
Source§fn from(buffer_usages_webgpu: BufferUsagesWebGPU) -> Self
fn from(buffer_usages_webgpu: BufferUsagesWebGPU) -> Self
Source§impl FromIterator<BufferUsagesWebGPU> for BufferUsagesWebGPU
impl FromIterator<BufferUsagesWebGPU> for BufferUsagesWebGPU
Source§fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
fn from_iter<T: IntoIterator<Item = Self>>(iterator: T) -> Self
The bitwise or (|) of the bits in each flags value.
Source§impl Hash for BufferUsagesWebGPU
impl Hash for BufferUsagesWebGPU
Source§impl IntoIterator for BufferUsagesWebGPU
impl IntoIterator for BufferUsagesWebGPU
Source§impl LowerHex for BufferUsagesWebGPU
impl LowerHex for BufferUsagesWebGPU
Source§impl Not for BufferUsagesWebGPU
impl Not for BufferUsagesWebGPU
Source§impl Octal for BufferUsagesWebGPU
impl Octal for BufferUsagesWebGPU
Source§impl PartialEq for BufferUsagesWebGPU
impl PartialEq for BufferUsagesWebGPU
Source§impl PublicFlags for BufferUsagesWebGPU
impl PublicFlags for BufferUsagesWebGPU
Source§impl Serialize for BufferUsagesWebGPU
impl Serialize for BufferUsagesWebGPU
Source§impl Sub for BufferUsagesWebGPU
impl Sub for BufferUsagesWebGPU
Source§fn sub(self, other: Self) -> Self
fn sub(self, other: Self) -> Self
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 = BufferUsagesWebGPU
type Output = BufferUsagesWebGPU
- operator.Source§impl SubAssign for BufferUsagesWebGPU
impl SubAssign for BufferUsagesWebGPU
Source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
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§impl UpperHex for BufferUsagesWebGPU
impl UpperHex for BufferUsagesWebGPU
impl Copy for BufferUsagesWebGPU
impl Eq for BufferUsagesWebGPU
impl StructuralPartialEq for BufferUsagesWebGPU
Auto Trait Implementations§
impl Freeze for BufferUsagesWebGPU
impl RefUnwindSafe for BufferUsagesWebGPU
impl Send for BufferUsagesWebGPU
impl Sync for BufferUsagesWebGPU
impl Unpin for BufferUsagesWebGPU
impl UnsafeUnpin for BufferUsagesWebGPU
impl UnwindSafe for BufferUsagesWebGPU
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more