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

Method with_update_part

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

Source from the content-addressed store, hash-verified

531 }
532
533 pub fn with_update_part<F, Fut>(mut self, callback: F) -> Self
534 where
535 F: Fn(serde_json::Value) -> Fut + Send + Sync + 'static,
536 Fut: std::future::Future<Output = Result<(), ToolError>> + Send + 'static,
537 {
538 self.update_part = Some(Arc::new(move |part| Box::pin(callback(part))));
539 self
540 }
541
542 pub async fn do_update_part(&self, part: serde_json::Value) -> Result<(), ToolError> {
543 if let Some(ref callback) = self.update_part {

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected