pub struct FlattenQualityMetrics {
pub page_count_before: usize,
pub page_count_after: usize,
pub page_count_match: bool,
pub content_stream_bytes_before: usize,
pub content_stream_bytes_after: usize,
pub content_ratio: f64,
}Expand description
Metrics comparing a PDF before and after flattening.
Used by compare_flatten_quality and the flatten-check CLI subcommand.
Fields§
§page_count_before: usizeNumber of pages in the original (pre-flatten) PDF.
page_count_after: usizeNumber of pages in the flattened (post-flatten) PDF.
page_count_match: boolTrue when page_count_before == page_count_after.
content_stream_bytes_before: usizeTotal byte length of all content streams in the original PDF.
content_stream_bytes_after: usizeTotal byte length of all content streams in the flattened PDF.
content_ratio: f64Ratio of after/before content stream bytes. 1.0 = same size, <1.0 = smaller.
Returns 1.0 when content_stream_bytes_before == 0 to avoid division by zero.
Auto Trait Implementations§
impl Freeze for FlattenQualityMetrics
impl RefUnwindSafe for FlattenQualityMetrics
impl Send for FlattenQualityMetrics
impl Sync for FlattenQualityMetrics
impl Unpin for FlattenQualityMetrics
impl UnsafeUnpin for FlattenQualityMetrics
impl UnwindSafe for FlattenQualityMetrics
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