pub struct Backtrace { /* private fields */ }
Expand description
Runtime description derived from a VM error.
Implementations§
source§impl Backtrace
impl Backtrace
sourcepub fn from_vm_error<S, Tx>(
vm: &Interpreter<S, Tx>,
result: ScriptExecutionResult
) -> Self
pub fn from_vm_error<S, Tx>(
vm: &Interpreter<S, Tx>,
result: ScriptExecutionResult
) -> Self
Create a backtrace from a vm instance and instruction result.
This isn’t copy-free and shouldn’t be provided by default.
sourcepub fn call_stack(&self) -> &[CallFrame]
pub fn call_stack(&self) -> &[CallFrame]
Call stack of the VM when the error occurred.
sourcepub const fn contract(&self) -> &ContractId
pub const fn contract(&self) -> &ContractId
Last contract of the context when the error occurred.
sourcepub const fn result(&self) -> &ScriptExecutionResult
pub const fn result(&self) -> &ScriptExecutionResult
ScriptExecutionResult
of the error that caused this backtrace.
sourcepub const fn initial_balances(&self) -> &InitialBalances
pub const fn initial_balances(&self) -> &InitialBalances
The initial balances.
sourcepub fn into_inner(
self
) -> (Vec<CallFrame>, ContractId, [Word; 64], Vec<u8>, ScriptExecutionResult, InitialBalances)
pub fn into_inner(
self
) -> (Vec<CallFrame>, ContractId, [Word; 64], Vec<u8>, ScriptExecutionResult, InitialBalances)
Expose the internal attributes of the backtrace.