Enum wgpu::BufferBindingType [−][src]
pub enum BufferBindingType { Uniform, Storage { read_only: bool, }, }
Specific type of a buffer binding.
WebGPU spec: https://gpuweb.github.io/gpuweb/#enumdef-gpubufferbindingtype
Variants
A buffer for uniform values.
Example GLSL syntax:
layout(std140, binding = 0)
uniform Globals {
vec2 aUniform;
vec2 anotherUniform;
};
A storage buffer.
Example GLSL syntax:
layout (set=0, binding=0) buffer myStorageBuffer {
vec4 myElement[];
};
Show fields
Fields of Storage
read_only: bool
If true
, the buffer can only be read in the shader,
and it must be annotated with readonly
.
Example GLSL syntax:
layout (set=0, binding=0) readonly buffer myStorageBuffer {
vec4 myElement[];
};
Trait Implementations
impl Clone for BufferBindingType
[src]
impl Clone for BufferBindingType
[src]pub fn clone(&self) -> BufferBindingType
[src]
pub fn clone(&self) -> BufferBindingType
[src]Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]Performs copy-assignment from source
. Read more
impl Debug for BufferBindingType
[src]
impl Debug for BufferBindingType
[src]impl Default for BufferBindingType
[src]
impl Default for BufferBindingType
[src]pub fn default() -> BufferBindingType
[src]
pub fn default() -> BufferBindingType
[src]Returns the “default value” for a type. Read more
impl<'de> Deserialize<'de> for BufferBindingType
[src]
impl<'de> Deserialize<'de> for BufferBindingType
[src]pub fn deserialize<__D>(
__deserializer: __D
) -> Result<BufferBindingType, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<BufferBindingType, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl Hash for BufferBindingType
[src]
impl Hash for BufferBindingType
[src]impl PartialEq<BufferBindingType> for BufferBindingType
[src]
impl PartialEq<BufferBindingType> for BufferBindingType
[src]pub fn eq(&self, other: &BufferBindingType) -> bool
[src]
pub fn eq(&self, other: &BufferBindingType) -> bool
[src]This method tests for self
and other
values to be equal, and is used
by ==
. Read more
pub fn ne(&self, other: &BufferBindingType) -> bool
[src]
pub fn ne(&self, other: &BufferBindingType) -> bool
[src]This method tests for !=
.
impl Serialize for BufferBindingType
[src]
impl Serialize for BufferBindingType
[src]pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
[src]Serialize this value into the given Serde serializer. Read more
impl Copy for BufferBindingType
[src]
impl Eq for BufferBindingType
[src]
impl StructuralEq for BufferBindingType
[src]
impl StructuralPartialEq for BufferBindingType
[src]
Auto Trait Implementations
impl RefUnwindSafe for BufferBindingType
impl Send for BufferBindingType
impl Sync for BufferBindingType
impl Unpin for BufferBindingType
impl UnwindSafe for BufferBindingType
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> CallHasher for T where
T: Hash,
impl<T> CallHasher for T where
T: Hash,
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]pub fn equivalent(&self, key: &K) -> bool
[src]
pub fn equivalent(&self, key: &K) -> bool
[src]Compare self to key
and return true
if they are equal.
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,