pub struct SysCallSliceMut<'a> { /* private fields */ }
Expand description
A Mutable System Call Slice
This represents a mutable slice of bytes, e.g. &mut [u8]
, across
a system call boundary.
This type is typically created by calling .into()
on a mutable slice.
The lifetime of the original slice is maintained by the lifetime
parameter 'a
.
Additionally, a SysCallSliceMut
can be converted into a SysCallSlice
,
though the reverse is not possible.
§Example
let sli: &mut [u8] = &mut [0, 1, 2, 3];
let scs: SysCallSliceMut<'_> = sli.into();
let scs: SysCallSlice<'_> = scs.into();
Implementations§
Source§impl<'a> SysCallSliceMut<'a>
impl<'a> SysCallSliceMut<'a>
Sourcepub unsafe fn to_slice_mut(self) -> &'a mut [u8]
pub unsafe fn to_slice_mut(self) -> &'a mut [u8]
Consumes the SysCallSliceMut
, returning it to a &mut [u8]
.
§SAFETY
This function should only be called on a SysCallSliceMut
that was obtained
either from the kernel, or that was converted from a slice.
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for SysCallSliceMut<'a>
impl<'de, 'a> Deserialize<'de> for SysCallSliceMut<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a> From<&'a mut [u8]> for SysCallSliceMut<'a>
impl<'a> From<&'a mut [u8]> for SysCallSliceMut<'a>
Source§impl<'a> From<SysCallSliceMut<'a>> for SysCallSlice<'a>
impl<'a> From<SysCallSliceMut<'a>> for SysCallSlice<'a>
Source§fn from(sli: SysCallSliceMut<'a>) -> Self
fn from(sli: SysCallSliceMut<'a>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<'a> Freeze for SysCallSliceMut<'a>
impl<'a> RefUnwindSafe for SysCallSliceMut<'a>
impl<'a> Send for SysCallSliceMut<'a>
impl<'a> Sync for SysCallSliceMut<'a>
impl<'a> Unpin for SysCallSliceMut<'a>
impl<'a> !UnwindSafe for SysCallSliceMut<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more