pub enum Expect {
Show 17 variants
Statement,
Node {
var: String,
},
NodeVar {
var: String,
},
Label,
NodeEnd,
Hop {
from: Option<String>,
var: String,
bound: usize,
},
EdgeType {
from: Option<String>,
var: String,
incoming: bool,
lead: &'static str,
},
RelEnd {
incoming: bool,
ranged: bool,
},
Arrow {
incoming: bool,
},
Predicate {
vars: Vec<String>,
},
Projection {
vars: Vec<String>,
},
Property {
var: String,
label: Option<String>,
},
Value,
SortKey {
vars: Vec<String>,
},
Argument {
vars: Vec<String>,
},
Clause {
done: Vec<String>,
},
Nothing,
}Expand description
What the caret sits at — the question a suggestion answers.
Carries the context that made the guess possible, so a caller can say why
a list is what it is (“properties of n, a Function”) instead of showing
a bare list.
Variants§
Statement
The keyword a statement opens with.
Node
A whole node pattern — (n:Label). var is the name it would bind.
NodeVar
A variable name, just inside (.
Label
A label, after (n:.
NodeEnd
The end of a node pattern: :Label, or ).
Hop
A relationship leaving the node just closed — or the clause that
follows it, since a pattern may simply end here. from is that node’s
label, var the name the next node would bind, and bound how many
the pattern has bound already.
EdgeType
An edge type — anywhere from just after the arrow to just after the
:. lead is the punctuation that still has to be written before the
type: [: right after the arrow, : right after the bracket, and
nothing once the colon is there.
RelEnd
The end of a relationship: ], or the bounds of a * range —
ranged when a * has been written and is still waiting for them.
Arrow
The arrow that closes a relationship — ->, or -.
Predicate
A predicate, after WHERE.
Projection
A returned item, after RETURN.
Property
A property of var, which is a label.
Value
The right-hand side of a comparison — a value only the author knows.
SortKey
The key a ORDER BY sorts on.
Argument
What a call takes: key( wants a variable, collect( a value of one.
Clause
A clause that may follow a complete one — ORDER BY, LIMIT,
AS OF. done are the ones already written, which cannot come again.
Nothing
Nothing worth guessing at: inside a string literal, where the words
typed are data rather than syntax; or after a shape the grammar
refuses (inline properties in a MATCH node), where every suggestion
would steer further into a query that cannot run.
Trait Implementations§
impl Eq for Expect
impl StructuralPartialEq for Expect
Auto Trait Implementations§
impl Forget for Expect
impl Freeze for Expect
impl RefUnwindSafe for Expect
impl Send for Expect
impl Sync for Expect
impl Unpin for Expect
impl UnsafeUnpin for Expect
impl UnwindSafe for Expect
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.