pub struct StreamingDocument<R: Read + Seek> { /* private fields */ }Expand description
A PDF document that supports streaming operations
Implementations§
Source§impl<R: Read + Seek> StreamingDocument<R>
impl<R: Read + Seek> StreamingDocument<R>
Sourcepub fn new(reader: R, options: StreamingOptions) -> Result<Self>
pub fn new(reader: R, options: StreamingOptions) -> Result<Self>
Create a new streaming document
Sourcepub fn next_page(&mut self) -> Result<Option<StreamingPage>>
pub fn next_page(&mut self) -> Result<Option<StreamingPage>>
Get the next page for processing
Sourcepub fn process_pages<F>(&mut self, callback: F) -> Result<()>
pub fn process_pages<F>(&mut self, callback: F) -> Result<()>
Process all pages with a callback
Sourcepub fn memory_usage(&self) -> usize
pub fn memory_usage(&self) -> usize
Get current memory usage
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear page cache to free memory
Auto Trait Implementations§
impl<R> Freeze for StreamingDocument<R>where
R: Freeze,
impl<R> RefUnwindSafe for StreamingDocument<R>where
R: RefUnwindSafe,
impl<R> Send for StreamingDocument<R>where
R: Send,
impl<R> Sync for StreamingDocument<R>where
R: Sync,
impl<R> Unpin for StreamingDocument<R>where
R: Unpin,
impl<R> UnwindSafe for StreamingDocument<R>where
R: UnwindSafe,
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