Enum scrypto_test::prelude::wasm::PrepareError
source · pub enum PrepareError {
Show 24 variants
DeserializationError,
ValidationError(String),
SerializationError,
StartFunctionNotAllowed,
InvalidImport(InvalidImport),
InvalidMemory(InvalidMemory),
InvalidTable(InvalidTable),
InvalidExportName(String),
TooManyTargetsInBrTable,
TooManyFunctions,
TooManyFunctionParams,
TooManyFunctionLocals {
max: u32,
actual: u32,
},
TooManyGlobals {
max: u32,
current: u32,
},
NoExportSection,
MissingExport {
export_name: String,
},
NoScryptoAllocExport,
NoScryptoFreeExport,
RejectedByInstructionMetering {
reason: String,
},
RejectedByStackMetering {
reason: String,
},
NotInstantiatable {
reason: String,
},
NotCompilable,
ModuleInfoError(String),
WasmParserError(String),
Overflow,
}
Expand description
Represents an error when validating a WASM file.
Variants§
DeserializationError
Failed to deserialize. See https://webassembly.github.io/spec/core/syntax/index.html
ValidationError(String)
Failed to validate See https://webassembly.github.io/spec/core/valid/index.html
SerializationError
Failed to serialize.
StartFunctionNotAllowed
The wasm module contains a start function.
InvalidImport(InvalidImport)
Invalid import section
InvalidMemory(InvalidMemory)
Invalid memory section
InvalidTable(InvalidTable)
Invalid table section
InvalidExportName(String)
Invalid export symbol name
TooManyTargetsInBrTable
Too many targets in the br_table
instruction
TooManyFunctions
Too many functions
TooManyFunctionParams
Too many function parameters
TooManyFunctionLocals
Too many function local variables
TooManyGlobals
Too many globals
NoExportSection
No export section
MissingExport
Missing export
NoScryptoAllocExport
The wasm module does not have the scrypto_alloc
export.
NoScryptoFreeExport
The wasm module does not have the scrypto_free
export.
RejectedByInstructionMetering
Failed to inject instruction metering
RejectedByStackMetering
Failed to inject stack metering
NotInstantiatable
Not instantiatable
NotCompilable
Not compilable
ModuleInfoError(String)
Wrap errors returned by WasmInstrument::ModuleInfoError It is wrapped to String, because it’s members cannot derive: Sbor, Eq and PartialEq
WasmParserError(String)
Wrap errors returned by wasmparser It is wrapped to String, because wasmparser error (BinaryReaderError) members cannot derive: Sbor, Eq and PartialEq
Overflow
An overflow occurred in some of the internal math
Trait Implementations§
source§impl<X> Categorize<X> for PrepareErrorwhere
X: CustomValueKind,
impl<X> Categorize<X> for PrepareErrorwhere
X: CustomValueKind,
fn value_kind() -> ValueKind<X>
source§impl Clone for PrepareError
impl Clone for PrepareError
source§fn clone(&self) -> PrepareError
fn clone(&self) -> PrepareError
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PrepareError
impl Debug for PrepareError
source§impl<D, X> Decode<X, D> for PrepareErrorwhere
D: Decoder<X>,
X: CustomValueKind,
impl<D, X> Decode<X, D> for PrepareErrorwhere
D: Decoder<X>,
X: CustomValueKind,
source§fn decode_body_with_value_kind(
decoder: &mut D,
value_kind: ValueKind<X>
) -> Result<PrepareError, DecodeError>
fn decode_body_with_value_kind( decoder: &mut D, value_kind: ValueKind<X> ) -> Result<PrepareError, DecodeError>
source§impl<C> Describe<C> for PrepareErrorwhere
C: CustomTypeKind<RustTypeId>,
impl<C> Describe<C> for PrepareErrorwhere
C: CustomTypeKind<RustTypeId>,
source§const TYPE_ID: RustTypeId = _
const TYPE_ID: RustTypeId = _
TYPE_ID
should give a unique identifier for its SBOR schema type.
An SBOR schema type capture details about the SBOR payload, how it should be interpreted, validated and displayed. Read moresource§fn type_data() -> TypeData<C, RustTypeId>
fn type_data() -> TypeData<C, RustTypeId>
source§fn add_all_dependencies(aggregator: &mut TypeAggregator<C>)
fn add_all_dependencies(aggregator: &mut TypeAggregator<C>)
get_local_type_data
, we need to ensure that the type and all of its own references
get added to the aggregator. Read moresource§impl<E, X> Encode<X, E> for PrepareErrorwhere
E: Encoder<X>,
X: CustomValueKind,
impl<E, X> Encode<X, E> for PrepareErrorwhere
E: Encoder<X>,
X: CustomValueKind,
source§fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>
fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>
source§fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>
fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>
source§impl From<PrepareError> for ExtractSchemaError
impl From<PrepareError> for ExtractSchemaError
source§fn from(value: PrepareError) -> ExtractSchemaError
fn from(value: PrepareError) -> ExtractSchemaError
source§impl PartialEq for PrepareError
impl PartialEq for PrepareError
source§fn eq(&self, other: &PrepareError) -> bool
fn eq(&self, other: &PrepareError) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<X> SborEnum<X> for PrepareErrorwhere
X: CustomValueKind,
impl<X> SborEnum<X> for PrepareErrorwhere
X: CustomValueKind,
fn get_discriminator(&self) -> u8
fn get_length(&self) -> usize
impl Eq for PrepareError
impl StructuralPartialEq for PrepareError
Auto Trait Implementations§
impl RefUnwindSafe for PrepareError
impl Send for PrepareError
impl Sync for PrepareError
impl Unpin for PrepareError
impl UnwindSafe for PrepareError
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.