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
sourceimpl<'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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more