#[non_exhaustive]pub enum Error {
Show 14 variants
Busy(String),
Unsupported(String),
DeviceLost(String),
Backend {
backend: &'static str,
operation: &'static str,
code: i32,
message: Box<str>,
},
Execution {
source: Arc<Error>,
},
Cancelled,
Message(String),
Compile {
message: String,
diagnostics: Vec<Diagnostic>,
report: Option<Box<Value>>,
},
Io(Error),
Json(Error),
Library(Error),
Download(Box<Error>),
Runtime {
context: String,
code: i32,
message: String,
},
Context {
context: String,
source: Box<Error>,
},
}Expand description
A runtime, validation, provisioning or compiler failure.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Busy(String)
A mapped allocation or exhausted prepared run capacity prevents submission.
Unsupported(String)
Hardware or the selected native runtime cannot provide a requested capability.
DeviceLost(String)
A device failure left memory contents or completion uncertain.
Backend
A native backend failure with its original status code.
Fields
Execution
A retained asynchronous failure, shared by completion observers.
Cancelled
Work was cancelled before completion.
Message(String)
Invalid input or a contextual diagnostic.
Compile
Structured diagnostics from a failed Loom compiler invocation.
Fields
diagnostics: Vec<Diagnostic>Complete structured diagnostics.
Io(Error)
An operating-system failure, preserving its error kind and source.
Json(Error)
Invalid JSON, preserving the parser’s location and source.
Library(Error)
A dynamic library or symbol could not be loaded.
Download(Box<Error>)
A network provisioning failure.
Runtime
Legacy native status retained for source compatibility. The native 0.8 runtime reports structured errors through other variants.
Fields
Context
Adds context while preserving an underlying failure.
Implementations§
Source§impl Error
impl Error
Sourcepub fn compiler_diagnostics(&self) -> Option<&[Diagnostic]>
pub fn compiler_diagnostics(&self) -> Option<&[Diagnostic]>
Structured compiler diagnostics through any contextual wrappers.
Sourcepub fn compiler_report(&self) -> Option<&Value>
pub fn compiler_report(&self) -> Option<&Value>
Compiler report retained from a failed invocation, when requested.
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more