Struct wgpu::hal::BufferBinding
source · pub struct BufferBinding<'a, A>where
A: Api,{
pub buffer: &'a <A as Api>::Buffer,
pub offset: u64,
pub size: Option<NonZeroU64>,
}
Fields§
§buffer: &'a <A as Api>::Buffer
The buffer being bound.
offset: u64
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<NonZeroU64>
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> Clone for BufferBinding<'_, A>where
A: Api,
impl<A> Clone for BufferBinding<'_, A>where
A: Api,
source§fn clone(&self) -> BufferBinding<'_, A>
fn clone(&self) -> BufferBinding<'_, A>
Returns a copy 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<'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