pub struct LineSpan {
pub break_length: usize,
pub end: usize,
pub line_number: u32,
pub start: usize,
pub text: String,
}Expand description
A line span within the original content.
Fields§
§break_length: usizeNumber of bytes consumed by the line break (0 for last line).
end: usizeByte offset where the line ends (exclusive).
line_number: u321-indexed line number.
start: usizeByte offset where the line starts (inclusive).
text: StringThe line text (without the line break).
Trait Implementations§
impl Eq for LineSpan
impl StructuralPartialEq for LineSpan
Auto Trait Implementations§
impl Freeze for LineSpan
impl RefUnwindSafe for LineSpan
impl Send for LineSpan
impl Sync for LineSpan
impl Unpin for LineSpan
impl UnsafeUnpin for LineSpan
impl UnwindSafe for LineSpan
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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