pub enum Error<'a, Env, ReturnType>where
Env: Environment,{
Link(LinkError),
Fault(Fault<'a, Env, ReturnType>),
}
Expand description
All errors that can be encountered executing Bud code.
Variants§
Link(LinkError)
An error occurred while linking an Module
.
Fault(Fault<'a, Env, ReturnType>)
A fault occurred while running the virtual machine.
Implementations§
source§impl<'a, Env, ReturnType> Error<'a, Env, ReturnType>where
Env: Environment,
impl<'a, Env, ReturnType> Error<'a, Env, ReturnType>where Env: Environment,
sourcepub fn expect_no_pause(self) -> Error<'static, Env, ReturnType>
pub fn expect_no_pause(self) -> Error<'static, Env, ReturnType>
Asserts that this error does not contain a paused execution. Returns an
Error
instance with a 'static
lifetime.
Panics
If this contains Error::Fault
with a kind of
FaultOrPause::Pause
, this function will panic. Paused execution
mutably borrows the virtual machine’s state.
Trait Implementations§
source§impl<Env, ReturnType> Clone for Error<'static, Env, ReturnType>where
Env: Environment,
impl<Env, ReturnType> Clone for Error<'static, Env, ReturnType>where Env: Environment,
source§impl<'a, Env, ReturnType: Debug> Debug for Error<'a, Env, ReturnType>where
Env: Environment + Debug,
impl<'a, Env, ReturnType: Debug> Debug for Error<'a, Env, ReturnType>where Env: Environment + Debug,
source§impl<'a, Env, ReturnType> Display for Error<'a, Env, ReturnType>where
Env: Environment,
impl<'a, Env, ReturnType> Display for Error<'a, Env, ReturnType>where Env: Environment,
source§impl<'a, Env, ReturnType> Error for Error<'a, Env, ReturnType>where
Env: Debug + Environment,
ReturnType: Debug,
impl<'a, Env, ReturnType> Error for Error<'a, Env, ReturnType>where Env: Debug + Environment, ReturnType: Debug,
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()