Skip to main content

harmos_sidecar/
error.rs

1/* ***
2 *
3 * Harmos
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * ***
8 */
9
10/* === Modules === */
11
12/* === Re-Exports === */
13
14/* === Imports === */
15
16// Standard Library Imports
17
18// Third Party Imports
19
20// Local Imports
21
22/* === Constants === */
23
24/* === Macros === */
25
26/* === Type Aliases === */
27
28pub type Result<T> = std::result::Result<T, Error>;
29
30/* === Structs === */
31
32/* === Enums === */
33
34#[derive(Debug, thiserror::Error)]
35pub enum Error {
36    #[cfg(feature = "kit")]
37    #[error(transparent)]
38    Executable(#[from] crate::ExecutableError),
39
40    #[error(transparent)]
41    Declaration(#[from] crate::inventory::DeclarationError),
42
43    #[error(transparent)]
44    Config(#[from] crate::ConfigError),
45
46    #[error(transparent)]
47    Registration(#[from] crate::RegistrationError),
48
49    #[cfg(feature = "kit")]
50    #[error(transparent)]
51    Call(#[from] crate::CallError),
52
53    #[cfg(feature = "kit")]
54    #[error(transparent)]
55    Publication(#[from] crate::PublicationError),
56
57    #[error(transparent)]
58    Io(#[from] std::io::Error),
59}
60
61/* === Traits === */
62
63/* === Implementations === */
64
65/* === Public Functions === */
66
67/* === Private Functions === */
68
69/* === Tests === */