[][src]Trait read_write_at::ReadAt

pub trait ReadAt {
    fn read_at(&self, buf: &mut [u8], offset: u64) -> Result<usize>;

    fn read_exact_at(&self, buf: &mut [u8], offset: u64) -> Result<()> { ... }
}

Read-only generalisation of std::os::unix::fs::FileExt

Required methods

fn read_at(&self, buf: &mut [u8], offset: u64) -> Result<usize>

Reads a number of bytes starting from a given offset. Returns the number of bytes read. The offset is relative to the start of the (virtual) file and thus independent from the current cursor, if the object has concept of a cursor. That cursor then should not be affected by this function. Short reads are not considered as errors.

Loading content...

Provided methods

fn read_exact_at(&self, buf: &mut [u8], offset: u64) -> Result<()>

Similar to read_at, but without short reads.

Loading content...

Implementations on Foreign Types

impl ReadAt for File[src]

impl<T: ?Sized> ReadAt for RefCell<T> where
    T: ReadAtMut
[src]

impl<T: ?Sized> ReadAt for Mutex<T> where
    T: ReadAtMut
[src]

Loading content...

Implementors

Loading content...