pub struct HtmlParser { /* private fields */ }Expand description
Parser for WebUI directives.
Implementations§
Source§impl HtmlParser
impl HtmlParser
Sourcepub fn with_options(options: impl Into<ParserOptions>) -> Self
pub fn with_options(options: impl Into<ParserOptions>) -> Self
Create a new directive parser with explicit parser options.
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 and default parser options.
Sourcepub fn with_plugin_options(
plugin: Box<dyn ParserPlugin>,
options: impl Into<ParserOptions>,
) -> Self
pub fn with_plugin_options( plugin: Box<dyn ParserPlugin>, options: impl Into<ParserOptions>, ) -> Self
Create a new parser with a plugin and explicit parser options.
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.
Sourcepub fn component_registry(&self) -> &ComponentRegistry
pub fn component_registry(&self) -> &ComponentRegistry
Get a shared 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_artifacts(&mut self) -> ParserPluginArtifacts
pub fn take_plugin_artifacts(&mut self) -> ParserPluginArtifacts
Take any post-parse artifacts captured by 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 !RefUnwindSafe for HtmlParser
impl !Send for HtmlParser
impl !Sync for HtmlParser
impl !UnwindSafe for HtmlParser
impl Freeze for HtmlParser
impl Unpin for HtmlParser
impl UnsafeUnpin 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