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\n This most likely indicates the module isn't valid.",
"type": "string",
"enum": [
"GasInstrumentation"
]
},
{
"description": "Stack instrumentation failed.\n\n This most likely indicates the module isn't valid.",
"type": "string",
"enum": [
"StackHeightInstrumentation"
]
},
{
"description": "Error happened during instantiation.\n\n This might indicate that `start` function trapped, or module isn't\n instantiable 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§const fn clone_from(&mut self, source: &Self)
const 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<PrepareError, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PrepareError, <__D as Deserializer<'de>>::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) -> PrepareError
fn from(value: &PrepareError) -> PrepareError
Converts to this type from the input type.
Source§impl From<PrepareError> for CompilationError
impl From<PrepareError> for CompilationError
Source§fn from(value: PrepareError) -> CompilationError
fn from(value: PrepareError) -> CompilationError
Converts to this type from the input type.
Source§impl FromStr for PrepareError
impl FromStr for PrepareError
Source§type Err = ConversionError
type Err = ConversionError
The associated error which can be returned from parsing.
Source§fn from_str(value: &str) -> Result<PrepareError, ConversionError>
fn from_str(value: &str) -> Result<PrepareError, ConversionError>
Parses a string
s to return a value of this type. Read moreSource§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§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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§fn try_from(value: &String) -> Result<PrepareError, ConversionError>
fn try_from(value: &String) -> Result<PrepareError, ConversionError>
Performs the conversion.
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§fn try_from(value: &str) -> Result<PrepareError, ConversionError>
fn try_from(value: &str) -> Result<PrepareError, ConversionError>
Performs the conversion.
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§fn try_from(value: String) -> Result<PrepareError, ConversionError>
fn try_from(value: String) -> Result<PrepareError, ConversionError>
Performs the conversion.
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.