Struct mdbook_tera::TeraPreprocessor
source · [−]pub struct TeraPreprocessor<C = StaticContextSource> { /* private fields */ }
Expand description
A mdBook preprocessor that renders Tera.
Implementations
sourceimpl<C> TeraPreprocessor<C>
impl<C> TeraPreprocessor<C>
sourcepub fn include_templates<P>(
&mut self,
root: P,
glob_str: &str
) -> Result<(), Error> where
P: AsRef<Path>,
pub fn include_templates<P>(
&mut self,
root: P,
glob_str: &str
) -> Result<(), Error> where
P: AsRef<Path>,
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
sourceimpl<C: Clone> Clone for TeraPreprocessor<C>
impl<C: Clone> Clone for TeraPreprocessor<C>
sourcefn clone(&self) -> TeraPreprocessor<C>
fn clone(&self) -> TeraPreprocessor<C>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<C: Default> Default for TeraPreprocessor<C>
impl<C: Default> Default for TeraPreprocessor<C>
sourceimpl<C> Preprocessor for TeraPreprocessor<C> where
C: ContextSource,
impl<C> Preprocessor for TeraPreprocessor<C> where
C: ContextSource,
sourcefn run(&self, book_ctx: &PreprocessorContext, book: Book) -> Result<Book, Error>
fn run(&self, book_ctx: &PreprocessorContext, book: Book) -> Result<Book, Error>
Run this Preprocessor
, allowing it to update the book before it is
given to a renderer. Read more
sourcefn supports_renderer(&self, _renderer: &str) -> bool
fn supports_renderer(&self, _renderer: &str) -> bool
A hint to MDBook
whether this preprocessor is compatible with a
particular renderer. Read more
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more