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

Method with_update_message

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

Source from the content-addressed store, hash-verified

548 }
549
550 pub fn with_update_message<F, Fut>(mut self, callback: F) -> Self
551 where
552 F: Fn(serde_json::Value) -> Fut + Send + Sync + 'static,
553 Fut: std::future::Future<Output = Result<(), ToolError>> + Send + 'static,
554 {
555 self.update_message = Some(Arc::new(move |msg| Box::pin(callback(msg))));
556 self
557 }
558
559 pub async fn do_update_message(&self, msg: serde_json::Value) -> Result<(), ToolError> {
560 if let Some(ref callback) = self.update_message {

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected