Type Alias krnl_core::buffer::Slice

source ·
pub type Slice<'a, T> = BufferBase<SliceRepr<'a, T>>;
Expand description

Slice implements Index.

See BufferBase.

Aliased Type§

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

Implementations§

source§

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

source

pub fn as_ptr(&self) -> *const T

Available on non-target_arch="spirv" only.

A pointer to the buffer’s data.

Trait Implementations§

source§

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

Available on non-target_arch="spirv" only.
source§

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

Converts to this type from the input type.