weave-agentfs-diff · comparison
Source declarations, signatures and documentation for comparison.
Source: sigil/weave/local/agentfs-diff/src/comparison.rs. SHA-256: edb061c2c6e3131d50bfa3dff833363a9935ce5db1e4b79e9357863ec56e7208.
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.
comparison::FileSystemType
Type of file system
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum FileSystemType {
/// Local AgentFS
AgentFS,
/// Remote Locus
Locus,
/// Generic/Unknown
Generic,
}Source line: 12.
comparison::EntryInfo
Entry information for comparison
#[derive(Debug, Clone)]
pub struct EntryInfo {
/// Entry path
pub path: String,
/// Entry type (file, directory, symlink)
pub entry_type: EntryType,
/// Size (for files)
pub size: Option<u64>,
/// Owner agent identity
pub owner: Identity,
/// Modification time
pub mtime: Option<std::time::SystemTime>,
/// Permissions
pub mode: Option<u32>,
/// Symlink target
pub link_target: Option<String>
}Source line: 23.
comparison::EntryType
Entry type
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum EntryType {
File,
Directory,
Symlink,
}Source line: 42.
comparison::FileSystem
Trait for file system operations needed for comparison
#[async_trait]
pub trait FileSystem: Send + Sync {
/// Get file system type
fn fs_type(&self) -> FileSystemType;
/// Get managing agent identity
fn agent_identity(&self) -> &Identity;
/// List entries in a directory
async fn list_entries(&self, path: &Path) -> Result<Vec<EntryInfo>>;
/// Get entry information
async fn get_entry(&self, path: &Path) -> Result<Option<EntryInfo>>;
/// Read file content
async fn read_content(&self, path: &Path) -> Result<Bytes>;
/// Write file content
async fn write_content(&self, path: &Path, content: Bytes) -> Result<()>;
/// Delete a path
async fn delete(&self, path: &Path) -> Result<()>;
/// Calculate content hash
async fn content_hash(&self, path: &Path) -> Result<String>;
}Source line: 50.
comparison::AgentFSWrapper
Wrapper for AgentFS to implement FileSystem trait
#[allow(dead_code)]
pub struct AgentFSWrapper {
}Source line: 78.