pub struct StaticContextSource { /* private fields */ }
Expand description
Static context source for the Tera preprocessor.
Implementations§
Source§impl StaticContextSource
impl StaticContextSource
Sourcepub fn from_json_file<P>(path: P) -> Result<Self, Error>
pub fn from_json_file<P>(path: P) -> Result<Self, Error>
Construct a context source given a JSON path.
§Errors
Returns an error if the provided path or JSON read is invalid.
Trait Implementations§
Source§impl Clone for StaticContextSource
impl Clone for StaticContextSource
Source§fn clone(&self) -> StaticContextSource
fn clone(&self) -> StaticContextSource
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 ContextSource for StaticContextSource
impl ContextSource for StaticContextSource
Auto Trait Implementations§
impl Freeze for StaticContextSource
impl RefUnwindSafe for StaticContextSource
impl Send for StaticContextSource
impl Sync for StaticContextSource
impl Unpin for StaticContextSource
impl UnwindSafe for StaticContextSource
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