pub trait HistoryRewriter: Send + Sync {
// Required methods
fn id(&self) -> &'static str;
fn rewrite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 RewriteContext<'life2>,
input: HistoryState,
) -> Pin<Box<dyn Future<Output = Result<HistoryState, HistoryError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
// Provided method
fn accepts(&self, _trigger: &RewriteTrigger) -> bool { ... }
}Expand description
Performs a permanent transform on persisted history (compaction,
overflow recovery, manual /compact, …).
Required Methods§
fn id(&self) -> &'static str
fn rewrite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 RewriteContext<'life2>,
input: HistoryState,
) -> Pin<Box<dyn Future<Output = Result<HistoryState, HistoryError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Provided Methods§
fn accepts(&self, _trigger: &RewriteTrigger) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".