[−][src]Trait olio::fs::PosRead
Trait offering a uniform pread
for positioned reads, with platform
dependent side-effects.
For File
(and any Borrow<File>
), this is implemented using the
platform dependent standard FileExt
traits. To maintain portability and
consistency on all platforms, the user is advised to avoid concurrent,
direct reads or writes on a File
(via its own Read
/Write
implementation) while any instances of this interface are in use for the
same File
, and to re-seek
to a known file position after such use.
Required methods
pub fn pread(&self, buf: &mut [u8], offset: u64) -> Result<usize>
[src]
Read bytes, starting at the specified offset, into the specified buffer and return the number of bytes read. The offset is from the start of the underlying file or file range. Reads beyond the end of available bytes will return 0 length. The position of the underlying file pointer (aka cursor) is not used. It is platform dependent whether the underlying file pointer is modified by this operation.
Implementors
impl<B> PosRead for B where
B: Borrow<File>,
[src]
B: Borrow<File>,
impl<P> PosRead for ReadPos<P> where
P: PosRead,
[src]
P: PosRead,
impl<P> PosRead for ReadSlice<P> where
P: PosRead,
[src]
P: PosRead,