pub fn new<D>(err: D) -> impl Errorwhere D: Debug + Display + Send + Sync + 'static,
Simple way to create an error value.
let err = errors::new("sound the alarm"); assert_eq!(err.to_string(), "sound the alarm");
15fn two() -> Result<(), E> { 16 println!("> two"); 17 Err(errors::new("kaboom").into()) 18}