[][src]Trait watchexec::run::Handler

pub trait Handler {
    fn new(args: Args) -> Result<Self>
    where
        Self: Sized
;
fn on_manual(&mut self) -> Result<bool>;
fn on_update(&mut self, ops: &[PathOp]) -> Result<bool>; }

Required methods

fn new(args: Args) -> Result<Self> where
    Self: Sized

Initialises the Handler with a copy of the arguments.

fn on_manual(&mut self) -> Result<bool>

Called through a manual request, such as an initial run.

Returns

A Result which means:

  • Err: an error has occurred while processing, quit.
  • Ok(false): everything is fine and the loop can continue.
  • Ok(true): everything is fine but we should gracefully stop.

fn on_update(&mut self, ops: &[PathOp]) -> Result<bool>

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.
Loading content...

Implementors

impl Handler for ExecHandler
[src]

Loading content...