[][src]Trait templar::Context

pub trait Context: Sized {
    fn merge<T: Into<Document>>(&self, doc: T) -> Result<()> { ... }
fn merge_path<T>(&self, path: &[&Document], doc: T) -> Result<()>
    where
        Document: From<T>
, { ... }
fn set<T: Into<ContextMapValue>>(&self, doc: T) -> Result<()> { ... }
fn create_scope(&self) -> ScopedContext { ... }
fn set_path<T: Into<ContextMapValue>>(
        &self,
        path: &[&Document],
        doc: T
    ) -> Result<()> { ... }
fn get(&self) -> Data { ... }
fn get_path(&self, path: &[&Document]) -> Data { ... } }

The primary context trait

Provided methods

fn merge<T: Into<Document>>(&self, doc: T) -> Result<()>

Merge the data into the root context

fn merge_path<T>(&self, path: &[&Document], doc: T) -> Result<()> where
    Document: From<T>, 

Merge the data into the context at the specified path

fn set<T: Into<ContextMapValue>>(&self, doc: T) -> Result<()>

Set the root context value

fn create_scope(&self) -> ScopedContext

Enter a new scope

fn set_path<T: Into<ContextMapValue>>(
    &self,
    path: &[&Document],
    doc: T
) -> Result<()>

Set the value at the specified path

fn get(&self) -> Data

Get the root context value

fn get_path(&self, path: &[&Document]) -> Data

Get the value at the path

Loading content...

Implementors

impl Context for SharedContext[src]

impl Context for StandardContext[src]

Loading content...