pub struct CodeChunk {
pub file_path: String,
pub start_line: usize,
pub end_line: usize,
pub content: String,
pub score: f32,
pub element_type: Option<String>,
pub element_name: Option<String>,
pub language: Option<String>,
pub context: Option<CodeContext>,
}Expand description
A chunk of code from search results
Fields§
§file_path: StringFile path relative to codebase root
start_line: usizeStart line number (1-indexed)
end_line: usizeEnd line number (1-indexed)
content: StringThe code content
score: f32Similarity score (0.0 - 1.0)
element_type: Option<String>Type of code element (function, class, etc.)
element_name: Option<String>Name of the code element
language: Option<String>Programming language
context: Option<CodeContext>Surrounding context (if requested)
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 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