Enum notify::event::EventKind[][src]

pub enum EventKind {
    Any,
    Access(AccessKind),
    Create(CreateKind),
    Modify(ModifyKind),
    Remove(RemoveKind),
    Other,
}
Expand description

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

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.

Tuple Fields of Access

0: AccessKind
Create

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.

Tuple Fields of Create

0: CreateKind
Modify

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).

Tuple Fields of Modify

0: ModifyKind
Remove

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.

Tuple Fields of Remove

0: RemoveKind
Other

An event not fitting in any of the above four categories.

This may be used for meta-events about the watch itself. In “imprecise” mode, it is, along with Any, the only other event generated.

Implementations

Indicates whether an event is an Access variant.

Indicates whether an event is a Create variant.

Indicates whether an event is a Modify variant.

Indicates whether an event is a Remove variant.

Indicates whether an event is an Other variant.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.