Add example to function pointer.
This commit is contained in:
@@ -114,7 +114,8 @@ Any custom syntax must include an _implementation_ of it.
|
||||
|
||||
The function signature of an implementation is:
|
||||
|
||||
> `Fn(scope: &mut Scope, context: &mut EvalContext, inputs: &[Expression]) -> Result<Dynamic, Box<EvalAltResult>>`
|
||||
> `Fn(scope: &mut Scope, context: &mut EvalContext, inputs: &[Expression])`
|
||||
> `-> Result<Dynamic, Box<EvalAltResult>>`
|
||||
|
||||
where:
|
||||
|
||||
|
@@ -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:
|
||||
|
||||
|
Reference in New Issue
Block a user