pub trait StateVersion {
type NewArgs;
const VERSION: u32;
// Required method
fn new(args: Self::NewArgs) -> VersionedState<Self>
where Self: Sized;
// Provided method
fn needs_migration() -> Result<bool, Error> { ... }
}Required Associated Constants§
Required Associated Types§
Required Methods§
fn new(args: Self::NewArgs) -> VersionedState<Self>where
Self: Sized,
Provided Methods§
fn needs_migration() -> Result<bool, Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.