pub struct BindGroupLayoutBuilder { /* private fields */ }Expand description
Builder for a bind group layout.
Implementations§
Source§impl BindGroupLayoutBuilder
impl BindGroupLayoutBuilder
Sourcepub fn add_buffer(
&mut self,
binding: u32,
visibility: ShaderStages,
binding_type: BufferBindingType,
) -> &mut Self
pub fn add_buffer( &mut self, binding: u32, visibility: ShaderStages, binding_type: BufferBindingType, ) -> &mut Self
Add a buffer to the bind group.
§Arguments
binding- The binding index of the buffer.visibility- The shader stages that can access the buffer.binding_type- The type of the buffer binding.
Sourcepub fn add_texture_view(
&mut self,
binding: u32,
visibility: ShaderStages,
multisampled: bool,
) -> &mut Self
pub fn add_texture_view( &mut self, binding: u32, visibility: ShaderStages, multisampled: bool, ) -> &mut Self
Add a texture to the bind group.
§Arguments
binding- The binding index of the texture.visibility- The shader stages that can access the texture.multisampled- Whether the texture is multisampled.
Sourcepub fn add_storage_texture_view(
&mut self,
binding: u32,
format: TextureFormat,
) -> &mut Self
pub fn add_storage_texture_view( &mut self, binding: u32, format: TextureFormat, ) -> &mut Self
Add a storage texture view to the bind group. This is used for textures that will be read and written to in a compute shader.
§Arguments
binding- The binding index of the texture.format- The format of the texture.atomic- Whether the texture will be used for atomic operations.
Sourcepub fn add_texture_array_view(
&mut self,
binding: u32,
visibility: ShaderStages,
) -> &mut Self
pub fn add_texture_array_view( &mut self, binding: u32, visibility: ShaderStages, ) -> &mut Self
Add a texture array to the bind group.
§Arguments
binding- The binding index of the texture array.visibility- The shader stages that can access the texture array.
Sourcepub fn add_depth_texture_view(
&mut self,
binding: u32,
visibility: ShaderStages,
multisampled: bool,
) -> &mut Self
pub fn add_depth_texture_view( &mut self, binding: u32, visibility: ShaderStages, multisampled: bool, ) -> &mut Self
Add a depth texture to the bind group.
§Arguments
binding- The binding index of the texture.visibility- The shader stages that can access the texture.multisampled- Whether the texture is multisampled.
Sourcepub fn add_texture_sampler(
&mut self,
binding: u32,
visibility: ShaderStages,
) -> &mut Self
pub fn add_texture_sampler( &mut self, binding: u32, visibility: ShaderStages, ) -> &mut Self
Add a texture to the bind group.
§Arguments
binding- The binding index of the texture sampler.visibility- The shader stages that can access the sampler.
Sourcepub fn add_depth_texture_sampler(
&mut self,
binding: u32,
visibility: ShaderStages,
) -> &mut Self
pub fn add_depth_texture_sampler( &mut self, binding: u32, visibility: ShaderStages, ) -> &mut Self
Add a depth texture sampler to the bind group.
§Arguments
binding- The binding index of the texture sampler.visibility- The shader stages that can access the sampler.
Trait Implementations§
Source§impl Clone for BindGroupLayoutBuilder
impl Clone for BindGroupLayoutBuilder
Source§fn clone(&self) -> BindGroupLayoutBuilder
fn clone(&self) -> BindGroupLayoutBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BindGroupLayoutBuilder
impl RefUnwindSafe for BindGroupLayoutBuilder
impl Send for BindGroupLayoutBuilder
impl Sync for BindGroupLayoutBuilder
impl Unpin for BindGroupLayoutBuilder
impl UnwindSafe for BindGroupLayoutBuilder
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
§impl<T> TypeData for T
impl<T> TypeData for T
§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
Creates a type-erased clone of this value.