Function string_error::into_err [−][src]
pub fn into_err(e: String) -> Box<dyn Error>
Expand description
Creates an error trait object for an owned string (String
).
This takes ownership of the String
argument.
Examples
use string_error::*; let x = into_err(String::from("Foo")); assert_eq!(x.description(), "Foo");