pub struct CodeChunk {
pub index: usize,
pub text: String,
pub node_kind: String,
pub line_start: usize,
pub line_end: usize,
pub byte_start: usize,
pub byte_end: usize,
pub non_ws_chars: usize,
pub parent_symbol: Option<String>,
pub file_path: String,
}Expand description
A code chunk produced by the CST-aware chunker.
Fields§
§index: usize0-based index of this chunk within the file.
text: StringThe source text of this chunk.
node_kind: StringThe tree-sitter node kind (e.g., “function_item”, “impl_item”).
line_start: usize0-based starting line.
line_end: usize0-based ending line.
byte_start: usizeByte offset start.
byte_end: usizeByte offset end.
non_ws_chars: usizeCount of non-whitespace characters.
parent_symbol: Option<String>Qualified name of the innermost containing symbol, if any.
file_path: StringPath of the source file.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CodeChunk
impl<'de> Deserialize<'de> for CodeChunk
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CodeChunk
impl RefUnwindSafe for CodeChunk
impl Send for CodeChunk
impl Sync for CodeChunk
impl Unpin for CodeChunk
impl UnsafeUnpin for CodeChunk
impl UnwindSafe for CodeChunk
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> 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