pub struct Director<'a> { /* private fields */ }
Expand description

Dispatch jobs to registered handlers.

Jobs are sorted into accept, reject, and fail directories based on whether they were accepted by the relevant handler. Once handled, a .stamp file containing the timestamp of when the job was completed is created beside the final location. In addition, rejected and failed jobs have a .reason file describing what happened.

Implementations

Creates a new Director.

The accept and reject directories are created as children of the given directory.

Add a handler for jobs labeled as kind.

Handle a path.

Returns whether the path is a stream terminator or not.

Return a stream of paths to act on.

The beginning of the stream will contain paths which exist at startup and afterwards, paths for which “important” events occur will be generated.

Watch a directory and act on the paths within it.

Watch a directory and act on the paths within it on an existing runtime.

Trait Implementations

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.