# Trait ethcore::trace::Tracer [−] [src]

    pub trait Tracer: Send {
        fn prepare_trace_call(&self, params: &ActionParams) -> Option<Call>;
        fn prepare_trace_create(&self, params: &ActionParams) -> Option<Create>;
        fn prepare_trace_output(&self) -> Option<Bytes>;
        fn trace_call(&mut self,
                  call: Option<Call>,
                  gas_used: U256,
                  output: Option<Bytes>,
                  subs: Vec<FlatTrace>);
        fn trace_create(&mut self,
                    create: Option<Create>,
                    gas_used: U256,
                    code: Option<Bytes>,
                    address: Address,
                    subs: Vec<FlatTrace>);
        fn trace_failed_call(&mut self,
                         call: Option<Call>,
                         subs: Vec<FlatTrace>,
                         error: TraceError);
        fn trace_failed_create(&mut self,
                           create: Option<Create>,
                           subs: Vec<FlatTrace>,
                           error: TraceError);
        fn trace_suicide(&mut self,
                     address: Address,
                     balance: U256,
                     refund_address: Address);
        fn subtracer(&self) -> Self where Self: Sized;
        fn traces(self) -> Vec<FlatTrace>;
    }

This trait is used by executive to build traces.

## Required Methods

### `fn prepare_trace_call(&self, params: &ActionParams) -> Option<Call>`

Prepares call trace for given params. Noop tracer should return None.

### `fn prepare_trace_create(&self, params: &ActionParams) -> Option<Create>`

Prepares create trace for given params. Noop tracer should return None.

### `fn prepare_trace_output(&self) -> Option<Bytes>`

Prepare trace output. Noop tracer should return None.

### `fn trace_call(&mut self,
call: Option<Call>,
gas_used: U256,
output: Option<Bytes>,
subs: Vec<FlatTrace>)`

Stores trace call info.

### `fn trace_create(&mut self,
create: Option<Create>,
gas_used: U256,
code: Option<Bytes>,
address: Address,
subs: Vec<FlatTrace>)`

Stores trace create info.

### `fn trace_failed_call(&mut self,
call: Option<Call>,
subs: Vec<FlatTrace>,
error: TraceError)`

Stores failed call trace.

### `fn trace_failed_create(&mut self,
create: Option<Create>,
subs: Vec<FlatTrace>,
error: TraceError)`

Stores failed create trace.

### `fn trace_suicide(&mut self,
address: Address,
balance: U256,
refund_address: Address)`

Stores suicide info.

### `fn subtracer(&self) -> Self where Self: Sized`

Spawn subtracer which will be used to trace deeper levels of execution.

### `fn traces(self) -> Vec<FlatTrace>`

Consumes self and returns all traces.

## Implementors

- `impl Tracer for ExecutiveTracer`
- `impl Tracer for NoopTracer`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)