pub struct UserSliceReadWrite { /* private fields */ }Expand description
A validated read-write reference to a user-space memory region.
Construction validates that [ptr, ptr+len) is mapped, user-accessible,
and writable (writable implies readable on x86_64).
Implementations§
Source§impl UserSliceReadWrite
impl UserSliceReadWrite
Sourcepub fn new(ptr: u64, len: usize) -> Result<Self, UserSliceError>
pub fn new(ptr: u64, len: usize) -> Result<Self, UserSliceError>
Create a new validated read-write user slice.
Auto Trait Implementations§
impl Freeze for UserSliceReadWrite
impl RefUnwindSafe for UserSliceReadWrite
impl Send for UserSliceReadWrite
impl Sync for UserSliceReadWrite
impl Unpin for UserSliceReadWrite
impl UnsafeUnpin for UserSliceReadWrite
impl UnwindSafe for UserSliceReadWrite
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more