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: aVar
and aTerm
Var
- A variable name. Has no children.Term
- A term. Has one child: aScalar
,Array
,Set
, orObject
Scalar
- A scalar value. Has one child: aString
,Int
,Float
,True
,False
, orNull
Array
- An array. Has zero or moreTerm
children.Set
- A set. Has zero or moreTerm
children.Object
- An object. Has zero or moreObjectItem
children.ObjectItem
- An object item. Has twoTerm
children.
Errors are also represented as nodes:
Error
- An error. Has three children: anErrorMessage
,ErrorAst
, andErrorCode
ErrorMessage
- 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 moreError
children.
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
)