Skip to main content

SchemaLoadError

Enum SchemaLoadError 

Source
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

Fields

§path: PathBuf
§source: Error
§

ParseManifest

Fields

§path: PathBuf
§source: Error
§

ParseType

Fields

§path: PathBuf
§source: Error
§

InvalidVersion

Fields

§value: String
§

InvalidName

Fields

§value: String
§reason: &'static str
§

TypeFileMismatch

Fields

§declared: Vec<String>
§found: Vec<String>
§

TypeNameMismatch

Fields

§file: String
§declared: String
§

MissingDefaultWeight

§

DuplicateRelationship

Fields

§name: String
§

UndeclaredRelationship

Fields

§type_name: String
§field: &'static str
§relationship: String
§available: Vec<String>
§

CatchAllViolation

Fields

§type_name: String
§count: usize
§

UnknownFieldReference

Fields

§type_name: String
§field: &'static str
§reference: String
§

DefaultValueNotInEnum

Fields

§type_name: String
§field: String
§default: String
§allowed: Vec<String>
§

RedeclaredBaseField

Fields

§type_name: String
§field: String
§

UndeclaredRelationshipType

Fields

§relationship: String
§field: &'static str
§reference: String
§declared: Vec<String>
§

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).

Fields

§type_name: String
§kind: &'static str
§offending_key: String
§reserved_keys: Vec<String>
§

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.

Fields

§value: String
§reason: String
§

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.

Fields

§to_schema: String
§

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.)

Fields

§to_schema: String
§relationship: String
§reference: String
§declared: Vec<String>
§

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.

Fields

§schema: String
§target: String
§declared: Vec<String>

Trait Implementations§

Source§

impl Debug for SchemaLoadError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SchemaLoadError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for SchemaLoadError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.