1 // Copyright (c) 2017 CtrlC developers
2 // Licensed under the Apache License, Version 2.0
3 // <LICENSE-APACHE or
4 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT
5 // license <LICENSE-MIT or http://opensource.org/licenses/MIT>,
6 // at your option. All files in the project carrying such
7 // notice may not be copied, modified, or distributed except
8 // according to those terms.
9 
10 use crate::platform;
11 
12 /// A cross-platform way to represent Ctrl-C or program termination signal. Other
13 /// signals/events are supported via `Other`-variant.
14 #[derive(Debug)]
15 pub enum SignalType {
16     /// Ctrl-C
17     Ctrlc,
18     /// Program termination
19     /// Maps to `SIGTERM` and `SIGHUP` on *nix, `CTRL_CLOSE_EVENT` on Windows.
20     Termination,
21     /// Other signal/event using platform-specific data
22     Other(platform::Signal),
23 }
24