Skip to main content

BatchLoader

Trait BatchLoader 

Source
pub trait BatchLoader: DocumentLoader {
    // Required methods
    fn load_directory<'life0, 'async_trait>(
        &'life0 self,
        dir: PathBuf,
        recursive: bool,
    ) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<Document>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn load_batch<'life0, 'async_trait>(
        &'life0 self,
        paths: Vec<PathBuf>,
    ) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<(PathBuf, Document)>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

批量加载器 trait

Required Methods§

Source

fn load_directory<'life0, 'async_trait>( &'life0 self, dir: PathBuf, recursive: bool, ) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<Document>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

加载目录下所有文档

Source

fn load_batch<'life0, 'async_trait>( &'life0 self, paths: Vec<PathBuf>, ) -> Pin<Box<dyn Future<Output = Layer3Result<Vec<(PathBuf, Document)>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

批量加载文件

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§