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<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 From<WasmTrap> for FunctionCallError
impl From<WasmTrap> for FunctionCallError
Source§impl Ord for WasmTrap
impl Ord for WasmTrap
Source§impl PartialOrd for WasmTrap
impl PartialOrd for WasmTrap
Source§impl TryFrom<&String> for WasmTrap
impl TryFrom<&String> for WasmTrap
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<&str> for WasmTrap
impl TryFrom<&str> for WasmTrap
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§impl TryFrom<String> for WasmTrap
impl TryFrom<String> for WasmTrap
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
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.