[−][src]Enum notify::event::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.
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.
Methods
impl EventKind
[src]
pub fn is_access(&self) -> bool
[src]
Indicates whether an event is an Access variant.
pub fn is_create(&self) -> bool
[src]
Indicates whether an event is a Create variant.
pub fn is_modify(&self) -> bool
[src]
Indicates whether an event is a Modify variant.
pub fn is_remove(&self) -> bool
[src]
Indicates whether an event is a Remove variant.
pub fn is_other(&self) -> bool
[src]
Indicates whether an event is an Other variant.
Trait Implementations
impl Clone for EventKind
[src]
fn clone(&self) -> EventKind
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for EventKind
[src]
impl Default for EventKind
[src]
impl PartialEq<EventKind> for EventKind
[src]
impl Hash for EventKind
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for EventKind
[src]
Auto Trait Implementations
impl Sync for EventKind
impl Unpin for EventKind
impl Send for EventKind
impl UnwindSafe for EventKind
impl RefUnwindSafe for EventKind
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
[src]
T: Any,
impl<T> CloneAny for T where
T: Clone + Any,
[src]
T: Clone + Any,