pub trait CompilableAsContent {
// Required method
fn get_compiled_content(
&self,
ctx: &Arc<Mutex<Context>>,
) -> Result<PartialContent, Box<dyn Error>>;
// Provided method
fn check_dependencies(&self, _ctx: &Arc<Mutex<Context>>) -> Option<String> { ... }
}Required Methods§
Sourcefn get_compiled_content(
&self,
ctx: &Arc<Mutex<Context>>,
) -> Result<PartialContent, Box<dyn Error>>
fn get_compiled_content( &self, ctx: &Arc<Mutex<Context>>, ) -> Result<PartialContent, Box<dyn Error>>
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.