#[non_exhaustive]pub enum BindingResource<'a> {
Buffer(BufferBinding<'a>),
BufferArray(&'a [BufferBinding<'a>]),
Sampler(&'a Sampler),
SamplerArray(&'a [&'a Sampler]),
TextureView(&'a TextureView),
TextureViewArray(&'a [&'a TextureView]),
}
Expand description
Resource that can be bound to a pipeline.
Corresponds to WebGPU GPUBindingResource
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Buffer(BufferBinding<'a>)
Binding is backed by a buffer.
Corresponds to wgt::BufferBindingType::Uniform
and wgt::BufferBindingType::Storage
with BindGroupLayoutEntry::count
set to None.
BufferArray(&'a [BufferBinding<'a>])
Binding is backed by an array of buffers.
Features::BUFFER_BINDING_ARRAY
must be supported to use this feature.
Corresponds to wgt::BufferBindingType::Uniform
and wgt::BufferBindingType::Storage
with BindGroupLayoutEntry::count
set to Some.
Sampler(&'a Sampler)
Binding is a sampler.
Corresponds to wgt::BindingType::Sampler
with BindGroupLayoutEntry::count
set to None.
SamplerArray(&'a [&'a Sampler])
Binding is backed by an array of samplers.
Features::TEXTURE_BINDING_ARRAY
must be supported to use this feature.
Corresponds to wgt::BindingType::Sampler
with BindGroupLayoutEntry::count
set
to Some.
TextureView(&'a TextureView)
Binding is backed by a texture.
Corresponds to wgt::BindingType::Texture
and wgt::BindingType::StorageTexture
with
BindGroupLayoutEntry::count
set to None.
TextureViewArray(&'a [&'a TextureView])
Binding is backed by an array of textures.
Features::TEXTURE_BINDING_ARRAY
must be supported to use this feature.
Corresponds to wgt::BindingType::Texture
and wgt::BindingType::StorageTexture
with
BindGroupLayoutEntry::count
set to Some.
Trait Implementations§
Source§impl<'a> Clone for BindingResource<'a>
impl<'a> Clone for BindingResource<'a>
Source§fn clone(&self) -> BindingResource<'a>
fn clone(&self) -> BindingResource<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl<'a> Freeze for BindingResource<'a>
impl<'a> !RefUnwindSafe for BindingResource<'a>
impl<'a> Send for BindingResource<'a>
impl<'a> Sync for BindingResource<'a>
impl<'a> Unpin for BindingResource<'a>
impl<'a> !UnwindSafe for BindingResource<'a>
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)