pub struct ReadSpan {
pub file: String,
pub start_line: usize,
pub end_line: usize,
pub source: String,
}Expand description
The declaration span of a resolved def: the file, its 1-based start and end lines, and the VERBATIM source text of those lines (no trim, no clip
– a span is quoted, not summarized). end_line is what tree-sitter
delimited as the whole declaration node; when the file has changed since
the map, end_line is clamped to the file’s current last line rather
than guessed upward, and a file that shrank below the span’s start yields
no span at all.
Fields§
§file: StringThe file value.
start_line: usizeThe start line value.
end_line: usizeThe end line value.
source: StringThe source value.
Trait Implementations§
impl StructuralPartialEq for ReadSpan
Auto Trait Implementations§
impl Freeze for ReadSpan
impl RefUnwindSafe for ReadSpan
impl Send for ReadSpan
impl Sync for ReadSpan
impl Unpin for ReadSpan
impl UnsafeUnpin for ReadSpan
impl UnwindSafe for ReadSpan
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<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