pub fn parse_configuration(schema: &str) -> Result<ValidatedConfiguration, diagnostics::Diagnostics> {
    let ast = ast::parse_schema(schema)?;
    let mut diagnostics = Diagnostics::default();
    let generators = GeneratorLoader::load_generators_from_ast(&ast, &mut diagnostics);
    let preview_features = preview_features(&generators);
    let datasources = load_sources(&ast, &preview_features, &mut diagnostics);

    diagnostics.to_result()?;

    Ok(ValidatedConfiguration {
        subject: Configuration {
            datasources,
            generators,
        },
        warnings: diagnostics.warnings,
    })
}
/// Loads all configuration blocks from a datamodel using the built-in source definitions.
Loads all configuration blocks from a datamodel using the built-in source definitions.
Loads all configuration blocks from a datamodel using the built - in source definitions .
pub fn parse_configuration(schema: &str) -> Result<ValidatedConfiguration, diagnostics::Diagnostics> {
    let ast = ast::parse_schema(schema)?;
    let mut diagnostics = Diagnostics::default();
    let generators = GeneratorLoader::load_generators_from_ast(&ast, &mut diagnostics);
    let preview_features = preview_features(&generators);
    let datasources = load_sources(&ast, &preview_features, &mut diagnostics);
    diagnostics.to_result()?;
    Ok(ValidatedConfiguration {
        subject: Configuration {
            datasources,
            generators,
        },
        warnings: diagnostics.warnings,
    })
}
pub fn parse_configuration ( schema : & str ) -> Result < ValidatedConfiguration , diagnostics :: Diagnostics > { let ast = ast :: parse_schema ( schema ) ? ; let mut diagnostics = Diagnostics :: default ( ) ; let generators = GeneratorLoader :: load_generators_from_ast ( & ast , & mut diagnostics ) ; let preview_features = preview_features ( & generators ) ; let datasources = load_sources ( & ast , & preview_features , & mut diagnostics ) ; diagnostics . to_result ( ) ? ; Ok ( ValidatedConfiguration { subject : Configuration { datasources , generators , } , warnings : diagnostics . warnings , } ) }
Loads all configuration blocks from a datamodel using the built-in source definitions.
Loads all configuration blocks from a datamodel using the built - in source definitions .
schema
&str