Struct ethers_etherscan::ClientBuilder
source · pub struct ClientBuilder { /* private fields */ }
Implementations§
source§impl ClientBuilder
impl ClientBuilder
sourcepub fn chain(self, chain: Chain) -> Result<Self, EtherscanError>
pub fn chain(self, chain: Chain) -> Result<Self, EtherscanError>
Configures the etherscan url and api url for the given chain
§Errors
Fails if the chain is not supported by etherscan
sourcepub fn with_url(
self,
etherscan_url: impl IntoUrl
) -> Result<Self, EtherscanError>
pub fn with_url( self, etherscan_url: impl IntoUrl ) -> Result<Self, EtherscanError>
sourcepub fn with_client(self, client: Client) -> Self
pub fn with_client(self, client: Client) -> Self
Configures the reqwest::Client
sourcepub fn with_api_url(
self,
etherscan_api_url: impl IntoUrl
) -> Result<Self, EtherscanError>
pub fn with_api_url( self, etherscan_api_url: impl IntoUrl ) -> Result<Self, EtherscanError>
sourcepub fn with_api_key(self, api_key: impl Into<String>) -> Self
pub fn with_api_key(self, api_key: impl Into<String>) -> Self
Configures the etherscan api key
sourcepub fn with_cache(
self,
cache_root: Option<PathBuf>,
cache_ttl: Duration
) -> Self
pub fn with_cache( self, cache_root: Option<PathBuf>, cache_ttl: Duration ) -> Self
Configures cache for etherscan request
Trait Implementations§
source§impl Clone for ClientBuilder
impl Clone for ClientBuilder
source§fn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ClientBuilder
impl Debug for ClientBuilder
source§impl Default for ClientBuilder
impl Default for ClientBuilder
source§fn default() -> ClientBuilder
fn default() -> ClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ClientBuilder
impl Send for ClientBuilder
impl Sync for ClientBuilder
impl Unpin for ClientBuilder
impl !UnwindSafe for ClientBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more