pub struct StreamingChapterProcessor { /* private fields */ }Expand description
Streaming chapter processor that reads incrementally from ZIP.
This type provides true streaming without materializing the full chapter content in memory.
Implementations§
Source§impl StreamingChapterProcessor
impl StreamingChapterProcessor
Sourcepub fn new(_options: RenderPrepOptions, limits: ChunkLimits) -> Self
pub fn new(_options: RenderPrepOptions, limits: ChunkLimits) -> Self
Create a new streaming processor.
Sourcepub fn process_chunk<F>(
&mut self,
_html_chunk: &[u8],
_on_item: F,
) -> Result<usize, RenderPrepError>where
F: FnMut(StyledEventOrRun),
pub fn process_chunk<F>(
&mut self,
_html_chunk: &[u8],
_on_item: F,
) -> Result<usize, RenderPrepError>where
F: FnMut(StyledEventOrRun),
Process a chunk of HTML bytes and emit styled items.
Returns the number of items emitted. When the chunk is exhausted but the document is not complete, returns Ok(0) to indicate more data is needed.
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if parsing is complete.
Auto Trait Implementations§
impl Freeze for StreamingChapterProcessor
impl RefUnwindSafe for StreamingChapterProcessor
impl Send for StreamingChapterProcessor
impl Sync for StreamingChapterProcessor
impl Unpin for StreamingChapterProcessor
impl UnsafeUnpin for StreamingChapterProcessor
impl UnwindSafe for StreamingChapterProcessor
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