pub struct ComponentRegistry { /* private fields */ }Expand description
Registry of web components.
Implementations§
Source§impl ComponentRegistry
impl ComponentRegistry
Sourcepub fn register_from_paths<P: AsRef<Path>>(
&mut self,
directories: &[P],
) -> Result<&mut Self>
pub fn register_from_paths<P: AsRef<Path>>( &mut self, directories: &[P], ) -> Result<&mut Self>
Register multiple components from directories recursively.
Sourcepub fn register_component_from_paths<P: AsRef<Path>, Q: AsRef<Path>>(
&mut self,
html_path: P,
css_path: Option<Q>,
) -> Result<()>
pub fn register_component_from_paths<P: AsRef<Path>, Q: AsRef<Path>>( &mut self, html_path: P, css_path: Option<Q>, ) -> Result<()>
Register a web component from paths to HTML and CSS files.
Sourcepub fn register_component(
&mut self,
tag_name: &str,
html_content: &str,
css_content: Option<&str>,
has_script: bool,
) -> Result<()>
pub fn register_component( &mut self, tag_name: &str, html_content: &str, css_content: Option<&str>, has_script: bool, ) -> Result<()>
Register a component directly from provided content strings.
Sourcepub fn contains(&self, tag_name: &str) -> bool
pub fn contains(&self, tag_name: &str) -> bool
Check if a tag name is registered as a component.
Trait Implementations§
Source§impl Debug for ComponentRegistry
impl Debug for ComponentRegistry
Auto Trait Implementations§
impl Freeze for ComponentRegistry
impl RefUnwindSafe for ComponentRegistry
impl Send for ComponentRegistry
impl Sync for ComponentRegistry
impl Unpin for ComponentRegistry
impl UnsafeUnpin for ComponentRegistry
impl UnwindSafe for ComponentRegistry
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