pub struct UserOutPtr<T> { /* private fields */ }Expand description
A wrapper around a mutable pointer to user memory (write-only).
Implementations§
Source§impl<T> UserOutPtr<T>
impl<T> UserOutPtr<T>
Sourcepub fn byte_offset(&self, count: isize) -> Self
pub fn byte_offset(&self, count: isize) -> Self
Returns a pointer offset by count bytes.
Sourcepub fn element_offset(&self, index: usize) -> Self
pub fn element_offset(&self, index: usize) -> Self
Returns a pointer offset by index elements.
Sourcepub fn reinterpret<U>(&self) -> UserOutPtr<U>
pub fn reinterpret<U>(&self) -> UserOutPtr<U>
Reinterprets the pointer as a pointer to type U.
Sourcepub fn copy_to_user(&self, src: &T) -> Result<(), Status>
pub fn copy_to_user(&self, src: &T) -> Result<(), Status>
Copies a single element from src to userspace.
Sourcepub fn copy_slice_to_user(&self, src: &[T]) -> Result<(), Status>
pub fn copy_slice_to_user(&self, src: &[T]) -> Result<(), Status>
Copies a slice of elements from src to userspace.
Trait Implementations§
Source§impl<T: Clone> Clone for UserOutPtr<T>
impl<T: Clone> Clone for UserOutPtr<T>
Source§fn clone(&self) -> UserOutPtr<T>
fn clone(&self) -> UserOutPtr<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable)§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug> Debug for UserOutPtr<T>
impl<T: Debug> Debug for UserOutPtr<T>
Source§impl<T: Default> Default for UserOutPtr<T>
impl<T: Default> Default for UserOutPtr<T>
Source§fn default() -> UserOutPtr<T>
fn default() -> UserOutPtr<T>
Returns the “default value” for a type. Read more
impl<T: Copy> Copy for UserOutPtr<T>
Auto Trait Implementations§
impl<T> Freeze for UserOutPtr<T>
impl<T> RefUnwindSafe for UserOutPtr<T>where
T: RefUnwindSafe,
impl<T> !Send for UserOutPtr<T>
impl<T> !Sync for UserOutPtr<T>
impl<T> Unpin for UserOutPtr<T>
impl<T> UnsafeUnpin for UserOutPtr<T>
impl<T> UnwindSafe for UserOutPtr<T>where
T: RefUnwindSafe,
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)