pub fn load_paths<'a, P, I>(
    paths: I,
    config: RecordIndexerConfig,
) -> impl Iterator<Item = Result<RecordIndex>>
where
    I: IntoIterator<Item = P>,
    P: Into<Cow<'a, Path>>,
{
    paths
        .into_iter()
        .map(|path| path.into().into_owned())
        .map(move |path| load_file(path, config.clone()))
        .map(
            |iter| -> Box<dyn Iterator<Item = Result<RecordIndex>> + Send> {
                match iter {
                    Ok(iter) => Box::new(iter),
                    Err(err) => Box::new([Err(err)].into_iter()),
                }
            },
        )
        .flatten()
}
/// Load record indexes from file paths.
Load record indexes from file paths.
Load record indexes from file paths .
pub fn load_paths<'a, P, I>(
    paths: I,
    config: RecordIndexerConfig,
) -> impl Iterator<Item = Result<RecordIndex>>
where
    I: IntoIterator<Item = P>,
    P: Into<Cow<'a, Path>>,
{
    paths
        .into_iter()
        .map(|path| path.into().into_owned())
        .map(move |path| load_file(path, config.clone()))
        .map(
            |iter| -> Box<dyn Iterator<Item = Result<RecordIndex>> + Send> {
                match iter {
                    Ok(iter) => Box::new(iter),
                    Err(err) => Box::new([Err(err)].into_iter()),
                }
            },
        )
        .flatten()
}
pub fn load_paths < ' a , P , I > ( paths : I , config : RecordIndexerConfig , ) -> impl Iterator < Item = Result < RecordIndex > > where I : IntoIterator < Item = P > , P : Into < Cow < ' a , Path > > , { paths . into_iter ( ) . map ( | path | path . into ( ) . into_owned ( ) ) . map ( move | path | load_file ( path , config . clone ( ) ) ) . map ( | iter | -> Box < dyn Iterator < Item = Result < RecordIndex > > + Send > { match iter { Ok ( iter ) => Box :: new ( iter ) , Err ( err ) => Box :: new ( [ Err ( err ) ] . into_iter ( ) ) , } } , ) . flatten ( ) }
Load record indexes from file paths.
Load record indexes from file paths .
paths
I
config
RecordIndexerConfig
paths
I
config
RecordIndexerConfig