pub struct LineRec {
pub source: u16,
pub lineno: u32,
pub start: u32,
pub end: u32,
/* private fields */
}Expand description
One line of the parser’s stream: (source, lineno) provenance plus the
byte range of the line’s current (possibly dedented) view into the
processed text of its source.
source indexes the parser’s source-text table (entry 0 is the document
itself; included files push further entries). Holding indices rather
than borrows is the load-bearing choice: the table can grow mid-parse
(an included file splices its lines into the running stream) without
any record referencing parser-owned text, so no self-reference and no
unsafe code.
Fields§
§source: u16Index into the parser’s source table (0 = the document itself).
lineno: u321-based line number within source.
start: u32Byte range of the current view into the processed text of source.
end: u32Trait Implementations§
impl Copy for LineRec
impl Eq for LineRec
impl StructuralPartialEq for LineRec
Auto Trait Implementations§
impl Freeze for LineRec
impl RefUnwindSafe for LineRec
impl Send for LineRec
impl Sync for LineRec
impl Unpin for LineRec
impl UnsafeUnpin for LineRec
impl UnwindSafe for LineRec
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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