Type Definition Func
gtmpl_value
type Func = fn(_: &[Value]) -> Result<Value, String>;
Function type supported by gtmpl_value.
impl From<Func> for Value
fn from(f: Func) -> Self
Convert Func to Value
Value
use gtmpl_value::{Func, Value}; fn f(a: &[Value]) -> Result<Value, String> { Ok(a[0].clone()) }; let x: Value = (f as Func).into();