pub struct PosixRandomAccessFile { /* private fields */ }
Expand description
| Implements random read access in a file using | pread(). | | Instances of this class are thread-safe, as | required by the RandomAccessFile API. Instances | are immutable and Read() only calls thread-safe | library functions.
Implementations§
Trait Implementations§
Source§impl Drop for PosixRandomAccessFile
impl Drop for PosixRandomAccessFile
Source§impl GetName for PosixRandomAccessFile
impl GetName for PosixRandomAccessFile
Source§impl RandomAccessFileRead for PosixRandomAccessFile
impl RandomAccessFileRead for PosixRandomAccessFile
Source§fn read(
&self,
offset: u64,
n: usize,
result: *mut Slice,
scratch: *mut u8,
) -> Status
fn read( &self, offset: u64, n: usize, result: *mut Slice, scratch: *mut u8, ) -> Status
| Read up to “n” bytes from the file starting
| at “offset”. “scratch[0..n-1]” may be
| written by this routine. Sets “*result” to
| the data that was read (including if fewer
| than “n” bytes were successfully read). May
| set “*result” to point at data in
| “scratch[0..n-1]”, so “scratch[0..n-1]” must
| be live when “*result” is used. If an error
| was encountered, returns a non-OK status.
|
| Safe for concurrent use by multiple threads.
impl RandomAccessFile for PosixRandomAccessFile
Auto Trait Implementations§
impl Freeze for PosixRandomAccessFile
impl !RefUnwindSafe for PosixRandomAccessFile
impl !Send for PosixRandomAccessFile
impl !Sync for PosixRandomAccessFile
impl Unpin for PosixRandomAccessFile
impl !UnwindSafe for PosixRandomAccessFile
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