pub fn unpack_client_error<E>(err: &E) -> Option<ClientError>where
E: Error + 'static,Expand description
Walks the source chain of err looking for a ClientError.
At each step, two locations are checked:
- Direct: the error itself is a
ClientError. - Packed in
io::Error: the error is anio::Errorwhose custom inner value is aClientError.
Use this in put_object implementations to reclassify body-stream errors
as crate::error::Error::Client instead of an opaque server error.