pub struct CodeChunk {
pub id: u64,
pub file_path: PathBuf,
pub language: String,
pub kind: ChunkKind,
pub name: Option<String>,
pub signature: Option<String>,
pub doc_comment: Option<String>,
pub body: String,
pub byte_range: Range<usize>,
pub line_range: Range<usize>,
}Expand description
A semantic chunk of code extracted from a source file.
Fields§
§id: u64Unique identifier for this chunk.
file_path: PathBufPath to the source file.
language: StringProgramming language.
kind: ChunkKindKind of code construct.
name: Option<String>Name of the construct (e.g., function name).
signature: Option<String>Full signature (e.g., fn foo(x: i32) -> String).
doc_comment: Option<String>Documentation comment, if any.
body: StringThe full source text of this chunk.
byte_range: Range<usize>Byte range in the original file.
line_range: Range<usize>Line range in the original file (0-indexed).
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