pub trait Action:
Clone
+ Debug
+ Send
+ 'static {
// Required method
fn name(&self) -> &'static str;
}Expand description
Marker trait for actions that can be dispatched to the store
Actions represent intents to change state. They should be:
- Clone: Actions may be logged, replayed, or sent to multiple handlers
- Debug: For debugging and logging
- Send + ’static: For async dispatch across threads
Use #[derive(Action)] from tui-dispatch-macros to auto-implement this trait.
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.