Skip to main content

IntoRootProvider

Trait IntoRootProvider 

Source
pub trait IntoRootProvider<N: Network = Ethereum> {
    // Required method
    fn into_root_provider(
        self,
    ) -> impl Future<Output = Result<RootProvider<N>, Error>> + Send;
}
Expand description

Conversion trait for types that can be turned into an Alloy RootProvider.

This is primarily used by RobustProviderBuilder to accept different provider types and connection strings.

Required Methods§

Source

fn into_root_provider( self, ) -> impl Future<Output = Result<RootProvider<N>, Error>> + Send

Convert self into a RootProvider.

§Errors

Returns an error if the underlying provider cannot be constructed or connected.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<F, P, N> IntoRootProvider<N> for FillProvider<F, P, N>
where F: TxFiller<N>, P: Provider<N>, N: Network,

Source§

impl<N> IntoRootProvider<N> for DynProvider<N>
where N: Network,

Source§

impl<N: Network> IntoRootProvider<N> for &str

Source§

impl<N: Network> IntoRootProvider<N> for RootProvider<N>

Source§

impl<N: Network> IntoRootProvider<N> for Url

Source§

impl<P, N> IntoRootProvider<N> for CallBatchProvider<P, N>
where P: Provider<N> + 'static, N: Network,

Source§

impl<P, N> IntoRootProvider<N> for CacheProvider<P, N>
where P: Provider<N>, N: Network,

Implementors§