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> !RefUnwindSafe for WgpuVecBuffer<T>
impl<T> !UnwindSafe for WgpuVecBuffer<T>
impl<T> Freeze 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> UnsafeUnpin for WgpuVecBuffer<T>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ConditionalSend for Twhere
T: Send,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> TransformedExt for T
impl<T> TransformedExt for T
Source§fn transformed<G>(self, transform: G) -> Transformed<Self, G>
fn transformed<G>(self, transform: G) -> Transformed<Self, G>
Return
self wrapped with transform stored exactly as G.