Skip to main content

ContextValue

Trait ContextValue 

Source
pub trait ContextValue:
    Serialize
    + DeserializeOwned
    + 'static {
    const KEY: &'static str;
}
Expand description

Serializable context data with a stable slot key. Distinct value types must use distinct keys, and persisted keys must remain stable across schema changes. The derive macro defaults to the type name; #[context(key = "…")] overrides it.

Required Associated Constants§

Source

const KEY: &'static str

The slot this value lives under.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§