Struct liquid::partials::LazyCompiler
source · pub struct LazyCompiler<S>where
S: PartialSource,{ /* private fields */ }
Expand description
An lazily-caching compiler for PartialSource
.
This would be useful in cases where:
- Most partial-templates aren’t used
- Of the used partial-templates, they are generally used many times.
Note: partial-compilation error reporting is deferred to render-time so content can still be generated even when the content is in an intermediate-state.
Implementations§
source§impl<S> LazyCompiler<S>where
S: PartialSource,
impl<S> LazyCompiler<S>where S: PartialSource,
sourcepub fn new(source: S) -> LazyCompiler<S>
pub fn new(source: S) -> LazyCompiler<S>
Create an on-demand compiler for PartialSource
.
source§impl<S> LazyCompiler<S>where
S: PartialSource + Default,
impl<S> LazyCompiler<S>where S: PartialSource + Default,
sourcepub fn empty() -> LazyCompiler<S>
pub fn empty() -> LazyCompiler<S>
Create an empty compiler for PartialSource
.
Trait Implementations§
source§impl<S> Debug for LazyCompiler<S>where
S: Debug + PartialSource,
impl<S> Debug for LazyCompiler<S>where S: Debug + PartialSource,
source§impl<S> Default for LazyCompiler<S>where
S: PartialSource + Default,
impl<S> Default for LazyCompiler<S>where S: PartialSource + Default,
source§fn default() -> LazyCompiler<S>
fn default() -> LazyCompiler<S>
Returns the “default value” for a type. Read more
source§impl<S> Deref for LazyCompiler<S>where
S: PartialSource,
impl<S> Deref for LazyCompiler<S>where S: PartialSource,
source§impl<S> DerefMut for LazyCompiler<S>where
S: PartialSource,
impl<S> DerefMut for LazyCompiler<S>where S: PartialSource,
source§impl<S> PartialCompiler for LazyCompiler<S>where
S: PartialSource + Send + Sync + 'static,
impl<S> PartialCompiler for LazyCompiler<S>where S: PartialSource + Send + Sync + 'static,
Auto Trait Implementations§
impl<S> RefUnwindSafe for LazyCompiler<S>where S: RefUnwindSafe,
impl<S> Send for LazyCompiler<S>where S: Send,
impl<S> Sync for LazyCompiler<S>where S: Sync,
impl<S> Unpin for LazyCompiler<S>where S: Unpin,
impl<S> UnwindSafe for LazyCompiler<S>where S: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more