pub struct BufferBinding {
pub binding: u32,
pub buffer_id: BufferId,
pub usage: BufferUsage,
}Expand description
A binding entry associating a buffer with a binding index and usage.
Fields§
§binding: u32Binding index in the shader (e.g. @binding(0)).
buffer_id: BufferIdThe buffer to bind.
usage: BufferUsageUsage of the buffer in this binding.
Implementations§
Source§impl BufferBinding
impl BufferBinding
Sourcepub fn new(binding: u32, buffer_id: BufferId, usage: BufferUsage) -> Self
pub fn new(binding: u32, buffer_id: BufferId, usage: BufferUsage) -> Self
Create a new buffer binding.
Sourcepub fn read_write(binding: u32, buffer_id: BufferId) -> Self
pub fn read_write(binding: u32, buffer_id: BufferId) -> Self
Shorthand for a read-write binding.
Trait Implementations§
Source§impl Clone for BufferBinding
impl Clone for BufferBinding
Source§fn clone(&self) -> BufferBinding
fn clone(&self) -> BufferBinding
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 moreSource§impl Debug for BufferBinding
impl Debug for BufferBinding
impl Copy for BufferBinding
Auto Trait Implementations§
impl Freeze for BufferBinding
impl RefUnwindSafe for BufferBinding
impl Send for BufferBinding
impl Sync for BufferBinding
impl Unpin for BufferBinding
impl UnsafeUnpin for BufferBinding
impl UnwindSafe for BufferBinding
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,
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