Skip to main content

awa/
lib.rs

1//! Awa — Postgres-native background job queue for Rust and Python.
2//!
3//! This is the facade crate that re-exports the main types from awa-model,
4//! awa-macros, and awa-worker for ergonomic usage.
5
6// Re-export awa_model so the JobArgs derive macro can resolve its trait path
7// through the facade crate (::awa::awa_model::JobArgs). Users only need to
8// depend on `awa` — no separate `awa-model` dependency required.
9#[doc(hidden)]
10pub use awa_model;
11
12// Re-export core model types (includes JobArgs derive macro via awa-model)
13pub use awa_model::{
14    self as model, admin, bridge, insert, insert_many, insert_many_copy,
15    insert_many_copy_from_pool, insert_with, migrations, storage, AwaError, CallbackConfig,
16    DefaultAction, InsertOpts, InsertParams, JobArgs, JobKindDescriptor, JobRow, JobState,
17    QueueDescriptor, ResolveOutcome, StorageCapability, StorageStatus, UniqueOpts,
18};
19
20// Re-export worker runtime
21pub use awa_worker::{
22    self as worker, context::ProgressState, BuildError, CallbackGuard, CallbackToken, Client,
23    ClientBuilder, HealthCheck, JobContext, JobError, JobEvent, JobResult, PeriodicJob,
24    PeriodicJobBuilder, QueueCapacity, QueueConfig, QueueHealth, RateLimit, RetentionPolicy,
25    UntypedJobEvent, Worker,
26};
27
28#[cfg(feature = "http-worker")]
29pub use awa_worker::{HttpWorker, HttpWorkerConfig, HttpWorkerMode};