pub trait ChunkGet<const BODY_SIZE: usize = DEFAULT_BODY_SIZE>: Send + Sync {
type Error: Error + Send + Sync + 'static;
// Required method
fn get(
&self,
address: &ChunkAddress,
) -> impl Future<Output = Result<AnyChunk<BODY_SIZE>, Self::Error>> + Send;
}Expand description
Async chunk retrieval (primary API).
Types implementing SyncChunkGet + Send + Sync get this automatically via
a blanket impl. Types needing genuinely async retrieval (e.g. network
fetch) should implement ChunkGet directly without implementing
SyncChunkGet.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".