pub struct ReadingPosition {
pub chapter_index: usize,
pub chapter_href: Option<String>,
pub anchor: Option<String>,
pub fallback_offset: usize,
}Expand description
Stable reading position with anchor + fallback offset information.
Fields§
§chapter_index: usize0-based chapter index in spine order.
chapter_href: Option<String>Optional chapter href hint for robust restore across index shifts.
anchor: Option<String>Optional anchor payload (fragment id or CFI-like token).
fallback_offset: usizeFallback character offset in the chapter when anchor cannot be resolved.
Trait Implementations§
Source§impl Clone for ReadingPosition
impl Clone for ReadingPosition
Source§fn clone(&self) -> ReadingPosition
fn clone(&self) -> ReadingPosition
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 ReadingPosition
impl Debug for ReadingPosition
Source§impl Default for ReadingPosition
impl Default for ReadingPosition
Source§fn default() -> ReadingPosition
fn default() -> ReadingPosition
Returns the “default value” for a type. Read more
Source§impl PartialEq for ReadingPosition
impl PartialEq for ReadingPosition
impl Eq for ReadingPosition
impl StructuralPartialEq for ReadingPosition
Auto Trait Implementations§
impl Freeze for ReadingPosition
impl RefUnwindSafe for ReadingPosition
impl Send for ReadingPosition
impl Sync for ReadingPosition
impl Unpin for ReadingPosition
impl UnsafeUnpin for ReadingPosition
impl UnwindSafe for ReadingPosition
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