Trait ReadAt

Source
pub trait ReadAt {
    // Required method
    fn read_at(&self, buf: &mut [u8], offs: u64) -> Result<usize>;
}
Expand description

Read data at an offset

Note that compared to Read::read, ReadAt::read_at does not borrow T mutably as it does not need to modify an internal cursor.

Required Methods§

Source

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

Implementations on Foreign Types§

Source§

impl ReadAt for File

Source§

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

Source§

impl ReadAt for [u8]

Source§

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

Source§

impl<'a> ReadAt for Vec<u8>

Source§

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

Source§

impl<'a, T: ReadAt + ?Sized> ReadAt for &'a T

Given a type T that impliments ReadAt, impliment ReadAt for &T and &mut T

Source§

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

Source§

impl<'a, T: ReadAt + ?Sized> ReadAt for &'a mut T

Given that type &T impliments ReadAt, impliment ReadAt for &T

Source§

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

Implementors§