pub enum Node {
Text(String),
Value(String),
ValueEscape(String),
If(i64, Arc<Vec<Node>>, Arc<Vec<Node>>),
Loop(i64, Arc<Vec<Node>>),
}
Expand description
Describes a Node of template.
Values
Text(String)
- Simple text.Value(String)
- Some value.ValueEscape(String)
- Escaped value:&
=>&
,"
=>"
,'
=>'
,<
=><
,>
=>>
.If(i64, Arc<Vec<Node>>, Arc<Vec<Node>>)
- If node. ifi64
key istrue
then use firstvec
else secondvec
.Loop(i64, Arc<Vec<Node>>)
- Loop node. loop ini64
key, usevec
.
Variants§
Text(String)
Simple text
Value(String)
Some value
ValueEscape(String)
Escaped value: &
=> &
, "
=> "
, '
=> '
, <
=> <
, >
=> >
.
If(i64, Arc<Vec<Node>>, Arc<Vec<Node>>)
If node. if i64
key is true
then use first vec
else second vec
.
Loop(i64, Arc<Vec<Node>>)
Loop node. loop in i64
key, use vec
.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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