pub struct Context { /* private fields */ }Implementations§
Source§impl Context
 
impl Context
pub fn new() -> Self
pub fn builder() -> ContextBuilder
pub fn add_variable(&mut self, name: String, value: Value)
pub fn get_variable(&self, name: &str) -> Option<&Value>
pub fn add_feature(&mut self, feature: String)
pub fn has_feature(&self, feature: &str) -> bool
pub fn variables(&self) -> &HashMap<String, Value>
pub fn features(&self) -> &[String]
pub fn to_tera_context(&self) -> Context
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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