pub fn eval_file<T: Variant + Clone>(
path: impl AsRef<Path>
) -> Result<T, Box<EvalAltResult>>
Expand description
Evaluate a script file, returning the result value or an error.
Not available under no_std
or WASM
.
§Example
let result = rhai::eval_file::<i64>("script.rhai")?;