pub struct UserPtr<T>(/* private fields */);
Expand description
A pointer to user space memory.
Implementations§
Source§impl<T> UserPtr<T>
impl<T> UserPtr<T>
pub fn address(&self) -> VirtAddr
pub fn is_null(&self) -> bool
pub fn get_as_mut(self) -> LinuxResult<&'static mut T>
pub fn get_as_mut_slice(self, len: usize) -> LinuxResult<&'static mut [T]>
pub fn get_as_mut_null_terminated(self) -> LinuxResult<&'static mut [T]>
Trait Implementations§
impl<T: Copy> Copy for UserPtr<T>
impl<T> StructuralPartialEq for UserPtr<T>
Auto Trait Implementations§
impl<T> Freeze for UserPtr<T>
impl<T> RefUnwindSafe for UserPtr<T>where
T: RefUnwindSafe,
impl<T> !Send for UserPtr<T>
impl<T> !Sync for UserPtr<T>
impl<T> Unpin for UserPtr<T>
impl<T> UnwindSafe for UserPtr<T>where
T: RefUnwindSafe,
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