pub struct Span {
pub start: u64,
pub end: u64,
pub line: Option<u32>,
pub page: Option<u32>,
}Expand description
Where an event came from in the source.
Without this there is no --page, no jumping from a search hit, and no navigable
table of contents; adding it later would mean touching every reader, so it is here
from day one.
Fields§
§start: u64Byte range within the original source.
end: u64§line: Option<u32>1-based line, for formats that have lines.
page: Option<u32>1-based page, for formats that have pages (PDF, EPUB).
Implementations§
Trait Implementations§
impl Copy for Span
impl Eq for Span
impl StructuralPartialEq for Span
Auto Trait Implementations§
impl Freeze for Span
impl RefUnwindSafe for Span
impl Send for Span
impl Sync for Span
impl Unpin for Span
impl UnsafeUnpin for Span
impl UnwindSafe for Span
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