Function string_error::static_err [−][src]
pub fn static_err(e: &'static str) -> Box<dyn Error>
Expand description
Creates an error trait object for a string constant (&'static str
).
Examples
use string_error::*; let x = static_err("Foo"); assert_eq!(x.description(), "Foo");