pub enum ExecutionQualifier {
Specific(u64),
All,
}Expand description
SRD-77 — Every read-side path that touches session data is
execution-qualified: it accepts an ExecutionQualifier
at the call boundary, and the storage layer applies a
matching exec_id filter to its queries. The “aggregate
across every execution” intent is the explicit
ExecutionQualifier::All variant, not an unqualified
default — callers can never accidentally read across
multiple executions when they meant the latest.
Construct via:
ExecutionQualifier::latest— resolvesmax(exec_id)from the session db at call time; the natural no-flag default for read commands.- [
ExecutionQualifier::specific(n)] — single execution id (typically from a--execution=<n>CLI flag). ExecutionQualifier::all— every execution; the--all-executionsCLI flag.
Variants§
Specific(u64)
One specific exec_id. The storage layer applies a
WHERE exec_id = <n> filter.
All
Every recorded execution. The storage layer applies
no exec_id filter — the “aggregate across all
executions” semantic, opted into explicitly.
Implementations§
Source§impl ExecutionQualifier
impl ExecutionQualifier
Sourcepub fn latest(session_dir: &Path) -> Self
pub fn latest(session_dir: &Path) -> Self
Resolve “the most recent execution” against the
session db at session_dir. Returns
[Self::Specific(max_exec_id)] when at least one
execution is recorded, falling back to
[Self::Specific(1)] when the db is empty / absent
(so the qualifier still narrows to a specific id —
the caller still gets the explicit qualification
promise, just against an empty target).
Sourcepub fn matches_all(&self) -> bool
pub fn matches_all(&self) -> bool
True iff this qualifier matches every recorded
execution. Storage-layer query builders use this to
decide whether to attach the WHERE exec_id = …
clause.
Sourcepub fn specific_id(&self) -> Option<u64>
pub fn specific_id(&self) -> Option<u64>
The specific exec_id when narrowed, otherwise
None. Storage-layer builders use this to bind the
WHERE exec_id = ? parameter.
Trait Implementations§
Source§impl Clone for ExecutionQualifier
impl Clone for ExecutionQualifier
impl Copy for ExecutionQualifier
Source§impl Debug for ExecutionQualifier
impl Debug for ExecutionQualifier
impl Eq for ExecutionQualifier
Source§impl PartialEq for ExecutionQualifier
impl PartialEq for ExecutionQualifier
impl StructuralPartialEq for ExecutionQualifier
Auto Trait Implementations§
impl Freeze for ExecutionQualifier
impl RefUnwindSafe for ExecutionQualifier
impl Send for ExecutionQualifier
impl Sync for ExecutionQualifier
impl Unpin for ExecutionQualifier
impl UnsafeUnpin for ExecutionQualifier
impl UnwindSafe for ExecutionQualifier
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§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> 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