Skip to main content

JobArgs

Derive Macro JobArgs 

Source
#[derive(JobArgs)]
{
    // Attributes available to this derive:
    #[awa]
}
Expand description

Derive macro for job argument types.

Generates the JobArgs trait implementation including:

  • kind() — snake_case kind string (or custom override)
  • Requires Serialize + Deserialize (user must derive those)

§Usage

#[derive(Debug, Serialize, Deserialize, JobArgs)]
struct SendEmail {
    pub to: String,
    pub subject: String,
}
// kind() returns "send_email"

#[derive(Debug, Serialize, Deserialize, JobArgs)]
#[awa(kind = "custom_kind")]
struct MyJob {
    pub data: String,
}
// kind() returns "custom_kind"