pub trait Loader: Send + Sync {
// Required methods
fn load<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Document, LoaderError>> + Send + 'static>>, LoaderError>> + Send + 'async_trait>>
where Self: 'async_trait;
fn load_and_split<'async_trait, TS>(
self,
splitter: TS,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Document, LoaderError>> + Send + 'static>>, LoaderError>> + Send + 'async_trait>>
where TS: 'async_trait + TextSplitter + 'static,
Self: 'async_trait;
}
Required Methods§
fn load<'async_trait>(
self,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Document, LoaderError>> + Send + 'static>>, LoaderError>> + Send + 'async_trait>>where
Self: 'async_trait,
fn load_and_split<'async_trait, TS>(
self,
splitter: TS,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Document, LoaderError>> + Send + 'static>>, LoaderError>> + Send + 'async_trait>>where
TS: 'async_trait + TextSplitter + 'static,
Self: 'async_trait,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.