1pub mod admin;
2pub mod cron;
3pub mod error;
4pub mod insert;
5pub mod job;
6pub mod kind;
7pub mod migrations;
8pub mod unique;
9
10pub use admin::{
12 CallbackConfig, DefaultAction, ListJobsFilter, QueueStats, ResolveOutcome,
13 StateTimeseriesBucket,
14};
15pub use cron::{CronJobRow, PeriodicJob, PeriodicJobBuilder};
16pub use error::AwaError;
17pub use insert::{insert, insert_many, insert_many_copy, insert_many_copy_from_pool, insert_with};
18pub use job::{InsertOpts, InsertParams, JobRow, JobState, UniqueOpts};
19
20pub use awa_macros::JobArgs;
22
23pub trait JobArgs: serde::Serialize {
29 fn kind() -> &'static str
31 where
32 Self: Sized;
33
34 fn kind_str(&self) -> &'static str
36 where
37 Self: Sized,
38 {
39 Self::kind()
40 }
41
42 fn to_args(&self) -> Result<serde_json::Value, serde_json::Error> {
44 serde_json::to_value(self)
45 }
46}