pub 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 fn new( ctx: &WgpuContext, label: Option<&'static str>, usage: BufferUsages, len: usize, ) -> Self
pub fn new_init( ctx: &WgpuContext, label: Option<&'static str>, usage: BufferUsages, data: &[T], ) -> Self
pub fn len(&self) -> usize
pub fn resize(&mut self, ctx: &WgpuContext, len: usize) -> bool
pub fn set(&mut self, ctx: &WgpuContext, data: &[T]) -> bool
pub 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>where
PhantomData<T>: Freeze,
impl<T> Send for WgpuVecBuffer<T>where
PhantomData<T>: Send,
impl<T> Sync for WgpuVecBuffer<T>where
PhantomData<T>: Sync,
impl<T> Unpin for WgpuVecBuffer<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for WgpuVecBuffer<T>where
PhantomData<T>: UnsafeUnpin,
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§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.