alloy_provider

Trait ProviderLayer

source
pub trait ProviderLayer<P: Provider<T, N>, T: Transport + Clone, N: Network = Ethereum> {
    type Provider: Provider<T, N>;

    // Required method
    fn layer(&self, inner: P) -> Self::Provider;
}
Expand description

A layering abstraction in the vein of tower::Layer

Required Associated Types§

source

type Provider: Provider<T, N>

The provider constructed by this layer.

Required Methods§

source

fn layer(&self, inner: P) -> Self::Provider

Wrap the given provider in the layer’s provider.

Implementors§

source§

impl<L, R, P, T, N> ProviderLayer<P, T, N> for JoinFill<L, R>
where L: TxFiller<N>, R: TxFiller<N>, P: Provider<T, N>, T: Transport + Clone, N: Network,

source§

type Provider = FillProvider<JoinFill<L, R>, P, T, N>

source§

impl<P, T> ProviderLayer<P, T> for AnvilLayer
where P: Provider<T>, T: Transport + Clone,

Available on crate feature anvil-node only.
source§

impl<P, T> ProviderLayer<P, T> for ChainLayer
where P: Provider<T>, T: Transport + Clone,

source§

impl<P, T, N> ProviderLayer<P, T, N> for CacheLayer
where P: Provider<T, N>, T: Transport + Clone, N: Network,

Available on non-WebAssembly only.
source§

impl<P, T, N> ProviderLayer<P, T, N> for Identity
where T: Transport + Clone, N: Network, P: Provider<T, N>,

source§

impl<P, T, N, Inner, Outer> ProviderLayer<P, T, N> for Stack<Inner, Outer>
where T: Transport + Clone, N: Network, P: Provider<T, N>, Inner: ProviderLayer<P, T, N>, Outer: ProviderLayer<Inner::Provider, T, N>,

source§

type Provider = <Outer as ProviderLayer<<Inner as ProviderLayer<P, T, N>>::Provider, T, N>>::Provider