pub trait SegmentCache: Send + Sync {
// Required methods
fn get<'life0, 'async_trait>(
&'life0 self,
id: SegmentId,
) -> Pin<Box<dyn Future<Output = VortexResult<Option<ByteBuffer>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn put<'life0, 'async_trait>(
&'life0 self,
id: SegmentId,
buffer: ByteBuffer,
) -> Pin<Box<dyn Future<Output = VortexResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
A cache for storing and retrieving individual segment data.
Required Methods§
fn get<'life0, 'async_trait>(
&'life0 self,
id: SegmentId,
) -> Pin<Box<dyn Future<Output = VortexResult<Option<ByteBuffer>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put<'life0, 'async_trait>(
&'life0 self,
id: SegmentId,
buffer: ByteBuffer,
) -> Pin<Box<dyn Future<Output = VortexResult<()>> + 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".