#[non_exhaustive]pub enum FsEvent {
FileChanged {
path: String,
event: String,
},
CwdChanged {
old_cwd: String,
new_cwd: String,
},
DirectoryAdded {
directory: String,
},
}Expand description
A filesystem hook event, decoded from its payload.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
FileChanged
event: “change” | “add” | “unlink”
CwdChanged
The working directory changed.
DirectoryAdded
A directory was added (DirectoryAdded).
Implementations§
Source§impl FsEvent
impl FsEvent
Sourcepub fn from_payload(p: &HookEventPayload) -> Option<Self>
pub fn from_payload(p: &HookEventPayload) -> Option<Self>
Decode a hook payload; None for other events or missing fields.
Trait Implementations§
impl Eq for FsEvent
impl StructuralPartialEq for FsEvent
Auto Trait Implementations§
impl Forget for FsEvent
impl Freeze for FsEvent
impl Move for FsEvent
impl RefUnwindSafe for FsEvent
impl Send for FsEvent
impl Sync for FsEvent
impl Unpin for FsEvent
impl UnsafeUnpin for FsEvent
impl UnwindSafe for FsEvent
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