MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / with_todo_get

Method with_todo_get

crates/opencode-tool/src/tool.rs:605–612  ·  view source on GitHub ↗
(mut self, callback: F)

Source from the content-addressed store, hash-verified

603 }
604
605 pub fn with_todo_get<F, Fut>(mut self, callback: F) -> Self
606 where
607 F: Fn(String) -> Fut + Send + Sync + 'static,
608 Fut: std::future::Future<Output = Result<Vec<TodoItemData>, ToolError>> + Send + 'static,
609 {
610 self.todo_get = Some(Arc::new(move |session_id| Box::pin(callback(session_id))));
611 self
612 }
613
614 pub async fn do_todo_get(&self) -> Result<Vec<TodoItemData>, ToolError> {
615 if let Some(ref callback) = self.todo_get {

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected