pub trait SnapshotObjectReader:
Send
+ Sync
+ Debug {
// Required methods
fn len(&self) -> u64;
fn digest(&self) -> &str;
fn read_chunk<'life0, 'async_trait>(
&'life0 self,
offset: u64,
max_bytes: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided method
fn is_empty(&self) -> bool { ... }
}Expand description
Bounded, random-access reader used across application and object-store
ports. Implementations must never return more than max_bytes.
Required Methods§
fn len(&self) -> u64
fn digest(&self) -> &str
fn read_chunk<'life0, 'async_trait>(
&'life0 self,
offset: u64,
max_bytes: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".