Skip to main content

Expect

Enum Expect 

Source
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.

Fields

§

NodeVar

A variable name, just inside (.

Fields

§

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.

Fields

§bound: usize
§

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.

Fields

§incoming: bool
§lead: &'static str
§

RelEnd

The end of a relationship: ], or the bounds of a * range — ranged when a * has been written and is still waiting for them.

Fields

§incoming: bool
§ranged: bool
§

Arrow

The arrow that closes a relationship — ->, or -.

Fields

§incoming: bool
§

Predicate

A predicate, after WHERE.

Fields

§vars: Vec<String>
§

Projection

A returned item, after RETURN.

Fields

§vars: Vec<String>
§

Property

A property of var, which is a label.

Fields

§

Value

The right-hand side of a comparison — a value only the author knows.

§

SortKey

The key a ORDER BY sorts on.

Fields

§vars: Vec<String>
§

Argument

What a call takes: key( wants a variable, collect( a value of one.

Fields

§vars: Vec<String>
§

Clause

A clause that may follow a complete one — ORDER BY, LIMIT, AS OF. done are the ones already written, which cannot come again.

Fields

§done: Vec<String>
§

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§

Source§

impl Clone for Expect

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Expect

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Expect

Source§

impl PartialEq for Expect

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Expect

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more