Trait scratchpad::Buffer[][src]

pub trait Buffer {
    fn as_bytes(&self) -> &[u8];
fn as_bytes_mut(&mut self) -> &mut [u8]; }

Trait for Scratchpad buffer types.

Buffer objects contain the memory from which Scratchpad allocations are made. Scratchpad handles all bookkeeping, so a buffer only needs to provide methods for raw access of the buffer memory.

Required methods

fn as_bytes(&self) -> &[u8][src]

Returns a byte slice of the buffer contents.

fn as_bytes_mut(&mut self) -> &mut [u8][src]

Returns a mutable byte slice of the buffer contents.

Loading content...

Implementations on Foreign Types

impl<'a, T> Buffer for &'a mut [T] where
    T: ByteData
[src]

impl<T> Buffer for Box<[T]> where
    T: ByteData
[src]

Loading content...

Implementors

impl<T> Buffer for T where
    T: Array,
    <T as Array>::Item: ByteData
[src]

Loading content...