[−][src]Struct safer_ffi::slice::slice_mut
&'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]
self: &'reborrow slice_mut<'lt, T>
) -> slice_ref<'reborrow, T> where
'lt: 'reborrow,
pub fn as_mut<'reborrow>(
self: &'reborrow mut slice_mut<'lt, T>
) -> slice_mut<'reborrow, T> where
'lt: 'reborrow,
[src]
self: &'reborrow mut slice_mut<'lt, T>
) -> slice_mut<'reborrow, T> where
'lt: 'reborrow,
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]
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]
fn from(slice: &'lt mut [T]) -> Self
[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]
fn hash<H: Hasher>(&self, hasher: &mut H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<'_, T: Ord> Ord for slice_mut<'_, T>
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[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]
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[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]
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,
type CLayout = slice_mut_Layout<'lt, T>
The CType
having the same layout as Self
.
fn is_valid(it: &Self::CLayout) -> bool
[src]
impl<'lt, T: 'lt> Send for slice_mut<'lt, T> where
&'lt mut [T]: Send,
[src]
&'lt mut [T]: Send,
impl<'lt, T: 'lt> Sync for slice_mut<'lt, T> where
&'lt mut [T]: Sync,
[src]
&'lt mut [T]: Sync,
Auto Trait Implementations
impl<'lt, T> RefUnwindSafe for slice_mut<'lt, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'lt, T> Unpin for slice_mut<'lt, T>
impl<'lt, T> UnwindSafe for slice_mut<'lt, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,