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§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.