Type Definition gtmpl_value::Func [] [src]

type Func = fn(_: &[Value]) -> Result<Value, String>;

Function type supported by gtmpl_value.

Trait Implementations

impl From<Func> for Value
[src]

[src]

Convert Func to Value

Examples

use gtmpl_value::{Func, Value};

fn f(a: &[Value]) -> Result<Value, String> {
    Ok(a[0].clone())
};
let x: Value = (f as Func).into();