pub async fn sync_environments<P: Into<PathBuf>>(
    root: P,
    datastore: Arc<FaaSDataStore>,
) -> Result<Environments> {
    let ids = datastore
        .items()
        .await
        .iter()
        .map(|(_k, f)| (*f.language(), f.environment_id))
        .collect::<Vec<(ProgrammingLanguage, Uuid)>>();
    let expected_env_ids: Vec<_> = ids.iter().map(|i| i.1).collect();

    Environment::sync_all(root.into(), &expected_env_ids).await
}
///
/// Sets up the enviornment directories based on the IDs contained in the datastore.
///
Sets up the enviornment directories based on the IDs contained in the datastore.
Sets up the enviornment directories based on the IDs contained in the datastore .
pub async fn sync_environments<P: Into<PathBuf>>(
    root: P,
    datastore: Arc<FaaSDataStore>,
) -> Result<Environments> {
    let ids = datastore
        .items()
        .await
        .iter()
        .map(|(_k, f)| (*f.language(), f.environment_id))
        .collect::<Vec<(ProgrammingLanguage, Uuid)>>();
    let expected_env_ids: Vec<_> = ids.iter().map(|i| i.1).collect();
    Environment::sync_all(root.into(), &expected_env_ids).await
}
pub async fn sync_environments < P : Into < PathBuf > > ( root : P , datastore : Arc < FaaSDataStore > , ) -> Result < Environments > { let ids = datastore . items ( ) . await . iter ( ) . map ( | ( _k , f ) | ( * f . language ( ) , f . environment_id ) ) . collect :: < Vec < ( ProgrammingLanguage , Uuid ) > > ( ) ; let expected_env_ids : Vec < _ > = ids . iter ( ) . map ( | i | i . 1 ) . collect ( ) ; Environment :: sync_all ( root . into ( ) , & expected_env_ids ) . await }
Sets up the enviornment directories based on the IDs contained in the datastore.
Sets up the enviornment directories based on the IDs contained in the datastore .
root
P
datastore
Arc<FaaSDataStore>
root
P
datastore
Arc<FaaSDataStore>