pub struct WgpuRuntime {
pub device: Arc<Device>,
pub queue: Arc<Queue>,
}
Expand description
A slab allocation runtime that creates and updates wgpu::Buffer
s.
Fields§
§device: Arc<Device>
§queue: Arc<Queue>
Trait Implementations§
Source§impl AsRef<WgpuRuntime> for WgpuRuntime
impl AsRef<WgpuRuntime> for WgpuRuntime
Source§fn as_ref(&self) -> &WgpuRuntime
fn as_ref(&self) -> &WgpuRuntime
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for WgpuRuntime
impl Clone for WgpuRuntime
Source§fn clone(&self) -> WgpuRuntime
fn clone(&self) -> WgpuRuntime
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 moreSource§impl IsRuntime for WgpuRuntime
impl IsRuntime for WgpuRuntime
Source§type BufferUsages = BufferUsages
type BufferUsages = BufferUsages
The type used to denote the configuration of the buffer.
Source§fn buffer_write<U: Iterator<Item = SlabUpdate>>(
&self,
updates: U,
buffer: &Self::Buffer,
)
fn buffer_write<U: Iterator<Item = SlabUpdate>>( &self, updates: U, buffer: &Self::Buffer, )
Write the updates into the given buffer.
Source§fn buffer_create(
&self,
capacity: usize,
label: Option<&str>,
usages: BufferUsages,
) -> Self::Buffer
fn buffer_create( &self, capacity: usize, label: Option<&str>, usages: BufferUsages, ) -> Self::Buffer
Create a new buffer with the given
capacity
, where capacity
is the number of u32
s
that can be stored in the buffer.Source§fn buffer_copy(
&self,
source_buffer: &Self::Buffer,
destination_buffer: &Self::Buffer,
label: Option<&str>,
)
fn buffer_copy( &self, source_buffer: &Self::Buffer, destination_buffer: &Self::Buffer, label: Option<&str>, )
Copy the contents of one buffer into another at index 0.
Source§async fn buffer_read(
&self,
buffer: &Self::Buffer,
buffer_len: usize,
range: impl RangeBounds<usize>,
) -> Result<Vec<u32>, SlabAllocatorError>
async fn buffer_read( &self, buffer: &Self::Buffer, buffer_len: usize, range: impl RangeBounds<usize>, ) -> Result<Vec<u32>, SlabAllocatorError>
Read the range from the given buffer. Read more
Auto Trait Implementations§
impl Freeze for WgpuRuntime
impl !RefUnwindSafe for WgpuRuntime
impl Send for WgpuRuntime
impl Sync for WgpuRuntime
impl Unpin for WgpuRuntime
impl !UnwindSafe for WgpuRuntime
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