2020-03-12 23:20:49 -07:00
|
|
|
use thiserror::Error;
|
|
|
|
|
2019-11-23 08:55:43 -08:00
|
|
|
pub struct ArgConstant<'a> {
|
|
|
|
pub long: &'a str,
|
|
|
|
pub name: &'a str,
|
|
|
|
pub help: &'a str,
|
|
|
|
}
|
|
|
|
|
2020-03-12 23:20:49 -07:00
|
|
|
/// Error type for forwarding Errors out of `main()` of a `clap` app
|
|
|
|
/// and still using the `Display` formatter
|
|
|
|
#[derive(Error)]
|
|
|
|
#[error("{0}")]
|
|
|
|
pub struct DisplayError(Box<dyn std::error::Error>);
|
|
|
|
impl DisplayError {
|
|
|
|
pub fn new_as_boxed(inner: Box<dyn std::error::Error>) -> Box<Self> {
|
|
|
|
DisplayError(inner).into()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl std::fmt::Debug for DisplayError {
|
|
|
|
fn fmt(&self, fmt: &mut std::fmt::Formatter) -> std::fmt::Result {
|
|
|
|
write!(fmt, "{}", self.0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-29 21:55:33 -07:00
|
|
|
pub mod commitment;
|
2019-11-11 16:42:08 -08:00
|
|
|
pub mod input_parsers;
|
|
|
|
pub mod input_validators;
|
2019-11-22 07:20:40 -08:00
|
|
|
pub mod keypair;
|
2020-09-21 14:12:51 -07:00
|
|
|
pub mod nonce;
|
2020-02-21 13:55:53 -08:00
|
|
|
pub mod offline;
|