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 Freeze for ClientBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more