pub struct Chunk {Show 13 fields
pub id: Uuid,
pub file_id: Uuid,
pub file_path: PathBuf,
pub content: String,
pub content_type: ContentType,
pub mime_type: Option<String>,
pub chunk_index: u32,
pub byte_range: Range<u64>,
pub line_range: Option<Range<u32>>,
pub parent_chunk_id: Option<Uuid>,
pub depth: u8,
pub embedding: Option<Vec<f32>>,
pub metadata: ChunkMetadata,
}Expand description
A chunk of content from a file.
Fields§
§id: UuidUnique chunk identifier
file_id: UuidParent file identifier
file_path: PathBufPath to the source file
content: StringThe actual content
content_type: ContentTypeType of content
mime_type: Option<String>MIME type of the source file
chunk_index: u32Position in file (0-indexed)
byte_range: Range<u64>Byte range in source file
line_range: Option<Range<u32>>Line range (if applicable)
parent_chunk_id: Option<Uuid>Parent chunk ID (for hierarchical chunking)
depth: u8Depth in hierarchy (0 = root)
embedding: Option<Vec<f32>>Embedding vector (if computed)
metadata: ChunkMetadataAdditional metadata
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Chunk
impl<'de> Deserialize<'de> for Chunk
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 Chunk
impl RefUnwindSafe for Chunk
impl Send for Chunk
impl Sync for Chunk
impl Unpin for Chunk
impl UnwindSafe for Chunk
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