[][src]Struct safer_ffi::slice::slice_mut

#[repr(C)]pub struct slice_mut<'lt, T> where
    T: 'lt, 
{ /* fields omitted */ }

&'lt mut [T] but with a guaranteed #[repr(C)] layout.

C layout (for some given type T)

typedef struct {
    // Cannot be NULL
    T * ptr;
    size_t len;
} slice_T;

Nullable pointer?

If you want to support the above typedef, but where the ptr field is allowed to be NULL (with the contents of len then being undefined) use the Option< slice_ptr<_> > type.

C Layout

Implementations

impl<'lt, T: 'lt> slice_mut<'lt, T>[src]

pub fn as_ref<'reborrow>(
    self: &'reborrow slice_mut<'lt, T>
) -> slice_ref<'reborrow, T> where
    'lt: 'reborrow, 
[src]

pub fn as_mut<'reborrow>(
    self: &'reborrow mut slice_mut<'lt, T>
) -> slice_mut<'reborrow, T> where
    'lt: 'reborrow, 
[src]

pub fn as_slice(self: slice_mut<'lt, T>) -> &'lt mut [T][src]

Trait Implementations

impl<'_, T: Debug> Debug for slice_mut<'_, T>[src]

impl<'_, T> Default for slice_mut<'_, T>[src]

impl<'_, T> Deref for slice_mut<'_, T>[src]

type Target = [T]

The resulting type after dereferencing.

impl<'_, T> DerefMut for slice_mut<'_, T>[src]

impl<'_, T: Eq> Eq for slice_mut<'_, T>[src]

impl<'lt, T: 'lt> From<&'lt mut [T]> for slice_mut<'lt, T>[src]

impl<'lt, T: 'lt> From<slice_mut<'lt, T>> for slice_ref<'lt, T>[src]

impl<'lt, T: 'lt> From<slice_mut<'lt, T>> for slice_raw<T>[src]

impl<'_, T: Hash> Hash for slice_mut<'_, T>[src]

impl<'_, T: Ord> Ord for slice_mut<'_, T>[src]

impl<'_, T: PartialEq> PartialEq<slice_mut<'_, T>> for slice_mut<'_, T>[src]

impl<'_, T: PartialOrd> PartialOrd<slice_mut<'_, T>> for slice_mut<'_, T>[src]

impl<'lt, T> ReprC for slice_mut<'lt, T> where
    NonNullMut<T>: ReprC,
    <NonNullMut<T> as ReprC>::CLayout: CType<OPAQUE_KIND = Concrete>,
    usize: ReprC,
    <usize as ReprC>::CLayout: CType<OPAQUE_KIND = Concrete>,
    PhantomData<&'lt ()>: ReprC,
    <PhantomData<&'lt ()> as ReprC>::CLayout: CType<OPAQUE_KIND = Concrete>,
    T: ReprC,
    T: 'lt, 
[src]

type CLayout = slice_mut_Layout<'lt, T>

The CType having the same layout as Self.

impl<'lt, T: 'lt> Send for slice_mut<'lt, T> where
    &'lt mut [T]: Send
[src]

impl<'lt, T: 'lt> Sync for slice_mut<'lt, T> where
    &'lt mut [T]: Sync
[src]

Auto Trait Implementations

impl<'lt, T> RefUnwindSafe for slice_mut<'lt, T> where
    T: RefUnwindSafe

impl<'lt, T> Unpin for slice_mut<'lt, T>

impl<'lt, T> UnwindSafe for slice_mut<'lt, T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.