#[non_exhaustive]pub enum WalkOutcome {
Complete,
LimitReached,
}Expand description
Why a limited walk stopped (0.15.10, W13.5, C-8).
A list of ids cannot answer this. TraversalBuilder::limit bounds the
walk’s rows, and the projection then drops rows again — one node can enter
the walk at two depths, and a retired concept is filtered after the walk has
already spent the budget on it — so a limit of 100 can return 87 ids whether
the graph held 87 or 87,000. That is the shape Doctrine II refuses to leave
to a comment, and it is why TraversalBuilder::limit arrives with
TraversalBuilder::execute_ids_explained rather than alone.
The answer is the walk’s own row count, taken in the same statement, and it
is exact rather than inferred: LimitReached means the walk produced the
number of rows it was allowed and stopped, not that the id count happened to
reach the ceiling.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Complete
The walk ran out of graph: the depth bound or the frontier stopped it, and the ids are every node the traversal describes.
LimitReached
The walk ran out of budget. More of the graph satisfies the traversal than came back, and what came back is the near end of it — the walk’s queue is breadth-first, so a limit drops the farthest nodes first.
Implementations§
Source§impl WalkOutcome
impl WalkOutcome
Sourcepub fn hit_limit(self) -> bool
pub fn hit_limit(self) -> bool
Whether the ceiling bit. Named like
CandidateCount::is_capped,
which is the same question one layer up.
Trait Implementations§
Source§impl Clone for WalkOutcome
impl Clone for WalkOutcome
Source§fn clone(&self) -> WalkOutcome
fn clone(&self) -> WalkOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for WalkOutcome
Source§impl Debug for WalkOutcome
impl Debug for WalkOutcome
impl Eq for WalkOutcome
Source§impl PartialEq for WalkOutcome
impl PartialEq for WalkOutcome
impl StructuralPartialEq for WalkOutcome
Auto Trait Implementations§
impl Freeze for WalkOutcome
impl RefUnwindSafe for WalkOutcome
impl Send for WalkOutcome
impl Sync for WalkOutcome
impl Unpin for WalkOutcome
impl UnsafeUnpin for WalkOutcome
impl UnwindSafe for WalkOutcome
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§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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request