We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1b89c1 commit f97b5e8Copy full SHA for f97b5e8
src/error.rs
@@ -201,6 +201,11 @@ impl Error {
201
self.find_source::<TimedOut>().is_some()
202
}
203
204
+ /// Returns true if the error was caused by a shutdown.
205
+ pub fn is_shutdown(&self) -> bool {
206
+ matches!(self.inner.kind, Kind::Shutdown)
207
+ }
208
+
209
/// Consumes the error, returning its cause.
210
pub fn into_cause(self) -> Option<Box<dyn StdError + Send + Sync>> {
211
self.inner.cause
0 commit comments