pub enum PrepareError {
Serialization,
Deserialization,
InternalMemoryDeclared,
GasInstrumentation,
StackHeightInstrumentation,
Instantiate,
Memory,
TooManyFunctions,
TooManyLocals,
}
Expand description
Error that can occur while preparing or executing Wasm smart-contract.
JSON schema
{
"description": "Error that can occur while preparing or executing Wasm smart-contract.",
"oneOf": [
{
"description": "Error happened while serializing the module.",
"type": "string",
"enum": [
"Serialization"
]
},
{
"description": "Error happened while deserializing the module.",
"type": "string",
"enum": [
"Deserialization"
]
},
{
"description": "Internal memory declaration has been found in the module.",
"type": "string",
"enum": [
"InternalMemoryDeclared"
]
},
{
"description": "Gas instrumentation failed.\n\nThis most likely indicates the module isn't valid.",
"type": "string",
"enum": [
"GasInstrumentation"
]
},
{
"description": "Stack instrumentation failed.\n\nThis most likely indicates the module isn't valid.",
"type": "string",
"enum": [
"StackHeightInstrumentation"
]
},
{
"description": "Error happened during instantiation.\n\nThis might indicate that `start` function trapped, or module isn't\ninstantiable and/or un-linkable.",
"type": "string",
"enum": [
"Instantiate"
]
},
{
"description": "Error creating memory.",
"type": "string",
"enum": [
"Memory"
]
},
{
"description": "Contract contains too many functions.",
"type": "string",
"enum": [
"TooManyFunctions"
]
},
{
"description": "Contract contains too many locals.",
"type": "string",
"enum": [
"TooManyLocals"
]
}
]
}
Variants§
Serialization
Error happened while serializing the module.
Deserialization
Error happened while deserializing the module.
InternalMemoryDeclared
Internal memory declaration has been found in the module.
GasInstrumentation
Gas instrumentation failed.
This most likely indicates the module isn’t valid.
StackHeightInstrumentation
Stack instrumentation failed.
This most likely indicates the module isn’t valid.
Instantiate
Error happened during instantiation.
This might indicate that start
function trapped, or module isn’t
instantiable and/or un-linkable.
Memory
Error creating memory.
TooManyFunctions
Contract contains too many functions.
TooManyLocals
Contract contains too many locals.
Trait Implementations§
Source§impl Clone for PrepareError
impl Clone for PrepareError
Source§fn clone(&self) -> PrepareError
fn clone(&self) -> PrepareError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PrepareError
impl Debug for PrepareError
Source§impl<'de> Deserialize<'de> for PrepareError
impl<'de> Deserialize<'de> for PrepareError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for PrepareError
impl Display for PrepareError
Source§impl From<&PrepareError> for PrepareError
impl From<&PrepareError> for PrepareError
Source§fn from(value: &PrepareError) -> Self
fn from(value: &PrepareError) -> Self
Converts to this type from the input type.
Source§impl From<PrepareError> for CompilationError
impl From<PrepareError> for CompilationError
Source§fn from(value: PrepareError) -> Self
fn from(value: PrepareError) -> Self
Converts to this type from the input type.
Source§impl FromStr for PrepareError
impl FromStr for PrepareError
Source§impl Hash for PrepareError
impl Hash for PrepareError
Source§impl Ord for PrepareError
impl Ord for PrepareError
Source§fn cmp(&self, other: &PrepareError) -> Ordering
fn cmp(&self, other: &PrepareError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PrepareError
impl PartialEq for PrepareError
Source§impl PartialOrd for PrepareError
impl PartialOrd for PrepareError
Source§impl Serialize for PrepareError
impl Serialize for PrepareError
Source§impl TryFrom<&String> for PrepareError
impl TryFrom<&String> for PrepareError
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&str> for PrepareError
impl TryFrom<&str> for PrepareError
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for PrepareError
impl TryFrom<String> for PrepareError
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
impl Copy for PrepareError
impl Eq for PrepareError
impl StructuralPartialEq for PrepareError
Auto Trait Implementations§
impl Freeze for PrepareError
impl RefUnwindSafe for PrepareError
impl Send for PrepareError
impl Sync for PrepareError
impl Unpin for PrepareError
impl UnwindSafe for PrepareError
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.