Skip to main content

boxed_io_error

Function boxed_io_error 

Source
fn boxed_io_error<'a>(
    err: &'a (dyn Error + Send + Sync + 'static),
) -> Option<&'a Error>
Expand description

Recover the errno-bearing io::Error behind the boxed error tiny_http reports for a failed Server::http bind. tiny_http surfaces the TcpListener::bind io::Error itself (its ? boxes it directly), so the top-level downcast is the real path. The source walk guards against a future wrapper. io::Error’s source() skips a custom payload (the payload is the error, not its cause), so an errno hidden under a wrapper is still found when the wrapper exposes it through its own source() chain.