Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a CustomError derive macro #63

Closed
FL03 opened this issue Apr 24, 2024 · 0 comments · Fixed by #67
Closed

Create a CustomError derive macro #63

FL03 opened this issue Apr 24, 2024 · 0 comments · Fixed by #67
Assignees
Labels
enhancement New feature or request macro Any additions or improvements to procedural macros rust Improvements or additions that update the Rust code upgrade Alterations to the codebase
Milestone

Comments

@FL03
Copy link
Member

FL03 commented Apr 24, 2024

extern crate scsys;

use scsys::CustomError;

#[derive(Debug, CustomError)]
pub enum CustomError {
    Sample(String),
}

Should generate the following code

impl core
impl std::error::Error for CustomError {}
@FL03 FL03 added enhancement New feature or request rust Improvements or additions that update the Rust code upgrade Alterations to the codebase macro Any additions or improvements to procedural macros labels Apr 24, 2024
@FL03 FL03 added this to the v0.2.1 milestone Apr 24, 2024
@FL03 FL03 self-assigned this Apr 24, 2024
@FL03 FL03 modified the milestones: v0.2.1, v0.2.2 Apr 28, 2024
@FL03 FL03 linked a pull request Apr 28, 2024 that will close this issue
1 task
@FL03 FL03 closed this as completed in #67 May 11, 2024
@github-project-automation github-project-automation bot moved this from 🆕 New to 👀 In review in @scsys/team:roadmap May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request macro Any additions or improvements to procedural macros rust Improvements or additions that update the Rust code upgrade Alterations to the codebase
Projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

1 participant