Struct ethers_providers::Provider
source · [−]pub struct Provider<P> { /* private fields */ }Expand description
An abstract provider for interacting with the Ethereum JSON RPC
API. Must be instantiated
with a data transport which implements the JsonRpcClient trait
(e.g. HTTP, Websockets etc.)
Example
use ethers_providers::{Middleware, Provider, Http};
use std::convert::TryFrom;
let provider = Provider::<Http>::try_from(
"https://mainnet.infura.io/v3/c60b0bb42f8a4c6481ecd229eddaca27"
).expect("could not instantiate HTTP Provider");
let block = provider.get_block(100u64).await?;
println!("Got block: {}", serde_json::to_string(&block)?);Implementations
sourceimpl<P: JsonRpcClient> Provider<P>
impl<P: JsonRpcClient> Provider<P>
sourcepub async fn node_client(&self) -> Result<NodeClient, ProviderError>
pub async fn node_client(&self) -> Result<NodeClient, ProviderError>
Returns the type of node we’re connected to, while also caching the value for use in other node-specific API calls, such as the get_block_receipts call.
pub fn with_sender(self, address: impl Into<Address>) -> Self
pub async fn request<T, R>(
&self,
method: &str,
params: T
) -> Result<R, ProviderError> where
T: Debug + Serialize + Send + Sync,
R: Serialize + DeserializeOwned + Debug,
sourcepub fn call_raw<'a>(&'a self, tx: &'a TypedTransaction) -> CallBuilder<'a, P>ⓘNotable traits for CallBuilder<'a, P>impl<'a, P: JsonRpcClient> Future for CallBuilder<'a, P> type Output = Result<Bytes, ProviderError>;
pub fn call_raw<'a>(&'a self, tx: &'a TypedTransaction) -> CallBuilder<'a, P>ⓘNotable traits for CallBuilder<'a, P>impl<'a, P: JsonRpcClient> Future for CallBuilder<'a, P> type Output = Result<Bytes, ProviderError>;
Analogous to Middleware::call, but returns a CallBuilder that can either be
.awaitd or used to override the parameters sent to eth_call.
See the call_raw::spoof for functions to construct state override parameters.
Note: this method does not send a transaction from your account
Example
let geth = Geth::new().spawn();
let provider = Provider::<Http>::try_from(geth.endpoint()).unwrap();
let adr1: Address = "0x6fC21092DA55B392b045eD78F4732bff3C580e2c".parse()?;
let adr2: Address = "0x295a70b2de5e3953354a6a8344e616ed314d7251".parse()?;
let pay_amt = parse_ether(1u64)?;
// Not enough ether to pay for the transaction
let tx = TransactionRequest::pay(adr2, pay_amt).from(adr1).into();
// override the sender's balance for the call
let mut state = spoof::balance(adr1, pay_amt * 2);
provider.call_raw(&tx).state(&state).await?;sourceimpl<P: JsonRpcClient> Provider<P>
impl<P: JsonRpcClient> Provider<P>
sourcepub fn interval<T: Into<Duration>>(self, interval: T) -> Self
pub fn interval<T: Into<Duration>>(self, interval: T) -> Self
Sets the default polling interval for event filters and pending transactions (default: 7 seconds)
sourcepub fn get_interval(&self) -> Duration
pub fn get_interval(&self) -> Duration
Gets the polling interval which the provider currently uses for event filters and pending transactions (default: 7 seconds)
sourceimpl Provider<Ws>
impl Provider<Ws>
sourcepub async fn connect(
url: impl IntoClientRequest + Unpin
) -> Result<Self, ProviderError>
pub async fn connect(
url: impl IntoClientRequest + Unpin
) -> Result<Self, ProviderError>
Direct connection to a websocket endpoint
pub async fn connect_with_auth(
url: impl IntoClientRequest + Unpin,
auth: Authorization
) -> Result<Self, ProviderError>
sourceimpl Provider<Ipc>
impl Provider<Ipc>
sourcepub async fn connect_ipc(path: impl AsRef<Path>) -> Result<Self, ProviderError>
pub async fn connect_ipc(path: impl AsRef<Path>) -> Result<Self, ProviderError>
Direct connection to an IPC socket.
sourceimpl<Read, Write> Provider<RwClient<Read, Write>> where
Read: JsonRpcClient + 'static,
<Read as JsonRpcClient>::Error: Sync + Send + 'static,
Write: JsonRpcClient + 'static,
<Write as JsonRpcClient>::Error: Sync + Send + 'static,
impl<Read, Write> Provider<RwClient<Read, Write>> where
Read: JsonRpcClient + 'static,
<Read as JsonRpcClient>::Error: Sync + Send + 'static,
Write: JsonRpcClient + 'static,
<Write as JsonRpcClient>::Error: Sync + Send + 'static,
sourceimpl<T: JsonRpcClientWrapper> Provider<QuorumProvider<T>>
impl<T: JsonRpcClientWrapper> Provider<QuorumProvider<T>>
sourcepub fn quorum(inner: QuorumProvider<T>) -> Self
pub fn quorum(inner: QuorumProvider<T>) -> Self
Provider that uses a quorum
sourceimpl Provider<MockProvider>
impl Provider<MockProvider>
sourcepub fn mocked() -> (Self, MockProvider)
pub fn mocked() -> (Self, MockProvider)
Returns a Provider instantiated with an internal “mock” transport.
Example
use ethers_core::types::U64;
use ethers_providers::{Middleware, Provider};
// Instantiate the provider
let (provider, mock) = Provider::mocked();
// Push the mock response
mock.push(U64::from(12))?;
// Make the call
let blk = provider.get_block_number().await.unwrap();
// The response matches
assert_eq!(blk.as_u64(), 12);
// and the request as well!
mock.assert_request("eth_blockNumber", ()).unwrap();sourceimpl Provider<RetryClient<HttpProvider>>
impl Provider<RetryClient<HttpProvider>>
pub fn new_client(
src: &str,
max_retry: u32,
initial_backoff: u64
) -> Result<Self, ParseError>
Trait Implementations
sourceimpl<P: JsonRpcClient> CeloMiddleware for Provider<P>
impl<P: JsonRpcClient> CeloMiddleware for Provider<P>
sourceimpl<P: JsonRpcClient> Middleware for Provider<P>
impl<P: JsonRpcClient> Middleware for Provider<P>
sourcefn client_version<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn client_version<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<String, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns the current client version using the web3_clientVersion RPC.
sourcefn get_block_number<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<U64, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_number<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<U64, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Gets the latest block number via the eth_BlockNumber API
sourcefn get_block<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<Option<Block<TxHash>>, Self::Error>> + Send + 'async_trait>> where
T: 'async_trait + Into<BlockId> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn get_block<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<Option<Block<TxHash>>, Self::Error>> + Send + 'async_trait>> where
T: 'async_trait + Into<BlockId> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Gets the block at block_hash_or_number (transaction hashes only)
sourcefn get_block_with_txs<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<Option<Block<Transaction>>, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<BlockId> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_with_txs<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<Option<Block<Transaction>>, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<BlockId> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Gets the block at block_hash_or_number (full transactions included)
sourcefn get_uncle_count<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>> where
T: 'async_trait + Into<BlockId> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn get_uncle_count<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<U256, Self::Error>> + Send + 'async_trait>> where
T: 'async_trait + Into<BlockId> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Gets the block uncle count at block_hash_or_number
sourcefn get_uncle<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T,
idx: U64
) -> Pin<Box<dyn Future<Output = Result<Option<Block<H256>>, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<BlockId> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn get_uncle<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T,
idx: U64
) -> Pin<Box<dyn Future<Output = Result<Option<Block<H256>>, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<BlockId> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Gets the block uncle at block_hash_or_number and idx
sourcefn get_transaction<'life0, 'async_trait, T>(
&'life0 self,
transaction_hash: T
) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Send + Sync + Into<TxHash>,
'life0: 'async_trait,
Self: 'async_trait,
fn get_transaction<'life0, 'async_trait, T>(
&'life0 self,
transaction_hash: T
) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Send + Sync + Into<TxHash>,
'life0: 'async_trait,
Self: 'async_trait,
Gets the transaction with transaction_hash
sourcefn get_transaction_receipt<'life0, 'async_trait, T>(
&'life0 self,
transaction_hash: T
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionReceipt>, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Send + Sync + Into<TxHash>,
'life0: 'async_trait,
Self: 'async_trait,
fn get_transaction_receipt<'life0, 'async_trait, T>(
&'life0 self,
transaction_hash: T
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionReceipt>, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Send + Sync + Into<TxHash>,
'life0: 'async_trait,
Self: 'async_trait,
Gets the transaction receipt with transaction_hash
sourcefn get_block_receipts<'life0, 'async_trait, T>(
&'life0 self,
block: T
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt>, Self::Error>> + Send + 'async_trait>> where
T: 'async_trait + Into<BlockNumber> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn get_block_receipts<'life0, 'async_trait, T>(
&'life0 self,
block: T
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt>, Self::Error>> + Send + 'async_trait>> where
T: 'async_trait + Into<BlockNumber> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Returns all receipts for a block.
Note that this uses the eth_getBlockReceipts RPC, which is
non-standard and currently supported by Erigon.
sourcefn parity_block_receipts<'life0, 'async_trait, T>(
&'life0 self,
block: T
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt>, Self::Error>> + Send + 'async_trait>> where
T: 'async_trait + Into<BlockNumber> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn parity_block_receipts<'life0, 'async_trait, T>(
&'life0 self,
block: T
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt>, Self::Error>> + Send + 'async_trait>> where
T: 'async_trait + Into<BlockNumber> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Returns all receipts for that block. Must be done on a parity node.
sourcefn get_gas_price<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_gas_price<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Gets the current gas price as estimated by the node
sourcefn estimate_eip1559_fees<'life0, 'async_trait>(
&'life0 self,
estimator: Option<fn(_: U256, _: Vec<Vec<U256>>) -> (U256, U256)>
) -> Pin<Box<dyn Future<Output = Result<(U256, U256), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn estimate_eip1559_fees<'life0, 'async_trait>(
&'life0 self,
estimator: Option<fn(_: U256, _: Vec<Vec<U256>>) -> (U256, U256)>
) -> Pin<Box<dyn Future<Output = Result<(U256, U256), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Gets a heuristic recommendation of max fee per gas and max priority fee per gas for EIP-1559 compatible transactions.
sourcefn get_accounts<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<Address>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_accounts<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<Address>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Gets the accounts on the node
sourcefn get_transaction_count<'life0, 'async_trait, T>(
&'life0 self,
from: T,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn get_transaction_count<'life0, 'async_trait, T>(
&'life0 self,
from: T,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Returns the nonce of the address
sourcefn get_balance<'life0, 'async_trait, T>(
&'life0 self,
from: T,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn get_balance<'life0, 'async_trait, T>(
&'life0 self,
from: T,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Returns the account’s balance
sourcefn get_chainid<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_chainid<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns the currently configured chain id, a value used in replay-protected transaction signing as introduced by EIP-155.
sourcefn syncing<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<SyncingStatus, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn syncing<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<SyncingStatus, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Return current client syncing status. If IsFalse sync is over.
sourcefn get_net_version<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_net_version<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns the network version.
sourcefn call<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<Bytes, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<Bytes, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sends the read-only (constant) transaction to a single Ethereum node and return the result (as bytes) of executing it. This is free, since it does not change any state on the blockchain.
sourcefn estimate_gas<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn estimate_gas<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sends a transaction to a single Ethereum node and return the estimated amount of gas required (as a U256) to send it This is free, but only an estimate. Providing too little gas will result in a transaction being rejected (while still consuming all provided gas).
sourcefn send_transaction<'life0, 'async_trait, T>(
&'life0 self,
tx: T,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'_, P>, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn send_transaction<'life0, 'async_trait, T>(
&'life0 self,
tx: T,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'_, P>, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Sends the transaction to the entire Ethereum network and returns the transaction’s hash This will consume gas from the account that signed the transaction.
sourcefn send_raw_transaction<'a, 'async_trait>(
&'a self,
tx: Bytes
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'a, P>, ProviderError>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
fn send_raw_transaction<'a, 'async_trait>(
&'a self,
tx: Bytes
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'a, P>, ProviderError>> + Send + 'async_trait>> where
'a: 'async_trait,
Self: 'async_trait,
Send the raw RLP encoded transaction to the entire Ethereum network and returns the transaction’s hash This will consume gas from the account that signed the transaction.
sourcefn is_signer<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn is_signer<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
The JSON-RPC provider is at the bottom-most position in the middleware stack. Here we check
if it has the key for the sender address unlocked, as well as supports the eth_sign call.
sourcefn sign<'life0, 'life1, 'async_trait, T>(
&'life0 self,
data: T,
from: &'life1 Address
) -> Pin<Box<dyn Future<Output = Result<Signature, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<Bytes> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn sign<'life0, 'life1, 'async_trait, T>(
&'life0 self,
data: T,
from: &'life1 Address
) -> Pin<Box<dyn Future<Output = Result<Signature, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<Bytes> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Signs data using a specific account. This account needs to be unlocked.
sourcefn sign_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
_tx: &'life1 TypedTransaction,
_from: Address
) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn sign_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
_tx: &'life1 TypedTransaction,
_from: Address
) -> Pin<Box<dyn Future<Output = Result<Signature, Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Sign a transaction via RPC call
sourcefn get_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter
) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn get_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter
) -> Pin<Box<dyn Future<Output = Result<Vec<Log>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Returns an array (possibly empty) of logs that match the filter
sourcefn watch<'a, 'life0, 'async_trait>(
&'a self,
filter: &'life0 Filter
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'a, P, Log>, ProviderError>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn watch<'a, 'life0, 'async_trait>(
&'a self,
filter: &'life0 Filter
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'a, P, Log>, ProviderError>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Streams matching filter logs
sourcefn watch_blocks<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'_, P, H256>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn watch_blocks<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'_, P, H256>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Streams new block hashes
sourcefn watch_pending_transactions<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'_, P, H256>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn watch_pending_transactions<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'_, P, H256>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Streams pending transactions
sourcefn new_filter<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: FilterKind<'life1>
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn new_filter<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: FilterKind<'life1>
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Creates a filter object, based on filter options, to notify when the state changes (logs).
To check if the state has changed, call get_filter_changes with the filter id.
sourcefn uninstall_filter<'life0, 'async_trait, T>(
&'life0 self,
id: T
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<U256> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn uninstall_filter<'life0, 'async_trait, T>(
&'life0 self,
id: T
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<U256> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Uninstalls a filter
sourcefn get_filter_changes<'life0, 'async_trait, T, R>(
&'life0 self,
id: T
) -> Pin<Box<dyn Future<Output = Result<Vec<R>, ProviderError>> + Send + 'async_trait>> where
T: Into<U256> + Send + Sync,
R: Serialize + DeserializeOwned + Send + Sync + Debug,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn get_filter_changes<'life0, 'async_trait, T, R>(
&'life0 self,
id: T
) -> Pin<Box<dyn Future<Output = Result<Vec<R>, ProviderError>> + Send + 'async_trait>> where
T: Into<U256> + Send + Sync,
R: Serialize + DeserializeOwned + Send + Sync + Debug,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Polling method for a filter, which returns an array of logs which occurred since last poll.
This method must be called with one of the following return types, depending on the filter type:
eth_newBlockFilter:H256, returns block hasheseth_newPendingTransactionFilter:H256, returns transaction hasheseth_newFilter:Log, returns raw logs
If one of these types is not used, decoding will fail and the method will return an error.
sourcefn get_storage_at<'life0, 'async_trait, T>(
&'life0 self,
from: T,
location: H256,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<H256, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn get_storage_at<'life0, 'async_trait, T>(
&'life0 self,
from: T,
location: H256,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<H256, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Get the storage of an address for a particular slot location
sourcefn get_code<'life0, 'async_trait, T>(
&'life0 self,
at: T,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<Bytes, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn get_code<'life0, 'async_trait, T>(
&'life0 self,
at: T,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<Bytes, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Returns the deployed code at a given address
sourcefn get_proof<'life0, 'async_trait, T>(
&'life0 self,
from: T,
locations: Vec<H256>,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<EIP1186ProofResponse, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn get_proof<'life0, 'async_trait, T>(
&'life0 self,
from: T,
locations: Vec<H256>,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<EIP1186ProofResponse, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Returns the EIP-1186 proof response https://github.com/ethereum/EIPs/issues/1186
sourcefn resolve_name<'life0, 'life1, 'async_trait>(
&'life0 self,
ens_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Address, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn resolve_name<'life0, 'life1, 'async_trait>(
&'life0 self,
ens_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Address, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Returns the address that the ens_name resolves to (or None if not configured).
Panics
If the bytes returned from the ENS registrar/resolver cannot be interpreted as an address. This should theoretically never happen.
sourcefn lookup_address<'life0, 'async_trait>(
&'life0 self,
address: Address
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn lookup_address<'life0, 'async_trait>(
&'life0 self,
address: Address
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns the ENS name the address resolves to (or None if not configured).
Panics
If the bytes returned from the ENS registrar/resolver cannot be interpreted as a string. This should theoretically never happen.
sourcefn resolve_avatar<'life0, 'life1, 'async_trait>(
&'life0 self,
ens_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Url, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn resolve_avatar<'life0, 'life1, 'async_trait>(
&'life0 self,
ens_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Url, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Returns the avatar HTTP link of the avatar that the ens_name resolves to (or None
if not configured)
Example
let avatar = provider.resolve_avatar("parishilton.eth").await.unwrap();
assert_eq!(avatar.to_string(), "https://i.imgur.com/YW3Hzph.jpg");Panics
If the bytes returned from the ENS registrar/resolver cannot be interpreted as a string. This should theoretically never happen.
sourcefn resolve_nft<'life0, 'async_trait>(
&'life0 self,
token: ERCNFT
) -> Pin<Box<dyn Future<Output = Result<Url, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn resolve_nft<'life0, 'async_trait>(
&'life0 self,
token: ERCNFT
) -> Pin<Box<dyn Future<Output = Result<Url, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns the URL (not necesserily HTTP) of the image behind a token.
Example
let token = ethers_providers::erc::ERCNFT::from_str("erc721:0xc92ceddfb8dd984a89fb494c376f9a48b999aafc/9018").unwrap();
let token_image = provider.resolve_nft(token).await.unwrap();
assert_eq!(token_image.to_string(), "https://creature.mypinata.cloud/ipfs/QmNwj3aUzXfG4twV3no7hJRYxLLAWNPk6RrfQaqJ6nVJFa/9018.jpg");Panics
If the bytes returned from the ENS registrar/resolver cannot be interpreted as a string. This should theoretically never happen.
sourcefn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ens_name: &'life1 str,
field: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ens_name: &'life1 str,
field: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Fetch a field for the ens_name (no None if not configured).
Panics
If the bytes returned from the ENS registrar/resolver cannot be interpreted as a string. This should theoretically never happen.
sourcefn txpool_content<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolContent, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn txpool_content<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolContent, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns the details of all transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only. Ref: Here
sourcefn txpool_inspect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolInspect, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn txpool_inspect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolInspect, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns a summary of all the transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only. Ref: Here
sourcefn txpool_status<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolStatus, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn txpool_status<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolStatus, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns the number of transactions currently pending for inclusion in the next block(s), as well as the ones that are being scheduled for future execution only. Ref: Here
sourcefn debug_trace_transaction<'life0, 'async_trait>(
&'life0 self,
tx_hash: TxHash,
trace_options: GethDebugTracingOptions
) -> Pin<Box<dyn Future<Output = Result<GethTrace, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn debug_trace_transaction<'life0, 'async_trait>(
&'life0 self,
tx_hash: TxHash,
trace_options: GethDebugTracingOptions
) -> Pin<Box<dyn Future<Output = Result<GethTrace, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Executes the given call and returns a number of possible traces for it
sourcefn trace_call<'life0, 'async_trait, T>(
&'life0 self,
req: T,
trace_type: Vec<TraceType>,
block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn trace_call<'life0, 'async_trait, T>(
&'life0 self,
req: T,
trace_type: Vec<TraceType>,
block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Executes the given call and returns a number of possible traces for it
sourcefn trace_call_many<'life0, 'async_trait, T>(
&'life0 self,
req: Vec<(T, Vec<TraceType>)>,
block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace>, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn trace_call_many<'life0, 'async_trait, T>(
&'life0 self,
req: Vec<(T, Vec<TraceType>)>,
block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace>, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Executes given calls and returns a number of possible traces for each call
sourcefn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_type: Vec<TraceType>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_type: Vec<TraceType>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Traces a call to eth_sendRawTransaction without making the call, returning the traces
sourcefn trace_replay_transaction<'life0, 'async_trait>(
&'life0 self,
hash: H256,
trace_type: Vec<TraceType>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_replay_transaction<'life0, 'async_trait>(
&'life0 self,
hash: H256,
trace_type: Vec<TraceType>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Replays a transaction, returning the traces
sourcefn trace_replay_block_transactions<'life0, 'async_trait>(
&'life0 self,
block: BlockNumber,
trace_type: Vec<TraceType>
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_replay_block_transactions<'life0, 'async_trait>(
&'life0 self,
block: BlockNumber,
trace_type: Vec<TraceType>
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Replays all transactions in a block returning the requested traces for each transaction
sourcefn trace_block<'life0, 'async_trait>(
&'life0 self,
block: BlockNumber
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_block<'life0, 'async_trait>(
&'life0 self,
block: BlockNumber
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns traces created at given block
sourcefn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Return traces matching the given filter
sourcefn trace_get<'life0, 'async_trait, T>(
&'life0 self,
hash: H256,
index: Vec<T>
) -> Pin<Box<dyn Future<Output = Result<Trace, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<U64> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
fn trace_get<'life0, 'async_trait, T>(
&'life0 self,
hash: H256,
index: Vec<T>
) -> Pin<Box<dyn Future<Output = Result<Trace, ProviderError>> + Send + 'async_trait>> where
T: 'async_trait + Into<U64> + Send + Sync,
'life0: 'async_trait,
Self: 'async_trait,
Returns trace at the given position
sourcefn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace>, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns all traces of a given transaction
type Error = ProviderError
type Provider = P
type Inner = Provider<P>
fn default_sender(&self) -> Option<Address>
sourcefn fill_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 mut TypedTransaction,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn fill_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 mut TypedTransaction,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Fill necessary details of a transaction for dispatch Read more
fn create_access_list<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<AccessListWithGasUsed, ProviderError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
sourcefn get_logs_paginated<'a>(
&'a self,
filter: &Filter,
page_size: u64
) -> LogQuery<'a, P>
fn get_logs_paginated<'a>(
&'a self,
filter: &Filter,
page_size: u64
) -> LogQuery<'a, P>
Returns a stream of logs are loaded in pages of given page size
fn subscribe<'life0, 'async_trait, T, R>(
&'life0 self,
params: T
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'_, P, R>, ProviderError>> + Send + 'async_trait>> where
T: Debug + Serialize + Send + Sync,
R: DeserializeOwned + Send + Sync,
P: PubsubClient,
T: 'async_trait,
R: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn unsubscribe<'life0, 'async_trait, T>(
&'life0 self,
id: T
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait>> where
T: Into<U256> + Send + Sync,
P: PubsubClient,
T: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn subscribe_blocks<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'_, P, Block<TxHash>>, ProviderError>> + Send + 'async_trait>> where
P: PubsubClient,
'life0: 'async_trait,
Self: 'async_trait,
fn subscribe_pending_txs<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'_, P, TxHash>, ProviderError>> + Send + 'async_trait>> where
P: PubsubClient,
'life0: 'async_trait,
Self: 'async_trait,
fn subscribe_logs<'a, 'life0, 'async_trait>(
&'a self,
filter: &'life0 Filter
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'a, P, Log>, ProviderError>> + Send + 'async_trait>> where
P: PubsubClient,
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn fee_history<'life0, 'life1, 'async_trait, T>(
&'life0 self,
block_count: T,
last_block: BlockNumber,
reward_percentiles: &'life1 [f64]
) -> Pin<Box<dyn Future<Output = Result<FeeHistory, Self::Error>> + Send + 'async_trait>> where
T: 'async_trait + Into<U256> + Send + Sync,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
sourcefn send_escalating<'a, 'life0, 'async_trait>(
&'a self,
tx: &'life0 TypedTransaction,
escalations: usize,
policy: EscalationPolicy
) -> Pin<Box<dyn Future<Output = Result<EscalatingPending<'a, Self::Provider>, Self::Error>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn send_escalating<'a, 'life0, 'async_trait>(
&'a self,
tx: &'life0 TypedTransaction,
escalations: usize,
policy: EscalationPolicy
) -> Pin<Box<dyn Future<Output = Result<EscalatingPending<'a, Self::Provider>, Self::Error>> + Send + 'async_trait>> where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
Send a transaction with a simple escalation policy. Read more
sourceimpl<'a> TryFrom<&'a String> for Provider<HttpProvider>
impl<'a> TryFrom<&'a String> for Provider<HttpProvider>
sourceimpl TryFrom<&str> for Provider<HttpProvider>
impl TryFrom<&str> for Provider<HttpProvider>
Auto Trait Implementations
impl<P> !RefUnwindSafe for Provider<P>
impl<P> Send for Provider<P> where
P: Send,
impl<P> Sync for Provider<P> where
P: Sync,
impl<P> Unpin for Provider<P> where
P: Unpin,
impl<P> !UnwindSafe for Provider<P>
Blanket Implementations
impl<U> AsSliceOf for U where
U: AsRef<[u8]> + ?Sized,
impl<U> AsSliceOf for U where
U: AsRef<[u8]> + ?Sized,
fn as_slice_of<T>(&self) -> Result<&[T], Error> where
T: FromByteSlice,
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToHex for T where
T: AsRef<[u8]>,
impl<T> ToHex for T where
T: AsRef<[u8]>,
sourcefn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self into the result. Lower case
letters are used (e.g. f9b4ca) Read more
sourcefn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> U where
U: FromIterator<char>,
Encode the hex strict representing self into the result. Upper case
letters are used (e.g. F9B4CA) Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more