Struct alfred::json::Builder [] [src]

pub struct Builder<'a> {
    pub items: &'a [Item<'a>],
    pub variables: HashMap<&'a str, &'a str>,
}

A helper type for writing out items with top-level variables.

Note: If you don't need top-level variables the write_items() function is easier to use.

Fields

The items that will be written out.

The variables that will be written out.

Methods

impl<'a> Builder<'a>
[src]

Returns a new Builder with no items.

Returns a new Builder with the given items.

Writes a complete JSON document representing the items and variables to the Write.

The Write is flushed after the JSON document is written.

Replaces the builder's items with items.

Replaces the builder's variables with variables.

Inserts a new variable into the builder's variables.

Replaces the builder's items with items.

Replaces the builder's variables with variables.

Inserts a new variable into the builder's variables.

Trait Implementations

impl<'a> Clone for Builder<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Debug for Builder<'a>
[src]

Formats the value using the given formatter.

impl<'a> Default for Builder<'a>
[src]

Returns the "default value" for a type. Read more