pub struct ExtensionRegistry { /* private fields */ }Available on crate feature
plugins only.Expand description
Central registry for all ASS format extensions
Manages registration and lookup of tag handlers and section processors. Optimized for fast lookup during parsing with minimal memory overhead.
Implementations§
Source§impl ExtensionRegistry
impl ExtensionRegistry
Sourcepub fn register_tag_handler(
&mut self,
handler: Box<dyn TagHandler>,
) -> Result<()>
pub fn register_tag_handler( &mut self, handler: Box<dyn TagHandler>, ) -> Result<()>
Sourcepub fn register_section_processor(
&mut self,
processor: Box<dyn SectionProcessor>,
) -> Result<()>
pub fn register_section_processor( &mut self, processor: Box<dyn SectionProcessor>, ) -> Result<()>
Sourcepub fn process_section(
&self,
section_name: &str,
header: &str,
lines: &[&str],
) -> Option<SectionResult>
pub fn process_section( &self, section_name: &str, header: &str, lines: &[&str], ) -> Option<SectionResult>
Sourcepub fn tag_handler_names(&self) -> Vec<&str>
pub fn tag_handler_names(&self) -> Vec<&str>
Get list of registered tag handler names
Sourcepub fn section_processor_names(&self) -> Vec<&str>
pub fn section_processor_names(&self) -> Vec<&str>
Get list of registered section processor names
Sourcepub fn has_tag_handler(&self, name: &str) -> bool
pub fn has_tag_handler(&self, name: &str) -> bool
Check if a tag handler is registered
Sourcepub fn has_section_processor(&self, name: &str) -> bool
pub fn has_section_processor(&self, name: &str) -> bool
Check if a section processor is registered
Sourcepub fn remove_tag_handler(&mut self, name: &str) -> Option<Box<dyn TagHandler>>
pub fn remove_tag_handler(&mut self, name: &str) -> Option<Box<dyn TagHandler>>
Remove a tag handler by name
§Returns
Some(handler)- If handler was found and removedNone- If no handler with that name was registered
Sourcepub fn remove_section_processor(
&mut self,
name: &str,
) -> Option<Box<dyn SectionProcessor>>
pub fn remove_section_processor( &mut self, name: &str, ) -> Option<Box<dyn SectionProcessor>>
Remove a section processor by name
§Returns
Some(processor)- If processor was found and removedNone- If no processor with that name was registered
Sourcepub fn extension_count(&self) -> usize
pub fn extension_count(&self) -> usize
Get total number of registered extensions
Trait Implementations§
Source§impl Debug for ExtensionRegistry
impl Debug for ExtensionRegistry
Auto Trait Implementations§
impl Freeze for ExtensionRegistry
impl !RefUnwindSafe for ExtensionRegistry
impl Send for ExtensionRegistry
impl Sync for ExtensionRegistry
impl Unpin for ExtensionRegistry
impl !UnwindSafe for ExtensionRegistry
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