CachePath

Trait CachePath 

Source
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§

Source

fn edb_cache_dir(&self) -> Option<PathBuf>

Returns the path to edb’s cache dir: ~/.edb/cache by default.

Provided Methods§

Source

fn is_valid(&self) -> bool

Check whether the cache is valid.

Source

fn edb_rpc_cache_dir(&self) -> Option<PathBuf>

Returns the path to edb rpc cache dir: <cache_root>/rpc.

Source

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>

Source

fn etherscan_cache_dir(&self) -> Option<PathBuf>

Returns the path to edb’s etherscan cache dir: <cache_root>/etherscan.

Source

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>

Source

fn compiler_cache_dir(&self) -> Option<PathBuf>

Returns the path to edb’s compiler cache dir: <cache_root>/solc.

Source

fn compiler_chain_cache_dir( &self, chain_id: impl Into<Chain>, ) -> Option<PathBuf>

Returns the path to edb’s compiler cache dir for chain_id: <cache_root>/solc/<chain>

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.

Implementations on Foreign Types§

Source§

impl CachePath for Option<EdbCachePath>

Implementors§