pub enum TemplateVar {
Scalar(String),
List(Vec<String>),
AssociativeArray(Vec<(String, String)>),
}
Expand description
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§
Source§impl Clone for TemplateVar
impl Clone for TemplateVar
Source§fn clone(&self) -> TemplateVar
fn clone(&self) -> TemplateVar
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl IntoTemplateVar for TemplateVar
impl IntoTemplateVar for TemplateVar
fn into_template_var(self) -> TemplateVar
Auto Trait Implementations§
impl Freeze for TemplateVar
impl RefUnwindSafe for TemplateVar
impl Send for TemplateVar
impl Sync for TemplateVar
impl Unpin for TemplateVar
impl UnwindSafe for TemplateVar
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)