Enum tau_engine::Value
source · pub enum Value<'a> {
Null,
Bool(bool),
Float(f64),
Int(i64),
UInt(u64),
String(Cow<'a, str>),
Array(&'a dyn Array),
Object(&'a dyn Object),
}Expand description
A dynamic data type that the solver can reason on.
Variants§
Null
Represents an empty type.
Bool(bool)
Represents a boolean.
Float(f64)
Represents a float.
Int(i64)
Represents an integer.
UInt(u64)
Represents an unsigned integer.
String(Cow<'a, str>)
Represents a string.
Array(&'a dyn Array)
Represents an array.
Object(&'a dyn Object)
Represents an object.
Implementations§
source§impl<'a> Value<'a>
impl<'a> Value<'a>
sourcepub fn as_array(&self) -> Option<&dyn Array>
pub fn as_array(&self) -> Option<&dyn Array>
Return the associated array if the Value is an Array.
sourcepub fn as_object(&self) -> Option<&dyn Object>
pub fn as_object(&self) -> Option<&dyn Object>
Return the associated object if the Value is an Object.