pub struct Backtrace { /* private fields */ }
Expand description
Runtime description derived from a VM error.
Implementations
sourceimpl Backtrace
impl Backtrace
sourcepub fn from_vm_error<S>(
vm: &Interpreter<S>,
result: ScriptExecutionResult
) -> Self
pub fn from_vm_error<S>(
vm: &Interpreter<S>,
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 fn memory(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
pub fn memory(&self) -> &[u8]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Memory of the VM 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 tx(&self) -> &CheckedTransaction
pub const fn tx(&self) -> &CheckedTransaction
fuel_tx::Transaction
state when the error occurred.
sourcepub fn into_inner(
self
) -> (Vec<CallFrame>, ContractId, [Word; 64], Vec<u8>, ScriptExecutionResult, CheckedTransaction)
pub fn into_inner(
self
) -> (Vec<CallFrame>, ContractId, [Word; 64], Vec<u8>, ScriptExecutionResult, CheckedTransaction)
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more