Trait liquid::partials::PartialCompiler
source · pub trait PartialCompiler {
// Required methods
fn compile(
self,
language: Arc<Language>
) -> Result<Box<dyn PartialStore + Send + Sync + 'static, Global>, Error>;
fn source(&self) -> &dyn PartialSource;
}
Expand description
Compile a PartialSource
into a PartialStore
of Renderable
s.
This trait is intended to allow a variety of implementation/policies to fit your needs, including:
- Compile partials eagerly or lazily.
- Report compile errors eagerly or lazily.
- Whether to cache the results or not.
Required Methods§
sourcefn compile(
self,
language: Arc<Language>
) -> Result<Box<dyn PartialStore + Send + Sync + 'static, Global>, Error>
fn compile( self, language: Arc<Language> ) -> Result<Box<dyn PartialStore + Send + Sync + 'static, Global>, Error>
Convert a PartialSource
into a PartialStore
.
sourcefn source(&self) -> &dyn PartialSource
fn source(&self) -> &dyn PartialSource
Access underlying PartialSource