pub trait State:
Send
+ Sync
+ Clone
+ Serialize
+ DeserializeOwned
+ 'static {
// Required methods
fn to_value(&self) -> Result<Value, Box<dyn Error + Send + Sync>>;
fn from_value(value: Value) -> Result<Self, Box<dyn Error + Send + Sync>>;
}Expand description
State trait for agent state.
Agents maintain state that can be serialized and deserialized.
Required Methods§
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.