pub struct NodeDataDir { /* private fields */ }Expand description
Tracks information about where the node-specfic configuration files are stored.
Implementations§
Source§impl NodeDataDir
impl NodeDataDir
Sourcepub fn new_test(dev: Option<u16>) -> Self
pub fn new_test(dev: Option<u16>) -> Self
Initializes the node data directory to a location suitable for unit/integration tests.
Sourcepub fn new_development(network: u16, dev: u16) -> Self
pub fn new_development(network: u16, dev: u16) -> Self
Initializes the node data directory path to the development path for the specified network and node index.
pub fn path(&self) -> &Path
Sourcepub fn router_peer_cache_path(&self) -> PathBuf
pub fn router_peer_cache_path(&self) -> PathBuf
The location to store the previous peer cache.
pub fn gateway_peer_cache_path(&self) -> PathBuf
pub fn validator_whitelist_path(&self) -> PathBuf
Sourcepub fn current_proposal_cache_path(&self) -> PathBuf
pub fn current_proposal_cache_path(&self) -> PathBuf
The location to store the current proposal cache.
Sourcepub fn jwt_secret_path<D: Display>(&self, address: &D) -> PathBuf
pub fn jwt_secret_path<D: Display>(&self, address: &D) -> PathBuf
The location to store the JWT secret for a given address.
Trait Implementations§
Source§impl Clone for NodeDataDir
impl Clone for NodeDataDir
Source§fn clone(&self) -> NodeDataDir
fn clone(&self) -> NodeDataDir
Returns a duplicate 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 NodeDataDir
impl Debug for NodeDataDir
Source§impl PartialEq for NodeDataDir
impl PartialEq for NodeDataDir
impl Eq for NodeDataDir
impl StructuralPartialEq for NodeDataDir
Auto Trait Implementations§
impl Freeze for NodeDataDir
impl RefUnwindSafe for NodeDataDir
impl Send for NodeDataDir
impl Sync for NodeDataDir
impl Unpin for NodeDataDir
impl UnsafeUnpin for NodeDataDir
impl UnwindSafe for NodeDataDir
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