Enum handlebars::ScopedJson [−][src]
pub enum ScopedJson<'reg: 'rc, 'rc> {
Constant(&'reg Json),
Derived(Json),
Context(&'rc Json, Vec<String>),
Missing,
}A JSON wrapper designed for handlebars internal use case
- Constant: the JSON value hardcoded into template
- Context: the JSON value referenced in your provided data context
- Derived: the owned JSON value computed during rendering process
Variants
Constant(&'reg Json)Derived(Json)Implementations
impl<'reg: 'rc, 'rc> ScopedJson<'reg, 'rc>[src]
impl<'reg: 'rc, 'rc> ScopedJson<'reg, 'rc>[src]pub fn as_json(&self) -> &Json[src]
get the JSON reference
pub fn render(&self) -> String[src]
pub fn is_missing(&self) -> bool[src]
pub fn into_derived(self) -> ScopedJson<'reg, 'rc>[src]
pub fn context_path(&self) -> Option<&Vec<String>>[src]
Trait Implementations
impl<'reg: 'rc, 'rc> Debug for ScopedJson<'reg, 'rc>[src]
impl<'reg: 'rc, 'rc> Debug for ScopedJson<'reg, 'rc>[src]impl<'reg: 'rc, 'rc> From<Value> for ScopedJson<'reg, 'rc>[src]
impl<'reg: 'rc, 'rc> From<Value> for ScopedJson<'reg, 'rc>[src]