tinymist_project

Trait CompileHandler

Source
pub trait CompileHandler<F: CompilerFeat, Ext>:
    Send
    + Sync
    + 'static {
    // Required methods
    fn on_any_compile_reason(&self, state: &mut ProjectCompiler<F, Ext>);
    fn notify_compile(&self, res: &CompiledArtifact<F>);
    fn status(&self, revision: usize, rep: CompileReport);

    // Provided method
    fn notify_removed(&self, _id: &ProjectInsId) { ... }
}
Expand description

A project compiler handler.

Required Methods§

Source

fn on_any_compile_reason(&self, state: &mut ProjectCompiler<F, Ext>)

Called when there is any reason to compile. This doesn’t mean that the project should be compiled.

Source

fn notify_compile(&self, res: &CompiledArtifact<F>)

Called when a compilation is done.

Source

fn status(&self, revision: usize, rep: CompileReport)

Called when the compilation status is changed.

Provided Methods§

Source

fn notify_removed(&self, _id: &ProjectInsId)

Called when a project is removed.

Implementations on Foreign Types§

Source§

impl<F: CompilerFeat + Send + Sync + 'static, Ext: 'static> CompileHandler<F, Ext> for PhantomData<fn(_: F, _: Ext)>

No need so no compilation.

Source§

fn on_any_compile_reason(&self, _state: &mut ProjectCompiler<F, Ext>)

Source§

fn notify_compile(&self, _res: &CompiledArtifact<F>)

Source§

fn status(&self, _revision: usize, _rep: CompileReport)

Implementors§