Struct ethers_etherscan::ClientBuilder
source · [−]pub struct ClientBuilder { /* private fields */ }
Implementations
sourceimpl 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
sourceimpl Clone for ClientBuilder
impl Clone for ClientBuilder
sourcefn clone(&self) -> ClientBuilder
fn clone(&self) -> ClientBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ClientBuilder
impl Debug for ClientBuilder
sourceimpl Default for ClientBuilder
impl Default for ClientBuilder
sourcefn 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
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> 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