Trait watchexec::run::Handler [−][src]
pub trait Handler { fn on_manual(&self) -> Result<bool>; fn on_update(&self, ops: &[PathOp]) -> Result<bool>; fn args(&self) -> Config; }
Required methods
fn on_manual(&self) -> Result<bool>
[src]
Called through a manual request, such as an initial run.
Returns
A Result
which means:
Err
: an error has occurred while processing, quit.Ok(true)
: everything is fine and the loop can continue.Ok(false)
: everything is fine but we should gracefully stop.
fn on_update(&self, ops: &[PathOp]) -> Result<bool>
[src]
Called through a file-update request.
Parameters
ops
: The list of events that triggered this update.
Returns
A Result
which means:
Err
: an error has occurred while processing, quit.Ok(true)
: everything is fine and the loop can continue.Ok(false)
: everything is fine but we should gracefully stop.
fn args(&self) -> Config
[src]
Called once by watch
at the very start.
Not called again; any changes will never be picked up.
The Config
instance should be created using ConfigBuilder
rather than direct initialisation
to resist potential breaking changes (see semver policy on crate root).