pub enum Value<'tree> {
Null,
Node(CapturedNode<'tree>),
String(String),
Array(Vec<Value<'tree>>),
Object(BTreeMap<DataFieldId, Value<'tree>>),
Variant {
tag: VariantTagId,
value: Box<Value<'tree>>,
},
}Expand description
A structured value produced by a query.
Variants§
Null
Represents a missing optional value. Serializes to null.
Node(CapturedNode<'tree>)
An AST node capture.
String(String)
A string, typically from a :: string conversion.
Array(Vec<Value<'tree>>)
A list of values, from a * or + capture.
Object(BTreeMap<DataFieldId, Value<'tree>>)
A map of field names to values, from a {...} capture.
Variant
A tagged union, from a [...] capture with labels.
Trait Implementations§
impl<'tree> StructuralPartialEq for Value<'tree>
Auto Trait Implementations§
impl<'tree> Freeze for Value<'tree>
impl<'tree> RefUnwindSafe for Value<'tree>
impl<'tree> Send for Value<'tree>
impl<'tree> Sync for Value<'tree>
impl<'tree> Unpin for Value<'tree>
impl<'tree> UnwindSafe for Value<'tree>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)