#[non_exhaustive]pub enum ModuleError {
Show 15 variants
NotFound {
path: Vec<String>,
searched: Vec<PathBuf>,
},
CircularImport {
cycle: Vec<Vec<String>>,
},
ImportConflict {
name: String,
module1: Vec<String>,
module2: Vec<String>,
},
PrivatePredicate {
name: String,
module: Vec<String>,
},
PredicateNotFound {
name: String,
module: Vec<String>,
},
UnsupportedImportedContent {
module: Vec<String>,
constructs: Vec<String>,
},
HiddenDependency {
module: Vec<String>,
export: String,
dependency: String,
},
AmbiguousModulePath {
path: Vec<String>,
candidates: Vec<PathBuf>,
},
IncompatiblePredicateDeclaration {
name: String,
module1: Vec<String>,
module2: Vec<String>,
},
IncompatibleDomainDeclaration {
name: String,
module1: Vec<String>,
module2: Vec<String>,
},
DuplicateImportedFunction {
name: String,
module: Vec<String>,
},
ConflictingPredicateVisibility {
name: String,
module: Vec<String>,
},
IncompatibleInferredPredicateSchema {
name: String,
arity: usize,
column: usize,
type1: ScalarType,
type2: ScalarType,
module1: Vec<String>,
module2: Vec<String>,
source1: Box<PathBuf>,
source2: Box<PathBuf>,
},
PredicateSchemaInferenceFailed {
name: String,
arity: usize,
module: Vec<String>,
source: Box<PathBuf>,
message: String,
},
ParseError {
path: PathBuf,
message: String,
},
}Expand description
Errors that can occur during module resolution
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound
Module file not found
Fields
CircularImport
Circular import detected
ImportConflict
Conflicting definitions for an imported function.
Fields
PrivatePredicate
Attempted to import private predicate
Fields
PredicateNotFound
Selected item not exported by a module
Fields
UnsupportedImportedContent
An imported module contains program-level constructs that are entry-only.
Fields
HiddenDependency
An exported item depends on module-local support that the import filters out.
Fields
AmbiguousModulePath
A context-free API request used a logical path that names several loaded files.
Fields
IncompatiblePredicateDeclaration
A declaration in the entry program or a selected public declaration in its resolved imports conflicts with another participating declaration.
Fields
IncompatibleDomainDeclaration
The entry program or imported modules define one domain alias with incompatible scalar types.
Fields
DuplicateImportedFunction
An imported module defines one exported function name more than once.
Fields
ConflictingPredicateVisibility
An imported module declares one predicate as both public and private.
Fields
IncompatibleInferredPredicateSchema
Separate source programs contribute clauses for one undeclared predicate signature with incompatible inferred column types.
Fields
type1: ScalarTypeType inferred from the first contribution.
type2: ScalarTypeType inferred from the conflicting contribution.
PredicateSchemaInferenceFailed
A clause contains invalid type evidence while module resolution is inferring an undeclared predicate signature.
Fields
ParseError
Parse error in module
Trait Implementations§
Source§impl Clone for ModuleError
impl Clone for ModuleError
Source§fn clone(&self) -> ModuleError
fn clone(&self) -> ModuleError
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 ModuleError
impl Debug for ModuleError
Source§impl Display for ModuleError
impl Display for ModuleError
Source§impl Error for ModuleError
impl Error for ModuleError
1.30.0 · 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()