Struct wgpu_types::BufferDescriptor
source · #[repr(C)]pub struct BufferDescriptor<L> {
pub label: L,
pub size: BufferAddress,
pub usage: BufferUsage,
pub mapped_at_creation: bool,
}Expand description
Describes a [Buffer].
Fields§
§label: LDebug label of a buffer. This will show up in graphics debuggers for easy identification.
size: BufferAddressSize of a buffer.
usage: BufferUsageUsages of a buffer. If the buffer is used in any way that isn’t specified here, the operation will panic.
mapped_at_creation: boolAllows a buffer to be mapped immediately after they are made. It does not have to be BufferUsage::MAP_READ or
BufferUsage::MAP_WRITE, all buffers are allowed to be mapped at creation.
Implementations§
source§impl<L> BufferDescriptor<L>
impl<L> BufferDescriptor<L>
sourcepub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> BufferDescriptor<K>
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> BufferDescriptor<K>
Trait Implementations§
source§impl<L: Clone> Clone for BufferDescriptor<L>
impl<L: Clone> Clone for BufferDescriptor<L>
source§fn clone(&self) -> BufferDescriptor<L>
fn clone(&self) -> BufferDescriptor<L>
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 more