pub struct Element {
pub name: ElementName,
pub raw_attributes: Vec<Attribute>,
pub merged_attributes: Vec<Attribute>,
pub spreads: Vec<Spread>,
pub children: Vec<BodyNode>,
pub brace: Option<Brace>,
pub diagnostics: Diagnostics,
}
Expand description
Parse the VNode::Element type
Fields§
§name: ElementName
div { } -> div
raw_attributes: Vec<Attribute>
The actual attributes that were parsed
merged_attributes: Vec<Attribute>
The attributes after merging - basically the formatted version of the combined attributes where possible.
These are the actual attributes that get rendered out
spreads: Vec<Spread>
The ...
spread attributes.
children: Vec<BodyNode>
The children of the element
brace: Option<Brace>
the brace of the div { }
diagnostics: Diagnostics
A list of diagnostics that were generated during parsing. This element might be a valid rsx_block but not technically a valid element - these diagnostics tell us what’s wrong and then are used when rendering
Trait Implementations§
Source§impl ToTokens for Element
impl ToTokens for Element
Source§fn to_tokens(&self, tokens: &mut TokenStream2)
fn to_tokens(&self, tokens: &mut TokenStream2)
Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Source§fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
fn into_token_stream(self) -> TokenStreamwhere
Self: Sized,
impl Eq for Element
impl StructuralPartialEq for Element
Auto Trait Implementations§
impl Freeze for Element
impl !RefUnwindSafe for Element
impl !Send for Element
impl !Sync for Element
impl Unpin for Element
impl UnwindSafe for Element
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,
Source§impl<T> Spanned for Twhere
T: Spanned + ?Sized,
impl<T> Spanned for Twhere
T: Spanned + ?Sized,
Source§fn span(&self) -> Span
fn span(&self) -> Span
Returns a
Span
covering the complete contents of this syntax tree
node, or Span::call_site()
if this node is empty.