Struct twig::function::Function
[−]
[src]
pub struct Function { pub name: &'static str, pub callable: Callable, }
Represents environment function.
Fields
name: &'static str
callable: Callable
Methods
impl Function
[src]
fn new_dynamic<F: 'static>(name: &'static str, callable: F) -> Function where
F: for<'e> Fn(&'e [Value]) -> RuntimeResult<Value>,
F: for<'e> Fn(&'e [Value]) -> RuntimeResult<Value>,
fn new_static<F: 'static, I: IntoIterator<Item = Arg>>(
name: &'static str,
arguments: I,
compile: F
) -> Function where
F: for<'c> Fn(&mut Staging<'c, Value>) -> TemplateResult<CompiledExpression>,
name: &'static str,
arguments: I,
compile: F
) -> Function where
F: for<'c> Fn(&mut Staging<'c, Value>) -> TemplateResult<CompiledExpression>,