weave-agentfs · sync
Source declarations, signatures and documentation for sync.
Source: sigil/weave/local/agentfs/src/sync.rs. SHA-256: 34c987d62d373f621865f8b0e194b6cdce420408be553caf2d00fe4f9db7af13.
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.
sync::SyncDirection
Sync direction
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum SyncDirection {
/// Push from AgentFS to Locus
Push,
/// Pull from Locus to AgentFS
Pull,
/// Bidirectional sync
Bidirectional,
}Source line: 15.
sync::SyncOptions
Sync options
#[derive(Clone, Serialize, Deserialize)]
#[serde(default)]
pub struct SyncOptions {
/// Sync direction
pub direction: SyncDirection,
/// Delete files not in source
pub delete: bool,
/// Follow symlinks
pub follow_links: bool,
/// Ignore patterns
pub ignore_patterns: Vec<String>,
/// Preview only (don't actually sync). Use `apply=true` to perform changes.
pub preview: bool,
/// Apply changes (if false and preview=false, defaults to safe preview)
pub apply: bool,
/// Progress callback
#[serde(skip)]
pub progress_callback: Option<std::sync::Arc<dyn Fn(SyncProgress) + Send + Sync>>,
/// Maximum number of concurrent sync operations
pub concurrency: usize
}Source line: 27.
sync::SyncProgress
Sync progress information
#[derive(Debug, Clone)]
pub struct SyncProgress {
/// Current file being synced
pub current_file: PathBuf,
/// Total files to sync
pub total_files: usize,
/// Files synced so far
pub synced_files: usize,
/// Bytes transferred
pub bytes_transferred: u64
}Source line: 88.
sync::SyncManager
Sync manager for AgentFS
pub struct SyncManager {
}Source line: 103.
sync::SyncManager::new
Create a new sync manager
pub fn new(agent_identity: Identity) -> Self;Source line: 114.
sync::SyncManager::connect
Connect to remote Locus
pub async fn connect(&mut self, locus: Arc<Locus>) -> Result<()>;Source line: 122.
sync::SyncManager::disconnect
Disconnect from remote Locus
pub fn disconnect(&mut self);Source line: 128.
sync::SyncManager::is_connected
Check if connected
pub fn is_connected(&self) -> bool;Source line: 133.
sync::SyncManager::sync
Perform sync operation
pub async fn sync(
&self,
local_path: &Path,
remote_path: &Path,
options: SyncOptions,
) -> Result<()>;Source line: 138.