pub struct PageRecovery {
pub page: usize,
pub extracted_chars: usize,
pub rendered_chars: usize,
}Expand description
Character recovery for a single source page, attributed via the
<!-- page N --> anchors the renderer emits at page boundaries
(kopitiam_token_max.md §8 card I-B).
The document-wide ConversionReport::recovery_ratio answers “did we lose
content somewhere?”; these answer “which page?” — turning “97% overall,
re-check everything” into “page 4 is 71%, check only page 4”. Their
extracted_chars/rendered_chars partition the document-wide totals
exactly (they sum back to ConversionReport::extracted_chars /
ConversionReport::rendered_chars), because the same normalization is
applied and the anchor lines themselves contribute zero content.
Fields§
§page: usize1-based page number, matching the block’s Document::block_pages value
and the <!-- page N --> anchor.
extracted_chars: usize§rendered_chars: usizeImplementations§
Source§impl PageRecovery
impl PageRecovery
Sourcepub fn recovery_ratio(&self) -> f64
pub fn recovery_ratio(&self) -> f64
This page’s rendered_chars / extracted_chars, with the same
empty-extraction convention as ConversionReport::recovery_ratio: a
page from which nothing was extracted (e.g. one that was entirely a
running head, now stripped) is full recovery, not a divide-by-zero.
Trait Implementations§
Source§impl Clone for PageRecovery
impl Clone for PageRecovery
Source§fn clone(&self) -> PageRecovery
fn clone(&self) -> PageRecovery
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PageRecovery
impl Debug for PageRecovery
Source§impl Default for PageRecovery
impl Default for PageRecovery
Source§fn default() -> PageRecovery
fn default() -> PageRecovery
Source§impl PartialEq for PageRecovery
impl PartialEq for PageRecovery
impl StructuralPartialEq for PageRecovery
Auto Trait Implementations§
impl Freeze for PageRecovery
impl RefUnwindSafe for PageRecovery
impl Send for PageRecovery
impl Sync for PageRecovery
impl Unpin for PageRecovery
impl UnsafeUnpin for PageRecovery
impl UnwindSafe for PageRecovery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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