pub const UNWIND: bool = cfg!(panic="unwind");
pub const ABORT: bool = cfg!(panic="abort");
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
pub struct cfg_panic_info {
pub unwind: bool,
pub abort: bool,
}
pub const ALL_INFO: cfg_panic_info = all_info();
pub const fn all_info() -> cfg_panic_info {
cfg_panic_info {
unwind: UNWIND,
abort: ABORT,
}
}
#[cfg(feature = "json")]
impl cfg_panic_info {
pub fn to_json(&self) -> serde_json::Value {
serde_json::json!({
"unwind": self.unwind,
"abort": self.abort,
})
}
}