Struct wgpu_hal::BufferBinding
source · pub struct BufferBinding<'a, A: Api> {
pub buffer: &'a A::Buffer,
pub offset: BufferAddress,
pub size: Option<BufferSize>,
}
Fields§
§buffer: &'a A::Buffer
The buffer being bound.
offset: BufferAddress
The offset at which the bound region starts.
This must be less than the size of the buffer. Some back ends cannot tolerate zero-length regions; for example, see VUID-VkDescriptorBufferInfo-offset-00340 and VUID-VkDescriptorBufferInfo-range-00341, or the documentation for GLES’s glBindBufferRange.
size: Option<BufferSize>
The size of the region bound, in bytes.
If None
, the region extends from offset
to the end of the
buffer. Given the restrictions on offset
, this means that
the size is always greater than zero.
Trait Implementations§
source§impl<A: Api> Clone for BufferBinding<'_, A>
impl<A: Api> Clone for BufferBinding<'_, A>
Auto Trait Implementations§
impl<'a, A> Freeze for BufferBinding<'a, A>
impl<'a, A> RefUnwindSafe for BufferBinding<'a, A>
impl<'a, A> Send for BufferBinding<'a, A>
impl<'a, A> Sync for BufferBinding<'a, A>
impl<'a, A> Unpin for BufferBinding<'a, A>
impl<'a, A> UnwindSafe for BufferBinding<'a, 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
Mutably borrows from an owned value. Read more