pub trait TodoStateProvider: Send + Sync {
// Required methods
fn get_phases(&self) -> Vec<TodoPhase>;
fn apply_ops<'a>(
&'a self,
ops: Vec<TodoOp>,
) -> Pin<Box<dyn Future<Output = Result<TodoUpdateResult, ToolError>> + Send + 'a>>;
}Expand description
Trait abstracting where todo state lives. Implemented by hosts
(e.g. oxicode-cli::store::TodoState) so the stateless TodoTool and
the TUI sticky panel share one source of truth.
Required Methods§
Sourcefn get_phases(&self) -> Vec<TodoPhase>
fn get_phases(&self) -> Vec<TodoPhase>
Snapshot of the current phases (cheap clone expected).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".