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§

Source§

impl ContextValue for ExitStatus

Source§

const KEY: &'static str = "exit_status"

Source§

impl ContextValue for FilesChanged

Source§

const KEY: &'static str = "files_changed"

Source§

impl ContextValue for FilesRead

Source§

const KEY: &'static str = "files_read"

Source§

impl ContextValue for OutputCut

Source§

const KEY: &'static str = "output_cut"