pub trait DebugInfoExt: Sized {
    // Required method
    fn debug_events(&self) -> Box<dyn Iterator<Item = DebugItem<'_>> + '_>;

    // Provided methods
    fn print_debug(self, level: DebugOutputKind) -> Self { ... }
    fn print_emitted_events(self) -> Self { ... }
    fn host_calls(&self) -> Box<dyn Iterator<Item = HostCallInfo<'_>> + '_> { ... }
    fn emitted_debug_prints(
        &self
    ) -> Box<dyn Iterator<Item = (ContractAddress, &EmittedDebugStatement)> + '_> { ... }
    fn host_calls_summary(
        &self
    ) -> BTreeMap<ContractAddress, BTreeMap<HostFunctionV1, (usize, InterpreterEnergy)>> { ... }
    fn host_calls_summary_per_entrypoint(
        &self
    ) -> BTreeMap<(ContractAddress, EntrypointName<'_>), BTreeMap<HostFunctionV1, (usize, InterpreterEnergy)>> { ... }
}
Expand description

A trait implemented by types which can extract debug information from contract receive entrypoint executions.

Required Methods§

source

fn debug_events(&self) -> Box<dyn Iterator<Item = DebugItem<'_>> + '_>

Get an iterator over all the debug traces emitted by the execution.

Provided Methods§

source

fn print_debug(self, level: DebugOutputKind) -> Self

Print the desired level of debug information that was recorded. This function is meant to be used in a method-chaining style.

source

fn print_emitted_events(self) -> Self

Print (to stderr) all the events generated by concordium_dbg! statements.

source

fn host_calls(&self) -> Box<dyn Iterator<Item = HostCallInfo<'_>> + '_>

Get an iterator over all host calls that have occurred, both in the remaining trace and in the rolled back part.

source

fn emitted_debug_prints( &self ) -> Box<dyn Iterator<Item = (ContractAddress, &EmittedDebugStatement)> + '_>

Get an iterator over all the emitted concordium_dbg! events.

source

fn host_calls_summary( &self ) -> BTreeMap<ContractAddress, BTreeMap<HostFunctionV1, (usize, InterpreterEnergy)>>

Get host function calls grouped by contract address that generated them. The value at each address and host function is the pair of the number of times the host function was called, and the total amount of interpreter energy that was used by all the calls.

source

fn host_calls_summary_per_entrypoint( &self ) -> BTreeMap<(ContractAddress, EntrypointName<'_>), BTreeMap<HostFunctionV1, (usize, InterpreterEnergy)>>

Get host function calls grouped by contract address and entrypoint that generated them. The value at each address and host function is the pair of the number of times the host function was called, and the total amount of interpreter energy that was used by all the calls.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl DebugInfoExt for Result<ContractInvokeSuccess, ContractInvokeError>

source§

fn debug_events(&self) -> Box<dyn Iterator<Item = DebugItem<'_>> + '_>

Implementors§