Skip to main content

watch

Function watch 

Source
pub async fn watch(
    beamfile: &Path,
    project: Project,
    sources: SourceMap,
    selection: Selection,
    options: RunOptions,
    executors: Executors,
    events: UnboundedSender<RunEvent>,
    cancel: CancellationToken,
    watcher: Box<dyn Watcher>,
    render_error: &mut (dyn FnMut(&SessionError) -> String + Send),
) -> WatchExit
Expand description

Runs selection and keeps re-running it as long as watcher reports relevant changes, until cancel fires or the watcher dies.

A crate::session nobody drives: watching is on for its whole life, and no command channel can retarget or stop it. Everything this function’s behaviour amounts to is documented there.