[][src]Trait ara::ReadAt

pub trait ReadAt {
#[must_use]    fn read_at<'life0, 'life1, 'async_trait>(
        &'life0 self,
        offset: u64,
        buf: &'life1 mut [u8]
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn len(&self) -> u64; #[must_use] fn read_at_exact<'life0, 'life1, 'async_trait>(
        &'life0 self,
        offset: u64,
        buf: &'life1 mut [u8]
    ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
, { ... }
fn is_empty(&self) -> bool { ... } }

Provides length and asynchronous random access to a resource

Required methods

#[must_use]fn read_at<'life0, 'life1, 'async_trait>(
    &'life0 self,
    offset: u64,
    buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<usize>> + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Read bytes from resource, starting at offset, into buf

fn len(&self) -> u64

Returns the length of the resource, in bytes

Loading content...

Provided methods

#[must_use]fn read_at_exact<'life0, 'life1, 'async_trait>(
    &'life0 self,
    offset: u64,
    buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Reads exactly buf, starting at offset

fn is_empty(&self) -> bool

Returns true if that resource is empty (has a length of 0)

Loading content...

Implementations on Foreign Types

impl<'a, T> ReadAt for &'a T where
    T: ReadAt
[src]

impl<'a, T> ReadAt for Arc<T> where
    T: ReadAt
[src]

impl<'a, T> ReadAt for Box<T> where
    T: ReadAt
[src]

Loading content...

Implementors

impl<R> ReadAt for BufReaderAt<R> where
    R: ReadAt
[src]

impl<Source> ReadAt for ReadAtWrapper<Source> where
    Source: GetReaderAt
[src]

Loading content...