Struct cslice::CMutSlice [] [src]

#[repr(C)]
pub struct CMutSlice<'a, T> { /* fields omitted */ }

A mutable slice, equivalent to &'a mut T.

A CMutSlice can be constructed from a corresponding Rust slice via the AsCMutSlice trait.

A Rust slice can be constructed from a corresponding CMutSlice via as_mut.

Methods

impl<'a, T> CMutSlice<'a, T>
[src]

Create a CSlice from raw data.

Safety

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.

Produces a raw pointer to the slice's buffer.

A cheap conversion to a Rust slice. This is slightly more general than as_ref.

A cheap conversion to a mutable Rust slice. This is slightly more general than as_mut.

Returns the number of elements in the slice.

Trait Implementations

impl<'a, T: Clone> Clone for CMutSlice<'a, T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, T: Copy> Copy for CMutSlice<'a, T>
[src]

impl<'a, T> AsRef<[T]> for CMutSlice<'a, T>
[src]

Performs the conversion.

impl<'a, T> AsMut<[T]> for CMutSlice<'a, T>
[src]

Performs the conversion.

impl<'a, T: Sync> Sync for CMutSlice<'a, T>
[src]

impl<'a, T: Send> Send for CMutSlice<'a, T>
[src]

impl<'a, T> Index<usize> for CMutSlice<'a, T>
[src]

The returned type after indexing

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

impl<'a, T> IndexMut<usize> for CMutSlice<'a, T>
[src]

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