intel_crashlog/source/
capability.rs1#[cfg(not(feature = "std"))]
5use alloc::{collections::BTreeSet, fmt};
6#[cfg(feature = "std")]
7use std::{collections::BTreeSet, fmt};
8
9#[derive(Debug, Eq, Ord, PartialEq, PartialOrd)]
11pub enum Capability {
12 Extract,
14 Trigger,
16 EnableDisable,
18 Clear,
20 Rearm,
22}
23
24impl fmt::Display for Capability {
25 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
26 match self {
27 Self::Extract => write!(f, "extract"),
28 Self::Trigger => write!(f, "trigger"),
29 Self::EnableDisable => write!(f, "enable/disable"),
30 Self::Clear => write!(f, "clear"),
31 Self::Rearm => write!(f, "rearm"),
32 }
33 }
34}
35
36pub type Capabilities = BTreeSet<Capability>;