Struct twig::nodes::expr::Expr [] [src]

pub struct Expr<'c> {
    pub line: usize,
    pub value: ExprValue<'c>,
}

Fields

line
value

Methods

impl<'c> Expr<'c>

fn new_at<'r>(value: ExprValue<'r>, line: usize) -> Expr<'r>

fn new_array<'r>(value: Vec<Expr<'r>>, line: usize) -> Expr<'r>

fn new_hash<'r>(value: Vec<(Expr<'r>, Expr<'r>)>, line: usize) -> Expr<'r>

fn new_str_constant<'r>(value: &'r str, line: usize) -> Expr<'r>

fn new_int_constant<'r>(value: i64, line: usize) -> Expr<'r>

fn new_bool<'r>(value: bool, line: usize) -> Expr<'r>

fn new_null<'r>(line: usize) -> Expr<'r>

fn new_name<'r>(name: &'r str, line: usize) -> Expr<'r>

fn is_constant(&self) -> bool

impl<'c> Expr<'c>

fn new_at<'r>(value: ExprValue<'r>, line: usize) -> Expr<'r>

fn new_array<'r>(value: Vec<Expr<'r>>, line: usize) -> Expr<'r>

fn new_hash<'r>(value: Vec<(Expr<'r>, Expr<'r>)>, line: usize) -> Expr<'r>

fn new_str_constant<'r>(value: &'r str, line: usize) -> Expr<'r>

fn new_int_constant<'r>(value: i64, line: usize) -> Expr<'r>

fn new_bool<'r>(value: bool, line: usize) -> Expr<'r>

fn new_null<'r>(line: usize) -> Expr<'r>

fn new_name<'r>(name: &'r str, line: usize) -> Expr<'r>

fn is_constant(&self) -> bool

Trait Implementations

impl<'c> Parse<'c> for Expr<'c>

type Output = Expr<'c>

fn parse<'r>(parser: &mut Parser<'r, 'c>) -> TemplateResult<Expr<'c>>

impl<'c> Parse<'c> for Expr<'c>

type Output = Expr<'c>

fn parse<'r>(parser: &mut Parser<'r, 'c>) -> TemplateResult<Expr<'c>>

impl<'c> CompileExpression<'c> for Expr<'c>

fn compile<'r>(&'r self, stage: &'r mut Staging<'c, Value>) -> TemplateResult<CompiledExpression>

Derived Implementations

impl<'c> Clone for Expr<'c>

fn clone(&self) -> Expr<'c>

fn clone_from(&mut self, source: &Self)

impl<'c> PartialEq for Expr<'c>

fn eq(&self, __arg_0: &Expr<'c>) -> bool

fn ne(&self, __arg_0: &Expr<'c>) -> bool

impl<'c> Debug for Expr<'c>

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

impl<'c> Clone for Expr<'c>

fn clone(&self) -> Expr<'c>

fn clone_from(&mut self, source: &Self)

impl<'c> PartialEq for Expr<'c>

fn eq(&self, __arg_0: &Expr<'c>) -> bool

fn ne(&self, __arg_0: &Expr<'c>) -> bool

impl<'c> Debug for Expr<'c>

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