pub struct NoteChunk {
pub char_start: usize,
pub char_end: usize,
pub chunk_hash: String,
pub embedding_text: String,
pub headings: Vec<String>,
pub heading_path: String,
pub line_start: u32,
pub line_end: u32,
pub text: String,
pub token_estimate: usize,
}Expand description
A chunk of note content ready for embedding.
Fields§
§char_start: usizeByte offset where the chunk starts (in the stripped body).
char_end: usizeByte offset where the chunk ends (exclusive, in the stripped body).
chunk_hash: StringSHA-256 of text.
embedding_text: StringPrefixed embedding text: Title: …\nPath: …\nHeadings: …\n\n{text}.
headings: Vec<String>Active heading stack at the chunk’s start position.
heading_path: StringHeadings joined with >.
line_start: u321-based line number where the chunk starts (in the stripped body).
line_end: u321-based line number where the chunk ends (in the stripped body).
text: StringTrimmed chunk text.
token_estimate: usizeToken count estimate via tokenx-rs.
Trait Implementations§
impl Eq for NoteChunk
impl StructuralPartialEq for NoteChunk
Auto Trait Implementations§
impl Freeze for NoteChunk
impl RefUnwindSafe for NoteChunk
impl Send for NoteChunk
impl Sync for NoteChunk
impl Unpin for NoteChunk
impl UnsafeUnpin for NoteChunk
impl UnwindSafe for NoteChunk
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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