pub trait ContextValue:
Any
+ Send
+ Sync {
// Required methods
fn as_any(&self) -> &dyn Any;
fn serialize_value(&self) -> Result<Vec<u8>, ContextError>;
fn is_local(&self) -> bool;
}Expand description
Type-erased context value. Stored as Arc<dyn ContextValue> in the scope chain.
Required Methods§
Sourcefn serialize_value(&self) -> Result<Vec<u8>, ContextError>
fn serialize_value(&self) -> Result<Vec<u8>, ContextError>
Serialize this value to bytes (bincode).
Returns LocalOnlyKey for local-only (non-serializable) values.