Skip to main content

ChainStorage

Trait ChainStorage 

Source
pub trait ChainStorage {
    // Required methods
    fn word(&self, address: &str, slot: &Word) -> Option<Word>;
    fn label(&self) -> &str;
}
Expand description

A chain a frontend can read storage from, for slots the trace never recorded.

The debugger never opens a connection; the frontend that has a node implements this and answers, and says in ChainStorage::label where the answer came from, so the value can be shown as what it is rather than as part of the recording.

Required Methods§

Source

fn word(&self, address: &str, slot: &Word) -> Option<Word>

The word at slot of address, or None when it could not be read.

Source

fn label(&self) -> &str

Where these words come from, as a user-facing phrase such as the chain at block 21000000.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> ChainStorage for CachedChain<F>
where F: Fn(&str, &Word) -> Option<Word>,