pub struct Chunk {
pub text: String,
pub position: usize,
pub token_count: Option<usize>,
}Expand description
Document chunk
Fields§
§text: String§position: usize§token_count: Option<usize>Trait Implementations§
Source§impl From<SemanticChunk> for Chunk
Convert a SemanticChunk to a basic Chunk (for backwards compatibility)
impl From<SemanticChunk> for Chunk
Convert a SemanticChunk to a basic Chunk (for backwards compatibility)
Source§fn from(sc: SemanticChunk) -> Self
fn from(sc: SemanticChunk) -> Self
Converts to this type from the input type.
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