pub struct AssetsLayout { /* private fields */ }Expand description
Layout of generated assets for a given network.
Implementations§
Source§impl AssetsLayout
impl AssetsLayout
Sourcepub fn new(assets_root: PathBuf, network_name: String) -> Self
pub fn new(assets_root: PathBuf, network_name: String) -> Self
Create a new layout rooted at assets_root/<network_name>.
Sourcepub fn assets_root(&self) -> &Path
pub fn assets_root(&self) -> &Path
Root folder for assets (contains all networks).
Sourcepub fn network_name(&self) -> &str
pub fn network_name(&self) -> &str
Network name used in paths and configs.
Sourcepub fn node_bin_dir(&self, node_id: u32) -> PathBuf
pub fn node_bin_dir(&self, node_id: u32) -> PathBuf
Directory for a node’s binaries.
Sourcepub fn node_config_root(&self, node_id: u32) -> PathBuf
pub fn node_config_root(&self, node_id: u32) -> PathBuf
Directory for a node’s configs.
Sourcepub fn node_logs_dir(&self, node_id: u32) -> PathBuf
pub fn node_logs_dir(&self, node_id: u32) -> PathBuf
Directory for a node’s logs.
Sourcepub fn daemon_dir(&self) -> PathBuf
pub fn daemon_dir(&self) -> PathBuf
Directory for daemon-related artifacts.
Sourcepub async fn count_nodes(&self) -> Result<u32>
pub async fn count_nodes(&self) -> Result<u32>
Count node directories under nodes/.
Sourcepub async fn latest_protocol_version_dir(&self, node_id: u32) -> Result<String>
pub async fn latest_protocol_version_dir(&self, node_id: u32) -> Result<String>
Find the newest protocol version directory for a node.
Trait Implementations§
Source§impl Clone for AssetsLayout
impl Clone for AssetsLayout
Source§fn clone(&self) -> AssetsLayout
fn clone(&self) -> AssetsLayout
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 moreAuto Trait Implementations§
impl Freeze for AssetsLayout
impl RefUnwindSafe for AssetsLayout
impl Send for AssetsLayout
impl Sync for AssetsLayout
impl Unpin for AssetsLayout
impl UnsafeUnpin for AssetsLayout
impl UnwindSafe for AssetsLayout
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