weave-agentfs-mirror · watcher
Source declarations, signatures and documentation for watcher.
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/watcher.rs. SHA-256: 7f3717550ce6bf85f72cf6b8bafe78f07f8306ff24ef794ecd7be7f4b540a298.
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.
watcher::WatchEvent
Watch event types
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum WatchEvent {
/// File created
Created(PathBuf),
/// File modified
Modified(PathBuf),
/// File deleted
Deleted(PathBuf),
/// File renamed
Renamed { from: PathBuf, to: PathBuf },
/// Sync triggered
SyncTriggered,
/// Sync completed
SyncCompleted {
files_synced: usize,
duration: Duration,
},
/// Error occurred
Error(String),
}Source line: 18.
watcher::MirrorWatcher
Mirror watcher for real-time sync
pub struct MirrorWatcher {
}Source line: 45.
watcher::MirrorWatcher::new
Create new mirror watcher
pub fn new(engine: Arc<SyncEngine>, interval: Duration) -> Self;Source line: 64.
watcher::MirrorWatcher::start
Start watching
pub async fn start(&mut self, mut state: SyncState) -> Result<()>;Source line: 77.
watcher::MirrorWatcher::stop
Stop watching
pub fn stop(&mut self);Source line: 120.
watcher::MirrorWatcher::receiver
Get event receiver
pub fn receiver(&mut self) -> Option<mpsc::UnboundedReceiver<WatchEvent>>;Source line: 127.