[][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 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 value(&self) -> &Json[src]

Returns the value

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

Test if value is missing

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> Sync for PathAndJson<'reg, 'rc>

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.