Trait StateVersion

Source
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§

Source

fn new(args: Self::NewArgs) -> VersionedState<Self>
where Self: Sized,

Provided Methods§

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.

Implementors§