pub enum WatchEvent {
Updated {
path: PathBuf,
rule: TowerRule,
},
Removed {
path: PathBuf,
rule_id: RuleId,
},
Error {
path: PathBuf,
reason: SkipReason,
},
}Expand description
Event emitted by the RuleWatcher background thread.
Tower maps these onto Supervisor::update_rule (Updated) and
Supervisor::disable_rule (Removed). On Error, log the reason and
keep the previously-loaded rule active.
Variants§
Updated
A rule file was created or modified; the new parsed rule is included.
Removed
A rule file was removed.
rule_id is derived from the file-stem (convention: filename == rule ID).
Error
A rule file changed but could not be reloaded.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WatchEvent
impl RefUnwindSafe for WatchEvent
impl Send for WatchEvent
impl Sync for WatchEvent
impl Unpin for WatchEvent
impl UnsafeUnpin for WatchEvent
impl UnwindSafe for WatchEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more