1use std::fmt;
2
3use {PublicKey, PrivateKey};
4
5impl fmt::Debug for PublicKey {
6 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
7 use PublicKey::*;
8 match *self {
9 Rsa { .. } => {
10 write!(f, "PublicKey::Rsa")
12 }
13 Ed25519(..) => {
14 write!(f, "PublicKey::Ed25519")
15 }
16 }
17 }
18}
19
20impl fmt::Debug for PrivateKey {
21 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
22 use PrivateKey::*;
23 match *self {
24 Rsa { .. } => {
25 write!(f, "PrivateKey::Rsa")
27 }
28 Ed25519(..) => {
29 write!(f, "PrivateKey::Ed25519")
30 }
31 }
32 }
33}