weave-agentfs · watcher
Source declarations, signatures and documentation for watcher.
Source: sigil/weave/local/agentfs/src/watcher.rs. SHA-256: b0bc3e6719c3464d5698229c5f8d2203e343498295cb44d6a540890a782aea41.
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)]
pub enum WatchEvent {
/// File created
Created(PathBuf),
/// File modified
Modified(PathBuf),
/// File deleted
Deleted(PathBuf),
/// File renamed
Renamed { from: PathBuf, to: PathBuf },
/// Directory created
DirCreated(PathBuf),
/// Directory deleted
DirDeleted(PathBuf),
}Source line: 12.
watcher::FSWatcher
File system watcher
pub struct FSWatcher {
}Source line: 33.
watcher::FSWatcher::new
Create a new file system watcher
pub fn new(root: PathBuf) -> Result<Self>;Source line: 49.
watcher::FSWatcher::id
Get watcher ID
pub fn id(&self) -> Uuid;Source line: 101.
watcher::FSWatcher::root
Get root path
pub fn root(&self) -> &Path;Source line: 106.
watcher::FSWatcher::recv
Receive next event
pub async fn recv(&mut self) -> Option<WatchEvent>;Source line: 111.
watcher::FSWatcher::try_recv
Try to receive event without blocking
pub fn try_recv(&mut self) -> Option<WatchEvent>;Source line: 116.