pub struct Classified {
pub comments: Vec<Range<usize>>,
pub imports: Vec<Range<usize>>,
pub logging: Vec<Range<usize>>,
pub tests: Vec<Range<usize>>,
pub error_line: Option<usize>,
}Expand description
The span layers of one version of a file. Each is a list of byte ranges in document order, non-overlapping within the layer.
Fields§
§comments: Vec<Range<usize>>Comments and docstrings.
imports: Vec<Range<usize>>Import statements (and re-exports, which are imports in disguise).
logging: Vec<Range<usize>>Statements that only log: print(…), console.log(…), logger.debug(…).
tests: Vec<Range<usize>>Test code inside a source file — in Rust, a #[cfg(test)] module or a #[test]
function, attributes included. Whole test files are found by path instead.
error_line: Option<usize>One-based line of the first syntax error the parser recovered from. Layers are still collected, but some may be missed or misplaced near it.
Trait Implementations§
Source§impl Clone for Classified
impl Clone for Classified
Source§impl Debug for Classified
impl Debug for Classified
Auto Trait Implementations§
impl Freeze for Classified
impl RefUnwindSafe for Classified
impl Send for Classified
impl Sync for Classified
impl Unpin for Classified
impl UnsafeUnpin for Classified
impl UnwindSafe for Classified
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