pub enum Value {
Str(String),
List(Vec<Value>),
Map(BTreeMap<String, Value>),
Bool(bool),
}Available on crate feature
template only.Expand description
A value a template can interpolate. Maps are ordered, so iteration and pairs are deterministic
and key-sorted.
Variants§
Str(String)
A string, inserted as-is.
List(Vec<Value>)
A sequence; iterated by $for$, concatenated (no separator) when interpolated directly.
Map(BTreeMap<String, Value>)
A keyed record; fields reached with $x.field$, enumerated with the pairs pipe.
Bool(bool)
A boolean; renders bare as true/false, and is the one non-empty value that is still falsy
(when false) in a conditional.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Value
Auto Trait Implementations§
impl Freeze for Value
impl RefUnwindSafe for Value
impl Send for Value
impl Sync for Value
impl Unpin for Value
impl UnsafeUnpin for Value
impl UnwindSafe for Value
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