Module sections

Source
Expand description

Section-specific parsers for ASS script components.

This module contains specialized parsers for each type of section in ASS scripts, breaking down the monolithic parser into focused, maintainable components that adhere to the 200 LOC limit while maintaining zero-copy performance.

§Architecture

Each section parser is responsible for:

  • Parsing its specific section format and content
  • Handling format specifications and field mappings
  • Generating appropriate parse issues for validation
  • Maintaining zero-copy lifetime-generic references

§Performance

All parsers are designed for optimal performance:

  • Zero allocations via lifetime-generic spans
  • Linear time complexity for section content
  • Efficient format mapping and field extraction
  • Minimal memory overhead during parsing

§Example

Re-exports§

pub use events::EventsParser;
pub use script_info::ScriptInfoParser;
pub use styles::StylesParser;

Modules§

events
script_info
Script Info section parser for ASS scripts.
styles
Styles section parser for ASS scripts.

Structs§

SectionFormats
Formats detected during initial parse

Functions§

parse_section_with_context
Parse a specific section type from text with context

Type Aliases§

ScriptInfoParseResult
Result type for script info parsing with version detection
SectionParseResult
Result type for section parsing with metadata