pub fn from_services_dirs<P>(paths: &[P]) -> Result<Self>
    where
        P: AsRef<Path> + Sized + AsRef<OsStr> + Debug,
    {
        let services = paths
            .iter()
            .map(|path| fetch_services(path))
            .flat_map(|result| match result {
                Ok(vec) => vec.into_iter().map(Ok).collect(),
                Err(err) => vec![Err(err)],
            })
            .collect::<Result<Vec<_>>>()?;

        let services = validate(services)?;
        Ok(Horust::new(
            services,
            paths.iter().map(PathBuf::from).collect(),
        ))
    }
/// Create a new horust instance from multiple paths of services.
Create a new horust instance from multiple paths of services.
Create a new horust instance from multiple paths of services .
pub fn from_services_dirs<P>(paths: &[P]) -> Result<Self>
    where
        P: AsRef<Path> + Sized + AsRef<OsStr> + Debug,
    {
        let services = paths
            .iter()
            .map(|path| fetch_services(path))
            .flat_map(|result| match result {
                Ok(vec) => vec.into_iter().map(Ok).collect(),
                Err(err) => vec![Err(err)],
            })
            .collect::<Result<Vec<_>>>()?;
        let services = validate(services)?;
        Ok(Horust::new(
            services,
            paths.iter().map(PathBuf::from).collect(),
        ))
    }
pub fn from_services_dirs < P > ( paths : & [ P ] ) -> Result < Self > where P : AsRef < Path > + Sized + AsRef < OsStr > + Debug , { let services = paths . iter ( ) . map ( | path | fetch_services ( path ) ) . flat_map ( | result | match result { Ok ( vec ) => vec . into_iter ( ) . map ( Ok ) . collect ( ) , Err ( err ) => vec ! [ Err ( err ) ] , } ) . collect :: < Result < Vec < _ > > > ( ) ? ; let services = validate ( services ) ? ; Ok ( Horust :: new ( services , paths . iter ( ) . map ( PathBuf :: from ) . collect ( ) , ) ) }
Create a new horust instance from multiple paths of services.
Create a new horust instance from multiple paths of services .
paths
&[P]
paths
&[P]