Struct kernel::user_ptr::UserSlicePtrReader
source · [−]pub struct UserSlicePtrReader(_, _);
Expand description
A reader for UserSlicePtr
.
Used to incrementally read from the user slice.
Trait Implementations
sourceimpl IoBufferReader for UserSlicePtrReader
impl IoBufferReader for UserSlicePtrReader
sourcefn len(&self) -> usize
fn len(&self) -> usize
Returns the number of bytes left to be read from this.
Note that even reading less than this number of bytes may fail.
sourceunsafe fn read_raw(&mut self, out: *mut u8, len: usize) -> Result
unsafe fn read_raw(&mut self, out: *mut u8, len: usize) -> Result
Reads raw data from the user slice into a raw kernel buffer.
Safety
The output buffer must be valid.
sourcefn read_slice(&mut self, data: &mut [u8]) -> Result
fn read_slice(&mut self, data: &mut [u8]) -> Result
Reads a byte slice from the io buffer. Read more
sourcefn read<T: ReadableFromBytes>(&mut self) -> Result<T>
fn read<T: ReadableFromBytes>(&mut self) -> Result<T>
Reads the contents of a plain old data (POD) type from the io buffer.
Auto Trait Implementations
impl RefUnwindSafe for UserSlicePtrReader
impl !Send for UserSlicePtrReader
impl !Sync for UserSlicePtrReader
impl Unpin for UserSlicePtrReader
impl UnwindSafe for UserSlicePtrReader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more