Struct cslice::CSlice [] [src]

pub struct CSlice<'a, T> { /* fields omitted */ }

An immutable slice, equivalent to &'a T.

A CSlice can be constructed from a corresponding Rust slice via the AsCSlice trait.

A Rust slice can be constructed from a corresponding CSlice via as_ref.


impl<'a, T> CSlice<'a, T>

Create a CSlice from raw data.


The region of memory from base (inclusive) to base + len * sizeof<T> (exclusive) must be valid for the duration of lifetime 'a.

Produces a raw pointer to the slice's buffer.

Returns the number of elements in the slice.

Trait Implementations

impl<'a, T: Clone> Clone for CSlice<'a, T>

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, T: Copy> Copy for CSlice<'a, T>

impl<'a, T> AsRef<[T]> for CSlice<'a, T>

Performs the conversion.

impl<'a, T: Sync> Sync for CSlice<'a, T>

impl<'a, T: Sync> Send for CSlice<'a, T>

impl<'a, T> Index<usize> for CSlice<'a, T>

The returned type after indexing

The method for the indexing (container[index]) operation