pub trait State:
Clone
+ Send
+ Sync
+ Serialize
+ DeserializeOwned
+ 'static {
type Update: StateUpdate;
// Required method
fn apply(&mut self, update: Self::Update);
}Expand description
Every agent state must implement this trait. Generated by #[derive(State)] proc macro.
Required Associated Types§
Sourcetype Update: StateUpdate
type Update: StateUpdate
The companion partial-update struct (all fields Optional)
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".