Debian Codegraph @

third_party/rust/interrupt-support/src/error.rs

raw
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 /// The error returned by err_if_interrupted.
6 #[derive(Debug, Clone)]
7 pub struct Interrupted;
8
9 impl std::fmt::Display for Interrupted {
10 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11 f.write_str("The operation was interrupted")
12 }
13 }
14
15 impl std::error::Error for Interrupted {}