Enum soroban_wasmi::errors::InstantiationError
source · pub enum InstantiationError {
ImportsExternalsLenMismatch,
ImportsExternalsMismatch {
expected: ExternType,
actual: Extern,
},
SignatureMismatch {
expected: FuncType,
actual: FuncType,
},
Table(TableError),
Memory(MemoryError),
Global(GlobalError),
ElementSegmentDoesNotFit {
table: Table,
offset: u32,
amount: u32,
},
FoundStartFn {
index: u32,
},
TooManyInstances,
}
Expand description
An error that may occur upon instantiation of a Wasm module.
Variants§
ImportsExternalsLenMismatch
Caused when the number of required imports does not match the number of given externals upon module instantiation.
ImportsExternalsMismatch
Fields
expected: ExternType
The expected external value for the module import.
Caused when a given external value does not match the type of the required import for module instantiation.
SignatureMismatch
Fields
Caused when a function has a mismatching signature.
Table(TableError)
Occurs when an imported table does not satisfy the required table type.
Memory(MemoryError)
Occurs when an imported memory does not satisfy the required memory type.
Global(GlobalError)
Occurs when an imported global variable does not satisfy the required global type.
ElementSegmentDoesNotFit
Fields
Caused when an element segment does not fit into the specified table instance.
FoundStartFn
Caused when the start
function was unexpectedly found in the instantiated module.
TooManyInstances
Trait Implementations§
source§impl Debug for InstantiationError
impl Debug for InstantiationError
source§impl Display for InstantiationError
impl Display for InstantiationError
source§impl Error for InstantiationError
impl Error for InstantiationError
1.30.0 · 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
source§impl From<GlobalError> for InstantiationError
impl From<GlobalError> for InstantiationError
source§fn from(error: GlobalError) -> Self
fn from(error: GlobalError) -> Self
source§impl From<InstantiationError> for Error
impl From<InstantiationError> for Error
source§fn from(error: InstantiationError) -> Self
fn from(error: InstantiationError) -> Self
source§impl From<MemoryError> for InstantiationError
impl From<MemoryError> for InstantiationError
source§fn from(error: MemoryError) -> Self
fn from(error: MemoryError) -> Self
source§impl From<TableError> for InstantiationError
impl From<TableError> for InstantiationError
source§fn from(error: TableError) -> Self
fn from(error: TableError) -> Self
Auto Trait Implementations§
impl RefUnwindSafe for InstantiationError
impl Send for InstantiationError
impl Sync for InstantiationError
impl Unpin for InstantiationError
impl UnwindSafe for InstantiationError
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.