Trait TextSplitter
Source pub trait TextSplitter: Send + Sync {
// Required method
fn split_text<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, TextSplitterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn split_documents<'life0, 'life1, 'async_trait>(
&'life0 self,
documents: &'life1 [Document],
) -> Pin<Box<dyn Future<Output = Result<Vec<Document>, TextSplitterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn create_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
text: &'life1 [String],
metadatas: &'life2 [HashMap<String, Value>],
) -> Pin<Box<dyn Future<Output = Result<Vec<Document>, TextSplitterError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}