Module layers

Source
Expand description

Useful layer implementations for the provider. Currently this module contains the AnvilLayer, AnvilProvider and ChainLayer types.

Structs§

AnvilLayeranvil-node
A layer that wraps an Anvil config.
AnvilProvideranvil-node
A provider that wraps an AnvilInstance, preventing the instance from being dropped while the provider is in use.
AsserterNon-WebAssembly
Container for pushing responses into the MockProvider.
CacheLayerNon-WebAssembly
A provider layer that caches RPC responses and serves them on subsequent requests.
CacheProviderNon-WebAssembly
The CacheProvider holds the underlying in-memory LRU cache and overrides methods from the Provider trait. It attempts to fetch from the cache and fallbacks to the RPC in case of a cache miss.
ChainLayer
A layer that wraps a NamedChain. The layer will be used to set the client’s poll interval based on the average block time for this chain.
MockLayerNon-WebAssembly
A mock provider layer that returns responses that have been pushed to the Asserter.
MockProviderNon-WebAssembly
A mock provider implementation that returns responses from the Asserter.
SharedCacheNon-WebAssembly
Shareable cache.

Enums§

MockErrorNon-WebAssembly
A MockProvider error.
MockResponseNon-WebAssembly
A mock response that can be pushed into the asserter.