ndn_identity/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum IdentityError {
5    #[error("security error: {0}")]
6    Security(#[from] ndn_security::TrustError),
7    #[error("cert error: {0}")]
8    Cert(#[from] ndn_cert::CertError),
9    #[error("DID error: {0}")]
10    Did(#[from] ndn_security::did::DidError),
11    #[error("app error: {0}")]
12    App(#[from] ndn_app::AppError),
13    #[error("IO error: {0}")]
14    Io(#[from] std::io::Error),
15    #[error("name error: {0}")]
16    Name(String),
17    #[error("enrollment failed: {0}")]
18    Enrollment(String),
19    #[error("renewal failed: {0}")]
20    Renewal(String),
21    #[error("not enrolled: call enroll() or provision() first")]
22    NotEnrolled,
23}