pub trait BufferWrite: BufferInstance {
    // Required methods
    fn write<'a, O: Into<BufferConverter<'a, Self::DType>>>(
        &mut self,
        other: O
    ) -> Result<(), Error>;
    fn write_value(&mut self, value: Self::DType) -> Result<(), Error>;
    fn write_value_at(
        &mut self,
        offset: usize,
        value: Self::DType
    ) -> Result<(), Error>;
}
Expand description

Buffer write methods

Required Methods§

source

fn write<'a, O: Into<BufferConverter<'a, Self::DType>>>( &mut self, other: O ) -> Result<(), Error>

Overwrite the elements of this buffer with the given other elements.

source

fn write_value(&mut self, value: Self::DType) -> Result<(), Error>

Overwrite all elements of this buffer with the given scalar value.

source

fn write_value_at( &mut self, offset: usize, value: Self::DType ) -> Result<(), Error>

Overwrite the element at offset with the given value.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: CDatatype> BufferWrite for Vec<T>

source§

fn write<'a, O: Into<BufferConverter<'a, T>>>( &mut self, other: O ) -> Result<(), Error>

source§

fn write_value(&mut self, value: T) -> Result<(), Error>

source§

fn write_value_at(&mut self, offset: usize, value: T) -> Result<(), Error>

Implementors§