[−][src]Trait tension::Buffer
Associated Types
type Context
Context for buffer allocation.
Required methods
unsafe fn new_uninit_in(context: &Self::Context, len: usize) -> Self
Create uninitialzed buffer. This is unsafe method, but it is helpful for pre-allocation of storage for some operations.
fn new_filled_in(context: &Self::Context, len: usize, value: T) -> Self
Create buffer filled with a single value.
fn len(&self) -> usize
Returns the length of the buffer.
fn context(&self) -> &Self::Context
Context of the buffer.
fn load(&self, dst: &mut [T])
Loads data from buffer to slice.
fn store(&mut self, src: &[T])
Stores data from slice to buffer.
fn copy_from(&mut self, src: &Self)
Copies content to self
from another buffer.
fn copy_to(&self, dst: &mut Self)
Copies content from self
to another buffer.