Skip to main content

HostBufferMut

Trait HostBufferMut 

Source
pub trait HostBufferMut: Send + 'static {
    // Required methods
    fn len(&self) -> usize;
    fn alignment(&self) -> Alignment;
    fn as_mut_slice(&mut self) -> &mut [u8] ;
    fn freeze(self: Box<Self>) -> ByteBuffer;

    // Provided method
    fn is_empty(&self) -> bool { ... }
}
Expand description

Mutable host buffer contract used by WritableHostBuffer.

Required Methods§

Source

fn len(&self) -> usize

Returns the logical byte length of the buffer.

Source

fn alignment(&self) -> Alignment

Returns the alignment of the buffer.

Source

fn as_mut_slice(&mut self) -> &mut [u8]

Returns mutable access to the writable byte range.

Source

fn freeze(self: Box<Self>) -> ByteBuffer

Freeze the buffer into an immutable ByteBuffer.

Provided Methods§

Source

fn is_empty(&self) -> bool

Whether the buffer is empty.

Implementors§