pub struct WebUIParserPlugin { /* private fields */ }Expand description
WebUI Framework parser plugin.
Intercepts @event attributes and component registrations during parsing,
then compiles each component’s HTML template into JSON metadata and JS closures.
§Event tracking
Event indices are assigned globally across all elements in a component.
element_events counts events on the current element (reset per element),
while next_event_idx is a monotonically increasing global counter.
This preserves event order in the emitted metadata while letting SSR HTML
mark one element with a single data-ev="COUNT" attribute.
Implementations§
Trait Implementations§
Source§impl Default for WebUIParserPlugin
impl Default for WebUIParserPlugin
Source§impl ParserPlugin for WebUIParserPlugin
impl ParserPlugin for WebUIParserPlugin
Source§fn begin_fragment(&mut self, _context: FragmentContext<'_>)
fn begin_fragment(&mut self, _context: FragmentContext<'_>)
Called before parsing begins for a fragment. Read more
Source§fn process_attribute(
&mut self,
context: AttributeContext<'_>,
) -> AttributeAction
fn process_attribute( &mut self, context: AttributeContext<'_>, ) -> AttributeAction
Process one authored attribute.
Source§fn component_built(&mut self, context: ComponentBuildContext<'_>) -> Result<()>
fn component_built(&mut self, context: ComponentBuildContext<'_>) -> Result<()>
Called after a component template is fully built. Read more
Source§fn finish_opening_tag(
&mut self,
context: ElementStartContext<'_>,
) -> Option<Vec<u8>>
fn finish_opening_tag( &mut self, context: ElementStartContext<'_>, ) -> Option<Vec<u8>>
Called after all attributes on an opening tag have been processed.
Returns optional opaque bytes to emit as a
Plugin protocol fragment.Source§fn finish(self: Box<Self>) -> Result<ParserPluginArtifacts>
fn finish(self: Box<Self>) -> Result<ParserPluginArtifacts>
Complete the build and return any captured artifacts. Read more
Source§fn configure_parser(&mut self, _options: &ParserOptions)
fn configure_parser(&mut self, _options: &ParserOptions)
Configure the plugin before parsing or component registration begins.
Source§fn component_processing(&self) -> ComponentProcessing
fn component_processing(&self) -> ComponentProcessing
Return static component-processing behavior.
Auto Trait Implementations§
impl !Freeze for WebUIParserPlugin
impl !RefUnwindSafe for WebUIParserPlugin
impl !Sync for WebUIParserPlugin
impl Send for WebUIParserPlugin
impl Unpin for WebUIParserPlugin
impl UnsafeUnpin for WebUIParserPlugin
impl UnwindSafe for WebUIParserPlugin
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