pub struct HtmlParser { /* private fields */ }Expand description
Parser for WebUI directives.
Implementations§
Source§impl HtmlParser
impl HtmlParser
Sourcepub fn with_plugin(plugin: Box<dyn ParserPlugin>) -> Self
pub fn with_plugin(plugin: Box<dyn ParserPlugin>) -> Self
Create a new parser with a plugin for framework-specific behavior.
Sourcepub fn set_css_strategy(&mut self, strategy: CssStrategy) -> &mut Self
pub fn set_css_strategy(&mut self, strategy: CssStrategy) -> &mut Self
Set the CSS strategy for component stylesheet delivery.
Sourcepub fn component_registry_mut(&mut self) -> &mut ComponentRegistry
pub fn component_registry_mut(&mut self) -> &mut ComponentRegistry
Get a mutable reference to the component registry.
pub fn into_fragment_records(self) -> WebUIFragmentRecords
Sourcepub fn has_fragment(&self, fragment_id: &str) -> bool
pub fn has_fragment(&self, fragment_id: &str) -> bool
Check if a fragment ID has been parsed (exists in the fragment records).
Sourcepub fn take_plugin(&mut self) -> Option<Box<dyn ParserPlugin>>
pub fn take_plugin(&mut self) -> Option<Box<dyn ParserPlugin>>
Take the parser plugin. Call before into_fragment_records() if you need
access to plugin state (e.g., component templates).
Sourcepub fn plugin_mut(&mut self) -> Option<&mut dyn ParserPlugin>
pub fn plugin_mut(&mut self) -> Option<&mut dyn ParserPlugin>
Get a mutable reference to the parser plugin.
Sourcepub fn take_tokens(&mut self) -> Vec<String>
pub fn take_tokens(&mut self) -> Vec<String>
Take the accumulated CSS tokens as a sorted, deduplicated Vec.
Tokens that are defined in inline <style> tags (e.g., in a
:root block) are excluded — only externally-referenced tokens
that the app does not already define are returned.
This consumes the internal token store. Call after parsing is complete.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HtmlParser
impl !RefUnwindSafe for HtmlParser
impl !Send for HtmlParser
impl !Sync for HtmlParser
impl Unpin for HtmlParser
impl UnsafeUnpin for HtmlParser
impl !UnwindSafe for HtmlParser
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