pub struct StreamingParser { /* private fields */ }Available on crate feature
stream only.Expand description
High-performance streaming parser for ASS scripts
Processes input chunks incrementally using a state machine approach. Supports partial lines, incomplete sections, and memory-efficient parsing.
Implementations§
Source§impl StreamingParser
impl StreamingParser
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create parser with custom capacity
Sourcepub fn feed_chunk(&mut self, chunk: &[u8]) -> Result<Vec<ParseDelta<'static>>>
pub fn feed_chunk(&mut self, chunk: &[u8]) -> Result<Vec<ParseDelta<'static>>>
Feed chunk of data to parser
§Errors
Returns an error if the chunk contains invalid UTF-8 or parsing fails.
Sourcepub fn finish(self) -> Result<StreamingResult>
pub fn finish(self) -> Result<StreamingResult>
Sourcepub const fn peak_memory(&self) -> usize
Available on crate feature benches only.
pub const fn peak_memory(&self) -> usize
benches only.Get peak memory usage (benchmarks only)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StreamingParser
impl RefUnwindSafe for StreamingParser
impl Send for StreamingParser
impl Sync for StreamingParser
impl Unpin for StreamingParser
impl UnwindSafe for StreamingParser
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