[][src]Trait ascesis::CompilableAsContent

pub trait CompilableAsContent {
    fn get_compiled_content(
        &self,
        ctx: &Arc<Mutex<Context>>
    ) -> Result<PartialContent, Box<dyn Error + 'static>>; fn check_dependencies(&self, _ctx: &Arc<Mutex<Context>>) -> Option<String> { ... } }

Required methods

fn get_compiled_content(
    &self,
    ctx: &Arc<Mutex<Context>>
) -> Result<PartialContent, Box<dyn Error + 'static>>

Get a compiled PartialContent of self.

Expected to return a content previously stored in the given Context, if possible, or to compile self and return the result. Expected to return error if not all dependencies of self are retrievable from the given Context as a PartialContent.

Note: unlike compile_as_dependency(), this function isn't expected to store compilation result in the Context.

Loading content...

Provided methods

fn check_dependencies(&self, _ctx: &Arc<Mutex<Context>>) -> Option<String>

Check whether all dependencies of self are retrievable from the given Context.

Expected to return None if none of dependencies is missing from Context, or a name of a missing dependency, chosen arbitrarily.

Loading content...

Implementors

impl CompilableAsContent for ImmediateDef[src]

impl CompilableAsContent for Rex[src]

impl CompilableAsContent for ThinArrowRule[src]

Loading content...