pub trait EntryMetadata:
Debug
+ Send
+ Sync {
// Required method
fn get_compressor(&self, entry_id: &EntryID) -> Arc<LiquidCompressorStates> ⓘ;
// Provided methods
fn add_squeeze_hint(
&self,
_entry_id: &EntryID,
_expression: Arc<CacheExpression>,
) { ... }
fn squeeze_hint(&self, _entry_id: &EntryID) -> Option<Arc<CacheExpression>> { ... }
}Expand description
Per-entry metadata used by the cache.
This trait covers only the metadata side of the cache: where to find a
batch’s compressor and squeeze hints. All actual byte IO goes through the
t4::Store held by the cache itself.
Required Methods§
Sourcefn get_compressor(&self, entry_id: &EntryID) -> Arc<LiquidCompressorStates> ⓘ
fn get_compressor(&self, entry_id: &EntryID) -> Arc<LiquidCompressorStates> ⓘ
Get the compressor for an entry.
Provided Methods§
Sourcefn add_squeeze_hint(
&self,
_entry_id: &EntryID,
_expression: Arc<CacheExpression>,
)
fn add_squeeze_hint( &self, _entry_id: &EntryID, _expression: Arc<CacheExpression>, )
Add a squeeze hint for an entry.
Sourcefn squeeze_hint(&self, _entry_id: &EntryID) -> Option<Arc<CacheExpression>>
fn squeeze_hint(&self, _entry_id: &EntryID) -> Option<Arc<CacheExpression>>
Get the squeeze hint for an entry. If None, the entry will be evicted to disk entirely. If Some, the entry will be squeezed according to the cache expressions previously recorded for this column. For example, if expression is ExtractDate32 { field: Date32Field::Year }, the entry will be squeezed to a crate::liquid_array::SqueezedDate32Array with the year component (Date32 or Timestamp input).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".