Skip to main content

ap_error

Attribute Macro ap_error 

Source
#[ap_error]
Expand description

A procedural macro for generating error types with FlatError trait implementation.

§Example

use ap_error::ap_error;
use thiserror::Error;

#[derive(Debug, Error)]
#[ap_error(flat)]
enum MyError {
    #[error("Not found")]
    NotFound,
    #[error("Permission denied")]
    PermissionDenied,
}