pub struct WgpuStorage { /* private fields */ }Expand description
Buffer storage for wgpu.
Implementations§
Source§impl WgpuStorage
Keeps actual wgpu buffer references in a hashmap with ids as key.
impl WgpuStorage
Keeps actual wgpu buffer references in a hashmap with ids as key.
Sourcepub fn new(
mem_alignment: usize,
device: Device,
usages: BufferUsages,
) -> WgpuStorage
pub fn new( mem_alignment: usize, device: Device, usages: BufferUsages, ) -> WgpuStorage
Create a new storage on the given device.
Trait Implementations§
Source§impl ComputeStorage for WgpuStorage
impl ComputeStorage for WgpuStorage
Source§type Resource = WgpuResource
type Resource = WgpuResource
The resource associated type determines the way data is implemented and how
it can be accessed by kernels.
Source§fn get(
&mut self,
handle: &StorageHandle,
) -> <WgpuStorage as ComputeStorage>::Resource
fn get( &mut self, handle: &StorageHandle, ) -> <WgpuStorage as ComputeStorage>::Resource
Returns the underlying resource for a specified storage handle
Source§fn alloc(&mut self, size: u64) -> Result<StorageHandle, IoError>
fn alloc(&mut self, size: u64) -> Result<StorageHandle, IoError>
Allocates
size units of memory and returns a handle to itAuto Trait Implementations§
impl Freeze for WgpuStorage
impl !RefUnwindSafe for WgpuStorage
impl Send for WgpuStorage
impl Sync for WgpuStorage
impl Unpin for WgpuStorage
impl !UnwindSafe for WgpuStorage
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more