Skip to main content

KernelState

Trait KernelState 

Source
pub trait KernelState:
    Clone
    + Send
    + Sync
    + 'static {
    // Required method
    fn version(&self) -> u32;
}
Expand description

Kernel state: cloneable, send, sync, and with a schema version for migrations.

Existing graph::State can implement this by adding fn version(&self) -> u32 (e.g. returning 1).

Required Methods§

Source

fn version(&self) -> u32

Schema version for state migration (e.g. 1, 2, …).

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§