weave-agentfs-diff · engine
Source declarations, signatures and documentation for engine.
Source: sigil/weave/local/agentfs-diff/src/engine.rs. SHA-256: 2206821012bcc123f528fd1f4df821038e3cc634352d47284bf6f5195055a94b.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
engine::ComparisonMode
Comparison mode
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum ComparisonMode {
/// Fast comparison (size and mtime only)
Fast,
/// Content comparison (hash files)
Content,
/// Full comparison (content + metadata)
Full,
}Source line: 25.
engine::DiffOptions
Options for diff operations
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DiffOptions {
/// Comparison mode
pub mode: ComparisonMode,
/// Compare file content
pub compare_content: bool,
/// Compare metadata
pub compare_metadata: bool,
/// Follow symlinks
pub follow_symlinks: bool,
/// Ignore patterns
pub ignore_patterns: Vec<String>,
/// Maximum parallel comparisons
pub max_parallel: usize,
/// Include unchanged files in results
pub include_unchanged: bool,
/// Optional path to a persistent cache file for content hashes
pub cache_path: Option<String>,
/// Optional cancellation flag for cooperative cancellation
#[serde(skip)]
pub cancel_flag: Option<Arc<AtomicBool>>
}Source line: 36.
engine::DiffOptions::with_content_comparison
pub fn with_content_comparison(mut self, enabled: bool) -> Self;Source line: 93.
engine::DiffOptions::with_metadata_comparison
pub fn with_metadata_comparison(mut self, enabled: bool) -> Self;Source line: 98.
engine::DiffOptions::with_mode
pub fn with_mode(mut self, mode: ComparisonMode) -> Self;Source line: 103.
engine::DiffEngine
Diff engine for comparing file systems
#[derive(Clone)]
pub struct DiffEngine {
}Source line: 111.
engine::DiffEngine::new
Create a new diff engine
pub fn new() -> Self;Source line: 128.
engine::DiffEngine::with_parallel
Create a diff engine with custom parallelism for hashing
pub fn with_parallel(max_parallel: usize) -> Self;Source line: 136.
engine::DiffEngine::compare
Compare two file systems
pub async fn compare(
&self,
source: Arc<dyn FileSystem>,
target: Arc<dyn FileSystem>,
options: DiffOptions,
) -> Result<Vec<Diff>>;Source line: 187.