Enum uritemplate::TemplateVar [] [src]

pub enum TemplateVar {
    Scalar(String),
    List(Vec<String>),
    AssociativeArray(Vec<(String, String)>),
}

TemplateVar represents the value of a template variable, which can be a scalar (a simple string), a list of strings, or an associative array of strings.

Normally, it is not necessary to use this class unless you are implementing the IntoTemplateVar trait for your own classes.

Variants

Scalar(String)

A simple string such as "foo"

List(Vec<String>)

A list of strings such as ["foo", "bar"]

AssociativeArray(Vec<(String, String)>)

An associative array of strings, such as [("key1", "value1"), ("key2", "value2")]

Trait Implementations

impl Clone for TemplateVar
[src]

fn clone(&self) -> TemplateVar

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl IntoTemplateVar for TemplateVar
[src]