macro_rules! into_internal {
{ $( $arg:tt )* } => { ... };
}
Expand description
Helper for converting an error into an internal error
Returns a closure implementing FnOnce(E) -> Bug
.
The source error E
must be std::error::Error + Send + Sync + 'static
.
§Examples
use tor_error::into_internal;
let s = std::str::from_utf8(s).map_err(into_internal!("bad bytes: {:?}", s))?;