ohno 0.4.0

High-quality Rust error handling.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

//! `#[ohno::error]` always adds the `OhnoCore` field and always generates the error representation
//! from it, so a marker on another field asks for something the attribute cannot honor.
//!
//! Declaring a field of type `OhnoCore` is fine: the injected field is the marked one, so the
//! declared field stays an ordinary field.

#[ohno::error]
pub struct AlreadyMarked {
    pub path: String,
    #[error]
    inner: ohno::OhnoCore,
}

fn main() {}