pub trait StatefulStateMigratorV1: Send + Sync {
// Required method
fn migrate(
&self,
from_schema_version: u32,
state: &[u8],
) -> Result<(u32, Vec<u8>), StatefulHandlerErrorV2>;
}Expand description
Host-provided migration hook. Migrations return a new state and never mutate the input, allowing the caller to preserve the previous-good copy.
Required Methods§
fn migrate( &self, from_schema_version: u32, state: &[u8], ) -> Result<(u32, Vec<u8>), StatefulHandlerErrorV2>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".