Trait Loader

Source
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§

Source

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,

Source

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.

Implementors§

Source§

impl Loader for TextLoader

Source§

impl<R: Read + Send + Sync + 'static> Loader for CsvLoader<R>

Source§

impl<R: Read + Send + Sync + 'static> Loader for HtmlLoader<R>

Source§

impl<R: AsyncRead + Send + Sync + Unpin + 'static> Loader for PandocLoader<R>