pub struct CodeChunk {
pub id: i64,
pub file_path: String,
pub byte_start: u64,
pub byte_end: u64,
pub content: String,
pub content_hash: String,
pub symbol_name: Option<String>,
pub symbol_kind: Option<String>,
}Expand description
Code chunk from Magellan’s code_chunks table.
Represents pre-extracted code content with SHA-256 hash for deduplication. Chunks are created during Magellan indexing and provide faster snippet retrieval than file I/O.
Fields§
§id: i64Database row ID
file_path: StringAbsolute path to the source file
byte_start: u64Byte offset from file start (inclusive)
byte_end: u64Byte offset from file start (exclusive)
content: StringThe source code content
content_hash: StringSHA-256 hash of the content for deduplication
symbol_name: Option<String>Name of the symbol this chunk belongs to (if available)
symbol_kind: Option<String>Kind of the symbol (e.g., “function_item”, “struct_item”)
Trait Implementations§
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> 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