1pub mod admin;
2pub mod bridge;
3pub mod cron;
4pub mod error;
5pub mod insert;
6pub mod job;
7pub mod kind;
8pub mod migrations;
9pub mod unique;
10
11pub use admin::{
13 CallbackConfig, DefaultAction, ListJobsFilter, QueueRuntimeConfigSnapshot, QueueRuntimeMode,
14 QueueRuntimeSnapshot, QueueRuntimeSummary, QueueStats, RateLimitSnapshot, ResolveOutcome,
15 RuntimeInstance, RuntimeOverview, RuntimeSnapshotInput, StateTimeseriesBucket,
16};
17pub use cron::{CronJobRow, PeriodicJob, PeriodicJobBuilder};
18pub use error::AwaError;
19pub use insert::{insert, insert_many, insert_many_copy, insert_many_copy_from_pool, insert_with};
20pub use job::{InsertOpts, InsertParams, JobRow, JobState, UniqueOpts};
21
22pub use awa_macros::JobArgs;
24
25pub trait JobArgs: serde::Serialize {
31 fn kind() -> &'static str
33 where
34 Self: Sized;
35
36 fn kind_str(&self) -> &'static str
38 where
39 Self: Sized,
40 {
41 Self::kind()
42 }
43
44 fn to_args(&self) -> Result<serde_json::Value, serde_json::Error> {
46 serde_json::to_value(self)
47 }
48}