pub struct PluginRegistry { /* private fields */ }Expand description
Plugin registry for managing multiple plugins
Implementations§
Source§impl PluginRegistry
impl PluginRegistry
Sourcepub fn register_processor(&mut self, processor: Box<dyn BlockProcessor>)
pub fn register_processor(&mut self, processor: Box<dyn BlockProcessor>)
Registers a block processor
Sourcepub fn register_validator(&mut self, validator: Box<dyn BlockValidator>)
pub fn register_validator(&mut self, validator: Box<dyn BlockValidator>)
Registers a block validator
Sourcepub fn register_transformer(&mut self, transformer: Box<dyn ContentTransformer>)
pub fn register_transformer(&mut self, transformer: Box<dyn ContentTransformer>)
Registers a content transformer
Sourcepub fn process_block(&self, block: &mut Block) -> Result<()>
pub fn process_block(&self, block: &mut Block) -> Result<()>
Processes a block through all registered processors
Sourcepub fn process_document(&self, document: &mut Document) -> Result<()>
pub fn process_document(&self, document: &mut Document) -> Result<()>
Processes a document through all registered processors
Sourcepub fn validate_block(&self, block: &Block) -> Result<()>
pub fn validate_block(&self, block: &Block) -> Result<()>
Validates a block through all registered validators
Sourcepub fn transform_content(&self, content: &str) -> Result<String>
pub fn transform_content(&self, content: &str) -> Result<String>
Transforms content through all registered transformers
Sourcepub fn processor_count(&self) -> usize
pub fn processor_count(&self) -> usize
Returns the number of registered processors
Sourcepub fn validator_count(&self) -> usize
pub fn validator_count(&self) -> usize
Returns the number of registered validators
Sourcepub fn transformer_count(&self) -> usize
pub fn transformer_count(&self) -> usize
Returns the number of registered transformers
Sourcepub fn processor_names(&self) -> Vec<&str>
pub fn processor_names(&self) -> Vec<&str>
Gets a list of processor names
Sourcepub fn validator_names(&self) -> Vec<&str>
pub fn validator_names(&self) -> Vec<&str>
Gets a list of validator names
Sourcepub fn transformer_names(&self) -> Vec<&str>
pub fn transformer_names(&self) -> Vec<&str>
Gets a list of transformer names