Skip to main content

StateSchemaSource

Trait StateSchemaSource 

Source
pub trait StateSchemaSource {
    // Required method
    fn state_schema(&self) -> &SystemStateSchema;
}
Expand description

A state-bearing value from which persistent-recording layout can be derived.

Both SystemState and SystemStateSchema implement this trait. Passing a live state is the natural choice for a new recording; passing a schema is useful when a continuation writer must be configured before checkpoint reconstruction. Writer builders retain only the cheap shared schema handle.

Required Methods§

Source

fn state_schema(&self) -> &SystemStateSchema

Returns the immutable schema that defines the state’s field layout.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§