1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use std::fmt::{self, Display};
#[derive(Copy, Clone, Debug, Eq, Hash, PartialEq)]
pub enum SigningProvider {
#[cfg(feature = "yubihsm")]
Yubihsm,
#[cfg(feature = "ledgertm")]
LedgerTm,
#[cfg(feature = "softsign")]
SoftSign,
}
impl Display for SigningProvider {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
#[cfg(feature = "yubihsm")]
SigningProvider::Yubihsm => write!(f, "yubihsm"),
#[cfg(feature = "ledgertm")]
SigningProvider::LedgerTm => write!(f, "ledgertm"),
#[cfg(feature = "softsign")]
SigningProvider::SoftSign => write!(f, "softsign"),
}
}
}