pub struct RsxBlock {
pub brace: Brace,
pub attributes: Vec<Attribute>,
pub spreads: Vec<Spread>,
pub children: Vec<BodyNode>,
pub diagnostics: Diagnostics,
}
Expand description
An item in the form of
{ attributes, ..spreads, children }
Does not make any guarantees about the contents of the block - this is meant to be verified by the element/component impls themselves.
The name of the block is expected to be parsed by the parent parser. It will accept items out of order if possible and then bubble up diagnostics to the parent. This lets us give better errors and autocomplete
Fields§
§brace: Brace
§attributes: Vec<Attribute>
§spreads: Vec<Spread>
§children: Vec<BodyNode>
§diagnostics: Diagnostics
Implementations§
Source§impl RsxBlock
impl RsxBlock
Sourcepub fn parse_children(content: &ParseBuffer<'_>) -> Result<Self>
pub fn parse_children(content: &ParseBuffer<'_>) -> Result<Self>
Only parse the children of the block - all others will be rejected
pub fn parse_inner(content: &ParseBuffer<'_>, brace: Brace) -> Result<Self>
Trait Implementations§
impl Eq for RsxBlock
impl StructuralPartialEq for RsxBlock
Auto Trait Implementations§
impl Freeze for RsxBlock
impl !RefUnwindSafe for RsxBlock
impl !Send for RsxBlock
impl !Sync for RsxBlock
impl Unpin for RsxBlock
impl UnwindSafe for RsxBlock
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