fuchsia_fs::file

Trait AsyncReadAtExt

Source
pub trait AsyncReadAtExt: AsyncReadAt {
    // Provided methods
    fn read_at<'a>(
        &'a mut self,
        offset: u64,
        buf: &'a mut [u8],
    ) -> ReadAt<'a, Self>
       where Self: Unpin { ... }
    fn read_at_exact<'a>(
        &'a mut self,
        offset: u64,
        buf: &'a mut [u8],
    ) -> ReadAtExact<'a, Self>
       where Self: Unpin { ... }
    fn read_to_end<'a>(
        &'a mut self,
        buf: &'a mut Vec<u8>,
    ) -> ReadToEnd<'a, Self>
       where Self: Unpin { ... }
}
Expand description

An extension trait which adds utility methods to AsyncReadAt.

Provided Methods§

Source

fn read_at<'a>(&'a mut self, offset: u64, buf: &'a mut [u8]) -> ReadAt<'a, Self>
where Self: Unpin,

Returns a future that reads at offset, and fill buf, on success the number of bytes read is returned.

Source

fn read_at_exact<'a>( &'a mut self, offset: u64, buf: &'a mut [u8], ) -> ReadAtExact<'a, Self>
where Self: Unpin,

Returns a future that reads at offset, and fill buf exactly.

Source

fn read_to_end<'a>(&'a mut self, buf: &'a mut Vec<u8>) -> ReadToEnd<'a, Self>
where Self: Unpin,

Returns a future that appends all data to buf, on success the number of bytes read is returned.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§