pub struct Context<'a> {
pub eng: Rc<Engine>,
pub menv: Rc<Env>,
pub root_name: String,
pub root: Value,
pub item: Option<(Value, Value)>,
pub read_template: &'a dyn Fn(&str) -> Option<String>,
pub delimiters: Delimiters,
}Expand description
what a template renders over (§5.4)
Fields§
§eng: Rc<Engine>the engine of the run
menv: Rc<Env>the entry module’s environment: its consts and funcs are in scope
root_name: Stringthe root’s name
root: Valuethe root’s document, bound to the root’s name
item: Option<(Value, Value)>a fan-out element and its key (§6), when rendering one element
read_template: &'a dyn Fn(&str) -> Option<String>the text of another template file by absolute path, or None when it cannot be read
delimiters: Delimitersthe template’s delimiters
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Context<'a>
impl<'a> !Send for Context<'a>
impl<'a> !Sync for Context<'a>
impl<'a> !UnwindSafe for Context<'a>
impl<'a> Forget for Context<'a>
impl<'a> Freeze for Context<'a>
impl<'a> Move for Context<'a>
impl<'a> Unpin for Context<'a>
impl<'a> UnsafeUnpin for Context<'a>
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