macro_rules! with_adapter {
($settings_provider:expr, |$A:ident| $body:expr) => { ... };
}Expand description
Dispatches a trie operation using the correct TrieKeyAdapter based on storage settings.
The first argument must implement
StorageSettingsCache. Inside the closure body, $A
is a type alias for either PackedKeyAdapter or LegacyKeyAdapter.
§Example
ⓘ
reth_trie_db::with_adapter!(provider, |A| {
let factory = DatabaseTrieCursorFactory::<_, A>::new(tx);
// ...
})