pub struct PageMetrics {
pub chapter_index: usize,
pub chapter_page_index: usize,
pub chapter_page_count: Option<usize>,
pub global_page_index: Option<usize>,
pub global_page_count_estimate: Option<usize>,
pub progress_chapter: f32,
pub progress_book: Option<f32>,
}Expand description
Structured page metrics for progress and navigation.
Fields§
§chapter_index: usizeChapter index in the spine (0-based), when known.
chapter_page_index: usizePage index in chapter (0-based).
chapter_page_count: Option<usize>Total pages in chapter, when known.
global_page_index: Option<usize>Global page index across rendered stream (0-based), when known.
global_page_count_estimate: Option<usize>Estimated global page count, when known.
progress_chapter: f32Chapter progress in range [0.0, 1.0].
progress_book: Option<f32>Book progress in range [0.0, 1.0], when known.
Trait Implementations§
Source§impl Clone for PageMetrics
impl Clone for PageMetrics
Source§fn clone(&self) -> PageMetrics
fn clone(&self) -> PageMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PageMetrics
impl Debug for PageMetrics
Source§impl Default for PageMetrics
impl Default for PageMetrics
Source§fn default() -> PageMetrics
fn default() -> PageMetrics
Returns the “default value” for a type. Read more
Source§impl PartialEq for PageMetrics
impl PartialEq for PageMetrics
impl Copy for PageMetrics
impl StructuralPartialEq for PageMetrics
Auto Trait Implementations§
impl Freeze for PageMetrics
impl RefUnwindSafe for PageMetrics
impl Send for PageMetrics
impl Sync for PageMetrics
impl Unpin for PageMetrics
impl UnsafeUnpin for PageMetrics
impl UnwindSafe for PageMetrics
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