pub(crate) struct WgpuVecBuffer<T: Default + Pod + Zeroable + Debug> {
label: Option<&'static str>,
pub(crate) buffer: Buffer,
usage: BufferUsages,
len: usize,
_phantom: PhantomData<T>,
}Fields§
§label: Option<&'static str>§buffer: Buffer§usage: BufferUsages§len: usizeKeep match to the buffer size
_phantom: PhantomData<T>Implementations§
Source§impl<T: Default + Pod + Zeroable + Debug> WgpuVecBuffer<T>
impl<T: Default + Pod + Zeroable + Debug> WgpuVecBuffer<T>
pub(crate) fn new( ctx: &WgpuContext, label: Option<&'static str>, usage: BufferUsages, len: usize, ) -> Self
pub(crate) fn new_init( ctx: &WgpuContext, label: Option<&'static str>, usage: BufferUsages, data: &[T], ) -> Self
pub(crate) fn len(&self) -> usize
pub(crate) fn resize(&mut self, ctx: &WgpuContext, len: usize) -> bool
pub(crate) fn set(&mut self, ctx: &WgpuContext, data: &[T]) -> bool
pub(crate) fn read_buffer(&self, ctx: &WgpuContext) -> Option<Vec<u8>>
Auto Trait Implementations§
impl<T> Freeze for WgpuVecBuffer<T>
impl<T> !RefUnwindSafe for WgpuVecBuffer<T>
impl<T> Send for WgpuVecBuffer<T>where
T: Send,
impl<T> Sync for WgpuVecBuffer<T>where
T: Sync,
impl<T> Unpin for WgpuVecBuffer<T>where
T: Unpin,
impl<T> !UnwindSafe for WgpuVecBuffer<T>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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