Struct inotify::Event[][src]

pub struct Event<S> {
    pub wd: WatchDescriptor,
    pub mask: EventMask,
    pub cookie: u32,
    pub name: Option<S>,
}
Expand description

An inotify event

A file system event that describes a change that the user previously registered interest in. To watch for events, call Inotify::add_watch. To retrieve events, call Inotify::read_events_blocking or Inotify::read_events.

Fields

wd: WatchDescriptor

Identifies the watch this event originates from

This WatchDescriptor is equal to the one that Inotify::add_watch returned when interest for this event was registered. The WatchDescriptor can be used to remove the watch using Inotify::rm_watch, thereby preventing future events of this type from being created.

mask: EventMask

Indicates what kind of event this is

cookie: u32

Connects related events to each other

When a file is renamed, this results two events: MOVED_FROM and MOVED_TO. The cookie field will be the same for both of them, thereby making is possible to connect the event pair.

name: Option<S>

The name of the file the event originates from

This field is set only if the subject of the event is a file or directory in a watched directory. If the event concerns a file or directory that is watched directly, name will be None.

Implementations

Returns an owned copy of the event.

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

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)

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.