pub struct BindingLayout {
pub group: u32,
pub binding: u32,
pub name: String,
pub ty: WgslType,
pub access: AccessMode,
}Expand description
Description of a buffer binding.
Fields§
§group: u32Binding group (usually 0).
binding: u32Binding number within the group.
name: StringVariable name in the shader.
ty: WgslTypeType of the binding.
access: AccessModeAccess mode for storage buffers.
Implementations§
Source§impl BindingLayout
impl BindingLayout
Sourcepub fn new(
group: u32,
binding: u32,
name: &str,
ty: WgslType,
access: AccessMode,
) -> Self
pub fn new( group: u32, binding: u32, name: &str, ty: WgslType, access: AccessMode, ) -> Self
Create a new binding layout.
Sourcepub fn storage_read(binding: u32, name: &str, element_type: WgslType) -> Self
pub fn storage_read(binding: u32, name: &str, element_type: WgslType) -> Self
Create a read-only storage buffer binding.
Sourcepub fn storage_read_write(
binding: u32,
name: &str,
element_type: WgslType,
) -> Self
pub fn storage_read_write( binding: u32, name: &str, element_type: WgslType, ) -> Self
Create a read-write storage buffer binding.
Trait Implementations§
Source§impl Clone for BindingLayout
impl Clone for BindingLayout
Source§fn clone(&self) -> BindingLayout
fn clone(&self) -> BindingLayout
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 BindingLayout
impl RefUnwindSafe for BindingLayout
impl Send for BindingLayout
impl Sync for BindingLayout
impl Unpin for BindingLayout
impl UnwindSafe for BindingLayout
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