pub trait ContentChunker: Send + Sync {
// Required methods
fn chunk<'life0, 'life1, 'async_trait>(
&'life0 self,
content: &'life1 str,
size: usize,
) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn name(&self) -> &str;
}Expand description
Trait for content chunking strategies
Implementors of this trait can provide custom chunking logic for text processing. The trait is async to allow for complex chunking strategies that might require external services or intensive computation.