[][src]Struct handlebars::PathAndJson

pub struct PathAndJson<'reg: 'rc, 'rc> { /* fields omitted */ }

Json wrapper that holds the Json value and reference path information

Methods

impl<'reg: 'rc, 'rc> PathAndJson<'reg, 'rc>[src]

pub fn new(
    path: Option<String>,
    value: ScopedJson<'reg, 'rc>
) -> PathAndJson<'reg, 'rc>
[src]

pub fn new_absolute(
    path: Option<String>,
    value: ScopedJson<'reg, 'rc>
) -> PathAndJson<'reg, 'rc>
[src]

pub fn path(&self) -> Option<&String>[src]

Returns relative path when the value is referenced If the value is from a literal, the path is None

pub fn path_root(&self) -> Option<&str>[src]

Return root level of this path if any

pub fn is_absolute_path(&self) -> bool[src]

pub fn value(&self) -> &Json[src]

Returns the value

pub fn is_value_missing(&self) -> bool[src]

Test if value is missing

pub fn render(&self) -> String[src]

Trait Implementations

impl<'reg: 'rc, 'rc> Debug for PathAndJson<'reg, 'rc>[src]

Auto Trait Implementations

impl<'reg, 'rc> Send for PathAndJson<'reg, 'rc>

impl<'reg, 'rc> Unpin for PathAndJson<'reg, 'rc>

impl<'reg, 'rc> Sync for PathAndJson<'reg, 'rc>

impl<'reg, 'rc> UnwindSafe for PathAndJson<'reg, 'rc>

impl<'reg, 'rc> RefUnwindSafe for PathAndJson<'reg, 'rc>

Blanket Implementations

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.

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

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

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