weave-locus · watcher
Source declarations, signatures and documentation for watcher.
Reviewed implementation boundary: Rollback records a marker; mount descriptions and governance metadata alone do not execute mounting or enforce signature authorization. Operations can have separate metadata/blob failure points. See /libraries/locus/overview.
Source: sigil/weave/models/locus/src/watcher.rs. SHA-256: cdab7534f2043b6c62366a4b4dd492584e53ba4a0ddc4de147701c32d1176dae.
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::WatcherId
Watcher ID type
pub type WatcherId = Uuid;Source line: 12.
watcher::WatchEvent
Event emitted by file watcher
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum WatchEvent {
/// File created
Created { path: String, is_dir: bool },
/// File modified
Modified { path: String, is_dir: bool },
/// File deleted
Deleted { path: String, is_dir: bool },
/// File moved
Moved {
from: String,
to: String,
is_dir: bool,
},
/// Metadata changed
MetadataChanged { path: String, is_dir: bool },
}Source line: 16.
watcher::Watcher
File watcher
pub struct Watcher {
}Source line: 38.
watcher::Watcher::new
Create a new watcher
pub fn new() -> Self;Source line: 66.
watcher::Watcher::id
Get the watcher ID
pub fn id(&self) -> WatcherId;Source line: 77.
watcher::Watcher::subscribe
Subscribe to watch events
pub fn subscribe(&self) -> broadcast::Receiver<WatchEvent>;Source line: 82.
watcher::Watcher::emit
Emit an event
pub fn emit(&self, event: WatchEvent);Source line: 87.
watcher::Watcher::emit_created
Emit created event
pub fn emit_created(&self, path: String, is_dir: bool);Source line: 100.
watcher::Watcher::emit_modified
Emit modified event
pub fn emit_modified(&self, path: String, is_dir: bool);Source line: 105.
watcher::Watcher::emit_deleted
Emit deleted event
pub fn emit_deleted(&self, path: String, is_dir: bool);Source line: 110.
watcher::Watcher::emit_moved
Emit moved event
pub fn emit_moved(&self, from: String, to: String, is_dir: bool);Source line: 115.
watcher::Watcher::emit_metadata_changed
Emit metadata changed event
pub fn emit_metadata_changed(&self, path: String, is_dir: bool);Source line: 120.