pub enum NodeKind {
Show 25 variants
Undefined,
Binding,
Var,
Term,
Scalar,
Array,
Set,
Object,
ObjectItem,
Int,
Float,
String,
True,
False,
Null,
Terms,
Bindings,
Results,
Result,
Error,
ErrorSeq,
ErrorMessage,
ErrorAst,
ErrorCode,
Internal,
}Expand description
Enumeration of different kinds of Rego Nodes that can be returned as output from a query.
The main kinds of nodes are:
Binding- A variable binding. Has two children: aVarand aTermVar- A variable name. Has no children.Term- A term. Has one child: aScalar,Array,Set, orObjectScalar- A scalar value. Has one child: aString,Int,Float,True,False, orNullArray- An array. Has zero or moreTermchildren.Set- A set. Has zero or moreTermchildren.Object- An object. Has zero or moreObjectItemchildren.ObjectItem- An object item. Has twoTermchildren.
Errors are also represented as nodes:
Error- An error. Has three children: anErrorMessage,ErrorAst, andErrorCodeErrorMessage- An error message.ErrorAst- A tree representing where in the input program the error occurred.ErrorCode- An error code.ErrorSeq- A sequence of errors. Has one or moreErrorchildren.
Variants§
Undefined
Binding
Var
Term
Scalar
Array
Set
Object
ObjectItem
Int
Float
String
True
False
Null
Terms
Bindings
Results
Result
Error
ErrorSeq
ErrorMessage
ErrorAst
ErrorCode
Internal
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeKind
impl RefUnwindSafe for NodeKind
impl Send for NodeKind
impl Sync for NodeKind
impl Unpin for NodeKind
impl UnwindSafe for NodeKind
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)