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]

[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.

[src]

Produces a raw pointer to the slice's buffer.

[src]

Produces a raw pointer to the slice's buffer.

[src]

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

[src]

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

[src]

Returns the number of elements in the slice.

Trait Implementations

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

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]

[src]

Performs the conversion.

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

[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.

[src]

Performs the indexing (container[index]) operation.

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

[src]

Performs the mutable indexing (container[index]) operation.