We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3f3b48 commit 8153b1aCopy full SHA for 8153b1a
1 file changed
src/error.rs
@@ -92,6 +92,20 @@ impl Error {
92
ErrorCode::InternalError.into()
93
}
94
95
+ /// **UNSTABLE**
96
+ ///
97
+ /// This capability is not part of the spec yet, and may be removed or changed at any point.
98
99
+ /// Request was cancelled.
100
101
+ /// Execution of the method was aborted either due to a cancellation request from the caller
102
+ /// or because of resource constraints or shutdown.
103
+ #[cfg(feature = "unstable_cancel_request")]
104
+ #[must_use]
105
+ pub fn request_cancelled() -> Self {
106
+ ErrorCode::RequestCancelled.into()
107
+ }
108
+
109
/// Authentication required.
110
#[must_use]
111
pub fn auth_required() -> Self {
0 commit comments