Enum EventKind
enum EventKind
Top-level event kind.
This is arguably the most important classification for events. All subkinds below this one represent details that may or may not be available for any particular backend, but most tools and Notify systems will only care about which of these four general kinds an event is about.
Variants
-
Any The catch-all event kind, for unsupported/unknown events.
This variant should be used as the "else" case when mapping native kernel bitmasks or bitmaps, such that if the mask is ever extended with new event types the backend will not gain bugs due to not matching new unknown event types.
This variant is also the default variant used when Notify is in "imprecise" mode.
-
Access(AccessKind) An event describing non-mutating access operations on files.
This event is about opening and closing file handles, as well as executing files, and any other such event that is about accessing files, folders, or other structures rather than mutating them.
Only some platforms are capable of generating these.
-
Create(CreateKind) An event describing creation operations on files.
This event is about the creation of files, folders, or other structures but not about e.g. writing new content into them.
-
Modify(ModifyKind) An event describing mutation of content, name, or metadata.
This event is about the mutation of files', folders', or other structures' content, name (path), or associated metadata (attributes).
-
Remove(RemoveKind) An event describing removal operations on files.
This event is about the removal of files, folders, or other structures but not e.g. erasing content from them. This may also be triggered for renames/moves that move files out of the watched subpath.
Some editors also trigger Remove events when saving files as they may opt for removing (or renaming) the original then creating a new file in-place.
-
Other An event not fitting in any of the above four categories.
This may be used for meta-events about the watch itself.
Implementations
impl EventKind
fn is_access(self: &Self) -> boolIndicates whether an event is an Access variant.
fn is_create(self: &Self) -> boolIndicates whether an event is a Create variant.
fn is_modify(self: &Self) -> boolIndicates whether an event is a Modify variant.
fn is_remove(self: &Self) -> boolIndicates whether an event is a Remove variant.
fn is_other(self: &Self) -> boolIndicates whether an event is an Other variant.
impl Clone for EventKind
fn clone(self: &Self) -> EventKind
impl Copy for EventKind
impl Debug for EventKind
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Default for EventKind
fn default() -> EventKind
impl Eq for EventKind
impl Freeze for EventKind
impl Hash for EventKind
fn hash<__H: $crate::hash::Hasher>(self: &Self, state: &mut __H)
impl PartialEq for EventKind
fn eq(self: &Self, other: &EventKind) -> bool
impl RefUnwindSafe for EventKind
impl Send for EventKind
impl StructuralPartialEq for EventKind
impl Sync for EventKind
impl Unpin for EventKind
impl UnsafeUnpin for EventKind
impl UnwindSafe for EventKind
impl<T> Any for EventKind
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for EventKind
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for EventKind
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for EventKind
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for EventKind
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for EventKind
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for EventKind
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for EventKind
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for EventKind
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>