pub struct HeapBuffer<T> { /* private fields */ }Expand description
Heap-allocated buffer with runtime-determined size.
Used for resources whose size is determined from data (loaded samples, configuration).
Implementations§
Trait Implementations§
Source§impl<T: Scalar> Buffer<T> for HeapBuffer<T>
impl<T: Scalar> Buffer<T> for HeapBuffer<T>
Source§fn as_mut_slice(&mut self) -> &mut [T]
fn as_mut_slice(&mut self) -> &mut [T]
Mutable access to the buffer data.
Source§fn copy_from(&mut self, src: &[T])
fn copy_from(&mut self, src: &[T])
Copy data from a slice. Copies
min(src.len(), self.len()) samples.Source§fn stats(&self) -> BufferStats
fn stats(&self) -> BufferStats
Snapshot of performance statistics.
Source§fn reset_stats(&mut self)
fn reset_stats(&mut self)
Reset performance counters (not the data).
Source§impl<T: Clone> Clone for HeapBuffer<T>
impl<T: Clone> Clone for HeapBuffer<T>
Source§fn clone(&self) -> HeapBuffer<T>
fn clone(&self) -> HeapBuffer<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for HeapBuffer<T>
impl<T> RefUnwindSafe for HeapBuffer<T>where
T: RefUnwindSafe,
impl<T> Send for HeapBuffer<T>where
T: Send,
impl<T> Sync for HeapBuffer<T>where
T: Sync,
impl<T> Unpin for HeapBuffer<T>where
T: Unpin,
impl<T> UnsafeUnpin for HeapBuffer<T>
impl<T> UnwindSafe for HeapBuffer<T>where
T: UnwindSafe,
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