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

Method with_file_time_assert

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

Source from the content-addressed store, hash-verified

476 }
477
478 pub fn with_file_time_assert<F, Fut>(mut self, callback: F) -> Self
479 where
480 F: Fn(String, String) -> Fut + Send + Sync + 'static,
481 Fut: std::future::Future<Output = Result<(), ToolError>> + Send + 'static,
482 {
483 self.file_time_assert = Some(Arc::new(move |session_id, file_path| {
484 Box::pin(callback(session_id, file_path))
485 }));
486 self
487 }
488
489 pub async fn do_file_time_assert(&self, file_path: String) -> Result<(), ToolError> {
490 if let Some(ref callback) = self.file_time_assert {

Callers

nothing calls this directly

Calls 1

newFunction · 0.85

Tested by

no test coverage detected