pub enum Error {
MainNotExposed {
exposing: NodeSpan,
declared: Option<NodeSpan>,
},
MainNotTask {
found: Option<Type>,
annotation: NodeSpan,
},
}Expand description
What is wrong with the module a manifest’s main names.
Variants§
MainNotExposed
The module exposes no value called main.
Fields
§
exposing: NodeSpanThe module’s exposing (...), which is what has to change.
MainNotTask
The module exposes main, and its type is not Task ().
Fields
§
found: Option<Type>The type main was judged to have: the one inference solved, or, when the typer
marked main unchecked rather than failing it, the one its annotation
declares. None only when the annotation cannot be read as a typer type, which
no annotation is today: typer::canonical_type_to_typer_type reads every
canonical type.
§
annotation: NodeSpanmain’s annotation, which every exposed value has
(An exposed declaration must be
annotated).
Trait Implementations§
Source§impl PhaseError for Error
impl PhaseError for Error
Source§fn message(&self) -> String
fn message(&self) -> String
One line naming what went wrong, in the vocabulary of the user’s source. Read more
Source§fn notes(&self) -> Vec<String>
fn notes(&self) -> Vec<String>
Supporting detail, one string per rendered note. Empty by default.
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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