pub enum SchemaLoadError {
Show 20 variants
Io {
path: PathBuf,
source: Error,
},
ParseManifest {
path: PathBuf,
source: Error,
},
ParseType {
path: PathBuf,
source: Error,
},
InvalidVersion {
value: String,
},
InvalidName {
value: String,
reason: &'static str,
},
TypeFileMismatch {
declared: Vec<String>,
found: Vec<String>,
},
TypeNameMismatch {
file: String,
declared: String,
},
MissingDefaultWeight,
DuplicateRelationship {
name: String,
},
UndeclaredRelationship {
type_name: String,
field: &'static str,
relationship: String,
available: Vec<String>,
},
CatchAllViolation {
type_name: String,
count: usize,
},
UnknownFieldReference {
type_name: String,
field: &'static str,
reference: String,
},
DefaultValueNotInEnum {
type_name: String,
field: String,
default: String,
allowed: Vec<String>,
},
RedeclaredBaseField {
type_name: String,
field: String,
},
UndeclaredRelationshipType {
relationship: String,
field: &'static str,
reference: String,
declared: Vec<String>,
},
ReservedSchemaKey {
type_name: String,
kind: &'static str,
offending_key: String,
reserved_keys: Vec<String>,
},
InvalidCrossMemToSchema {
value: String,
reason: String,
},
DuplicateCrossMemToSchema {
to_schema: String,
},
UndeclaredCrossMemSourceType {
to_schema: String,
relationship: String,
reference: String,
declared: Vec<String>,
},
AliasTargetRelTypeNotDeclared {
schema: String,
target: String,
declared: Vec<String>,
},
}Variants§
Io
ParseManifest
ParseType
InvalidVersion
InvalidName
TypeFileMismatch
TypeNameMismatch
MissingDefaultWeight
DuplicateRelationship
UndeclaredRelationship
CatchAllViolation
UnknownFieldReference
DefaultValueNotInEnum
RedeclaredBaseField
UndeclaredRelationshipType
ReservedSchemaKey
Schema declares a regular section or metadata field whose key
collides with an engine-invariant key. The reserved set covers
section key relationships (the parser’s auto-managed
## Relationships section) and metadata field key type (the
engine-set frontmatter type discriminator).
InvalidCrossMemToSchema
A cross_mem_relationships: entry’s to_schema: field is
not a bare schema name. Cross-mem eligibility is name-based —
versioned (software@1.0.0) and range (software@^1.0) forms
are refused so a version component can never silently re-enter
the eligibility path.
DuplicateCrossMemToSchema
Two cross_mem_relationships: entries declare the same
to_schema:. A schema declares each target-schema at most once
— the second entry would otherwise silently shadow or split
the vocabulary.
UndeclaredCrossMemSourceType
A cross_mem_relationships[].definitions[*].source_types entry
references a type name not declared in the source schema’s
types list. Source types belong to the source schema’s
namespace; unknown names raise this error at load time.
(Target types are accepted as opaque strings — they belong to
the target schema’s namespace, which is not in scope here.)
AliasTargetRelTypeNotDeclared
The schema’s alias_target_rel_type: pointer names a rel-type
not declared in relationships.definitions. Surfaces at
schema-load time so the alias-synthesis pass can trust the
pointer is resolvable at every later mutation call.
Trait Implementations§
Source§impl Debug for SchemaLoadError
impl Debug for SchemaLoadError
Source§impl Display for SchemaLoadError
impl Display for SchemaLoadError
Source§impl Error for SchemaLoadError
impl Error for SchemaLoadError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()