pub struct ClauseYield {
pub var: String,
pub source: Option<String>,
pub evaluations: usize,
pub values: usize,
}Expand description
Internal walker state — the scope the recursive walker resolves names against, so it does not thread it through every call. What one leaf clause yielded over a whole traversal.
A clause under a cartesian is evaluated once per outer tuple, so emptiness is a property of the evaluations and not of the clause:
evaluations == 0— never reached, because something outside it was empty first. Not the cause; the cause is an earlier clause.evaluations > 0 && values == 0— reached and yielded nothing every time. This is the clause a diagnostic should name.values > 0— yielded.
An empty stream is a legal value of the algebra, so none of these is an error. What a host does about one is the host’s policy.
Why an evaluation yielded nothing, when the reason is a read of
None, is reported beside these records by
evaluate_for_iteration_with_none_reads (NoneReads).
Fields§
§var: StringThe clause’s element name.
source: Option<String>The source’s canonical text, when it has one.
evaluations: usizeHow many times this clause was evaluated.
values: usizeHow many values it produced, summed over those evaluations.
Trait Implementations§
Source§impl Clone for ClauseYield
impl Clone for ClauseYield
Source§impl Debug for ClauseYield
impl Debug for ClauseYield
impl Eq for ClauseYield
Source§impl PartialEq for ClauseYield
impl PartialEq for ClauseYield
impl StructuralPartialEq for ClauseYield
Auto Trait Implementations§
impl Freeze for ClauseYield
impl RefUnwindSafe for ClauseYield
impl Send for ClauseYield
impl Sync for ClauseYield
impl Unpin for ClauseYield
impl UnsafeUnpin for ClauseYield
impl UnwindSafe for ClauseYield
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<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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more