Trait tvix_eval::observer::CompilerObserver
source · pub trait CompilerObserver {
// Provided methods
fn observe_compiled_toplevel(&mut self, _: &Rc<Lambda>) { ... }
fn observe_compiled_lambda(&mut self, _: &Rc<Lambda>) { ... }
fn observe_compiled_thunk(&mut self, _: &Rc<Lambda>) { ... }
}
Expand description
Implemented by types that wish to observe internal happenings of the Tvix compiler.
Provided Methods§
sourcefn observe_compiled_toplevel(&mut self, _: &Rc<Lambda>)
fn observe_compiled_toplevel(&mut self, _: &Rc<Lambda>)
Called when the compiler finishes compilation of the top-level of an expression (usually the root Nix expression of a file).
sourcefn observe_compiled_lambda(&mut self, _: &Rc<Lambda>)
fn observe_compiled_lambda(&mut self, _: &Rc<Lambda>)
Called when the compiler finishes compilation of a user-defined function.
Note that in Nix there are only single argument functions, so
in an expression like a: b: c: ...
this method will be
called three times.
sourcefn observe_compiled_thunk(&mut self, _: &Rc<Lambda>)
fn observe_compiled_thunk(&mut self, _: &Rc<Lambda>)
Called when the compiler finishes compilation of a thunk.