pub enum ModuleErrorKind {
FileNotFound {
module_name: String,
candidates: Vec<PathBuf>,
},
CyclicDependency {
cycle: Vec<String>,
},
DuplicateModule {
module_name: String,
},
ParseErrors {
file: PathBuf,
messages: Vec<String>,
},
TypeErrors {
file: PathBuf,
messages: Vec<String>,
},
CompileErrors {
file: PathBuf,
messages: Vec<String>,
},
Io {
path: PathBuf,
message: String,
},
}Expand description
The underlying variant of a module resolution error.
Variants§
FileNotFound
A mod foo; declaration could not be resolved to a source file.
CyclicDependency
A cycle was detected in the module dependency graph.
DuplicateModule
A module was declared more than once in the same parent module.
ParseErrors
The parser encountered errors in a module source file.
TypeErrors
Type errors encountered during module type checking.
CompileErrors
Compilation errors encountered during module code generation.
Io
An I/O error occurred while reading a source file.
Implementations§
Source§impl ModuleErrorKind
impl ModuleErrorKind
Sourcepub fn at(self, span: Span, file: PathBuf) -> ModuleError
pub fn at(self, span: Span, file: PathBuf) -> ModuleError
Attaches a source span and file path to this error kind,
producing a ModuleError.
Trait Implementations§
Source§impl Debug for ModuleErrorKind
impl Debug for ModuleErrorKind
Source§impl Display for ModuleErrorKind
impl Display for ModuleErrorKind
Source§impl Error for ModuleErrorKind
impl Error for ModuleErrorKind
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ModuleErrorKind
impl RefUnwindSafe for ModuleErrorKind
impl Send for ModuleErrorKind
impl Sync for ModuleErrorKind
impl Unpin for ModuleErrorKind
impl UnsafeUnpin for ModuleErrorKind
impl UnwindSafe for ModuleErrorKind
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
Mutably borrows from an owned value. Read more