pub struct SemanticChunker;Expand description
Semantic chunker that splits at document structure boundaries.
Implementations§
Trait Implementations§
Source§impl Chunker for SemanticChunker
impl Chunker for SemanticChunker
Source§fn content_types(&self) -> &[&str]
fn content_types(&self) -> &[&str]
Content types this chunker is designed for.
Source§fn can_chunk(&self, content_type: &ContentType) -> bool
fn can_chunk(&self, content_type: &ContentType) -> bool
Check if this chunker can handle the given content type.
Source§fn chunk<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 ExtractedContent,
config: &'life2 ChunkConfig,
) -> Pin<Box<dyn Future<Output = Result<Vec<ChunkOutput>, ChunkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn chunk<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
content: &'life1 ExtractedContent,
config: &'life2 ChunkConfig,
) -> Pin<Box<dyn Future<Output = Result<Vec<ChunkOutput>, ChunkError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Chunk the extracted content.
Auto Trait Implementations§
impl Freeze for SemanticChunker
impl RefUnwindSafe for SemanticChunker
impl Send for SemanticChunker
impl Sync for SemanticChunker
impl Unpin for SemanticChunker
impl UnwindSafe for SemanticChunker
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