awa-macros
Procedural macros for the Awa Postgres-native job queue.
You don't normally depend on this crate directly — #[derive(JobArgs)] is re-exported by both awa and awa-model. Add awa to your dependencies and the derive comes with it.
What's in here
#[derive(JobArgs)]— implementsawa::JobArgsfor a struct, generating thekind()method that identifies the job type across Rust and Python workers.
Usage
use JobArgs;
use ;
assert_eq!;
The default kind string is the struct's name converted from CamelCase to snake_case. Override it explicitly with #[awa(kind = "...")]:
assert_eq!;
The macro resolves JobArgs through whichever of awa or awa-model is in your Cargo.toml, so the same derive works for applications using the facade crate and for libraries depending on awa-model directly.
Serialize and Deserialize must be derived alongside JobArgs — the runtime serialises job arguments as JSON.
License
MIT OR Apache-2.0