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.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Backtrace
impl Send for Backtrace
impl Sync for Backtrace
impl Unpin for Backtrace
impl UnwindSafe for Backtrace
Blanket Implementations§
source§impl<T> AnyDebug for Twhere
T: Any + Debug,
impl<T> AnyDebug for Twhere T: Any + Debug,
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.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