Enum twig::value::Value [] [src]

pub enum Value {
    Null,
    Int(i64),
    Float(f64),
    Str(String),
    Array(Vec<Value>),
    Hash(HashMap<HashKey, Value>),
    Obj(Rc<RefCell<Object>>),
    Func(Rc<for<'r> Fn(&'r [Value]) -> Option<Value>>),
}

Represents Twig runtime value.

Variants

Null
Int
Float
Str
Array
Hash
Obj
Func

Methods

impl Value

fn int(self) -> RuntimeResult<i64>

If possible, returns this value represented as integer.

Trait Implementations

impl<'a> From<HashMap<&'a str, &'a str>> for Value

fn from(value: HashMap<&'a str, &'a str>) -> Value

impl From<HashMap<String, String>> for Value

fn from(value: HashMap<String, String>) -> Value

impl Clone for Value

fn clone(&self) -> Value

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

impl PartialEq for Value

fn eq(&self, other: &Value) -> bool

fn ne(&self, other: &Rhs) -> bool

impl Eq for Value

impl PartialOrd for Value

fn partial_cmp(&self, other: &Value) -> Option<Ordering>

fn lt(&self, other: &Rhs) -> bool

fn le(&self, other: &Rhs) -> bool

fn gt(&self, other: &Rhs) -> bool

fn ge(&self, other: &Rhs) -> bool

impl Debug for Value

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

impl LittleValue for Value

impl IdentifyValue for Value

fn identify_value(&self) -> Option<Fingerprint>

fn hash_value<H: Sha1Hasher>(&self, hasher: &mut H) -> Result<(), ()>

impl Default for Value

fn default() -> Value

impl Display for Value

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