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

    pub trait Database {
        fn tracing_enabled(&self) -> bool;
        fn import(&self, batch: &mut DBTransaction, request: ImportRequest);
        fn trace(&self,
             block_number: BlockNumber,
             tx_position: usize,
             trace_position: Vec<usize>)
             -> Option<LocalizedTrace>;
        fn transaction_traces(&self,
                          block_number: BlockNumber,
                          tx_position: usize)
                          -> Option<Vec<LocalizedTrace>>;
        fn block_traces(&self, block_number: BlockNumber) -> Option<Vec<LocalizedTrace>>;
        fn filter(&self, filter: &Filter) -> Vec<LocalizedTrace>;
    }

Db provides an interface to query tracesdb.

## Required Methods

### `fn tracing_enabled(&self) -> bool`

Returns true if tracing is enabled. Otherwise false.

### `fn import(&self, batch: &mut DBTransaction, request: ImportRequest)`

Imports new block traces.

### `fn trace(&self,
block_number: BlockNumber,
tx_position: usize,
trace_position: Vec<usize>)
-> Option<LocalizedTrace>`

Returns localized trace at given position.

### `fn transaction_traces(&self,
block_number: BlockNumber,
tx_position: usize)
-> Option<Vec<LocalizedTrace>>`

Returns localized traces created by a single transaction.

### `fn block_traces(&self, block_number: BlockNumber) -> Option<Vec<LocalizedTrace>>`

Returns localized traces created in given block.

### `fn filter(&self, filter: &Filter) -> Vec<LocalizedTrace>`

Filter traces matching given filter.

## Implementors

- `impl<T> TraceDatabase for TraceDB<T> where T: DatabaseExtras`

# 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`)