pub enum TemplateValue {
Scalar(String),
List(Vec<Option<String>>),
Associative(Vec<(String, Option<String>)>),
}Expand description
One defined RFC 6570 variable value.
An absent map entry denotes RFC 6570’s undefined value. Empty list and map values are likewise treated as undefined, while an empty scalar is defined. Associative values retain their pair order so expansions reproduce the order supplied by an RFC 6570 data model rather than silently sorting keys.
Variants§
Scalar(String)
A single scalar string value.
List(Vec<Option<String>>)
An ordered composite list value.
Associative(Vec<(String, Option<String>)>)
A composite associative value.
Implementations§
Source§impl TemplateValue
impl TemplateValue
Sourcepub fn list_with_undefined(values: Vec<Option<String>>) -> Self
pub fn list_with_undefined(values: Vec<Option<String>>) -> Self
Constructs a list that can retain undefined members.
Sourcepub fn associative(values: Vec<(String, String)>) -> Self
pub fn associative(values: Vec<(String, String)>) -> Self
Constructs an associative value.
Trait Implementations§
Source§impl Clone for TemplateValue
impl Clone for TemplateValue
Source§fn clone(&self) -> TemplateValue
fn clone(&self) -> TemplateValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TemplateValue
impl Debug for TemplateValue
impl Eq for TemplateValue
Source§impl From<&str> for TemplateValue
impl From<&str> for TemplateValue
Source§impl From<String> for TemplateValue
impl From<String> for TemplateValue
Source§impl PartialEq for TemplateValue
impl PartialEq for TemplateValue
impl StructuralPartialEq for TemplateValue
Auto Trait Implementations§
impl Freeze for TemplateValue
impl RefUnwindSafe for TemplateValue
impl Send for TemplateValue
impl Sync for TemplateValue
impl Unpin for TemplateValue
impl UnsafeUnpin for TemplateValue
impl UnwindSafe for TemplateValue
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).