Struct dir::DatabaseDirectories
source · [−]pub struct DatabaseDirectories {
pub path: String,
pub legacy_path: String,
pub genesis_hash: H256,
pub fork_name: Option<String>,
pub spec_name: String,
}
Expand description
Database directories for the given fork.
Fields
path: String
Base path
legacy_path: String
Legacy path
genesis_hash: H256
Genesis hash
fork_name: Option<String>
Name of current fork
spec_name: String
Name of current spec
Implementations
sourceimpl DatabaseDirectories
impl DatabaseDirectories
sourcepub fn legacy_fork_path(&self) -> PathBuf
pub fn legacy_fork_path(&self) -> PathBuf
Base DB directory for the given fork.
sourcepub fn spec_root_path(&self) -> PathBuf
pub fn spec_root_path(&self) -> PathBuf
Spec root directory for the given fork.
sourcepub fn client_path(&self, pruning: Algorithm) -> PathBuf
pub fn client_path(&self, pruning: Algorithm) -> PathBuf
Generic client path
sourcepub fn db_root_path(&self) -> PathBuf
pub fn db_root_path(&self) -> PathBuf
DB root path, named after genesis hash
sourcepub fn legacy_version_path(&self, pruning: Algorithm) -> PathBuf
pub fn legacy_version_path(&self, pruning: Algorithm) -> PathBuf
Get the root path for database
sourcepub fn legacy_user_defaults_path(&self) -> PathBuf
pub fn legacy_user_defaults_path(&self) -> PathBuf
Get user defaults path, legacy way
sourcepub fn legacy_snapshot_path(&self) -> PathBuf
pub fn legacy_snapshot_path(&self) -> PathBuf
Get snapshot path, legacy way
sourcepub fn legacy_network_path(&self) -> PathBuf
pub fn legacy_network_path(&self) -> PathBuf
Get user defaults path, legacy way
sourcepub fn user_defaults_path(&self) -> PathBuf
pub fn user_defaults_path(&self) -> PathBuf
Get user defauls path
sourcepub fn snapshot_path(&self) -> PathBuf
pub fn snapshot_path(&self) -> PathBuf
Get the path for the snapshot directory given the genesis hash and fork name.
sourcepub fn network_path(&self) -> PathBuf
pub fn network_path(&self) -> PathBuf
Get the path for the network directory.
Trait Implementations
sourceimpl Debug for DatabaseDirectories
impl Debug for DatabaseDirectories
sourceimpl PartialEq<DatabaseDirectories> for DatabaseDirectories
impl PartialEq<DatabaseDirectories> for DatabaseDirectories
sourcefn eq(&self, other: &DatabaseDirectories) -> bool
fn eq(&self, other: &DatabaseDirectories) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &DatabaseDirectories) -> bool
fn ne(&self, other: &DatabaseDirectories) -> bool
This method tests for !=
.
impl StructuralPartialEq for DatabaseDirectories
Auto Trait Implementations
impl RefUnwindSafe for DatabaseDirectories
impl Send for DatabaseDirectories
impl Sync for DatabaseDirectories
impl Unpin for DatabaseDirectories
impl UnwindSafe for DatabaseDirectories
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more