Function casbin::rhai::eval_file

source ·
pub fn eval_file<T>(path: impl AsRef<Path>) -> Result<T, Box<EvalAltResult>>
where T: Variant + Clone,
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")?;