pub struct Watcher { /* private fields */ }
Expand description

Daemon monitoring files.

Implementations

Spawns a watcher.

Runs on a memtrace CTF file.

Runs the watcher.

Constructor.

Resets the watcher’s state.

  • clears self.known_files and self.new_diffs;
  • adds self.tmp_file and self.init_file to self.known_files.

Restarts the watcher and resets the data.

Called when the init file of the run has changed.

Reads the content of a file and applies something to that content.

  • clears self.buf once it’s done.
  • asserts self.buf.is_empty().

Reads the init file in the dump directory.

Returns None when

  • init file does not exist, or
  • init_last_modified = Some(t) and the init file was modified more recently than t.

This function is used i) during initialization to read the init file, and ii) to check whether it was overwritten by a new run to relaunch everything.

If the result isn’t None, self.init_last_modified is updated to the date of last modification of the init file.

Gathers and registers new diffs.

  • sleeps for 100 milliseconds if there are no new diffs;
  • asserts self.new_diffs.is_empty().
  • returns true if something new was discovered.
  • update_progress indicates that the crate::data::progress needs to be updated

Gathers the new diff files.

  • diff files to send will be in self.new_diffs.
  • assumes self.new_diffs.is_empty().
  • returns Some if there was at list one new diff found (equivalent to !self.new_diffs.is_empty())
  • returns the most recent date of last modification

Auto Trait Implementations

Blanket Implementations

Convert the source color to the destination color using the specified method Read more

Convert the source color to the destination color using the bradford method by default Read more

Gets the TypeId of self. Read more

The error type produced by a failed conversion.

Convert the given value into an approximately equivalent representation.

The error type produced by a failed conversion.

Convert the subject into an approximately equivalent representation.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Approximate the subject with the default scheme.

Approximate the subject with a specific scheme.

Approximate the subject to a given type with the default scheme.

Approximate the subject to a given type with a specific scheme.

Convert the subject to a given type.

Attempt to convert the subject to a given type.

Attempt a value conversion of the subject to a given type.

Returns the argument unchanged.

Calls U::from(self).

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

Convert into T with values clamped to the color defined bounds Read more

Convert into T. The resulting color might be invalid in its color space Read more

The error type produced by a failed conversion.

Convert the given value into the subject type.

The type returned in the event of a conversion error.

Performs the conversion.

The error type produced by a failed conversion.

Convert the subject into the destination type.

The type returned in the event of a conversion error.

Performs the conversion.

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more

The error type produced by a failed conversion.

Convert the given value into an exactly equivalent representation.

The error type produced by a failed conversion.

Convert the subject into an exactly equivalent representation.