We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 68bae2b commit 3eeb04eCopy full SHA for 3eeb04e
src/error.rs
@@ -238,6 +238,13 @@ impl Error {
238
matches!(self.inner.kind, Kind::User(User::BodyWriteAborted))
239
}
240
241
+ /// Returns true if the error was caused while calling `AsyncWrite::shutdown()`.
242
+ pub fn is_shutdown(&self) -> bool {
243
+ #[cfg(all(any(feature = "client", feature = "server"), feature = "http1"))]
244
+ return matches!(self.inner.kind, Kind::Shutdown);
245
+ false
246
+ }
247
+
248
/// Returns true if the error was caused by a timeout.
249
pub fn is_timeout(&self) -> bool {
250
#[cfg(all(feature = "http1", feature = "server"))]
0 commit comments