Skip to main content

RuntimeConfigRecord

Trait RuntimeConfigRecord 

Source
pub trait RuntimeConfigRecord: Clone + PartialEq {
    // Required methods
    fn config_key(&self) -> &str;
    fn config_value(&self) -> &str;
    fn config_requires_restart(&self) -> bool;
}
Expand description

Record type that can be stored in a runtime configuration snapshot.

Product crates can implement this trait for their database entity model when they need the runtime cache to preserve product-only columns such as audit metadata, timestamps, namespaces, or SeaORM enum wrappers. Forge only needs a stable key, a storage string, and the restart boundary to provide common snapshot behavior.

Required Methods§

Source

fn config_key(&self) -> &str

Returns the stable configuration key.

Source

fn config_value(&self) -> &str

Returns the storage string for this configuration row.

Source

fn config_requires_restart(&self) -> bool

Returns whether hot updates should be ignored after first load.

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§