masterror 0.27.3

Application error types and response mapping
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// SPDX-FileCopyrightText: 2025 RAprogramm <andrey.rozanov.vl@gmail.com>
//
// SPDX-License-Identifier: MIT

use masterror::{AppCode, AppErrorKind, Error};

#[derive(Debug, Error)]
enum MissingCode {
    #[error("with code")]
    #[app_error(kind = AppErrorKind::NotFound, code = AppCode::NotFound)]
    WithCode,
    #[error("without code")]
    #[app_error(kind = AppErrorKind::Service)]
    WithoutCode,
}

fn main() {}