Type Alias sc_client_db::DbStateBuilder

source ·
pub type DbStateBuilder<Hasher> = TrieBackendBuilder<Arc<dyn Storage<Hasher>>, Hasher>;
Expand description

Builder for DbState.

Aliased Type§

struct DbStateBuilder<Hasher> { /* private fields */ }

Implementations

source§

impl<S, H> TrieBackendBuilder<S, H>
where S: TrieBackendStorage<H>, H: Hasher,

source

pub fn new(storage: S, root: <H as Hasher>::Out) -> TrieBackendBuilder<S, H>

Create a new builder instance.

source§

impl<S, H, C, R> TrieBackendBuilder<S, H, C, R>
where S: TrieBackendStorage<H>, H: Hasher,

source

pub fn new_with_cache( storage: S, root: <H as Hasher>::Out, cache: C, ) -> TrieBackendBuilder<S, H, C, R>

Create a new builder instance.

source

pub fn wrap(other: &TrieBackend<S, H, C, R>) -> TrieBackendBuilder<&S, H, &C, R>

Wrap the given TrieBackend.

This can be used for example if all accesses to the trie should be recorded while some other functionality still uses the non-recording backend.

The backend storage and the cache will be taken from other.

source

pub fn with_optional_recorder( self, recorder: Option<R>, ) -> TrieBackendBuilder<S, H, C, R>

Use the given optional recorder for the to be configured TrieBackend.

source

pub fn with_recorder(self, recorder: R) -> TrieBackendBuilder<S, H, C, R>

Use the given recorder for the to be configured TrieBackend.

source

pub fn with_optional_cache<LC>( self, cache: Option<LC>, ) -> TrieBackendBuilder<S, H, LC, R>

Use the given optional cache for the to be configured TrieBackend.

source

pub fn with_cache<LC>(self, cache: LC) -> TrieBackendBuilder<S, H, LC, R>

Use the given cache for the to be configured TrieBackend.

source

pub fn build(self) -> TrieBackend<S, H, C, R>

Build the configured TrieBackend.