pub enum LoadError {
NotFound {
spec: String,
},
Cycle {
path: Vec<ModuleName>,
},
Compile {
name: ModuleName,
error: Error,
},
}Expand description
Why a module graph could not be loaded. Every one of these is a compile-time failure: the imports are literals in the source, so they are resolved, compiled and instantiated before anything runs, and none of it can raise mid-evaluation.
Variants§
NotFound
The resolver did not answer this spec. Carries the spec as written, since the module it names has no canonical name to report.
Cycle
The imports form a cycle. path is the chain of canonical names that
closes it, importer before importee, ending with the name that repeats —
so [A, B, A] reads as “A imports B imports A”.
Fields
§
path: Vec<ModuleName>Compile
A module’s source did not compile, named by the module it came from.
Trait Implementations§
impl Eq for LoadError
impl StructuralPartialEq for LoadError
Auto Trait Implementations§
impl Freeze for LoadError
impl !RefUnwindSafe for LoadError
impl Send for LoadError
impl !Sync for LoadError
impl Unpin for LoadError
impl UnsafeUnpin for LoadError
impl !UnwindSafe for LoadError
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