pub struct WgpuDeviceBuffer { /* private fields */ }Expand description
Concrete DeviceBuffer impl over a GpuBufferHandle.
Constructed via WgpuBackend::allocate_device_buffer. Public so
downstream code can downcast_ref::<WgpuDeviceBuffer>() and
reach the underlying wgpu::Buffer for advanced use; opaque to
callers that only hold Box<dyn DeviceBuffer>.
Implementations§
Source§impl WgpuDeviceBuffer
impl WgpuDeviceBuffer
Sourcepub fn handle(&self) -> &GpuBufferHandle
pub fn handle(&self) -> &GpuBufferHandle
Borrow the underlying handle for advanced wgpu work (custom
bind groups, manual readback, etc.). Most callers should
stick to the DeviceBuffer API.
Trait Implementations§
Source§impl Debug for WgpuDeviceBuffer
impl Debug for WgpuDeviceBuffer
Source§impl DeviceBuffer for WgpuDeviceBuffer
impl DeviceBuffer for WgpuDeviceBuffer
Source§fn backend_id(&self) -> &'static str
fn backend_id(&self) -> &'static str
Stable backend identifier the buffer belongs to. Matches
crate::backend::VyreBackend::id of the allocating backend.Source§fn byte_len(&self) -> usize
fn byte_len(&self) -> usize
Size of the allocation in bytes. The kernel sees this as the
declared
BufferDecl::count * element_size.Source§fn debug_label(&self) -> Option<&str>
fn debug_label(&self) -> Option<&str>
Optional human-readable label (debug surface only). Backends may
return
None when no label was set.Source§fn as_any(&self) -> &dyn Any
fn as_any(&self) -> &dyn Any
Erase to
&dyn Any so callers can downcast without naming the
concrete buffer type. Implementors return self.Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Mutable variant of
Self::as_any. Implementors return self.Auto Trait Implementations§
impl !RefUnwindSafe for WgpuDeviceBuffer
impl !UnwindSafe for WgpuDeviceBuffer
impl Freeze for WgpuDeviceBuffer
impl Send for WgpuDeviceBuffer
impl Sync for WgpuDeviceBuffer
impl Unpin for WgpuDeviceBuffer
impl UnsafeUnpin for WgpuDeviceBuffer
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