pub trait IntoUserError {
    fn into_user_err(self) -> UserError;
}
Expand description

A trait marking a type as able to be converted into an UserError.

Examples

use std::fs;
use uerr::IntoUserError;

let contents = fs::read_to_string("names.txt")
    .map_err(|err| {
        err.into_user_err()
           .print_all("myprogram.exe: ")
           .exit(err.raw_os_error().unwrap_or(-1))
    });

Required Methods

Convert this value into an UserError.

Implementors