pub struct ParallelRenderer { /* private fields */ }Expand description
Parallel PDF renderer
Renders pages in parallel using multiple threads. Each page is independent, so this provides linear speedup with the number of cores.
Implementations§
Source§impl ParallelRenderer
impl ParallelRenderer
Sourcepub fn render(&self, area_tree: &AreaTree) -> Result<PdfDocument>
pub fn render(&self, area_tree: &AreaTree) -> Result<PdfDocument>
Render an area tree to PDF using parallel processing
Pages are rendered in parallel and then combined into a single document. This is significantly faster for multi-page documents on multi-core systems.
Implementation strategy:
- Pre-collect shared resources (images, opacity states) sequentially
- Render individual page content streams in parallel
- Combine results into final document in correct order
Sourcepub fn effective_threads(&self) -> usize
pub fn effective_threads(&self) -> usize
Get the effective number of threads
Auto Trait Implementations§
impl Freeze for ParallelRenderer
impl RefUnwindSafe for ParallelRenderer
impl Send for ParallelRenderer
impl Sync for ParallelRenderer
impl Unpin for ParallelRenderer
impl UnsafeUnpin for ParallelRenderer
impl UnwindSafe for ParallelRenderer
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more