pub enum WasmTrap {
Unreachable,
IncorrectCallIndirectSignature,
MemoryOutOfBounds,
CallIndirectOob,
IllegalArithmetic,
MisalignedAtomicAccess,
IndirectCallToNull,
StackOverflow,
GenericTrap,
}Expand description
A kind of a trap happened during execution of a binary
JSON schema
{
"description": "A kind of a trap happened during execution of a binary",
"oneOf": [
{
"description": "An `unreachable` opcode was executed.",
"type": "string",
"enum": [
"Unreachable"
]
},
{
"description": "Call indirect incorrect signature trap.",
"type": "string",
"enum": [
"IncorrectCallIndirectSignature"
]
},
{
"description": "Memory out of bounds trap.",
"type": "string",
"enum": [
"MemoryOutOfBounds"
]
},
{
"description": "Call indirect out of bounds trap.",
"type": "string",
"enum": [
"CallIndirectOOB"
]
},
{
"description": "An arithmetic exception, e.g. divided by zero.",
"type": "string",
"enum": [
"IllegalArithmetic"
]
},
{
"description": "Misaligned atomic access trap.",
"type": "string",
"enum": [
"MisalignedAtomicAccess"
]
},
{
"description": "Indirect call to null.",
"type": "string",
"enum": [
"IndirectCallToNull"
]
},
{
"description": "Stack overflow.",
"type": "string",
"enum": [
"StackOverflow"
]
},
{
"description": "Generic trap.",
"type": "string",
"enum": [
"GenericTrap"
]
}
]
}Variants§
Unreachable
An unreachable opcode was executed.
IncorrectCallIndirectSignature
Call indirect incorrect signature trap.
MemoryOutOfBounds
Memory out of bounds trap.
CallIndirectOob
Call indirect out of bounds trap.
IllegalArithmetic
An arithmetic exception, e.g. divided by zero.
MisalignedAtomicAccess
Misaligned atomic access trap.
IndirectCallToNull
Indirect call to null.
StackOverflow
Stack overflow.
GenericTrap
Generic trap.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for WasmTrap
impl<'de> Deserialize<'de> for WasmTrap
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WasmTrap, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WasmTrap, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<WasmTrap> for FunctionCallError
impl From<WasmTrap> for FunctionCallError
Source§fn from(value: WasmTrap) -> FunctionCallError
fn from(value: WasmTrap) -> FunctionCallError
Converts to this type from the input type.
Source§impl Ord for WasmTrap
impl Ord for WasmTrap
Source§impl PartialOrd for WasmTrap
impl PartialOrd for WasmTrap
Source§impl Serialize for WasmTrap
impl Serialize for WasmTrap
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
impl Copy for WasmTrap
impl Eq for WasmTrap
impl StructuralPartialEq for WasmTrap
Auto Trait Implementations§
impl Freeze for WasmTrap
impl RefUnwindSafe for WasmTrap
impl Send for WasmTrap
impl Sync for WasmTrap
impl Unpin for WasmTrap
impl UnwindSafe for WasmTrap
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.