#[non_exhaustive]pub enum Error {
InvalidIr(ValidationErrors),
ModuleNameClash {
first: String,
second: String,
rust_name: String,
},
UnknownModule {
option: &'static str,
name: String,
},
InvalidModuleName {
name: String,
},
DuplicateBuild {
label: String,
},
InvalidBuildLabel {
label: String,
},
UnknownBuild {
label: String,
},
BuildsDiffer(Box<BuildsDiffer>),
}Expand description
Why Generator::generate failed.
Messages name the module, item or build involved.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidIr(ValidationErrors)
The IR failed validation.
ModuleNameClash
Two IR modules would get the same Rust module name.
Fields
UnknownModule
Generator::module_name or
Generator::accept_build names a
module that isn’t in the IR.
Fields
InvalidModuleName
Generator::module_name was given a
name that isn’t a valid Rust module name.
DuplicateBuild
Two builds have the same label, or labels that make the same Build
variant.
InvalidBuildLabel
A build’s label isn’t lowercase letters, digits and single underscores, starting with a letter.
UnknownBuild
Generator::accept_build names a
build label no IR has.
BuildsDiffer(Box<BuildsDiffer>)
Two builds’ IRs disagree on a type, a function’s signature or a global’s type, so one set of bindings can’t fit both.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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 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