pub enum FunctionCallError {
CompilationError(CompilationError),
LinkError {
msg: String,
},
MethodResolveError(MethodResolveError),
WasmTrap(WasmTrap),
HostError(HostError),
}
Expand description
Permitted errors that cause a function call to fail gracefully.
Occurrence of such errors will be included in the merklize state on chain using a single bit to signal failure vs Success.
See the doc comment on VMResult
for an explanation what the difference
between this and a VMRunnerError
is. And see PartialExecutionStatus
for what gets stored on chain.
Variants§
CompilationError(CompilationError)
Wasm compilation error
LinkError
Wasm binary env link error
MethodResolveError(MethodResolveError)
Import/export resolve error
WasmTrap(WasmTrap)
A trap happened during execution of a binary
HostError(HostError)
Trait Implementations§
Source§impl Debug for FunctionCallError
impl Debug for FunctionCallError
Source§impl Display for FunctionCallError
impl Display for FunctionCallError
Source§impl<'_derivative_strum> From<&'_derivative_strum FunctionCallError> for &'static str
impl<'_derivative_strum> From<&'_derivative_strum FunctionCallError> for &'static str
Source§fn from(x: &'_derivative_strum FunctionCallError) -> &'static str
fn from(x: &'_derivative_strum FunctionCallError) -> &'static str
Source§impl From<FunctionCallError> for &'static str
impl From<FunctionCallError> for &'static str
Source§fn from(x: FunctionCallError) -> &'static str
fn from(x: FunctionCallError) -> &'static str
Source§impl From<PrepareError> for FunctionCallError
impl From<PrepareError> for FunctionCallError
Source§fn from(err: PrepareError) -> Self
fn from(err: PrepareError) -> Self
Source§impl PartialEq for FunctionCallError
impl PartialEq for FunctionCallError
Source§impl TryFrom<VMLogicError> for FunctionCallError
Try to convert a general error that happened at the VMLogic
level to a
FunctionCallError
that can be included in a VMOutcome
.
impl TryFrom<VMLogicError> for FunctionCallError
Try to convert a general error that happened at the VMLogic
level to a
FunctionCallError
that can be included in a VMOutcome
.
VMLogicError
have two very different types of errors. Some are just
a result from the guest code doing incorrect things, other are bugs in
unc-infra.
The first type can be converted to a FunctionCallError
, the other becomes
a VMRunnerError
instead and must be treated differently.
Source§type Error = VMRunnerError
type Error = VMRunnerError
impl Eq for FunctionCallError
impl StructuralPartialEq for FunctionCallError
Auto Trait Implementations§
impl Freeze for FunctionCallError
impl RefUnwindSafe for FunctionCallError
impl Send for FunctionCallError
impl Sync for FunctionCallError
impl Unpin for FunctionCallError
impl UnwindSafe for FunctionCallError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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