mithril_client_cli/utils/
mod.rs1mod cardano_db;
5mod cardano_db_download_checker;
6mod expander;
7mod feedback_receiver;
8mod multi_download_progress_reporter;
9mod progress_reporter;
10
11pub use cardano_db::*;
12pub use cardano_db_download_checker::*;
13pub use expander::*;
14pub use feedback_receiver::*;
15pub use multi_download_progress_reporter::*;
16pub use progress_reporter::*;
17
18use anyhow::anyhow;
19use mithril_client::MithrilResult;
20use std::path::Path;
21
22pub(crate) fn path_to_string(path: &Path) -> MithrilResult<String> {
24 let path = path
25 .to_str()
26 .ok_or_else(|| {
27 anyhow!(
28 "Path '{}' contains invalid UTF-8 characters.",
29 path.display()
30 )
31 })?
32 .to_string();
33
34 Ok(path)
35}