pub struct ParagraphChunk<'a> {
pub text: &'a str,
pub chunk_size: usize,
pub chunk_id: Uuid,
pub paragraph_ids: Vec<Uuid>,
pub chunk_index: usize,
pub cut_type: CutType,
}Expand description
A paragraph-level chunk with metadata. Borrows text from the input.
Fields§
§text: &'a strThe accumulated text, borrowed from the input.
chunk_size: usizeToken count of the chunk.
chunk_id: UuidDeterministic ID: uuid5(NAMESPACE_OID, text).
paragraph_ids: Vec<Uuid>Paragraph IDs from the sentences that compose this chunk.
chunk_index: usizeSequential chunk index.
cut_type: CutTypeHow the chunk boundary was determined.
Trait Implementations§
Source§impl<'a> Clone for ParagraphChunk<'a>
impl<'a> Clone for ParagraphChunk<'a>
Source§fn clone(&self) -> ParagraphChunk<'a>
fn clone(&self) -> ParagraphChunk<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ParagraphChunk<'a>
impl<'a> RefUnwindSafe for ParagraphChunk<'a>
impl<'a> Send for ParagraphChunk<'a>
impl<'a> Sync for ParagraphChunk<'a>
impl<'a> Unpin for ParagraphChunk<'a>
impl<'a> UnsafeUnpin for ParagraphChunk<'a>
impl<'a> UnwindSafe for ParagraphChunk<'a>
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