Skip to main content

CellObserver

Trait CellObserver 

Source
pub trait CellObserver: Send + Sync {
    // Required method
    fn cell_changed(
        &self,
        changes: &CellChanges,
        cwd: &Path,
        lane: &str,
    ) -> Vec<String>;

    // Provided methods
    fn enabled(&self) -> bool { ... }
    fn before_shell(&self, _command: &str, _lane: &str) -> Option<String> { ... }
}
Expand description

Something that wants the files each cell changed without being a guard: no verdicts, no statistics, no records. Its lines are delivered verbatim with the lane’s next cell result (memory pointers, kernel_apis::memory_pointers).

Required Methods§

Source

fn cell_changed( &self, changes: &CellChanges, cwd: &Path, lane: &str, ) -> Vec<String>

The files a cell on lane (working in cwd) changed, checked writes included; lines for the model.

Provided Methods§

Source

fn enabled(&self) -> bool

False while the observer has nothing to do (checked per cell, like a guard’s watches_cells).

Source

fn before_shell(&self, _command: &str, _lane: &str) -> Option<String>

A shell command a cell on lane is about to run: Some(reason) refuses it, with the reason for the model.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§