pub struct DocumentChunker { /* private fields */ }Expand description
Document chunker with various strategies
Implementations§
Source§impl DocumentChunker
impl DocumentChunker
Sourcepub fn with_strategy(strategy: ChunkingStrategy) -> Self
pub fn with_strategy(strategy: ChunkingStrategy) -> Self
Create chunker with specific strategy
Sourcepub fn chunk_document(
&self,
document: &Document,
) -> RragResult<Vec<DocumentChunk>>
pub fn chunk_document( &self, document: &Document, ) -> RragResult<Vec<DocumentChunk>>
Chunk a document into smaller pieces
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DocumentChunker
impl RefUnwindSafe for DocumentChunker
impl Send for DocumentChunker
impl Sync for DocumentChunker
impl Unpin for DocumentChunker
impl UnwindSafe for DocumentChunker
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