Crate jobby_derive

Crate jobby_derive 

Source
Expand description

This crate provides a procedural macro for deriving job types in jobby.

The JobType macro allows you to define enums that represent different job types, along with associated metadata such as client IDs and names. It also supports attributes for marking variants as submittable via an admin UI

§Usage

To use this macro, annotate your enum with #[derive(JobType)] and provide the necessary attributes. For example:

#[derive(JobType)]
#[job_type(u8, 1, "example", "example_module")]
enum ExampleJob {
    #[job_type(submittable)]
    JobA = 1,
    JobB = 2,
}

This will generate implementations for converting the enum to and from its underlying representation, as well as metadata retrieval functions.

Derive Macros§

JobType