pub struct FastParserPlugin { /* private fields */ }Expand description
FAST parser plugin.
Implements the ParserPlugin trait for the FAST framework:
- 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 FastParserPlugin
impl FastParserPlugin
Sourcepub fn set_css_strategy(&mut self, strategy: CssStrategy)
pub fn set_css_strategy(&mut self, strategy: CssStrategy)
Set the CSS delivery strategy for generated f-templates.
Sourcepub fn take_component_templates(&self) -> Vec<(String, String)>
pub fn take_component_templates(&self) -> Vec<(String, String)>
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 FastParserPlugin
impl Default for FastParserPlugin
Source§impl ParserPlugin for FastParserPlugin
impl ParserPlugin for FastParserPlugin
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 when a component template has been fully processed for the active
CSS strategy and wrapped for shadow DOM rendering.
Source§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>) -> ParserPluginArtifacts
fn into_artifacts(self: Box<Self>) -> ParserPluginArtifacts
Consume the plugin and return any build artifacts it captured.
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
Auto Trait Implementations§
impl Freeze for FastParserPlugin
impl RefUnwindSafe for FastParserPlugin
impl Send for FastParserPlugin
impl Sync for FastParserPlugin
impl Unpin for FastParserPlugin
impl UnsafeUnpin for FastParserPlugin
impl UnwindSafe for FastParserPlugin
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