pub struct PosixSequentialFile { /* private fields */ }Expand description
| Implements sequential read access in a file | using read(). | | Instances of this class are thread-friendly but | not thread-safe, as required by the | SequentialFile API.
Implementations§
Trait Implementations§
Source§impl Drop for PosixSequentialFile
impl Drop for PosixSequentialFile
Source§impl GetName for PosixSequentialFile
impl GetName for PosixSequentialFile
Source§impl SequentialFileRead for PosixSequentialFile
impl SequentialFileRead for PosixSequentialFile
Source§fn read(&mut self, n: usize, result: *mut Slice, scratch: *mut u8) -> Status
fn read(&mut self, n: usize, result: *mut Slice, scratch: *mut u8) -> Status
| Read up to “n” bytes from the file. “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.
|
| REQUIRES: External synchronization
|
Source§impl SequentialFileSkip for PosixSequentialFile
impl SequentialFileSkip for PosixSequentialFile
Source§fn skip(&mut self, n: u64) -> Status
fn skip(&mut self, n: u64) -> Status
| Skip “n” bytes from the file. This is
| guaranteed to be no slower that reading the
| same data, but may be faster.
|
| If end of file is reached, skipping will stop
| at the end of the file, and Skip will return
| OK.
|
| REQUIRES: External synchronization
impl SequentialFile for PosixSequentialFile
Auto Trait Implementations§
impl Freeze for PosixSequentialFile
impl RefUnwindSafe for PosixSequentialFile
impl Send for PosixSequentialFile
impl Sync for PosixSequentialFile
impl Unpin for PosixSequentialFile
impl UnwindSafe for PosixSequentialFile
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