pub struct UserSlice {
address: u64,
length: u64,
}Expand description
Data structure to store fat pointers provided by userspace
Fields§
§address: u64§length: u64Implementations§
Source§impl UserSlice
impl UserSlice
Sourcepub fn new(address: u64, length: u64) -> Result<Self, SyscallError>
pub fn new(address: u64, length: u64) -> Result<Self, SyscallError>
Sourcepub fn copy_to_slice(&self, slice: &mut [u8])
pub fn copy_to_slice(&self, slice: &mut [u8])
Copies the userspace data into the given slice
§Panics
sliceis not exactly as large as thisUserSlice(only with thedebug-checksfeature)- any of the cases listed on
Self::partial_copy_to_slice
Sourcepub fn partial_copy_to_slice(&self, slice: &mut [u8], offset: u64, length: u64)
pub fn partial_copy_to_slice(&self, slice: &mut [u8], offset: u64, length: u64)
Sourcefn incorrect_size_panic(&self, dst_len: usize, src_len: u64) -> !
fn incorrect_size_panic(&self, dst_len: usize, src_len: u64) -> !
Panic Message for when dst_len is not sized like src_len (they are not equal)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UserSlice
impl RefUnwindSafe for UserSlice
impl Send for UserSlice
impl Sync for UserSlice
impl Unpin for UserSlice
impl UnsafeUnpin for UserSlice
impl UnwindSafe for UserSlice
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)