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}
21
22impl fmt::Display for Capability {
23 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
24 match self {
25 Self::Extract => write!(f, "extract"),
26 Self::Trigger => write!(f, "trigger"),
27 Self::EnableDisable => write!(f, "enable/disable"),
28 Self::Clear => write!(f, "clear"),
29 }
30 }
31}
32
33pub type Capabilities = BTreeSet<Capability>;