Trait ReadBytesAt

Source
pub trait ReadBytesAt {
    // Required method
    fn read_bytes_at(&self, offset: u64, size: usize) -> Result<Bytes>;
}
Expand description

Trait identical to ReadAt but returning Bytes instead of reading into a buffer.

This forwards to the underlying ReadAt implementation except for Bytes, &Bytes, &mut Bytes.

Required Methods§

Source

fn read_bytes_at(&self, offset: u64, size: usize) -> Result<Bytes>

Version of ReadAt::read_exact_at that returns a Bytes instead of reading into a buffer.

Implementations on Foreign Types§

Source§

impl ReadBytesAt for &Bytes

Source§

fn read_bytes_at(&self, offset: u64, size: usize) -> Result<Bytes>

Source§

impl ReadBytesAt for &[u8]

Source§

fn read_bytes_at(&self, offset: u64, size: usize) -> Result<Bytes>

Source§

impl ReadBytesAt for &mut Bytes

Source§

fn read_bytes_at(&self, offset: u64, size: usize) -> Result<Bytes>

Source§

impl ReadBytesAt for Vec<u8>

Source§

fn read_bytes_at(&self, offset: u64, size: usize) -> Result<Bytes>

Source§

impl ReadBytesAt for File

Source§

fn read_bytes_at(&self, offset: u64, size: usize) -> Result<Bytes>

Source§

impl ReadBytesAt for Bytes

Source§

fn read_bytes_at(&self, offset: u64, size: usize) -> Result<Bytes>

Implementors§