Type Alias krnl::buffer::SliceMut

source ·
pub type SliceMut<'a, T> = BufferBase<SliceMutRepr<'a, T>>;
Expand description

SliceMut

See BufferBase.

Aliased Type§

struct SliceMut<'a, T> { /* private fields */ }

Implementations§

source§

impl<'a, T: Scalar> SliceMut<'a, T>

source

pub fn from_host_slice_mut(host_slice: &'a mut [T]) -> Self

Create a mutable slice from a &mut [T].

Trait Implementations§

source§

impl<'a, T: Scalar> From<&'a mut [T]> for SliceMut<'a, T>

source§

fn from(host_slice: &'a mut [T]) -> Self

Converts to this type from the input type.
source§

impl<'a, T: Scalar> TryFrom<ScalarBufferBase<ScalarSliceMutRepr<'a>>> for SliceMut<'a, T>

§

type Error = ScalarBufferBase<ScalarSliceMutRepr<'a>>

The type returned in the event of a conversion error.
source§

fn try_from(slice: ScalarSliceMut<'a>) -> Result<Self, Self::Error>

Performs the conversion.