[−][src]Trait ara::ReadAt
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,
&'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
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,
&'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)
Implementations on Foreign Types
impl<'a, T> ReadAt for &'a T where
T: ReadAt,
[src]
T: ReadAt,
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,
[src]
&'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
[src]
impl<'a, T> ReadAt for Arc<T> where
T: ReadAt,
[src]
T: ReadAt,
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,
[src]
&'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
[src]
impl<'a, T> ReadAt for Box<T> where
T: ReadAt,
[src]
T: ReadAt,
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,
[src]
&'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
[src]
Implementors
impl<R> ReadAt for BufReaderAt<R> where
R: ReadAt,
[src]
R: ReadAt,
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,
[src]
&'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
[src]
impl<Source> ReadAt for ReadAtWrapper<Source> where
Source: GetReaderAt,
[src]
Source: GetReaderAt,