fedimint_cli

Trait CliResultExt

Source
pub(crate) trait CliResultExt<O, E> {
    // Required methods
    fn map_err_cli(self) -> Result<O, CliError>;
    fn map_err_cli_msg(self, msg: impl Into<String>) -> Result<O, CliError>;
}
Expand description

Extension trait making turning Results/Errors into CliError/CliOutputResult easier

Required Methods§

Source

fn map_err_cli(self) -> Result<O, CliError>

Map error into CliError wrapping the original error message

Source

fn map_err_cli_msg(self, msg: impl Into<String>) -> Result<O, CliError>

Map error into CliError using custom error message msg

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<O, E> CliResultExt<O, E> for Result<O, E>
where E: Into<Error>,

Implementors§