Struct twig::operator::Operator [] [src]

pub struct Operator {
    pub options: OperatorOptions,
    pub callable: Callable,
}

Represents environment operator.

Fields

options

Operator options.

callable

Operator callable.

Methods

impl Operator

fn new_binary<F: 'static>(chars: &'static str, precedence: u16, associativity: Associativity, callable: F) -> Operator where F: for<'e> Fn(&'e Value, &'e Value) -> RuntimeResult<Value>

fn new_binary_left<F: 'static>(chars: &'static str, precedence: u16, callable: F) -> Operator where F: for<'e> Fn(&'e Value, &'e Value) -> RuntimeResult<Value>

fn new_binary_right<F: 'static>(chars: &'static str, precedence: u16, callable: F) -> Operator where F: for<'e> Fn(&'e Value, &'e Value) -> RuntimeResult<Value>

fn new_unary<F: 'static>(chars: &'static str, precedence: u16, callable: F) -> Operator where F: for<'e> Fn(&'e Value) -> RuntimeResult<Value>

Trait Implementations

impl Debug for Operator

fn fmt(&self, f: &mut Formatter) -> Result