1pub mod admin;
2pub mod error;
3pub mod insert;
4pub mod job;
5pub mod kind;
6pub mod migrations;
7pub mod unique;
8
9pub use error::AwaError;
11pub use insert::{insert, insert_many, insert_with};
12pub use job::{InsertOpts, InsertParams, JobRow, JobState, UniqueOpts};
13
14pub use awa_macros::JobArgs;
16
17pub trait JobArgs: serde::Serialize {
23 fn kind() -> &'static str
25 where
26 Self: Sized;
27
28 fn kind_str(&self) -> &'static str
30 where
31 Self: Sized,
32 {
33 Self::kind()
34 }
35
36 fn to_args(&self) -> Result<serde_json::Value, serde_json::Error> {
38 serde_json::to_value(self)
39 }
40}