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.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Value<'a>
impl<'a> !Send for Value<'a>
impl<'a> !Sync for Value<'a>
impl<'a> Unpin for Value<'a>
impl<'a> !UnwindSafe for Value<'a>
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