voa_openpgp/import/error.rs
1//! Error handling for importing [OpenPGP certificates] as [VOA] verifiers.
2//!
3//! [OpenPGP certificates]: https://openpgp.dev/book/certificates.html
4//! [VOA]: https://uapi-group.org/specifications/specs/file_hierarchy_for_the_verification_of_os_artifacts/
5
6use std::path::PathBuf;
7
8/// The error that can occur when importing verifiers.
9#[derive(Debug, thiserror::Error)]
10pub enum Error {
11 /// An error occurred while importing a destructured OpenPGP certificate.
12 #[error("Destructured import error:\n{0}")]
13 DestructuredImport(#[source] crate::import::destructured::error::Error),
14
15 /// A path is not a regular file.
16 #[error("The path {path:?} is not a regular file.")]
17 PathIsNotAFile {
18 /// The path that is not a regular file.
19 path: PathBuf,
20 },
21}