pub enum Value {
Null,
Int(i64),
Float(f64),
Str(String),
Array(Vec<Value>),
Hash(HashMap<HashKey, Value>),
Obj(Rc<RefCell<dyn Object>>),
Func(Rc<dyn for<'r> Fn(&'r [Value]) -> Option<Value>>),
}Expand description
Represents Twig runtime value.
Variants§
Null
Int(i64)
Float(f64)
Str(String)
Array(Vec<Value>)
Hash(HashMap<HashKey, Value>)
Obj(Rc<RefCell<dyn Object>>)
Func(Rc<dyn for<'r> Fn(&'r [Value]) -> Option<Value>>)
Implementations§
Trait Implementations§
Source§impl IdentifyValue for Value
impl IdentifyValue for Value
fn identify_value(&self) -> Option<Fingerprint>
fn hash_value<H: Sha1Hasher>(&self, hasher: &mut H) -> Result<(), ()>
Source§impl PartialOrd for Value
impl PartialOrd for Value
impl Eq for Value
impl LittleValue for Value
Auto Trait Implementations§
impl Freeze for Value
impl !RefUnwindSafe for Value
impl !Send for Value
impl !Sync for Value
impl Unpin for Value
impl !UnwindSafe for Value
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more