pub trait TodoStateProvider:
Send
+ Sync
+ Debug {
// Required methods
fn get_phases(&self) -> Vec<TodoPhase>;
fn apply_ops<'a>(
&'a self,
ops: Vec<TodoOp>,
) -> Pin<Box<dyn Future<Output = Result<TodoUpdateResult, String>> + Send + 'a>>;
}Expand description
Todo state access capability. Implemented by the composition root
(oxi-cli) bridging to the session-scoped todo state. Used by the
todo agent tool and the TUI sticky panel.
Required Methods§
Sourcefn get_phases(&self) -> Vec<TodoPhase>
fn get_phases(&self) -> Vec<TodoPhase>
Return a snapshot of the current phase list (read-only, for TUI).
Sourcefn apply_ops<'a>(
&'a self,
ops: Vec<TodoOp>,
) -> Pin<Box<dyn Future<Output = Result<TodoUpdateResult, String>> + Send + 'a>>
fn apply_ops<'a>( &'a self, ops: Vec<TodoOp>, ) -> Pin<Box<dyn Future<Output = Result<TodoUpdateResult, String>> + Send + 'a>>
Apply a sequence of todo ops, returning the updated state, the newly-completed transitions (for strikethrough animation), and any error messages from ambiguous op references.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".