pub trait CachePath {
// Required method
fn edb_cache_dir(&self) -> Option<PathBuf>;
// Provided methods
fn is_valid(&self) -> bool { ... }
fn edb_rpc_cache_dir(&self) -> Option<PathBuf> { ... }
fn rpc_chain_cache_dir(&self, chain_id: impl Into<Chain>) -> Option<PathBuf> { ... }
fn etherscan_cache_dir(&self) -> Option<PathBuf> { ... }
fn etherscan_chain_cache_dir(
&self,
chain_id: impl Into<Chain>,
) -> Option<PathBuf> { ... }
fn compiler_cache_dir(&self) -> Option<PathBuf> { ... }
fn compiler_chain_cache_dir(
&self,
chain_id: impl Into<Chain>,
) -> Option<PathBuf> { ... }
}Expand description
Trait for cache paths.
Required Methods§
Sourcefn edb_cache_dir(&self) -> Option<PathBuf>
fn edb_cache_dir(&self) -> Option<PathBuf>
Returns the path to edb’s cache dir: ~/.edb/cache by default.
Provided Methods§
Sourcefn edb_rpc_cache_dir(&self) -> Option<PathBuf>
fn edb_rpc_cache_dir(&self) -> Option<PathBuf>
Returns the path to edb rpc cache dir: <cache_root>/rpc.
Sourcefn rpc_chain_cache_dir(&self, chain_id: impl Into<Chain>) -> Option<PathBuf>
fn rpc_chain_cache_dir(&self, chain_id: impl Into<Chain>) -> Option<PathBuf>
Returns the path to edb chain’s cache dir: <cache_root>/rpc/<chain>
Sourcefn etherscan_cache_dir(&self) -> Option<PathBuf>
fn etherscan_cache_dir(&self) -> Option<PathBuf>
Returns the path to edb’s etherscan cache dir: <cache_root>/etherscan.
Sourcefn etherscan_chain_cache_dir(
&self,
chain_id: impl Into<Chain>,
) -> Option<PathBuf>
fn etherscan_chain_cache_dir( &self, chain_id: impl Into<Chain>, ) -> Option<PathBuf>
Returns the path to edb’s etherscan cache dir for chain_id:
<cache_root>/etherscan/<chain>
Sourcefn compiler_cache_dir(&self) -> Option<PathBuf>
fn compiler_cache_dir(&self) -> Option<PathBuf>
Returns the path to edb’s compiler cache dir: <cache_root>/solc.
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.