morphir_core/metadata/
mod.rs1pub mod admission;
7mod assertion;
8mod context;
9mod graph;
10mod provider;
11mod term;
12
13pub(crate) use context::expand_property_objects;
14
15pub use assertion::{Assertion, AssertionKey, AssertionSource, Carrier, DocumentId, SourceRecord};
16pub use context::{
17 Coercion, ContextError, ContextResources, EffectiveContext, ExpandedKey, expand_object,
18 expand_properties, inline_document_contexts, resolve_context,
19};
20pub use graph::{GraphIndex, GraphMapError};
21pub use provider::ProviderDeclarationError;
22pub use term::{Fact, GraphName, ObjectTerm, TypedValue};
23
24#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
26pub enum MetadataError {
27 #[error("document identity must not be empty")]
29 EmptyDocumentId,
30 #[error("node-local carrier does not match the fact subject")]
32 CarrierSubjectMismatch,
33 #[error("document provenance is implicit and cannot be added as detail")]
35 DocumentProvenanceIsImplicit,
36 #[error("assertion source override must not be empty")]
38 EmptyAssertionSources,
39 #[error("document source does not match the assertion owner")]
41 DocumentSourceOwnerMismatch,
42 #[error("duplicate assertion source selector: {0:?}")]
44 DuplicateSourceSelector(Box<AssertionKey>),
45 #[error("assertion source selector has no matching authored assertion: {0:?}")]
47 UnmatchedSourceSelector(Box<AssertionKey>),
48 #[error("assertion source selector names another document: {0:?}")]
50 SourceSelectorOwnerMismatch(Box<AssertionKey>),
51 #[error("assertion source selector cannot name a sidecar: {0:?}")]
53 SourceSelectorCarrierUnsupported(Box<AssertionKey>),
54 #[error("assertion to rewrite was not found")]
56 AssertionNotFound,
57 #[error("replacement collides with an existing assertion: {0:?}")]
59 AssertionCollision(Box<AssertionKey>),
60 #[error("duplicate assertion has conflicting source knowledge: {0:?}")]
62 SourceKnowledgeConflict(Box<AssertionKey>),
63 #[error("assertion source ownership is unknown")]
65 UnknownSourceOwnership,
66 #[error("named graphs are not supported by the first metadata graph executor")]
68 NamedGraphUnsupported,
69}