pub trait Blob: Inspect {
// Required methods
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 mut [u8],
offset: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn len(&self) -> u64;
}
Expand description
Trait for a read-only blob.
Required Methods§
Sourcefn read<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 mut [u8],
offset: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read<'life0, 'life1, 'async_trait>(
&'life0 self,
buf: &'life1 mut [u8],
offset: u64,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reads data at offset
into buf
.
If buf
is not completely filled, then this should return
std::io::ErrorKind::UnexpectedEof
rather than any kind of partial
success.