pub struct ParserRegistry { /* private fields */ }Implementations§
Source§impl ParserRegistry
impl ParserRegistry
pub fn new() -> Self
pub fn register_template_parser( &mut self, lang: &str, parser: Arc<dyn TemplateParser>, )
pub fn register_script_parser( &mut self, lang: &str, parser: Arc<dyn ScriptParser>, )
pub fn register_style_parser( &mut self, lang: &str, parser: Arc<dyn StyleParser>, )
pub fn register_metadata_parser( &mut self, lang: &str, parser: Arc<dyn MetadataParser>, )
pub fn get_template_parser(&self, lang: &str) -> Option<Arc<dyn TemplateParser>>
pub fn get_script_parser(&self, lang: &str) -> Option<Arc<dyn ScriptParser>>
pub fn get_style_parser(&self, lang: &str) -> Option<Arc<dyn StyleParser>>
pub fn get_metadata_parser(&self, lang: &str) -> Option<Arc<dyn MetadataParser>>
Trait Implementations§
Source§impl Default for ParserRegistry
impl Default for ParserRegistry
Source§fn default() -> ParserRegistry
fn default() -> ParserRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ParserRegistry
impl !RefUnwindSafe for ParserRegistry
impl Send for ParserRegistry
impl Sync for ParserRegistry
impl Unpin for ParserRegistry
impl UnsafeUnpin for ParserRegistry
impl !UnwindSafe for ParserRegistry
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