pub struct TeraPreprocessor<C = StaticContextSource> { /* private fields */ }Expand description
A mdBook preprocessor that renders Tera.
Implementations§
Source§impl<C> TeraPreprocessor<C>
impl<C> TeraPreprocessor<C>
Sourcepub fn include_templates<P>(
&mut self,
root: P,
glob_str: &str,
) -> Result<(), Error>
pub fn include_templates<P>( &mut self, root: P, glob_str: &str, ) -> Result<(), Error>
Includes Tera templates given a glob pattern and a root directory.
§Errors
Returns an error if the provided path cannot be canonicalized or the inheritance chain can’t be built, such as adding a child template without the parent one.
Trait Implementations§
Source§impl<C: Clone> Clone for TeraPreprocessor<C>
impl<C: Clone> Clone for TeraPreprocessor<C>
Source§fn clone(&self) -> TeraPreprocessor<C>
fn clone(&self) -> TeraPreprocessor<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C: Default> Default for TeraPreprocessor<C>
impl<C: Default> Default for TeraPreprocessor<C>
Source§impl<C> Preprocessor for TeraPreprocessor<C>where
C: ContextSource,
impl<C> Preprocessor for TeraPreprocessor<C>where
C: ContextSource,
Auto Trait Implementations§
impl<C> Freeze for TeraPreprocessor<C>where
C: Freeze,
impl<C = StaticContextSource> !RefUnwindSafe for TeraPreprocessor<C>
impl<C> Send for TeraPreprocessor<C>where
C: Send,
impl<C> Sync for TeraPreprocessor<C>where
C: Sync,
impl<C> Unpin for TeraPreprocessor<C>where
C: Unpin,
impl<C = StaticContextSource> !UnwindSafe for TeraPreprocessor<C>
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