Enum cranelift_isle::error::Error
source · [−]pub enum Error {
IoError {
error: Arc<Error>,
context: String,
},
ParseError {
msg: String,
src: Source,
span: SourceSpan,
},
TypeError {
msg: String,
src: Source,
span: SourceSpan,
},
Errors(Vec<Error>),
}
Expand description
Errors produced by ISLE.
Variants
IoError
Fields
context: String
The context explaining what caused the I/O error.
An I/O error.
ParseError
Fields
msg: String
The error message.
src: Source
The input ISLE source.
span: SourceSpan
The location of the parse error.
The input ISLE source has a parse error.
TypeError
Fields
msg: String
The error message.
src: Source
The input ISLE source.
span: SourceSpan
The location of the type error.
The input ISLE source has a type error.
Errors(Vec<Error>)
Multiple errors.
Implementations
Trait Implementations
sourceimpl Diagnostic for Error
impl Diagnostic for Error
sourcefn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan>>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan>>>
Labels to apply to this Diagnostic’s Diagnostic::source_code
sourcefn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Source code to apply this Diagnostic’s Diagnostic::labels to.
Additional related Diagnostics.
sourcefn code(&'a self) -> Option<Box<dyn Display + 'a, Global>>
fn code(&'a self) -> Option<Box<dyn Display + 'a, Global>>
Unique diagnostic code that can be used to look up more information
about this Diagnostic. Ideally also globally unique, and documented in
the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz
) is recommended, but more classic codes like
E0123
or Enums will work just fine. Read more
sourcefn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
Diagnostic severity. This may be used by [ReportHandler]s to change the display format of this diagnostic. Read more
sourceimpl Error for Error
impl Error for Error
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more