conjure_core::parse

Function get_example_model

Source
pub fn get_example_model(filename: &str) -> Result<Model, Error>
Expand description

Searches recursively in ../tests/integration folder for an .essence file matching the given filename, then uses conjure to process it into astjson, and returns the parsed model.

§Arguments

  • filename - A string slice that holds filename without extension

§Returns

Function returns a Result<Value, anyhow::Error>, where Value is the parsed model.