pub struct SchemaSourceDiagnostic {
pub source: &'static str,
pub versions_found: Vec<String>,
pub pinned_version_match: bool,
pub status: Option<&'static str>,
}Expand description
One resolution-source line on EngineError::SchemaNotFound’s
details.sources payload.
The schema registry consults sources in a fixed order — local
storage (the mem’s own storage backend), built-in (compiled into
the engine binary), remote (memstead.io, reserved) — and records
what each held for the pinned name so an agent or operator can
tell where a pin failed: missing from local authoring, absent
from the shipped catalogue, or past the not-yet-wired remote. The
local_storage/builtin lines report a wrong-version partial
match (right name, wrong version) through pinned_version_match.
Fields§
§source: &'static strStable source label: "local_storage", "builtin", or
"remote". Agents may branch on it.
versions_found: Vec<String>Versions of the pinned name this source held, ascending.
Empty when the source carried nothing for that name — or was
not enumerated (today only remote, see status).
pinned_version_match: booltrue when the pinned exact version is among versions_found.
Always false across every source on a genuine not-found (the
fixed resolution order means a match on any source would have
resolved); a lone true here signals right-name/wrong-version.
status: Option<&'static str>Non-enumerable status for sources that do not list versions —
today only remote, which reports "not_configured". None
for the enumerable local_storage/builtin sources.
Implementations§
Source§impl SchemaSourceDiagnostic
impl SchemaSourceDiagnostic
Sourcepub fn for_failed_pin(
name: &str,
requested: &Version,
consulted: &[Arc<Schema>],
) -> Vec<Self>
pub fn for_failed_pin( name: &str, requested: &Version, consulted: &[Arc<Schema>], ) -> Vec<Self>
Build the fixed-order source diagnostics for a failed pin.
consulted is the resolution set the call site actually
searched: at boot it is the workspace-authored schemas layered
over the built-ins; at the create/migration sites it is the
set that path consulted (built-in alone, or workspace + built-in
for the migration resolver). The builtin line is recomputed
from the static catalogue so it is honest regardless of what the
caller passed; anything in consulted the built-in set does not
carry is attributed to local_storage. remote is always the
reserved not_configured slot.
Trait Implementations§
Source§impl Clone for SchemaSourceDiagnostic
impl Clone for SchemaSourceDiagnostic
Source§fn clone(&self) -> SchemaSourceDiagnostic
fn clone(&self) -> SchemaSourceDiagnostic
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SchemaSourceDiagnostic
impl Debug for SchemaSourceDiagnostic
impl Eq for SchemaSourceDiagnostic
Source§impl PartialEq for SchemaSourceDiagnostic
impl PartialEq for SchemaSourceDiagnostic
Source§impl Serialize for SchemaSourceDiagnostic
impl Serialize for SchemaSourceDiagnostic
impl StructuralPartialEq for SchemaSourceDiagnostic
Auto Trait Implementations§
impl Freeze for SchemaSourceDiagnostic
impl RefUnwindSafe for SchemaSourceDiagnostic
impl Send for SchemaSourceDiagnostic
impl Sync for SchemaSourceDiagnostic
impl Unpin for SchemaSourceDiagnostic
impl UnsafeUnpin for SchemaSourceDiagnostic
impl UnwindSafe for SchemaSourceDiagnostic
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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.impl<T> Fruit for T
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