Skip to main content

ObjectPrefetch

Trait ObjectPrefetch 

Source
pub trait ObjectPrefetch:
    Send
    + Sync
    + Debug {
    // Required method
    fn prefetch<'life0, 'async_trait>(
        &'life0 self,
        items: Vec<PrefetchItem>,
    ) -> Pin<Box<dyn Future<Output = Result<PrefetchResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Dyn-compatible capability seam so downstream consumers that hold Arc<dyn ObjectStore> (not CacheClientStore directly) can still drive prefetch without downcasting.

Debug is a supertrait so Arc<dyn ObjectPrefetch> can be embedded in a #[derive(Debug)] struct (e.g. DataLakeConnection).

Required Methods§

Source

fn prefetch<'life0, 'async_trait>( &'life0 self, items: Vec<PrefetchItem>, ) -> Pin<Box<dyn Future<Output = Result<PrefetchResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§