pub struct Chunk {
pub id: ChunkId,
pub project: String,
pub source: String,
pub content: String,
pub ts: DateTime<Utc>,
pub kind: Option<String>,
pub metadata: Value,
}Expand description
A piece of indexable text.
Fields§
§id: ChunkIdStable id (UUID v4 by default).
project: StringProject slug this chunk belongs to.
source: StringSource identifier (path, url, doc id).
content: StringRaw chunk text.
ts: DateTime<Utc>Creation timestamp.
kind: Option<String>Optional classifier ("code", "note", "diary", "doc").
metadata: ValueFree-form JSON metadata (e.g. AST symbol name + line range for code chunks).
Implementations§
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
impl StructuralPartialEq for Chunk
Auto Trait Implementations§
impl Freeze for Chunk
impl RefUnwindSafe for Chunk
impl Send for Chunk
impl Sync for Chunk
impl Unpin for Chunk
impl UnsafeUnpin 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