Skip to main content

harmos_packaging/bundle/
error.rs

1/* ***
2 *
3 * Harmos
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * ***
8 */
9
10// Plugin bundle errors
11
12/* === Modules === */
13
14/* === Re-Exports === */
15
16/* === Imports === */
17
18// Standard Library Imports
19
20// Third Party Imports
21
22// Local Imports
23
24/* === Constants === */
25
26/* === Macros === */
27
28/* === Type Aliases === */
29
30/* === Structs === */
31
32/* === Enums === */
33
34#[derive(Debug, thiserror::Error)]
35pub enum Error {
36    #[error("invalid plugin bundle: {0}")]
37    Invalid(String),
38
39    #[error("plugin bundle exceeds {0}")]
40    Limit(&'static str),
41
42    #[error(transparent)]
43    Io(#[from] std::io::Error),
44
45    #[error(transparent)]
46    Json(#[from] serde_json::Error),
47}
48
49/* === Traits === */
50
51/* === Implementations === */
52
53/* === Public Functions === */
54
55/* === Private Functions === */
56
57/* === Tests === */