[][src]Enum handlebars::ScopedJson

pub enum ScopedJson<'reg: 'rc, 'rc> {
    Constant(&'reg Json),
    Derived(Json),
    Context(&'rc JsonVec<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)
Context(&'rc JsonVec<String>)
Missing

Implementations

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> From<Value> for ScopedJson<'reg, 'rc>[src]

Auto Trait Implementations

impl<'reg, 'rc> RefUnwindSafe for ScopedJson<'reg, 'rc>[src]

impl<'reg, 'rc> Send for ScopedJson<'reg, 'rc>[src]

impl<'reg, 'rc> Sync for ScopedJson<'reg, 'rc>[src]

impl<'reg, 'rc> Unpin for ScopedJson<'reg, 'rc>[src]

impl<'reg, 'rc> UnwindSafe for ScopedJson<'reg, 'rc>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.