Add example to function pointer.

This commit is contained in:
Stephen Chung
2020-10-15 20:05:23 +08:00
parent a6fa94d946
commit ea9ef1091a
4 changed files with 62 additions and 10 deletions

View File

@@ -62,7 +62,8 @@ Function Signature
The function signature passed to `Engine::on_var` takes the following form:
> `Fn(name: &str, index: usize, scope: &Scope, context: &EvalContext) -> Result<Option<Dynamic>, Box<EvalAltResult>> + 'static`
> `Fn(name: &str, index: usize, scope: &Scope, context: &EvalContext)`
> `-> Result<Option<Dynamic>, Box<EvalAltResult>> + 'static`
where: