pub struct FastV2ParserPlugin { /* private fields */ }Expand description
Deprecated FAST 2 parser plugin used by fast and fast-v2.
Implements the ParserPlugin trait for FAST 2 compatibility:
- Filters FAST-specific runtime binding attributes (
@click,f-ref, etc.) - Tracks components encountered during parsing
- Returns
<f-template>artifacts with converted FAST syntax after parsing - Emits binding attribute counts as
Pluginprotocol fragment data
Implementations§
Source§impl FastV2ParserPlugin
impl FastV2ParserPlugin
Sourcepub fn take_component_templates(&self) -> Vec<ComponentTemplateArtifact>
pub fn take_component_templates(&self) -> Vec<ComponentTemplateArtifact>
Take the individual component f-template strings, keyed by tag name.
Each value is a complete <f-template name="tag-name">...</f-template> string
ready to be appended to a document. This is used by the JSON partial render
endpoint to send only the templates the client needs.
Trait Implementations§
Source§impl Default for FastV2ParserPlugin
impl Default for FastV2ParserPlugin
Source§impl ParserPlugin for FastV2ParserPlugin
impl ParserPlugin for FastV2ParserPlugin
Source§fn register_component_template(
&mut self,
tag_name: &str,
component: &Component,
processed_template: &str,
) -> Result<()>
fn register_component_template( &mut self, tag_name: &str, component: &Component, processed_template: &str, ) -> Result<()>
Called with the plugin-facing component template for the active CSS/DOM
strategies. Authored root
<template> attributes are preserved here;
the SSR/internal parse view may strip runtime-only attributes. Read moreSource§fn classify_attribute(&mut self, attr_name: &str) -> AttributeAction
fn classify_attribute(&mut self, attr_name: &str) -> AttributeAction
Decide how a framework-owned attribute should be handled.
Source§fn finish_element(&mut self, binding_attribute_count: u32) -> Option<Vec<u8>>
fn finish_element(&mut self, binding_attribute_count: u32) -> Option<Vec<u8>>
Called after all attributes on an element have been processed.
binding_attribute_count is the number of dynamic attribute bindings found.
Returns optional opaque bytes to emit as a Plugin protocol fragment.Source§fn into_artifacts(self: Box<Self>) -> Result<ParserPluginArtifacts>
fn into_artifacts(self: Box<Self>) -> Result<ParserPluginArtifacts>
Consume the plugin and return any build artifacts it captured. Read more
Source§fn start_fragment(&mut self, _fragment_id: &str)
fn start_fragment(&mut self, _fragment_id: &str)
Called before parsing begins for a fragment. Read more
Source§fn configure(&mut self, _options: &ParserOptions)
fn configure(&mut self, _options: &ParserOptions)
Called when parser output options change.
Auto Trait Implementations§
impl Freeze for FastV2ParserPlugin
impl RefUnwindSafe for FastV2ParserPlugin
impl Send for FastV2ParserPlugin
impl Sync for FastV2ParserPlugin
impl Unpin for FastV2ParserPlugin
impl UnsafeUnpin for FastV2ParserPlugin
impl UnwindSafe for FastV2ParserPlugin
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