pub enum TNode {
Element {
tag: String,
attrs: Vec<TAttr>,
children: Vec<TNode>,
span: Span,
},
Text {
text: String,
span: Span,
},
Hole {
expr: TExpr,
filters: Vec<TFilter>,
raw: bool,
span: Span,
},
If {
arms: Vec<(TExpr, Vec<TNode>)>,
otherwise: Option<Vec<TNode>>,
span: Span,
},
For {
pattern: String,
iterable: TExpr,
key: Option<TExpr>,
index: Option<String>,
body: Vec<TNode>,
empty: Option<Vec<TNode>>,
span: Span,
},
Inspect {
scrutinee: TExpr,
arms: Vec<(String, Vec<TNode>)>,
span: Span,
},
Let {
name: String,
expr: TExpr,
span: Span,
},
Extends {
name: String,
span: Span,
},
Block {
name: String,
default: Option<Vec<TNode>>,
span: Span,
},
Children {
span: Span,
},
Component {
name: String,
props: Vec<TAttr>,
children: Vec<TNode>,
span: Span,
},
}Expand description
One node of the template tree.
Variants§
Trait Implementations§
impl Eq for TNode
impl StructuralPartialEq for TNode
Auto Trait Implementations§
impl Freeze for TNode
impl RefUnwindSafe for TNode
impl Send for TNode
impl Sync for TNode
impl Unpin for TNode
impl UnsafeUnpin for TNode
impl UnwindSafe for TNode
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.