weave-agentfs-mirror · conflict
Source declarations, signatures and documentation for conflict.
Reviewed implementation boundary: The mirror plan executor contains NotImplemented paths. A generated plan is not a successfully synchronized remote filesystem. See /libraries/agentfs-mirror/overview.
Source: sigil/weave/local/agentfs-mirror/src/conflict.rs. SHA-256: 19b2548447210f19d6fe8e37f77dc8f68bbb007acbbebfe846074c88303fc953.
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.
conflict::ConflictStrategy
Conflict resolution strategy
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum ConflictStrategy {
/// Newer file wins
NewerWins,
/// Older file wins
OlderWins,
/// Source always wins
SourceWins,
/// Target always wins
TargetWins,
/// Skip conflicts
Skip,
/// Interactive resolution
Interactive,
/// Agent-based (owner agent wins)
AgentBased,
}Source line: 10.
conflict::ConflictResolution
Resolution for a specific conflict
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ConflictResolution {
/// Use source version
UseSource,
/// Use target version
UseTarget,
/// Skip this file
Skip,
/// Merge versions (for text files)
Merge,
/// Rename one version
Rename {
source_name: String,
target_name: String,
},
}Source line: 29.
conflict::Conflict
Conflict information
#[derive(Debug, Clone)]
pub struct Conflict {
/// Path with conflict
pub path: PathBuf,
/// Source file info
pub source_info: FileInfo,
/// Target file info
pub target_info: FileInfo,
/// Conflict type
pub conflict_type: ConflictType
}Source line: 47.
conflict::FileInfo
File information for conflict resolution
#[derive(Debug, Clone)]
pub struct FileInfo {
/// File size
pub size: u64,
/// Modification time
pub mtime: DateTime<Utc>,
/// Owner agent identity
pub owner: Identity,
/// Content hash
pub hash: Option<String>
}Source line: 63.
conflict::ConflictType
Type of conflict
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ConflictType {
/// Both files modified
BothModified,
/// Delete vs modify
DeleteModify,
/// Type mismatch (file vs directory)
TypeMismatch,
}Source line: 79.
conflict::ConflictResolver
Conflict resolver
#[derive(Debug, Clone)]
pub struct ConflictResolver {
}Source line: 90.
conflict::ConflictResolver::new
Create a new conflict resolver
pub fn new(strategy: ConflictStrategy) -> Self;Source line: 96.
conflict::ConflictResolver::resolve
Resolve a conflict
pub async fn resolve(&self, conflict: &Conflict) -> ConflictResolution;Source line: 101.
conflict::ConflictResolver::is_conflict
Check if two files conflict
pub fn is_conflict(
source_mtime: DateTime<Utc>,
target_mtime: DateTime<Utc>,
threshold: chrono::Duration,
) -> bool;Source line: 133.