pub trait Compaction: Send + Sync {
// Required method
fn compact<'life0, 'async_trait>(
&'life0 self,
input: CompactionInput,
) -> Pin<Box<dyn Future<Output = Result<CompactionOutput, CompactionError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Compaction port: reduce a block list to fit the window budget. Async and
host-pluggable; the output is frame-local (see CompactionOutput) and
never written back into fact state.
Required Methods§
Sourcefn compact<'life0, 'async_trait>(
&'life0 self,
input: CompactionInput,
) -> Pin<Box<dyn Future<Output = Result<CompactionOutput, CompactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn compact<'life0, 'async_trait>(
&'life0 self,
input: CompactionInput,
) -> Pin<Box<dyn Future<Output = Result<CompactionOutput, CompactionError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Compact input.blocks under input.budget, returning the
replacement blocks plus an optional host-only summary.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".