pub trait RepackOperation:
Send
+ Sync
+ 'static {
// Required methods
fn key(&self) -> String;
fn inspect(&self) -> Result<RepackInventory, RepackError>;
fn run(&self, context: &RepackContext) -> Result<RepackOutcome, RepackError>;
}Expand description
Storage-specific repack payload driven by the scheduler.
Implementations must stage immutable replacement data, verify all logical identities, and make cutover atomic. Once cutover starts, it must finish even if the context’s token becomes cancelled.
Required Methods§
Sourcefn inspect(&self) -> Result<RepackInventory, RepackError>
fn inspect(&self) -> Result<RepackInventory, RepackError>
Cheap facts used by automatic trigger policy.
Sourcefn run(&self, context: &RepackContext) -> Result<RepackOutcome, RepackError>
fn run(&self, context: &RepackContext) -> Result<RepackOutcome, RepackError>
Build, verify, and atomically publish replacement storage.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".