pub trait SectionProcessor: Send + Sync {
// Required methods
fn name(&self) -> &'static str;
fn process(&self, header: &str, lines: &[&str]) -> SectionResult;
// Provided method
fn validate(&self, header: &str, lines: &[&str]) -> bool { ... }
}Available on crate feature
plugins only.Expand description
Trait for handling custom ASS sections
Implementors can process non-standard sections that extend ASS functionality. Section processors are called when unknown section headers are encountered.
Required Methods§
Sourcefn process(&self, header: &str, lines: &[&str]) -> SectionResult
fn process(&self, header: &str, lines: &[&str]) -> SectionResult
Process section header and content lines
§Arguments
header- Section header (e.g., “Aegisub Project”)lines- All lines belonging to this section
§Returns
SectionResult::Processed- Section was handled successfullySectionResult::Ignored- Section not recognized by this processorSectionResult::Failed- Error occurred during processing