pub trait Upcaster:
Send
+ Sync
+ Debug {
// Required methods
fn current_version(&self, kind: &str) -> u16;
fn upcast(
&self,
kind: &str,
version: u16,
payload: Value,
) -> Result<Value, StoreError>;
}Expand description
A pure, total transform from an older record version to the current one.
Lives inside the deterministic zone: given the same (kind, version, payload) it must always produce the same output, in this process and in one
started a year from now.
Required Methods§
Sourcefn current_version(&self, kind: &str) -> u16
fn current_version(&self, kind: &str) -> u16
Highest version this upcaster knows how to produce.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".