pub enum JSXNode {
Element {
tag: String,
attributes: Vec<JSXAttribute>,
children: Vec<JSXNode>,
span: Span,
},
Expression(Box<Expr>),
Text(String, Span),
ComponentCall {
name: String,
props: Vec<JSXAttribute>,
children: Vec<JSXNode>,
span: Span,
},
For {
binding: String,
iter: Box<Expr>,
body: Box<JSXNode>,
span: Span,
},
If {
condition: Box<Expr>,
then_branch: Box<JSXNode>,
else_branch: Option<Box<JSXNode>>,
span: Span,
},
Fragment(Vec<JSXNode>, Span),
}Variants§
Element
<tag attr="value">children</tag>
Expression(Box<Expr>)
{expression}
Text(String, Span)
Plain text
ComponentCall
<Component prop={value} />
For
for item in list: jsx
If
if cond: jsx [else: jsx]
Fragment(Vec<JSXNode>, Span)
Fragment wrapper
Trait Implementations§
Auto Trait Implementations§
impl Freeze for JSXNode
impl RefUnwindSafe for JSXNode
impl Send for JSXNode
impl Sync for JSXNode
impl Unpin for JSXNode
impl UnwindSafe for JSXNode
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