# `loco-rs` public API index

GENERATED by `cargo xtask api-index` from rustdoc JSON. Do not edit by hand.

Every public symbol in `loco-rs`, grouped by module. If a symbol is not
here, it does not exist — do not import it. Inherent methods and trait
methods are listed under their type; trait *implementations* are omitted,
since they restate the trait's own API.

## `loco_rs::prelude`

`use loco_rs::prelude::*;` brings these into scope. They are already available — importing them again is redundant.

`ActiveModelBehavior`, `ActiveModelTrait`, `ActiveValue`, `AppContext`, `Authenticable`, `BackgroundWorker`, `ColumnTrait`, `Condition`, `ConnectionTrait`, `DatabaseConnection`, `Date`, `DateTime`, `DateTimeUtc`, `DateTimeWithTimeZone`, `DbErr`, `Decimal`, `Dir`, `EntityTrait`, `Error`, `Expr`, `Form`, `Format`, `Initializer`, `IntoActiveModel`, `IntoResponse`, `Json`, `JsonValidate`, `JsonValidateWithMessage`, `Mailer`, `MiddlewareStackExt`, `ModelError`, `ModelResult`, `ModelTrait`, `Multipart`, `Order`, `Pager`, `PagerMeta`, `PaginatorTrait`, `Path`, `Query`, `QueryFilter`, `QueryOrder`, `QuerySelect`, `Queue`, `RemoteIP`, `RespondTo`, `Response`, `Result`, `Routes`, `Set`, `SharedStore`, `State`, `Task`, `TaskInfo`, `TenantActiveModelExt`, `TenantEntity`, `TenantQueryExt`, `TeraView`, `TransactionTrait`, `Uuid`, `Validatable`, `Validate`, `ValidatorTrait`, `ViewEngine`, `ViewRenderer`, `async_trait`, `auth`, `bad_request`, `cookie`, `data`, `debug_handler`, `delete`, `format`, `get`, `head`, `include_dir`, `mailer`, `not_found`, `options`, `patch`, `post`, `prelude`, `put`, `query`, `task`, `trace`, `unauthorized`, `validation`

## `loco_rs::testing::prelude`

`use loco_rs::testing::prelude::*;` brings these into scope. They are already available — importing them again is redundant.

`db`, `redaction`, `request`, `selector`

## `loco_rs`

- `type` **Result** — Application results options list
- `enum` **VersionCheckError**

### `VersionCheckError`

- `variant` **CrateError**
- `variant` **LockfileError**
## `app`

- `struct` **AppContext**` { environment: Environment, db: DatabaseConnection, queue_provider: Option<Arc<Queue>>, config: Config, mailer: Option<EmailSender>, storage: Arc<Storage>, cache: Arc<Cache>, shared_store: Arc<SharedStore> }` — Represents the application context for a web server
- `struct` **AppContextBuilder** — Builder for [`AppContext`]
- `trait` **Hooks** — A trait that defines hooks for customizing and extending the behavior of a
- `trait` **Initializer** — An initializer
- `struct` **RefGuard**
- `struct` **SharedStore** — Type-safe heterogeneous storage for arbitrary application data

### `AppContext`

- `fn` **builder**`(environment: Environment, db: DatabaseConnection, config: Config) -> AppContextBuilder` — Start building an [`AppContext`]. (with-db)
- `fn` **into_builder**`(self: Self) -> AppContextBuilder` — Turn an existing context back into a builder, carrying **every**

### `AppContextBuilder`

- `fn` **build**`(self: Self) -> AppContext` — Finalize the [`AppContext`], filling any unset optional component with a
- `fn` **cache**`(self: Self, cache: Arc<Cache>) -> Self` — Set the cache (default: null cache)
- `fn` **mailer**`(self: Self, mailer: EmailSender) -> Self` — Set the email sender (default: none)
- `fn` **queue_provider**`(self: Self, queue_provider: Arc<Queue>) -> Self` — Set the background-queue provider (default: none)
- `fn` **shared_store**`(self: Self, shared_store: Arc<SharedStore>) -> Self` — Set the shared store (default: empty)
- `fn` **storage**`(self: Self, storage: Arc<Storage>) -> Self` — Set the storage (default: single null driver)

### `Hooks`

- `fn` **after_context**`(ctx: AppContext) -> Pin<Box<dyn Future + Send>>`
- `fn` **after_routes**`(router: AxumRouter, _ctx: &AppContext) -> Pin<Box<dyn Future + Send>>` — Invoke this function after the Loco routers have been constructed. This
- `fn` **app_name**`() -> &str` — Defines the crate name
- `fn` **app_version**`() -> String` — Defines the composite app version
- `fn` **before_routes**`(_ctx: &AppContext) -> Pin<Box<dyn Future + Send>>` — Returns the initial Axum router for the application, allowing the user
- `fn` **before_run**`(_app_context: &AppContext) -> Pin<Box<dyn Future + Send>>` — Calling the function before run the app
- `fn` **boot**`(mode: StartMode, environment: &Environment, config: Config) -> Pin<Box<dyn Future + Send>>` — Initializes and boots the application based on the specified mode and
- `fn` **connect_workers**`(ctx: &AppContext, queue: &Queue) -> Pin<Box<dyn Future + Send>>` — Connects custom workers to the application using the provided
- `fn` **dump**`(ctx: &AppContext, base: &Path) -> Pin<Box<dyn Future + Send>>` — Dumps database tables to YAML fixtures under `base`, the counterpart to
- `fn` **init_logger**`(_ctx: &AppContext) -> Result<bool>` — Override and return `Ok(true)` to provide an alternative logging and
- `fn` **initializers**`(_ctx: &AppContext) -> Pin<Box<dyn Future + Send>>` — Provide a list of initializers
- `fn` **load_config**`(env: &Environment) -> Pin<Box<dyn Future + Send>>` — Loads the configuration settings for the application based on the given environment
- `fn` **middlewares**`(ctx: &AppContext) -> Vec<Box<dyn MiddlewareLayer>>` — Provide a list of middlewares
- `fn` **on_shutdown**`(_ctx: &AppContext) -> Pin<Box<dyn Future + Send>>` — Called when the application is shutting down
- `fn` **register_tasks**`(tasks: &mut Tasks)` — Registers custom tasks with the provided [`Tasks`] object
- `fn` **routes**`(_ctx: &AppContext) -> AppRoutes` — Defines the application's routing configuration
- `fn` **seed**`(_ctx: &AppContext, path: &Path) -> Pin<Box<dyn Future + Send>>` — Seeds the database with initial data
- `fn` **serve**`(app: AxumRouter, ctx: &AppContext, serve_params: &ServeParams) -> Pin<Box<dyn Future + Send>>` — Start serving the Axum web application on the specified address and
- `fn` **truncate**`(_ctx: &AppContext) -> Pin<Box<dyn Future + Send>>` — Truncates the database as required. Users should implement this

### `Initializer`

- `fn` **after_routes**`(self: &Self, router: AxumRouter, _ctx: &AppContext) -> Pin<Box<dyn Future + Send>>` — Occurs after the app's `after_routes`
- `fn` **before_run**`(self: &Self, _app_context: &AppContext) -> Pin<Box<dyn Future + Send>>` — Occurs after the app's `before_run`
- `fn` **check**`(self: &Self, _app_context: &AppContext) -> Pin<Box<dyn Future + Send>>` — Perform health checks for this initializer
- `fn` **name**`(self: &Self) -> String` — The initializer name or identifier

### `SharedStore`

- `fn` **contains**`(self: &Self) -> bool` — Check if the shared store contains a value of type T
- `fn` **get**`(self: &Self) -> Option<T>` — Get a clone of a value of type T from the shared store
- `fn` **get_ref**`(self: &Self) -> Option<RefGuard<T>>` — Get a reference to a value of type T from the shared store
- `fn` **insert**`(self: &Self, val: T)` — Insert a value of type T into the shared store
- `fn` **remove**`(self: &Self) -> Option<T>` — Remove a value of type T from the shared store
## `auth::jwt`

- `struct` **JWT** — Represents the JWT configuration and operations
- `enum` **JWTAlgorithm** — The HMAC-based JWT signing algorithms supported by [`JWT`]
- `struct` **UserClaims**` { pid: String, claims: Map<String, Value> }` — Represents the claims associated with a user JWT

### `JWT`

- `fn` **algorithm**`(self: Self, algorithm: JWTAlgorithm) -> Self` — Override the default JWT algorithm to be used
- `fn` **generate_token**`(self: &Self, expiration: u64, pid: String, claims: Map<String, Value>) -> JWTResult<String>` — Generates a new JWT with specified claims and an expiration time
- `fn` **new**`(secret: &str) -> Self` — Creates a new [`JWT`] instance with the specified secret key
- `fn` **validate**`(self: &Self, token: &str) -> JWTResult<TokenData<UserClaims>>` — Validates the authenticity and expiration of a given JWT

### `JWTAlgorithm`

- `variant` **HS256**
- `variant` **HS384**
- `variant` **HS512**
## `bgworker`

- `trait` **BackgroundWorker**
- `trait` **Driver** — Abstracts the backend-coupled operations of the SQL-based job queue
- `struct` **Job**` { id: JobId, name: String, data: JobData, status: JobStatus, run_at: DateTime<Utc>, interval: Option<i64>, created_at: Option<DateTime<Utc>>, updated_at: Option<DateTime<Utc>>, tags: Option<Vec<String>>, priority: i32 }` — A background job, shared between the SQL-based (Postgres/`SQLite`) and
- `type` **JobData**
- `type` **JobHandler** — A boxed, type-erased job handler: takes a job's id and data and runs the
- `type` **JobId**
- `struct` **JobRegistry**
- `enum` **JobStatus**
- `struct` **Queue** — A handle to a background job queue
- `trait` **QueueProvider** — Object-safe interface implemented by every queue backend (Postgres,
- `struct` **RunOpts**` { num_workers: u32, poll_interval_sec: u32, reaper: Option<ReaperConfig> }`
- `fn` **converge**`(queue: &Queue, config: &QueueConfig) -> Result<()>` — Initialize the system according to configuration
- `fn` **create_queue_provider**`(config: &Config) -> Result<Option<Arc<Queue>>>` — Create a provider from the `queue` config when `workers.mode` is

### `BackgroundWorker`

- `fn` **build**`(ctx: &AppContext) -> Self`
- `fn` **class_name**`() -> String where Self: Sized`
- `fn` **perform**`(self: &Self, args: A) -> Pin<Box<dyn Future + Send>>`
- `fn` **perform_all_later**`(ctx: &AppContext, args_list: Vec<A>) -> Pin<Box<dyn Future + Send>> where Self: Sized` — Enqueue (or run) multiple jobs at once at the default priority and
- `fn` **perform_all_later_with_priority**`(ctx: &AppContext, jobs: Vec<(A, Option<i32>)>) -> Pin<Box<dyn Future + Send>> where Self: Sized` — Enqueue (or run) multiple jobs at once, each with its own priority,
- `fn` **perform_later**`(ctx: &AppContext, args: A) -> Pin<Box<dyn Future + Send>> where Self: Sized` — Enqueue (or run) the job at the default priority and return its ID
- `fn` **perform_later_with_priority**`(ctx: &AppContext, args: A, priority: Option<i32>) -> Pin<Box<dyn Future + Send>> where Self: Sized` — Enqueue (or run) the job with an explicit priority and return its ID
- `fn` **queue**`() -> Option<String>` — If you have a specific queue
- `fn` **tags**`() -> Vec<String>` — Specifies tags associated with this worker. Workers might only process jobs

### `Driver`

- `fn` **complete_job**`(pool: &Self::Pool, id: &JobId, interval: Option<i64>) -> impl Trait`
- `fn` **dequeue**`(pool: &Self::Pool, tags: &[String]) -> impl Trait`
- `fn` **fail_job**`(pool: &Self::Pool, id: &JobId, error: &Error) -> impl Trait`
- `fn` **idle_count**`(pool: &Self::Pool) -> usize`

### `JobRegistry`

- `fn` **handlers**`(self: &Self) -> &Arc<HashMap<String, JobHandler>>` — Returns a reference to the job handlers
- `fn` **insert_handler**`(self: &mut Self, name: String, handler: JobHandler) -> Result<()>` — Inserts a pre-erased job handler under `name` (see
- `fn` **new**`() -> Self` — Creates a new `JobRegistry`
- `fn` **run**`(self: &Self, pool: &D::Pool, opts: &RunOpts, token: &CancellationToken, tags: &[String]) -> Vec<JoinHandle<()>>` — Runs the job handlers with the provided number of workers

### `JobStatus`

- `variant` **Cancelled**
- `variant` **Completed**
- `variant` **Failed**
- `variant` **Processing**
- `variant` **Queued**

### `Queue`

- `fn` **cancel_jobs**`(self: &Self, job_name: &str) -> Result<()>` — Cancels jobs based on the given job name for the configured queue provider
- `fn` **clear**`(self: &Self) -> Result<()>` — Performs clear on this [`Queue`]
- `fn` **clear_by_status**`(self: &Self, status: Vec<JobStatus>) -> Result<()>` — Clears jobs based on their status for the configured queue provider
- `fn` **clear_jobs_older_than**`(self: &Self, age_days: i64, status: &Vec<JobStatus>) -> Result<()>` — Clears jobs older than a specified number of days for the configured queue provider
- `fn` **describe**`(self: &Self) -> String`
- `fn` **dump**`(self: &Self, path: &Path, status: Option<&Vec<JobStatus>>, age_days: Option<i64>) -> Result<PathBuf>` — Dumps the list of jobs to a YAML file at the specified path
- `fn` **empty**`() -> Self` — A [`Queue`] with no configured provider. Replaces the old
- `fn` **enqueue**`(self: &Self, class: String, queue: Option<String>, args: A, tags: Option<Vec<String>>, priority: Option<i32>) -> Result<Option<String>>` — Add a job to the queue
- `fn` **enqueue_batch**`(self: &Self, class: String, queue: Option<String>, jobs: Vec<(A, Option<i32>)>, tags: Option<Vec<String>>) -> Result<Vec<JobId>>` — Add multiple jobs to the queue in a single batch operation, returning
- `fn` **from_provider**`(provider: Arc<dyn QueueProvider>) -> Self` — Wraps a third-party (or built-in) [`QueueProvider`] as a [`Queue`]
- `fn` **import**`(self: &Self, path: &Path) -> Result<()>` — Imports jobs from a YAML file into the configured queue provider
- `fn` **ping**`(self: &Self) -> Result<()>` — Returns a ping of this [`Queue`]
- `fn` **register**`(self: &Self, worker: W) -> Result<()>` — Register a worker
- `fn` **requeue**`(self: &Self, age_minutes: &i64) -> Result<()>` — Requeued job with the given minutes ages
- `fn` **retry_failed**`(self: &Self, id: Option<&str>) -> Result<u64>` — Moves failed jobs back to [`JobStatus::Queued`], returning how many
- `fn` **run**`(self: &Self, tags: Vec<String>) -> Result<()>` — Runs the worker loop for this [`Queue`]
- `fn` **setup**`(self: &Self) -> Result<()>` — Runs the setup of this [`Queue`]
- `fn` **shutdown**`(self: &Self) -> Result<()>` — # Errors

### `QueueProvider`

- `fn` **cancel_jobs_by_name**`(self: &Self, name: &str) -> Pin<Box<dyn Future + Send>>` — Cancels queued jobs by name
- `fn` **clear**`(self: &Self) -> Pin<Box<dyn Future + Send>>` — Clears all jobs from this provider
- `fn` **clear_by_status**`(self: &Self, status: Vec<JobStatus>) -> Pin<Box<dyn Future + Send>>` — Clears jobs matching any of the given statuses
- `fn` **clear_jobs_older_than**`(self: &Self, age_days: i64, status: Option<&Vec<JobStatus>>) -> Pin<Box<dyn Future + Send>>` — Clears jobs older than `age_days`, optionally filtered by status
- `fn` **describe**`(self: &Self) -> String` — A short, human-readable description of this provider
- `fn` **enqueue**`(self: &Self, class: String, queue: Option<String>, args: JsonValue, tags: Option<Vec<String>>, priority: Option<i32>) -> Pin<Box<dyn Future + Send>>` — Add a job to the queue. See [`Queue::enqueue`] for the full contract
- `fn` **enqueue_batch**`(self: &Self, class: String, queue: Option<String>, jobs: Vec<(JsonValue, Option<i32>)>, tags: Option<Vec<String>>) -> Pin<Box<dyn Future + Send>>` — Add multiple jobs to the queue in one batch. See [`Queue::enqueue_batch`]
- `fn` **get_jobs**`(self: &Self, status: Option<&Vec<JobStatus>>, age_days: Option<i64>) -> Pin<Box<dyn Future + Send>>` — Retrieves jobs from this provider, optionally filtered
- `fn` **ping**`(self: &Self) -> Pin<Box<dyn Future + Send>>` — Pings this provider
- `fn` **register_handler**`(self: &Self, name: String, handler: JobHandler) -> Pin<Box<dyn Future + Send>>` — Registers a pre-erased job handler under `name`
- `fn` **requeue**`(self: &Self, age_minutes: &i64) -> Pin<Box<dyn Future + Send>>` — Requeues jobs stuck in processing for longer than `age_minutes`
- `fn` **retry_failed**`(self: &Self, id: Option<&str>) -> Pin<Box<dyn Future + Send>>` — Moves failed jobs back to [`JobStatus::Queued`], returning how many
- `fn` **run**`(self: &Self, tags: Vec<String>) -> Pin<Box<dyn Future + Send>>` — Runs the worker loop for this provider
- `fn` **setup**`(self: &Self) -> Pin<Box<dyn Future + Send>>` — Runs the setup of this provider
- `fn` **shutdown**`(self: &Self) -> Result<()>` — Signals this provider's worker loop to stop
## `bgworker::pg`

- `struct` **PgDriver** — [`Driver`] implementation delegating to the Postgres-specific
- `struct` **PgQueue**` { pool: PgPool, registry: Arc<Mutex<JobRegistry>>, run_opts: RunOpts, token: CancellationToken }` — The Postgres [`QueueProvider`]
- `fn` **cancel_jobs_by_name**`(pool: &PgPool, name: &str) -> Result<()>` — Cancels jobs in the `pg_loco_queue` table by their name
- `fn` **clear**`(pool: &PgPool) -> Result<()>` — Clear all jobs
- `fn` **clear_by_status**`(pool: &PgPool, status: Vec<JobStatus>) -> Result<()>` — Deletes jobs from the `pg_loco_queue` table based on their status
- `fn` **clear_jobs_older_than**`(pool: &PgPool, age_days: i64, status: Option<&Vec<JobStatus>>) -> Result<()>` — Deletes jobs from the `pg_loco_queue` table that are older than a specified number of days
- `fn` **create_provider**`(qcfg: &PostgresQueueConfig) -> Result<Queue>` — Create this provider
- `fn` **enqueue**`(pool: &PgPool, name: &str, data: JobData, run_at: DateTime<Utc>, interval: Option<Duration>, tags: Option<Vec<String>>, priority: Option<i32>) -> Result<JobId>` — Add a job
- `fn` **enqueue_batch**`(pool: &PgPool, name: &str, jobs: Vec<(JobData, Option<i32>)>, run_at: DateTime<Utc>, tags: Option<Vec<String>>) -> Result<Vec<JobId>>` — Enqueue multiple jobs in a single atomic batch
- `fn` **get_jobs**`(pool: &PgPool, status: Option<&Vec<JobStatus>>, age_days: Option<i64>) -> Result<Vec<Job>>` — Retrieves a list of jobs from the `pg_loco_queue` table in the database
- `fn` **initialize_database**`(pool: &PgPool) -> Result<()>` — Initialize job tables
- `fn` **ping**`(pool: &PgPool) -> Result<()>` — Ping system
- `fn` **requeue**`(pool: &PgPool, age_minutes: &i64) -> Result<()>` — Requeues jobs from [`JobStatus::Processing`] to [`JobStatus::Queued`]
- `fn` **retry_failed**`(pool: &PgPool, id: Option<&str>) -> Result<u64>` — Moves failed jobs back to [`JobStatus::Queued`], returning how many moved
## `bgworker::redis`

- `const` **DEFAULT_QUEUES**
- `struct` **JobRegistry**
- `type` **RedisPool**
- `struct` **RedisQueue**` { client: RedisPool, registry: Arc<Mutex<JobRegistry>>, run_opts: RunOpts, token: CancellationToken }` — Redis [`QueueProvider`]: holds the client, job registry, run options and
- `struct` **RunOpts**` { num_workers: u32, poll_interval_sec: u32, queues: Option<Vec<String>>, reaper: Option<ReaperConfig> }`
- `fn` **cancel_jobs_by_name**`(client: &RedisPool, job_name: &str) -> Result<()>` — Cancels jobs with the specified name in the Redis queue
- `fn` **clear**`(client: &RedisPool) -> Result<()>` — Clear tasks
- `fn` **clear_by_status**`(client: &RedisPool, status: Vec<JobStatus>) -> Result<()>` — Clears jobs based on their status from the Redis queue
- `fn` **clear_jobs_older_than**`(client: &RedisPool, age_days: i64, status: Option<&Vec<JobStatus>>) -> Result<()>` — Clears jobs older than the specified number of days from the Redis queue
- `fn` **create_provider**`(qcfg: &RedisQueueConfig) -> Result<Queue>` — Create this provider
- `fn` **enqueue**`(client: &RedisPool, class: String, queue: Option<String>, args: impl Trait, tags: Option<Vec<String>>, priority: Option<i32>) -> Result<JobId>` — Add a task
- `fn` **enqueue_batch**`(client: &RedisPool, class: String, queue: Option<String>, jobs: Vec<(Value, Option<i32>)>, tags: Option<Vec<String>>) -> Result<Vec<JobId>>` — Enqueue multiple jobs in a single atomic pipeline operation
- `fn` **get_jobs**`(client: &RedisPool, status: Option<&Vec<JobStatus>>, age_days: Option<i64>) -> Result<Vec<Job>>` — Retrieves a list of jobs, optionally filtered by `status` and age
- `fn` **get_queues**`(config_queues: &Option<Vec<String>>) -> Vec<String>`
- `fn` **ping**`(client: &RedisPool) -> Result<()>` — Ping system
- `fn` **requeue**`(client: &RedisPool, age_minutes: &i64) -> Result<()>` — Requeues failed or stalled jobs that are older than a specified number of minutes
- `fn` **retry_failed**`(client: &RedisPool, id: Option<&str>) -> Result<u64>` — Moves failed jobs back onto their queue, returning how many moved

### `JobRegistry`

- `fn` **handlers**`(self: &Self) -> &Arc<HashMap<String, JobHandler>>` — Returns a reference to the job handlers
- `fn` **insert_handler**`(self: &mut Self, name: String, handler: JobHandler) -> Result<()>` — Inserts a pre-erased job handler under `name` (see
- `fn` **new**`() -> Self` — Creates a new [`JobRegistry`]
- `fn` **run**`(self: &Self, client: &RedisPool, opts: &RunOpts, token: &CancellationToken, tags: &[String]) -> Vec<JoinHandle<()>>` — Runs the job handlers with the provided number of workers
## `bgworker::sqlt`

- `struct` **SqliteDriver** — [`Driver`] implementation delegating to the `SQLite`-specific
- `struct` **SqliteQueue**` { pool: SqlitePool, registry: Arc<Mutex<JobRegistry>>, run_opts: RunOpts, token: CancellationToken }` — The `SQLite` [`QueueProvider`]
- `fn` **cancel_jobs_by_name**`(pool: &SqlitePool, name: &str) -> Result<()>` — Cancels jobs in the `sqlt_loco_queue` table by their name
- `fn` **clear**`(pool: &SqlitePool) -> Result<()>` — Clear all jobs
- `fn` **clear_by_status**`(pool: &SqlitePool, status: Vec<JobStatus>) -> Result<()>` — Deletes jobs from the `sqlt_loco_queue` table based on their status
- `fn` **clear_jobs_older_than**`(pool: &SqlitePool, age_days: i64, status: Option<&Vec<JobStatus>>) -> Result<()>` — Deletes jobs from the `sqlt_loco_queue` table that are older than a specified number of days
- `fn` **create_provider**`(qcfg: &SqliteQueueConfig) -> Result<Queue>` — Create this provider
- `fn` **enqueue**`(pool: &SqlitePool, name: &str, data: JobData, run_at: DateTime<Utc>, interval: Option<Duration>, tags: Option<Vec<String>>, priority: Option<i32>) -> Result<JobId>` — Add a job
- `fn` **enqueue_batch**`(pool: &SqlitePool, name: &str, jobs: Vec<(JobData, Option<i32>)>, tags: Option<Vec<String>>) -> Result<Vec<JobId>>` — Enqueue multiple jobs in a single atomic batch
- `fn` **get_jobs**`(pool: &SqlitePool, status: Option<&Vec<JobStatus>>, age_days: Option<i64>) -> Result<Vec<Job>>` — Retrieves a list of jobs from the `sqlt_loco_queue` table in the database
- `fn` **initialize_database**`(pool: &SqlitePool) -> Result<()>` — Initialize job tables
- `fn` **ping**`(pool: &SqlitePool) -> Result<()>` — Ping system
- `fn` **requeue**`(pool: &SqlitePool, age_minutes: &i64) -> Result<()>` — Requeues jobs from [`JobStatus::Processing`] to [`JobStatus::Queued`]
- `fn` **retry_failed**`(pool: &SqlitePool, id: Option<&str>) -> Result<u64>` — Moves failed jobs back to [`JobStatus::Queued`], returning how many moved
## `boot`

- `struct` **BootResult**` { app_context: AppContext, router: Option<Router>, worker: Option<Vec<String>>, run_scheduler: bool }`
- `struct` **MiddlewareInfo**` { id: String, enabled: bool, detail: String }`
- `enum` **RunDbCommand** — Represents commands for handling database-related operations
- `struct` **ServeParams**` { port: i32, binding: String }` — Configuration structure for serving an application
- `enum` **StartMode** — Represents the application startup mode
- `fn` **create_app**`(mode: StartMode, environment: &Environment, config: Config) -> Result<BootResult>` — Creates an application based on the specified mode and environment
- `fn` **create_context**`(environment: &Environment, config: Config) -> Result<AppContext>` — Initializes the application context by loading configuration and
- `fn` **list_endpoints**`(ctx: &AppContext) -> Vec<ListRoutes>`
- `fn` **list_middlewares**`(ctx: &AppContext) -> Vec<MiddlewareInfo>`
- `fn` **run_app**`(mode: &StartMode, app_context: AppContext) -> Result<BootResult>` — Run the application with the  given mode
- `fn` **run_db**`(app_context: &AppContext, cmd: RunDbCommand) -> Result<()>` — Handles database commands
- `fn` **run_scheduler**`(app_context: &AppContext, config: Option<&PathBuf>, name: Option<String>, tag: Option<String>, list: bool) -> Result<()>` — Runs the scheduler with the given configuration and context. in case if list
- `fn` **run_task**`(app_context: &AppContext, task: Option<&String>, vars: &Vars) -> Result<()>` — Run task
- `fn` **shutdown_signal**`()` — Waits for a shutdown signal, either via Ctrl+C or termination signal
- `fn` **start**`(boot: BootResult, server_config: ServeParams, no_banner: bool) -> Result<()>` — Runs the application based on the provided `BootResult`

### `RunDbCommand`

- `variant` **Down** — Run one or more down migrations
- `variant` **Entities** — Generate entity
- `variant` **Migrate** — Apply pending migrations
- `variant` **Reset** — Drop all tables, then reapply all migrations
- `variant` **Schema** — Dump database schema
- `variant` **Seed** — Seed database
- `variant` **Status** — Check the status of all migrations
- `variant` **Truncate** — Truncate tables, by executing the implementation in [`Hooks::seed`]

### `StartMode`

- `variant` **All** — Run the app with all available components in the same process
- `variant` **ServerAndScheduler** — Run the server and scheduler without workers
- `variant` **ServerAndWorker** — Run the application web server and the worker in the same process
- `variant` **ServerOnly** — Run the application as a server only. when running web server only,
- `variant` **WorkerAndScheduler** — Run workers and scheduler without the HTTP server
- `variant` **WorkerOnly** — Pulling job worker and execute them
## `cache`

- `struct` **Cache**` { driver: Box<dyn CacheDriver> }` — Represents a cache instance
- `enum` **CacheError** — Errors related to cache operations
- `type` **CacheResult**
- `fn` **create_cache_provider**`(config: &Config) -> Result<Arc<Cache>>` — Create a provider

### `Cache`

- `fn` **clear**`(self: &Self) -> CacheResult<()>` — Clears all key-value pairs from the cache
- `fn` **contains_key**`(self: &Self, key: &str) -> CacheResult<bool>` — Checks if a key exists in the cache
- `fn` **get**`(self: &Self, key: &str) -> CacheResult<Option<T>>` — Retrieves a value from the cache based on the provided key and deserializes it
- `fn` **get_or_insert**`(self: &Self, key: &str, f: F) -> LocoResult<T> where T: Serialize + DeserializeOwned + Send + Sync, F: Future<Output = LocoResult<T>> + Send` — Retrieves and deserializes the value associated with the given key from the cache,
- `fn` **get_or_insert_with_expiry**`(self: &Self, key: &str, duration: Duration, f: F) -> LocoResult<T> where T: Serialize + DeserializeOwned + Send + Sync, F: Future<Output = LocoResult<T>> + Send` — Retrieves and deserializes the value associated with the given key from the cache,
- `fn` **insert**`(self: &Self, key: &str, value: &T) -> CacheResult<()>` — Inserts a serializable value into the cache with the provided key
- `fn` **insert_with_expiry**`(self: &Self, key: &str, value: &T, duration: Duration) -> CacheResult<()>` — Inserts a serializable value into the cache with the provided key and expiry duration
- `fn` **new**`(driver: Box<dyn CacheDriver>) -> Self` — Creates a new cache instance with the specified cache driver
- `fn` **ping**`(self: &Self) -> CacheResult<()>` — Pings the cache to check if it is reachable
- `fn` **remove**`(self: &Self, key: &str) -> CacheResult<()>` — Removes a key-value pair from the cache

### `CacheError`

- `variant` **Any**
- `variant` **Deserialization**
- `variant` **Redis**
- `variant` **RedisConnectionError**
- `variant` **Serialization**
## `cache::drivers`

- `trait` **CacheDriver** — Trait representing a cache driver

### `CacheDriver`

- `fn` **clear**`(self: &Self) -> Pin<Box<dyn Future + Send>>` — Clears all key-value pairs from the cache
- `fn` **contains_key**`(self: &Self, key: &str) -> Pin<Box<dyn Future + Send>>` — Checks if a key exists in the cache
- `fn` **get**`(self: &Self, key: &str) -> Pin<Box<dyn Future + Send>>` — Retrieves a value from the cache based on the provided key
- `fn` **insert**`(self: &Self, key: &str, value: &str) -> Pin<Box<dyn Future + Send>>` — Inserts a key-value pair into the cache
- `fn` **insert_with_expiry**`(self: &Self, key: &str, value: &str, duration: Duration) -> Pin<Box<dyn Future + Send>>` — Inserts a key-value pair into the cache that expires after the
- `fn` **ping**`(self: &Self) -> Pin<Box<dyn Future + Send>>` — Pings the cache to check if it is reachable
- `fn` **remove**`(self: &Self, key: &str) -> Pin<Box<dyn Future + Send>>` — Removes a key-value pair from the cache
## `cache::drivers::inmem`

- `enum` **Expiration**
- `struct` **InMemExpiry**
- `struct` **Inmem** — Represents the in-memory cache driver
- `fn` **new**`(config: &InMemCacheConfig) -> Cache` — Creates a new instance of the in-memory cache driver, with a default Loco

### `Expiration`

- `variant` **AfterDuration**
- `variant` **Never**
- `fn` **as_duration**`(self: &Self) -> Option<Duration>`

### `Inmem`

- `fn` **from**`(cache: Cache<String, (Expiration, String)>) -> Box<dyn CacheDriver>` — Constructs a new [`Inmem`] instance from a given cache
## `cache::drivers::null`

- `struct` **Null** — Represents the in-memory cache driver
- `fn` **new**`() -> Box<dyn CacheDriver>` — Creates a new null cache instance
## `cache::drivers::redis`

- `struct` **Redis** — Represents the Redis cache driver
- `fn` **new**`(config: &RedisCacheConfig) -> CacheResult<Cache>` — Creates a new instance of the Redis cache driver with a default configuration

### `Redis`

- `fn` **from**`(pool: Pool<RedisConnectionManager>) -> Box<dyn CacheDriver>` — Constructs a new [`Redis`] instance from a given connection pool
## `cargo_config`

- `struct` **CargoConfig** — Represents a parsed Cargo.toml configuration

### `CargoConfig`

- `fn` **from_current_dir**`() -> AppResult<Self>` — Creates a new [`CargoConfig`] by reading the Cargo.toml file from the current directory
- `fn` **from_path**`(path: impl Trait) -> AppResult<Self>` — Creates a new [`CargoConfig`] by reading and parsing a TOML file from the specified path
- `fn` **get_db_entities**`(self: &Self) -> Option<&Table>` — Retrieves the database entity configuration from the Cargo.toml
## `cli`

- `enum` **DeploymentKind**
- `fn` **format_templates_as_tree**`(paths: Vec<PathBuf>) -> String`
- `fn` **main**`() -> Result<()>` — # Main CLI Function
- `fn` **playground**`() -> Result<AppContext>` — run playgroup code

### `DeploymentKind`

- `variant` **Docker**
- `variant` **Lambda**
- `variant` **Nginx**
## `config`

- `struct` **Auth**` { jwt: Option<JWT> }` — User authentication configuration
- `enum` **CacheConfig** — Cache configurations for the application
- `struct` **Config**` { logger: Logger, server: Server, database: Database, cache: CacheConfig, queue: Option<QueueConfig>, auth: Option<Auth>, workers: Workers, mailer: Option<Mailer>, initializers: Option<Initializers>, settings: Option<Value>, scheduler: Option<Config> }` — Main application configuration structure
- `struct` **Database**` { uri: String, enable_logging: bool, min_connections: u32, max_connections: u32, connect_timeout: u64, idle_timeout: u64, acquire_timeout: Option<u64>, auto_migrate: bool, dangerously_truncate: bool, dangerously_recreate: bool, run_on_start: Option<String> }` — Database configuration
- `struct` **InMemCacheConfig**` { max_capacity: u64 }`
- `type` **Initializers** — Initializers configuration
- `struct` **JWT**` { location: Option<JWTLocationConfig>, secret: String, expiration: u64 }` — JWT configuration structure
- `enum` **JWTLocation** — Defines the authentication mechanism for middleware
- `enum` **JWTLocationConfig** — Configuration for JWT location(s) - supports both single location and multiple locations
- `struct` **Logger**` { enable: bool, pretty_backtrace: bool, level: LogLevel, format: Format, override_filter: Option<String>, file_appender: Option<LoggerFileAppender> }` — Logger configuration
- `struct` **LoggerFileAppender**` { enable: bool, non_blocking: bool, level: LogLevel, format: Format, rotation: Rotation, dir: Option<String>, filename_prefix: Option<String>, filename_suffix: Option<String>, max_log_files: usize }`
- `struct` **Mailer**` { smtp: Option<SmtpMailer>, stub: bool }` — Mailer configuration
- `struct` **MailerAuth**` { user: String, password: String }` — Authentication details for the mailer
- `enum` **MailerTls** — TLS mode for the SMTP connection
- `struct` **PostgresQueueConfig**` { uri: String, dangerously_flush: bool, enable_logging: bool, max_connections: u32, min_connections: u32, connect_timeout: u64, idle_timeout: u64, poll_interval_sec: u32, num_workers: u32, reaper: Option<ReaperConfig> }`
- `enum` **QueueConfig**
- `struct` **ReaperConfig**` { age_minutes: i64, interval_seconds: u64 }` — Configuration for an opt-in visibility-timeout reaper
- `struct` **RedisCacheConfig**` { uri: String, max_size: u32 }`
- `struct` **RedisQueueConfig**` { uri: String, dangerously_flush: bool, queues: Option<Vec<String>>, num_workers: u32, reaper: Option<ReaperConfig> }`
- `struct` **Server**` { binding: String, port: i32, host: String, ident: Option<String>, middlewares: Config }` — Server configuration structure
- `struct` **SmtpMailer**` { enable: bool, host: String, port: u16, secure: bool, tls: Option<MailerTls>, auth: Option<MailerAuth>, hello_name: Option<String> }` — SMTP mailer configuration structure
- `struct` **SqliteQueueConfig**` { uri: String, dangerously_flush: bool, enable_logging: bool, max_connections: u32, min_connections: u32, connect_timeout: u64, idle_timeout: u64, poll_interval_sec: u32, num_workers: u32, reaper: Option<ReaperConfig> }`
- `enum` **WorkerMode** — Worker mode configuration
- `struct` **Workers**` { mode: WorkerMode }` — Background worker configuration
- `fn` **db_connect_timeout**`() -> u64`
- `fn` **db_idle_timeout**`() -> u64`
- `fn` **db_max_conn**`() -> u32`
- `fn` **db_min_conn**`() -> u32`

### `CacheConfig`

- `variant` **InMem** — In-memory cache
- `variant` **Null** — Null cache
- `variant` **Redis** — Redis cache

### `Config`

- `fn` **from_folder**`(env: &Environment, path: &Path) -> Result<Self>` — Loads configuration settings from a folder for the specified
- `fn` **get_jwt_config**`(self: &Self) -> Result<&JWT>` — Get a reference to the JWT configuration
- `fn` **new**`(env: &Environment) -> Result<Self>` — Creates a new configuration instance based on the specified environment
- `fn` **settings**`(self: &Self) -> Result<T>` — Deserialize the `settings:` block into your own type

### `JWTLocation`

- `variant` **Bearer** — Authenticate using a Bearer token
- `variant` **Cookie** — Authenticate using a token stored in a cookie
- `variant` **Query** — Authenticate using a token passed as a query parameter

### `JWTLocationConfig`

- `variant` **Multiple** — Multiple authentication locations (tried in order)
- `variant` **Single** — Single authentication location

### `MailerTls`

- `variant` **Implicit** — Implicit TLS: the connection is encrypted from the first byte (SMTPS,
- `variant` **None** — No transport security (cleartext). For local sinks like Mailpit only
- `variant` **Starttls** — Opportunistic TLS: connect in cleartext, then upgrade with `STARTTLS`

### `QueueConfig`

- `variant` **Postgres** — Postgres queue
- `variant` **Redis** — Redis queue
- `variant` **Sqlite** — Sqlite queue (requires `db-sqlite` feature)
- `fn` **dangerously_flush**`(self: &Self) -> bool` — Whether this queue is configured to discard all jobs on startup,

### `Server`

- `fn` **full_url**`(self: &Self) -> String`

### `SmtpMailer`

- `field` **secure** — Enable TLS
- `field` **tls** — Explicit TLS mode. When set, overrides [`SmtpMailer::secure`]. Use
- `fn` **tls_mode**`(self: &Self) -> MailerTls` — Resolve the effective TLS mode: explicit [`SmtpMailer::tls`] when set,

### `WorkerMode`

- `variant` **BackgroundAsync** — Workers operate asynchronously in the background, processing tasks with
- `variant` **BackgroundQueue** — Workers operate asynchronously in the background, processing queued
- `variant` **ForegroundBlocking** — Workers operate in the foreground in the same process and block until
## `controller`

- `struct` **AppRoutes** — Represents the routes of the application
- `struct` **ErrorDetail**` { error: Option<String>, description: Option<String>, errors: Option<Value> }` — Structure representing details about an error
- `struct` **Handler**` { uri: String, method: MethodRouter<AppContext>, actions: Vec<Method> }`
- `struct` **Json**
- `struct` **ListRoutes**` { uri: String, actions: Vec<Method>, method: MethodRouter<AppContext> }`
- `struct` **Routes**` { prefix: Option<String>, handlers: Vec<Handler> }`
- `fn` **bad_request**`(msg: T) -> Result<U>` — Return a bad request with a message
- `fn` **not_found**`() -> Result<T>` — return not found status code
- `fn` **unauthorized**`(msg: T) -> Result<U>` — Create an unauthorized error with a specified message

### `AppRoutes`

- `fn` **add_route**`(self: Self, route: Routes) -> Self` — Add a single route
- `fn` **add_routes**`(self: Self, mounts: Vec<Routes>) -> Self` — Add multiple routes
- `fn` **collect**`(self: &Self) -> Vec<ListRoutes>`
- `fn` **empty**`() -> Self` — Create an empty instance
- `fn` **get_prefix**`(self: &Self) -> Option<&String>` — Get the prefix of the routes
- `fn` **get_routes**`(self: &Self) -> &[Routes]` — Get the routes
- `fn` **middlewares**`(self: &Self, ctx: &AppContext) -> Vec<Box<dyn MiddlewareLayer>>`
- `fn` **nest_prefix**`(self: Self, prefix: &str) -> Self` — Set a nested prefix for the routes. This prefix will be appended to any existing prefix
- `fn` **nest_route**`(self: Self, prefix: &str, route: Routes) -> Self` — Set a nested route with a prefix. This route will be added with the specified prefix
- `fn` **nest_routes**`(self: Self, prefix: &str, routes: Vec<Routes>) -> Self` — Set multiple nested routes with a prefix. These routes will be added with the specified prefix
- `fn` **prefix**`(self: Self, prefix: &str) -> Self` — Set a prefix for the routes. this prefix will be a prefix for all the
- `fn` **to_router**`(self: &Self, ctx: AppContext, app: AXRouter<AppContext>) -> Result<AXRouter>` — Add the routes to an existing Axum Router, and set a list of middlewares
- `fn` **with_default_routes**`() -> Self` — Create a new instance with the default routes

### `ErrorDetail`

- `fn` **new**`(error: T1, description: T2) -> Self` — Create a new `ErrorDetail` with the specified error and description
- `fn` **with_reason**`(error: T) -> Self` — Create an `ErrorDetail` with only an error reason and no description

### `Routes`

- `fn` **add**`(self: Self, uri: &str, method: MethodRouter<AppContext>) -> Self` — Adding new router
- `fn` **at**`(prefix: &str) -> Self` — Set a prefix for the routes. this prefix will be a prefix for all the
- `fn` **delete**`(self: Self, uri: &str, handler: H) -> Self where H: Handler<T, AppContext>` — Adding a DELETE route
- `fn` **get**`(self: Self, uri: &str, handler: H) -> Self where H: Handler<T, AppContext>` — Adding a GET route
- `fn` **head**`(self: Self, uri: &str, handler: H) -> Self where H: Handler<T, AppContext>` — Adding a HEAD route
- `fn` **layer**`(self: Self, layer: L) -> Self where L: Layer<Route> + Clone + Send + Sync, L::Service: Service<Request> + Clone + Send + Sync, L::Service::Response: IntoResponse, L::Service::Error: Into<Infallible>, L::Service::Future: Send` — Set a layer for the routes. this layer will be a layer for all the
- `fn` **merge**`(self: Self, other: Self) -> Self` — Merge another Routes instance into this one
- `fn` **merge_all**`(self: Self, others: Vec<Self>) -> Self` — Merge multiple Routes instances into this one
- `fn` **nest**`(self: Self, path: &str, nested_routes: Self) -> Self` — Nest another Routes instance under a prefix path
- `fn` **new**`() -> Self` — Creates a new [`Routes`] instance with default settings
- `fn` **options**`(self: Self, uri: &str, handler: H) -> Self where H: Handler<T, AppContext>` — Adding an OPTIONS route
- `fn` **patch**`(self: Self, uri: &str, handler: H) -> Self where H: Handler<T, AppContext>` — Adding a PATCH route
- `fn` **post**`(self: Self, uri: &str, handler: H) -> Self where H: Handler<T, AppContext>` — Adding a POST route
- `fn` **prefix**`(self: Self, uri: &str) -> Self` — Set a prefix for the routes. this prefix will be a prefix for all the
- `fn` **put**`(self: Self, uri: &str, handler: H) -> Self where H: Handler<T, AppContext>` — Adding a PUT route
- `fn` **trace**`(self: Self, uri: &str, handler: H) -> Self where H: Handler<T, AppContext>` — Adding a TRACE route
## `controller::extractor::auth`

- `struct` **ApiToken**` { user: T }`
- `struct` **JWT**` { claims: UserClaims }`
- `struct` **JWTWithUser**` { claims: UserClaims, user: T }`
- `fn` **extract_jwt_from_request_parts**`(parts: &Parts, state: &S) -> Result<JWT, Error> where AppContext: FromRef<S>, S: Send + Sync` — extract a [JWT] token from request parts, using a non-mutable reference to the [Parts]
- `fn` **extract_token**`(jwt_config: &JWT, parts: &Parts) -> Result<String>` — extract token from the configured jwt location settings
- `fn` **extract_token_from_cookie**`(name: &str, parts: &Parts) -> Result<String>` — Extract a token value from cookie
- `fn` **extract_token_from_header**`(headers: &HeaderMap) -> Result<String>` — Function to extract a token from the authorization header
- `fn` **extract_token_from_query**`(name: &str, parts: &Parts) -> Result<String>` — Extract a token value from query
- `fn` **get_jwt_from_config**`(ctx: &AppContext) -> Result<&JWT>` — extract JWT token from context configuration
## `controller::extractor::shared_store`

- `struct` **SharedStore** — An extractor that streamlines the process of getting static Data from the `DiContainer`
## `controller::extractor::validate`

- `struct` **FormValidate** — Axum middleware for validating form data with simplified error handling
- `struct` **FormValidateWithMessage** — Axum middleware for validating form data
- `struct` **JsonValidate** — Axum middleware for validating JSON request bodies with simplified error
- `struct` **JsonValidateWithMessage** — Axum middleware for validating JSON request bodies
- `struct` **QueryValidate** — Axum middleware for validating query parameters with simplified error
- `struct` **QueryValidateWithMessage** — Axum middleware for validating query parameters
## `controller::format`

- `struct` **RenderBuilder**
- `fn` **empty**`() -> Result<Response>` — Returns an empty response
- `fn` **empty_json**`() -> Result<Response>` — Respond with empty json (`{}`)
- `fn` **html**`(content: &str) -> Result<Response>` — Returns an HTML response
- `fn` **json**`(t: T) -> Result<Response>` — Returns a JSON response containing the provided data
- `fn` **redirect**`(to: &str) -> Result<Response>` — Returns an redirect response
- `fn` **render**`() -> RenderBuilder`
- `fn` **template**`(template: &str, data: S) -> Result<Response> where S: Serialize` — Render template from string
- `fn` **text**`(t: &str) -> Result<Response>` — Returns a response containing the provided text
- `fn` **view**`(v: &V, key: &str, data: S) -> Result<Response> where V: ViewRenderer, S: Serialize` — Render template located by `key`
- `fn` **yaml**`(content: &str) -> Result<Response>` — Returns a YAML response

### `RenderBuilder`

- `fn` **cookies**`(self: Self, cookies: &[Cookie]) -> Result<Self>` — Add a collection of cookies to the response
- `fn` **empty**`(self: Self) -> Result<Response>` — Finalize and return an empty response
- `fn` **etag**`(self: Self, etag: &str) -> Result<Self>` — Add an etag
- `fn` **header**`(self: Self, key: K, value: V) -> Self where HeaderName: TryFrom<K>, HeaderName::Error: Into<Error>, HeaderValue: TryFrom<V>, HeaderValue::Error: Into<Error>` — Add a single header
- `fn` **html**`(self: Self, content: &str) -> Result<Response>` — Finalize and return a HTML response
- `fn` **json**`(self: Self, item: T) -> Result<Response> where T: Serialize` — Finalize and return a JSON response
- `fn` **new**`() -> Self`
- `fn` **redirect**`(self: Self, to: &str) -> Result<Response>` — Finalize and redirect request
- `fn` **redirect_with_header_key**`(self: Self, key: K, to: &str) -> Result<Response> where K: TryInto<HeaderName>, K::Error: Into<Error>` — Finalizes the HTTP response and redirects to a specified location using
- `fn` **response**`(self: Self) -> Builder` — Get an Axum response builder (escape hatch, leaving this builder)
- `fn` **status**`(self: Self, status: T) -> Self where StatusCode: TryFrom<T>, StatusCode::Error: Into<Error>` — Add a status code
- `fn` **template**`(self: Self, template: &str, data: S) -> Result<Response> where S: Serialize` — Render template located by `key`
- `fn` **text**`(self: Self, content: &str) -> Result<Response>` — Finalize and return a text response
- `fn` **view**`(self: Self, v: &V, key: &str, data: S) -> Result<Response> where V: ViewRenderer, S: Serialize` — Render template located by `key`
## `controller::middleware`

- `struct` **Config**` { compression: Option<Compression>, etag: Option<Etag>, limit_payload: Option<LimitPayload>, logger: Option<Config>, catch_panic: Option<CatchPanic>, timeout_request: Option<TimeOut>, cors: Option<Cors>, static_assets: Option<StaticAssets>, secure_headers: Option<SecureHeader>, remote_ip: Option<RemoteIpMiddleware>, fallback: Option<Fallback>, request_id: Option<RequestId> }` — Server middleware configuration structure
- `trait` **MiddlewareLayer** — Trait representing the behavior of middleware components in the application
- `trait` **MiddlewareStackExt** — Ergonomic, Rails-style edits to a middleware stack
- `fn` **default_middleware_stack**`(ctx: &AppContext) -> Vec<Box<dyn MiddlewareLayer>>`

### `MiddlewareLayer`

- `fn` **apply**`(self: &Self, app: AXRouter<AppContext>) -> Result<AXRouter<AppContext>>` — Applies the middleware to the given Axum router and returns the modified
- `fn` **config**`(self: &Self) -> Result<Value>` — Returns middleware config
- `fn` **is_enabled**`(self: &Self) -> bool` — Returns whether the middleware is enabled or not
- `fn` **name**`(self: &Self) -> &str` — Returns the name of the middleware

### `MiddlewareStackExt`

- `fn` **delete**`(self: &mut Self, name: &str) -> &mut Self` — Remove the first middleware named `name`
- `fn` **insert_after**`(self: &mut Self, name: &str, middleware: Box<dyn MiddlewareLayer>) -> &mut Self` — Insert `middleware` immediately after the first middleware named `name`
- `fn` **insert_before**`(self: &mut Self, name: &str, middleware: Box<dyn MiddlewareLayer>) -> &mut Self` — Insert `middleware` immediately before the first middleware named `name`
- `fn` **replace**`(self: &mut Self, name: &str, middleware: Box<dyn MiddlewareLayer>) -> &mut Self` — Replace the first middleware named `name` with `middleware`
## `controller::middleware::catch_panic`

- `struct` **CatchPanic**` { enable: bool }`
## `controller::middleware::compression`

- `struct` **Compression**` { enable: bool }`
## `controller::middleware::cors`

- `struct` **Cors**` { enable: bool, allow_origins: Vec<String>, allow_headers: Vec<String>, allow_methods: Vec<String>, expose_headers: Vec<String>, allow_credentials: bool, max_age: Option<u64>, vary: Vec<String> }` — CORS middleware configuration

### `Cors`

- `fn` **cors**`(self: &Self) -> Result<CorsLayer>` — Creates cors layer
## `controller::middleware::etag`

- `struct` **Etag**` { enable: bool }`
## `controller::middleware::fallback`

- `struct` **Fallback**` { enable: bool, code: StatusCode, file: Option<String>, not_found: Option<String> }`
- `struct` **StatusCodeWrapper**
## `controller::middleware::format`

- `struct` **Format**
- `enum` **RespondTo**
- `fn` **get_respond_to**`(headers: &HeaderMap) -> RespondTo`

### `RespondTo`

- `variant` **Html**
- `variant` **Json**
- `variant` **None**
- `variant` **Other**
- `variant` **Xml**
## `controller::middleware::limit_payload`

- `enum` **DefaultBodyLimitKind**
- `struct` **LimitPayload**` { body_limit: DefaultBodyLimitKind }`

### `DefaultBodyLimitKind`

- `variant` **Disable**
- `variant` **Limit**
## `controller::middleware::logger`

- `struct` **Config**` { enable: bool }`
- `struct` **Middleware** — [`Middleware`] struct responsible for logging HTTP requests
- `fn` **new**`(config: &Config, environment: &Environment) -> Middleware` — Creates a new instance of [`Middleware`] by cloning the [`Config`]
## `controller::middleware::powered_by`

- `struct` **Middleware** — [`Middleware`] struct responsible for managing the identifier value for the
- `fn` **new**`(ident: Option<&str>) -> Middleware` — Creates a new instance of [`Middleware`] by cloning the [`crate::config::Config`]
## `controller::middleware::remote_ip`

- `enum` **RemoteIP** — The resolved remote IP for a request, as determined by the
- `struct` **RemoteIpMiddleware**` { enable: bool, source: ClientIpSource }` — Resolves the client's IP address from a single, configured, trusted

### `RemoteIP`

- `variant` **Forwarded** — Resolved from the configured header-based [`ClientIpSource`] (e.g
- `variant` **None** — The remote-ip middleware is not enabled, or no IP could be resolved by
- `variant` **Socket** — Resolved from the raw socket peer address: either because the
## `controller::middleware::request_id`

- `struct` **LocoRequestId** — Wrapper struct for storing the request ID in the request's extensions
- `struct` **RequestId**` { enable: bool }`
- `fn` **request_id_middleware**`(request: Request, next: Next) -> Response` — Middleware function to ensure or generate a unique request ID

### `LocoRequestId`

- `fn` **get**`(self: &Self) -> &str` — Retrieves the request ID as a string slice
## `controller::middleware::secure_headers`

- `struct` **SecureHeader**` { enable: bool, preset: String, overrides: Option<BTreeMap<String, String>> }` — Sets a predefined or custom set of secure headers
- `struct` **SecureHeaders** — The [`SecureHeaders`] layer which wraps around the service and injects
- `struct` **SecureHeadersMiddleware** — The secure headers middleware

### `SecureHeaders`

- `fn` **new**`(config: &SecureHeader) -> Result<Self>` — Creates a new [`SecureHeaders`] instance with the provided
## `controller::middleware::static_assets_embedded`

- `struct` **EmbeddedAssets**
- `struct` **FolderConfig**` { uri: String, path: PathBuf }`
- `struct` **StaticAssets**` { enable: bool, must_exist: bool, folder: FolderConfig, fallback: PathBuf, precompressed: bool }` — Static asset middleware configuration
- `fn` **get_embedded_static_assets**`() -> HashMap<String, &[u8]>`
## `controller::middleware::timeout`

- `struct` **TimeOut**` { enable: bool, timeout: u64 }` — Timeout middleware configuration
## `controller::monitoring`

- `struct` **Health**` { ok: bool }` — Represents the health status of the application
- `fn` **health**`() -> Result<Response>` — Check application ping endpoint
- `fn` **ping**`() -> Result<Response>` — Check application ping endpoint
- `fn` **readiness**`(__arg0: State<AppContext>) -> (StatusCode, Response)` — Check the readiness of the application by sending a ping request to
- `fn` **routes**`() -> Routes` — Defines and returns the readiness-related routes
## `controller::views`

- `struct` **ViewEngine**
- `trait` **ViewRenderer**
- `fn` **template**`(template: &str, data: S) -> Result<String> where S: Serialize` — A struct representing an inline Tera view renderer

### `ViewEngine<E>`

- `fn` **new**`(engine: E) -> Self` — Creates a new [`ViewEngine`] that wraps the given engine

### `ViewRenderer`

- `fn` **render**`(self: &Self, key: &str, data: S) -> Result<String>` — Render a view template located by `key`
## `controller::views::engine_embedded`

- `static` **DEFAULT_ASSET_FOLDER**
- `struct` **TeraView**` { tera: Tera, default_context: Context }`
- `fn` **get_embedded_templates**`() -> HashMap<String, &str>`

### `TeraView`

- `fn` **build**`() -> Result<Self>` — Create a Tera view engine
- `fn` **build_with_post_process**`(post_process: impl Trait) -> Result<Self>` — Create a Tera view engine with a post-processing function, used to
- `fn` **from_embedded_templates**`() -> Result<Self>` — Load and initialize templates from embedded assets
- `fn` **post_process**`(self: Self, post_process: impl Trait) -> Result<Self>` — Attach the Tera view engine with a post-processing function for subsequent instantiation
- `fn` **render_component**`(self: &Self, component: &str, data: S, body: Option<&str>) -> Result<String>` — Render one Tera 2 component by name, autoescaped like [`ViewRenderer::render`]
## `controller::views::pagination`

- `struct` **Pager**` { results: T, info: PagerMeta }` — A page of results plus its pagination metadata
- `struct` **PagerMeta**` { page: u64, page_size: u64, total_pages: u64, total_items: u64 }`

### `Pager<T>`

- `fn` **new**`(results: T, meta: PagerMeta) -> Self`
## `controller::views::tera_builtins::filters`

- `fn` **register_filters**`(tera: &mut Tera)`
## `controller::views::tera_builtins::filters::number`

- `fn` **number_to_human_size**`(value: &Value, _: Kwargs, _: &State) -> TeraResult<Value>` — Converts a numeric value (in bytes) into a human-readable size string with
- `fn` **number_to_percentage**`(value: &Value, kwargs: Kwargs, _: &State) -> TeraResult<Value>` — Converts a numeric value into a formatted percentage string
- `fn` **number_with_delimiter**`(value: &Value, _: Kwargs, _: &State) -> TeraResult<Value>` — Formats a numeric value by adding commas as thousands separators
## `data`

- `fn` **load_json_file**`(path: &str) -> Result<T>` — Load a data JSON file asynchronously
- `fn` **load_json_file_sync**`(path: &str) -> Result<T>` — Load a data JSON file synchronously
## `db`

- `static` **EXTRACT_DB_NAME**
- `struct` **MultiDb**` { db: HashMap<String, DatabaseConnection> }`
- `fn` **connect**`(config: &Database) -> Result<DbConn, DbErr>` — Establish a connection to the database using the provided configuration
- `fn` **converge**`(ctx: &AppContext, config: &Database) -> Result<()>` — converge database logic
- `fn` **create**`(db_uri: &str) -> Result<()>` — Create a new database. This functionality is currently exclusive to Postgre
- `fn` **down**`(db: &DatabaseConnection, steps: u32) -> Result<(), DbErr>` — Revert migrations to the database using the provided migrator
- `fn` **dump**`(db: &DatabaseConnection, path: &str) -> Result<()> where A::Entity::Model: Serialize, A: ActiveModelTrait + Send + Sync, A::Entity: EntityName` — Dump an entity's rows to a YAML fixture at `path`, symmetric to [`seed`]
- `fn` **dump_schema**`(ctx: &AppContext, fname: &str) -> Result<()>` — dumps the db schema into file
- `fn` **dump_tables**`(db: &DatabaseConnection, to: &Path, only_tables: Option<Vec<String>>) -> Result<()>` — Dumps the contents of specified database tables into YAML files
- `fn` **entities**`(ctx: &AppContext) -> Result<String>` — Generate entity model
- `fn` **extract_db_name**`(conn_str: &str) -> Result<&str>` — Extracts the database name from a given connection string
- `fn` **get_tables**`(db: &DatabaseConnection) -> Result<Vec<String>>` — Retrieves a list of table names from the database
- `fn` **migrate**`(db: &DatabaseConnection) -> Result<(), DbErr>` — Apply migrations to the database using the provided migrator
- `fn` **reset**`(db: &DatabaseConnection) -> Result<(), DbErr>` — Reset the database, dropping and recreating the schema and applying
- `fn` **reset_autoincrement**`(db_backend: DatabaseBackend, table_name: &str, db: &DatabaseConnection) -> Result<()>` — Function to reset auto-increment
- `fn` **run_app_dump**`(ctx: &AppContext, base: &Path) -> Result<()>` — Execute a dump from the given base directory via [`Hooks::dump`]
- `fn` **run_app_seed**`(ctx: &AppContext, path: &Path) -> Result<()>` — Execute seed from the given path
- `fn` **seed**`(db: &DatabaseConnection, path: &str) -> Result<()> where A::Entity::Model: IntoActiveModel<A> + Deserialize + Serialize, A: ActiveModelTrait + Send + Sync + TryIntoModel<A::Entity::Model>, Insert<A>: Send + Sync, A::Entity: EntityName` — Seed the database with data from a specified file
- `fn` **status**`(db: &DatabaseConnection) -> Result<(), DbErr>` — Check the migration status of the database
- `fn` **truncate_table**`(db: &DatabaseConnection, _: T) -> Result<(), DbErr> where T: EntityTrait` — Truncate a table in the database, effectively deleting all rows
- `fn` **verify_access**`(db: &DatabaseConnection) -> Result<()>` — Verifies a user has access to data within its database

### `MultiDb`

- `fn` **get**`(self: &Self, name: &str) -> AppResult<&DatabaseConnection>` — Retrieves a database connection instance based on the specified key
- `fn` **new**`(dbs_config: HashMap<String, Database>) -> AppResult<Self>` — Creating multiple DB connection from the given hashmap
## `doctor`

- `struct` **Check**` { status: CheckStatus, message: String, description: Option<String> }` — Represents the result of a resource check
- `enum` **CheckStatus** — Represents the status of a resource check
- `enum` **Resource** — Represents different resources that can be checked
- `fn` **check_cratesio_version**`(crate_name: &str, current_version: &str) -> Result<Option<String>>` — Check latest crate version in crates.io
- `fn` **check_db**`(config: &Database) -> Check` — Checks the database connection
- `fn` **check_deps**`() -> Result<Check>` — Checks "blessed" / major dependencies in a Loco app Cargo.toml, and
- `fn` **check_production_safety**`(config: &Config) -> Check` — Flags configuration that is fine in development and harmful in production
- `fn` **check_published_loco_version**`() -> Result<Check>` — Check for the latest Loco version
- `fn` **check_queue**`(config: &Config) -> Check` — Checks the Redis connection
- `fn` **check_seaorm_cli**`() -> Result<Check>` — Checks the presence and version of `SeaORM` CLI
- `fn` **run_all**`(app_context: &AppContext, production: bool) -> Result<BTreeMap<Resource, Check>>` — Runs checks for all configured resources

### `Check`

- `fn` **to_result**`(self: &Self) -> Result<()>` — Convert to a Result type
- `fn` **valid**`(self: &Self) -> bool`

### `CheckStatus`

- `variant` **NotConfigure**
- `variant` **NotOk**
- `variant` **Ok**

### `Resource`

- `variant` **Database**
- `variant` **Deps**
- `variant` **Initializer**
- `variant` **ProductionSafety** — Settings that are safe in development and dangerous in production
- `variant` **PublishedLocoVersion**
- `variant` **Queue**
- `variant` **SeaOrmCLI**
## `environment`

- `const` **DEFAULT_ENVIRONMENT**
- `enum` **Environment** — Application environment
- `fn` **resolve_from_env**`() -> String`

### `Environment`

- `variant` **Any**
- `variant` **Development**
- `variant` **Production**
- `variant` **Test**
- `fn` **load**`(self: &Self) -> Result<Config>` — Load environment variables from local configuration
- `fn` **load_from_folder**`(self: &Self, path: &Path) -> Result<Config>` — Load environment variables from the given config path
## `errors`

- `enum` **Error** — Application-wide error type

### `Error`

- `variant` **Any**
- `variant` **Axum**
- `variant` **AxumFormRejection**
- `variant` **BadRequest**
- `variant` **Cache**
- `variant` **CustomError**
- `variant` **DB**
- `variant` **EmailSender**
- `variant` **Generators**
- `variant` **IO**
- `variant` **InternalServerError**
- `variant` **InvalidHeaderName**
- `variant` **InvalidHeaderValue**
- `variant` **InvalidMethod**
- `variant` **JSON**
- `variant` **JsonRejection**
- `variant` **Message**
- `variant` **Model**
- `variant` **NotFound**
- `variant` **ParseAddress**
- `variant` **QueueProviderMissing**
- `variant` **Redis**
- `variant` **Scheduler**
- `variant` **Smtp**
- `variant` **Sqlx**
- `variant` **Storage**
- `variant` **TaskNotFound**
- `variant` **Tera**
- `variant` **Unauthorized**
- `variant` **Validation**
- `variant` **VersionCheck**
- `variant` **WithBacktrace**
- `variant` **Worker**
- `variant` **YAML**
- `variant` **YAMLFile**
- `fn` **bt**`(self: Self) -> Self`
- `fn` **msg**`(err: impl Trait) -> Self`
- `fn` **string**`(s: &str) -> Self`
- `fn` **wrap**`(err: impl Trait) -> Self`
## `hash`

- `fn` **hash_password**`(pass: &str) -> Result<String>` — Hashes a plain text password and returns the hashed result
- `fn` **random_string**`(length: usize) -> String` — Generates a random alphanumeric string of the specified length
- `fn` **verify_password**`(pass: &str, hashed_password: &str) -> bool` — Verifies a plain text password against a hashed password
## `initializers::multi_db`

- `struct` **MultiDbInitializer**
## `logger`

- `enum` **Format**
- `enum` **LogLevel**
- `enum` **Rotation**
- `fn` **init**`(config: &Logger) -> Result<()>` — Tracing filtering rules:
- `fn` **init_env_filter**`(override_filter: Option<&String>, level: &LogLevel) -> EnvFilter` — Builds the [`EnvFilter`] Loco applies to its tracing subscriber, following
- `fn` **init_layer**`(make_writer: W2, format: &Format, ansi: bool) -> Box<dyn Layer + Sync + Send> where W2: MakeWriter + Sync + Send` — Builds a single boxed tracing [`Layer`] for `make_writer` in the given

### `Format`

- `variant` **Compact**
- `variant` **Json**
- `variant` **Pretty**

### `LogLevel`

- `variant` **Debug** — The "debug" level
- `variant` **Error** — The "error" level
- `variant` **Info** — The "info" level
- `variant` **Off** — The "off" level
- `variant` **Trace** — The "trace" level
- `variant` **Warn** — The "warn" level

### `Rotation`

- `variant` **Daily**
- `variant` **Hourly**
- `variant` **Minutely**
- `variant` **Never**
## `mailer`

- `struct` **Args**` { from: Option<String>, to: String, reply_to: Option<String>, locals: Value, bcc: Option<String>, cc: Option<String>, headers: Option<EmailHeaders> }` — The arguments struct for specifying email details such as sender, recipient,
- `const` **DEFAULT_FROM_SENDER**
- `const` **DEFAULT_MAILER_PRIORITY** — Default background-queue priority used when enqueuing mailer jobs. Higher
- `struct` **Deliveries**` { count: usize, messages: Vec<String> }`
- `struct` **Email**` { from: Option<String>, to: String, reply_to: Option<String>, subject: String, text: String, html: String, bcc: Option<String>, cc: Option<String>, headers: Option<EmailHeaders> }` — The structure representing an email details
- `struct` **EmailHeaders**` { references: Option<String>, in_reply_to: Option<String>, message_id: Option<String> }`
- `struct` **EmailSender**` { transport: EmailTransport }` — A structure representing the email sender, encapsulating the chosen
- `enum` **EmailTransport** — An enumeration representing the possible transport methods for sending
- `trait` **Mailer** — The `Mailer` trait defines methods for sending emails and processing email
- `struct` **MailerOpts**` { from: String, reply_to: Option<String>, priority: i32 }` — The options struct for configuring the email sender
- `struct` **MailerWorker**` { ctx: AppContext }` — The [`MailerWorker`] struct represents a worker responsible for asynchronous
- `struct` **MultiArgs**` { from: Option<String>, to: Vec<String>, reply_to: Option<String>, locals: Value, bcc: Vec<String>, cc: Vec<String>, headers: Option<EmailHeaders> }` — The arguments struct for specifying email details with multiple recipients
- `struct` **MultiEmail**` { from: Option<String>, to: Vec<String>, reply_to: Option<String>, subject: String, text: String, html: String, bcc: Vec<String>, cc: Vec<String>, headers: Option<EmailHeaders> }` — The structure representing an email with multiple recipients
- `struct` **MultiMailerWorker**` { ctx: AppContext }` — The [`MultiMailerWorker`] struct represents a worker responsible for

### `EmailSender`

- `fn` **deliveries**`(self: &Self) -> Deliveries`
- `fn` **mail**`(self: &Self, email: &Email) -> Result<()>` — Sends an email using the configured transport method
- `fn` **mail_multi**`(self: &Self, email: &MultiEmail) -> Result<()>` — Sends an email with multiple recipients using the configured transport
- `fn` **smtp**`(config: &SmtpMailer) -> Result<Self>` — Creates a new `EmailSender` using the SMTP transport method based on the
- `fn` **stub**`() -> Self`

### `EmailTransport`

- `variant` **Smtp** — SMTP (Simple Mail Transfer Protocol) transport
- `variant` **Test** — Test/stub transport for testing purposes

### `Mailer`

- `fn` **deliver_now**`(ctx: &AppContext, email: &Email) -> Pin<Box<dyn Future + Send>> where Self: Send` — Sends an email **synchronously**, bypassing the background worker queue
- `fn` **mail**`(ctx: &AppContext, email: &Email) -> Pin<Box<dyn Future + Send>> where Self: Send` — Sends an email using the provided [`AppContext`] and email details
- `fn` **mail_multi**`(ctx: &AppContext, email: &MultiEmail) -> Pin<Box<dyn Future + Send>> where Self: Send` — Sends an email to multiple recipients using the provided [`AppContext`]
- `fn` **mail_template**`(ctx: &AppContext, dir: &Dir, args: Args) -> Pin<Box<dyn Future + Send>> where Self: Send` — Renders and sends an email using the provided [`AppContext`], template
- `fn` **mail_template_multi**`(ctx: &AppContext, dir: &Dir, args: MultiArgs) -> Pin<Box<dyn Future + Send>> where Self: Send` — Renders and sends an email to multiple recipients using the provided
- `fn` **mail_template_now**`(ctx: &AppContext, dir: &Dir, args: Args) -> Pin<Box<dyn Future + Send>> where Self: Send` — Renders a template and sends it **synchronously** (see
- `fn` **mail_template_with_shared**`(ctx: &AppContext, dir: &Dir, shared_dirs: &[&Dir], args: Args) -> Pin<Box<dyn Future + Send>> where Self: Send` — Renders and sends an email using the provided [`AppContext`], template
- `fn` **opts**`() -> MailerOpts` — Returns default options for the mailer
## `model`

- `trait` **Authenticable**
- `enum` **ModelError**
- `type` **ModelResult**
- `trait` **TenantActiveModelExt** — Safely assigns the tenant key on a tenant-owned Sea-ORM active model
- `trait` **TenantEntity** — Marks a Sea-ORM entity as tenant-owned
- `trait` **TenantQueryExt** — Adds an explicit tenant filter to tenant-owned Sea-ORM queries

### `Authenticable`

- `fn` **find_by_api_key**`(db: &DatabaseConnection, api_key: &str) -> Pin<Box<dyn Future + Send>>`
- `fn` **find_by_claims_key**`(db: &DatabaseConnection, claims_key: &str) -> Pin<Box<dyn Future + Send>>`

### `ModelError`

- `variant` **Any**
- `variant` **DbErr**
- `variant` **EntityAlreadyExists**
- `variant` **EntityNotFound**
- `variant` **Jwt**
- `variant` **Message**
- `variant` **TenantMismatch**
- `variant` **Validation**
- `fn` **msg**`(s: &str) -> Self`
- `fn` **to_msg**`(err: impl Trait) -> Self`
- `fn` **wrap**`(err: impl Trait) -> Self`

### `TenantActiveModelExt`

- `fn` **set_tenant**`(self: Self, tenant_id: Self::Entity::TenantId) -> ModelResult<Self>` — Assigns the model's tenant column without allowing reassignment

### `TenantEntity`

- `fn` **tenant_column**`() -> Self::Column` — Returns the column used to isolate this entity by tenant

### `TenantQueryExt`

- `fn` **in_tenant**`(self: Self, tenant_id: Self::Entity::TenantId) -> Self` — Restricts this query to one tenant
## `model::query`

- `struct` **ConditionBuilder**
- `struct` **DateRangeBuilder**
- `struct` **PageResponse**` { page: Vec<T>, meta: PagerMeta }` — A page of rows plus its metadata, as returned by [`paginate`] and
- `struct` **PaginationQuery**` { page_size: u64, page: u64 }` — Structure representing the pagination query parameters
- `enum` **SortDirection** — Enum representing sorting directions, with serialization and deserialization
- `fn` **between**`(col: T, a: V, b: V) -> ConditionBuilder` — See [`ConditionBuilder::between`]
- `fn` **condition**`() -> ConditionBuilder`
- `fn` **contains**`(col: T, a: V) -> ConditionBuilder` — See [`ConditionBuilder::contains`]
- `fn` **date_range**`(col: T) -> DateRangeBuilder<T>` — See [`ConditionBuilder::date_range`]
- `fn` **ends_with**`(col: T, a: V) -> ConditionBuilder` — See [`ConditionBuilder::ends_with`]
- `fn` **eq**`(col: T, value: V) -> ConditionBuilder` — See [`ConditionBuilder::eq`]
- `fn` **fetch_page**`(db: &C, selector: S, pagination_query: &PaginationQuery) -> Result<PageResponse<S::Selector::Item>> where C: ConnectionTrait + Sync, S: PaginatorTrait<C> + Send` — Fetching a page from a selector
- `fn` **gt**`(col: T, value: V) -> ConditionBuilder` — See [`ConditionBuilder::gt`]
- `fn` **gt_equal**`(col: T, value: V) -> ConditionBuilder` — See [`ConditionBuilder::gte`]
- `fn` **is_in**`(col: T, values: I) -> ConditionBuilder` — See [`ConditionBuilder::is_in`]
- `fn` **is_not_in**`(col: T, values: I) -> ConditionBuilder` — See [`ConditionBuilder::is_not_in`]
- `fn` **is_not_null**`(col: T) -> ConditionBuilder` — See [`ConditionBuilder::is_not_null`]
- `fn` **is_null**`(col: T) -> ConditionBuilder` — See [`ConditionBuilder::is_null`]
- `fn` **like**`(col: T, a: V) -> ConditionBuilder` — See [`ConditionBuilder::like`]
- `fn` **lt**`(col: T, value: V) -> ConditionBuilder` — See [`ConditionBuilder::lt`]
- `fn` **lt_equal**`(col: T, value: V) -> ConditionBuilder` — See [`ConditionBuilder::lte`]
- `fn` **not_between**`(col: T, a: V, b: V) -> ConditionBuilder` — See [`ConditionBuilder::not_between`]
- `fn` **not_equal**`(col: T, value: V) -> ConditionBuilder` — See [`ConditionBuilder::ne`]
- `fn` **not_like**`(col: T, a: V) -> ConditionBuilder` — See [`ConditionBuilder::not_like`]
- `fn` **paginate**`(db: &DatabaseConnection, entity: Select<E>, condition: Option<Condition>, pagination_query: &PaginationQuery) -> Result<PageResponse<E::Model>> where E: EntityTrait, E::Model: Sync` — Paginate function for fetching paginated data from the database
- `fn` **starts_with**`(col: T, a: V) -> ConditionBuilder` — See [`ConditionBuilder::starts_with`]
- `fn` **with**`(condition: Condition) -> ConditionBuilder`

### `ConditionBuilder`

- `fn` **between**`(self: Self, col: T, a: V, b: V) -> Self` — where condition the given column between the given values
- `fn` **build**`(self: &Self) -> Condition`
- `fn` **contains**`(self: Self, col: T, a: V) -> Self` — where condition the given column end with given values
- `fn` **date_range**`(self: Self, col: T) -> DateRangeBuilder<T>` — where condition the given column is not null
- `fn` **ends_with**`(self: Self, col: T, a: V) -> Self` — where condition the given column end with given values
- `fn` **eq**`(self: Self, col: T, value: V) -> Self` — where condition the given column equals the given value
- `fn` **gt**`(self: Self, col: T, value: V) -> Self` — where condition the given column greater than the given value
- `fn` **gte**`(self: Self, col: T, value: V) -> Self` — where condition the given column greater than or equal to the given
- `fn` **is_in**`(self: Self, col: T, values: I) -> Self` — where condition the given column is in
- `fn` **is_not_in**`(self: Self, col: T, values: I) -> Self` — where condition the given column is not in
- `fn` **is_not_null**`(self: Self, col: T) -> Self` — where condition the given column is not null
- `fn` **is_null**`(self: Self, col: T) -> Self` — where condition the given column is null
- `fn` **like**`(self: Self, col: T, a: V) -> Self` — where condition the given column like given values
- `fn` **lt**`(self: Self, col: T, value: V) -> Self` — where condition the given column smaller than to the given
- `fn` **lte**`(self: Self, col: T, value: V) -> Self` — where condition the given column smaller than or equal to the given
- `fn` **ne**`(self: Self, col: T, value: V) -> Self` — where condition the given column not equals the given value
- `fn` **not_between**`(self: Self, col: T, a: V, b: V) -> Self` — where condition the given column not between the given values
- `fn` **not_like**`(self: Self, col: T, a: V) -> Self` — where condition the given column not like given values
- `fn` **starts_with**`(self: Self, col: T, a: V) -> Self` — where condition the given column start with given values

### `PaginationQuery`

- `fn` **page**`(page: u64) -> Self`

### `SortDirection`

- `variant` **Asc**
- `variant` **Desc**
- `fn` **order**`(self: &Self) -> Order` — Returns the corresponding `Order` enum variant based on the current
## `scheduler`

- `struct` **Config**` { jobs: HashMap<String, Job>, output: Output }` — Configuration structure for the scheduler
- `enum` **Error** — Errors that may occur while operating the scheduler
- `struct` **Job**` { run: String, shell: bool, run_on_start: bool, cron: String, tags: Option<Vec<String>>, output: Option<Output> }` — Representing a single job in the scheduler
- `struct` **JobDescription**` { command: String, output: Output, environment: Environment }` — Structure representing the job command
- `enum` **Output** — Enum representing the scheduler job output
- `type` **Result** — Result type used in the module, with a custom error type
- `struct` **Scheduler**` { jobs: HashMap<String, Job> }` — Representing the scheduler itself
- `struct` **Spec**` { name: Option<String>, tag: Option<String> }` — Specification used to filter all scheduler job with the given Spec

### `Error`

- `variant` **ConfigNotFound**
- `variant` **Empty**
- `variant` **IO**
- `variant` **InvalidConfigSchema**
- `variant` **InvalidCronSyntax**
- `variant` **Question**
- `variant` **TaskNotFound**

### `Job`

- `fn` **prepare_command**`(self: &Self, binary_path: &Path, default_output: &Output, environment: &Environment) -> JobDescription` — Prepares the command for execution based on the job's configuration

### `JobDescription`

- `fn` **run**`(self: &Self) -> Result<Output>` — Executes the job command and returns the output

### `Output`

- `variant` **STDOUT** — The STDOUT or STDERR of the job will view propagated
- `variant` **Silent** — Silent output, the STDOUT or STDERR of the job will not view out

### `Scheduler`

- `fn` **by_spec**`(self: Self, include_jobs: &Spec) -> Self` — Filters the scheduler's jobs based on the provided specification
- `fn` **from_config**`(config: &Path, environment: &Environment) -> Result<Self>` — Creates a new scheduler instance from the given configuration file
- `fn` **new**`(data: &Config, environment: &Environment) -> Result<Self>` — Creates a new scheduler instance from the provided configuration data
- `fn` **run**`(self: Self) -> Result<()>` — Runs the scheduled jobs according to their cron expressions
## `schema`

- `enum` **ArrayColType**
- `enum` **ColType**
- `fn` **add_column**`(m: &SchemaManager, table: &str, name: &str, atype: ColType) -> Result<(), DbErr>` — Add a column to a table with a column type
- `fn` **add_enum_values**`(m: &SchemaManager, enum_name: &str, new_values: Vec<String>) -> Result<(), DbErr>` — Add enum values to an existing enum type
- `fn` **add_reference**`(m: &SchemaManager, fromtbl: &str, totbl: &str, refname: &str) -> Result<(), DbErr>` — Adds a reference. Reads "movies belongs-to users":
- `fn` **alter**`(name: T) -> TableAlterStatement` — Alter table
- `fn` **create_join_table**`(m: &SchemaManager, table: &str, cols: &[(&str, ColType)], refs: &[(&str, &str)]) -> Result<(), DbErr>` — Create a join table. A join table has a composite primary key
- `fn` **create_join_table_without_timestamps**`(m: &SchemaManager, table: &str, cols: &[(&str, ColType)], refs: &[(&str, &str)]) -> Result<(), DbErr>` — Create a join table without automatic timestamps
- `fn` **create_table**`(m: &SchemaManager, table: &str, cols: &[(&str, ColType)], refs: &[(&str, &str)]) -> Result<(), DbErr>` — Create a table
- `fn` **create_table_without_timestamps**`(m: &SchemaManager, table: &str, cols: &[(&str, ColType)], refs: &[(&str, &str)]) -> Result<(), DbErr>` — Create a table without automatic timestamps
- `fn` **drop_enum_type**`(m: &SchemaManager, enum_name: &str) -> Result<(), DbErr>` — Drop an enum type completely
- `fn` **drop_table**`(m: &SchemaManager, table: &str) -> Result<(), DbErr>` — Drop a table
- `fn` **enum_type**`(name: T, enum_name: &str) -> ColumnDef where T: IntoIden` — Create a non-nullable enum column definition
- `fn` **enum_type_null**`(name: T, enum_name: &str) -> ColumnDef where T: IntoIden` — Create a nullable enum column definition
- `fn` **enum_type_null_with_default**`(name: T, enum_name: &str, default_value: &str) -> ColumnDef where T: IntoIden` — Create a nullable enum column definition with default value
- `fn` **enum_type_with_default**`(name: T, enum_name: &str, default_value: &str) -> ColumnDef where T: IntoIden` — Create a non-nullable enum column definition with default value
- `fn` **remove_column**`(m: &SchemaManager, table: &str, name: &str) -> Result<(), DbErr>` — Drop a column from a table
- `fn` **remove_reference**`(m: &SchemaManager, fromtbl: &str, totbl: &str, refname: &str) -> Result<(), DbErr>` — Removes a reference by constructing its name from the table names
- `fn` **rename_column**`(m: &SchemaManager, table: &str, from: &str, to: &str) -> Result<(), DbErr>` — Rename a column, keeping its type and data
- `fn` **table_auto_tz**`(name: T) -> TableCreateStatement where T: IntoIden` — Wrapping table schema creation
- `fn` **timestamps_tz**`(t: TableCreateStatement) -> TableCreateStatement`
- `fn` **timestamptz**`(name: T) -> ColumnDef where T: IntoIden` — Create a non-nullable timestamptz column definition
- `fn` **timestamptz_null**`(name: T) -> ColumnDef where T: IntoIden` — Create a nullable timestamptz column definition

### `ArrayColType`

- `variant` **BigInt**
- `variant` **Bool**
- `variant` **Double**
- `variant` **Float**
- `variant` **Int**
- `variant` **String**

### `ColType`

- `variant` **Array**
- `variant` **ArrayNull**
- `variant` **ArrayUniq**
- `variant` **BigInteger**
- `variant` **BigIntegerNull**
- `variant` **BigIntegerUniq**
- `variant` **BigIntegerWithDefault**
- `variant` **BigUnsigned**
- `variant` **BigUnsignedNull**
- `variant` **BigUnsignedUniq**
- `variant` **BigUnsignedWithDefault**
- `variant` **Binary**
- `variant` **BinaryLen**
- `variant` **BinaryLenNull**
- `variant` **BinaryLenUniq**
- `variant` **BinaryNull**
- `variant` **BinaryUniq**
- `variant` **Blob**
- `variant` **BlobNull**
- `variant` **BlobUniq**
- `variant` **Boolean**
- `variant` **BooleanNull**
- `variant` **BooleanWithDefault**
- `variant` **Char**
- `variant` **CharLen**
- `variant` **CharLenNull**
- `variant` **CharLenUniq**
- `variant` **CharLenWithDefault**
- `variant` **CharNull**
- `variant` **CharUniq**
- `variant` **CharWithDefault**
- `variant` **Date**
- `variant` **DateNull**
- `variant` **DateTime**
- `variant` **DateTimeNull**
- `variant` **DateTimeUniq**
- `variant` **DateTimeWithDefault**
- `variant` **DateUniq**
- `variant` **DateWithDefault**
- `variant` **Decimal**
- `variant` **DecimalLen**
- `variant` **DecimalLenNull**
- `variant` **DecimalLenUniq**
- `variant` **DecimalLenWithDefault**
- `variant` **DecimalNull**
- `variant` **DecimalUniq**
- `variant` **DecimalWithDefault**
- `variant` **Double**
- `variant` **DoubleNull**
- `variant` **DoubleUniq**
- `variant` **DoubleWithDefault**
- `variant` **Enum**
- `variant` **EnumNull**
- `variant` **EnumNullWithDefault**
- `variant` **EnumWithDefault**
- `variant` **Float**
- `variant` **FloatNull**
- `variant` **FloatUniq**
- `variant` **FloatWithDefault**
- `variant` **Integer**
- `variant` **IntegerNull**
- `variant` **IntegerUniq**
- `variant` **IntegerWithDefault**
- `variant` **Interval**
- `variant` **IntervalNull**
- `variant` **IntervalUniq**
- `variant` **Json**
- `variant` **JsonBinary**
- `variant` **JsonBinaryNull**
- `variant` **JsonBinaryUniq**
- `variant` **JsonNull**
- `variant` **JsonUniq**
- `variant` **Money**
- `variant` **MoneyNull**
- `variant` **MoneyUniq**
- `variant` **MoneyWithDefault**
- `variant` **PkAuto**
- `variant` **PkUuid**
- `variant` **SmallInteger**
- `variant` **SmallIntegerNull**
- `variant` **SmallIntegerUniq**
- `variant` **SmallIntegerWithDefault**
- `variant` **SmallUnsigned**
- `variant` **SmallUnsignedNull**
- `variant` **SmallUnsignedUniq**
- `variant` **SmallUnsignedWithDefault**
- `variant` **String**
- `variant` **StringLen**
- `variant` **StringLenNull**
- `variant` **StringLenUniq**
- `variant` **StringLenWithDefault**
- `variant` **StringNull**
- `variant` **StringUniq**
- `variant` **StringWithDefault**
- `variant` **Text**
- `variant` **TextNull**
- `variant` **TextUniq**
- `variant` **TextWithDefault**
- `variant` **Time**
- `variant` **TimeNull**
- `variant` **TimeUniq**
- `variant` **TimeWithDefault**
- `variant` **TimestampWithTimeZone**
- `variant` **TimestampWithTimeZoneNull**
- `variant` **TimestampWithTimeZoneWithDefault**
- `variant` **Unsigned**
- `variant` **UnsignedNull**
- `variant` **UnsignedUniq**
- `variant` **UnsignedWithDefault**
- `variant` **Uuid**
- `variant` **UuidNull**
- `variant` **UuidUniq**
- `variant` **UuidUniqWithDefault**
- `variant` **UuidWithDefault**
- `variant` **VarBinary**
- `variant` **VarBinaryNull**
- `variant` **VarBinaryUniq**
- `variant` **VarBitLen**
- `variant` **VarBitLenNull**
- `variant` **VarBitLenUniq**
- `fn` **array**`(kind: ArrayColType) -> Self`
- `fn` **array_null**`(kind: ArrayColType) -> Self`
- `fn` **array_uniq**`(kind: ArrayColType) -> Self`
## `storage`

- `struct` **Contents**
- `struct` **Storage**` { stores: BTreeMap<String, Box<dyn StoreDriver>>, strategy: Box<dyn StorageStrategy> }`
- `enum` **StorageError**
- `type` **StorageResult**

### `Storage`

- `fn` **as_store**`(self: &Self, name: &str) -> Option<&dyn StoreDriver>` — Returns a reference to the store with the specified name if exists
- `fn` **as_store_err**`(self: &Self, name: &str) -> StorageResult<&dyn StoreDriver>` — Returns a reference to the store with the specified name
- `fn` **copy**`(self: &Self, from: &Path, to: &Path) -> StorageResult<()>` — Copies content from one path to another in the storage
- `fn` **copy_with_policy**`(self: &Self, from: &Path, to: &Path, strategy: &dyn StorageStrategy) -> StorageResult<()>` — Copies content from one path to another in the storage using a specific
- `fn` **delete**`(self: &Self, path: &Path) -> StorageResult<()>` — Deletes content from the storage at the specified path
- `fn` **delete_with_policy**`(self: &Self, path: &Path, strategy: &dyn StorageStrategy) -> StorageResult<()>` — Deletes content from the storage at the specified path using a specific
- `fn` **download**`(self: &Self, path: &Path) -> StorageResult<T>` — Downloads content from the storage at the specified path
- `fn` **download_stream**`(self: &Self, path: &Path) -> StorageResult<BytesStream>` — Downloads content from storage as a stream, enabling efficient
- `fn` **download_stream_with_policy**`(self: &Self, path: &Path, strategy: &dyn StorageStrategy) -> StorageResult<BytesStream>` — Downloads content from storage as a stream using a specific strategy
- `fn` **download_with_policy**`(self: &Self, path: &Path, strategy: &dyn StorageStrategy) -> StorageResult<T>` — Downloads content from the storage at the specified path using a
- `fn` **exists**`(self: &Self, path: &Path) -> StorageResult<bool>` — Checks whether content exists at the specified path
- `fn` **exists_with_policy**`(self: &Self, path: &Path, strategy: &dyn StorageStrategy) -> StorageResult<bool>` — Checks whether content exists at the specified path using a specific
- `fn` **list**`(self: &Self, path: &Path, recursive: bool) -> StorageResult<Vec<ListEntry>>` — Lists entries whose paths start with the given prefix
- `fn` **list_with_policy**`(self: &Self, path: &Path, recursive: bool, strategy: &dyn StorageStrategy) -> StorageResult<Vec<ListEntry>>` — Lists entries whose paths start with the given prefix using a specific
- `fn` **new**`(stores: BTreeMap<String, Box<dyn StoreDriver>>, strategy: Box<dyn StorageStrategy>) -> Self` — Creates a new storage instance with the provided stores and strategy
- `fn` **presign_get**`(self: &Self, path: &Path, expire: Duration) -> StorageResult<PresignedRequest>` — Builds a presigned `GET` URL for `path` using the selected strategy
- `fn` **presign_get_with_policy**`(self: &Self, path: &Path, expire: Duration, strategy: &dyn StorageStrategy) -> StorageResult<PresignedRequest>` — Builds a presigned `GET` URL using a specific strategy
- `fn` **presign_put**`(self: &Self, path: &Path, expire: Duration, options: PresignPutOptions) -> StorageResult<PresignedRequest>` — Builds a presigned `PUT` URL for `path` using the selected strategy
- `fn` **presign_put_with_policy**`(self: &Self, path: &Path, expire: Duration, options: PresignPutOptions, strategy: &dyn StorageStrategy) -> StorageResult<PresignedRequest>` — Builds a presigned `PUT` URL using a specific strategy
- `fn` **rename**`(self: &Self, from: &Path, to: &Path) -> StorageResult<()>` — Renames content from one path to another in the storage
- `fn` **rename_with_policy**`(self: &Self, from: &Path, to: &Path, strategy: &dyn StorageStrategy) -> StorageResult<()>` — Renames content from one path to another in the storage using a specific
- `fn` **single**`(store: Box<dyn StoreDriver>) -> Self` — Creates a new storage instance with a single store and the default
- `fn` **stat**`(self: &Self, path: &Path) -> StorageResult<ListEntry>` — Retrieves metadata for a single path without downloading its content
- `fn` **stat_with_policy**`(self: &Self, path: &Path, strategy: &dyn StorageStrategy) -> StorageResult<ListEntry>` — Retrieves metadata for a single path using a specific strategy
- `fn` **upload**`(self: &Self, path: &Path, content: &Bytes) -> StorageResult<()>` — Uploads content to the storage at the specified path
- `fn` **upload_stream**`(self: &Self, path: &Path, stream: BytesStream) -> StorageResult<()>` — Uploads content from a stream to storage, enabling efficient
- `fn` **upload_stream_with_policy**`(self: &Self, path: &Path, stream: BytesStream, strategy: &dyn StorageStrategy) -> StorageResult<()>` — Uploads content from a stream using a specific strategy
- `fn` **upload_with_strategy**`(self: &Self, path: &Path, content: &Bytes, strategy: &dyn StorageStrategy) -> StorageResult<()>` — Uploads content to the storage at the specified path using a specific

### `StorageError`

- `variant` **Any**
- `variant` **Multi**
- `variant` **Store**
- `variant` **StoreNotFound**
- `variant` **UnableToReadBytes**
## `storage::drivers`

- `struct` **GetResponse** — The response of a [`StoreDriver::get`] call
- `struct` **ListEntry**` { path: String, is_dir: bool, content_length: Option<u64>, last_modified: Option<DateTime<Utc>>, etag: Option<String> }` — A single entry returned by [`StoreDriver::list`] or [`StoreDriver::stat`]
- `struct` **PresignPutOptions**` { content_type: Option<String> }` — Optional parameters for [`StoreDriver::presign_put`]
- `struct` **PresignedRequest**` { method: Method, uri: Uri, headers: HeaderMap }` — A presigned HTTP request returned by [`StoreDriver::presign_get`] or
- `trait` **StoreDriver**
- `struct` **UploadResponse**` { e_tag: Option<String>, version: Option<String> }`

### `GetResponse`

- `fn` **bytes**`(self: &Self) -> StorageResult<Bytes>` — Read all content and return it as `Bytes`
- `fn` **from_bytes**`(content: Bytes) -> Self` — Builds a `GetResponse` from an already-materialized byte buffer
- `fn` **into_stream**`(self: Self) -> StorageResult<BytesStream>` — Convert the response into a streaming bytes reader

### `ListEntry`

- `fn` **new**`(path: String, is_dir: bool, content_length: Option<u64>, last_modified: Option<DateTime<Utc>>, etag: Option<String>) -> Self` — Builds a `ListEntry` from listing/stat metadata

### `PresignedRequest`

- `fn` **new**`(method: Method, uri: Uri, headers: HeaderMap) -> Self` — Builds a `PresignedRequest`
- `fn` **url**`(self: &Self) -> String` — The presigned URL as a string

### `StoreDriver`

- `fn` **copy**`(self: &Self, from: &Path, to: &Path) -> Pin<Box<dyn Future + Send>>` — Copies the content from one path to another in the object store
- `fn` **delete**`(self: &Self, path: &Path) -> Pin<Box<dyn Future + Send>>` — Deletes the content at the specified path in the object store
- `fn` **exists**`(self: &Self, path: &Path) -> Pin<Box<dyn Future + Send>>` — Checks if the content exists at the specified path in the object store
- `fn` **get**`(self: &Self, path: &Path) -> Pin<Box<dyn Future + Send>>` — Retrieves the content from the specified path in the object store
- `fn` **get_stream**`(self: &Self, path: &Path) -> Pin<Box<dyn Future + Send>>` — Retrieves content from the specified path and returns it as a stream
- `fn` **list**`(self: &Self, path: &Path, recursive: bool) -> Pin<Box<dyn Future + Send>>` — Lists entries whose paths start with the given prefix
- `fn` **presign_get**`(self: &Self, path: &Path, expire: Duration) -> Pin<Box<dyn Future + Send>>` — Builds a presigned URL that lets a client `GET` the content at `path`
- `fn` **presign_put**`(self: &Self, path: &Path, expire: Duration, options: PresignPutOptions) -> Pin<Box<dyn Future + Send>>` — Builds a presigned URL that lets a client `PUT` content to `path`
- `fn` **rename**`(self: &Self, from: &Path, to: &Path) -> Pin<Box<dyn Future + Send>>` — Renames or moves the content from one path to another in the object
- `fn` **stat**`(self: &Self, path: &Path) -> Pin<Box<dyn Future + Send>>` — Retrieves metadata for a single path without downloading its content
- `fn` **upload**`(self: &Self, path: &Path, content: &Bytes) -> Pin<Box<dyn Future + Send>>` — Uploads the content represented by `Bytes` to the specified path in the
- `fn` **upload_stream**`(self: &Self, path: &Path, stream: BytesStream) -> Pin<Box<dyn Future + Send>>` — Uploads content from a stream to the specified path

### `UploadResponse`

- `fn` **new**`(e_tag: Option<String>, version: Option<String>) -> Self` — Builds an `UploadResponse` from upload metadata
## `storage::drivers::aws`

- `struct` **Credential**` { key_id: String, secret_key: String, token: Option<String> }` — A set of AWS security credentials
- `fn` **new**`(bucket_name: &str, region: &str) -> StorageResult<Box<dyn StoreDriver>>` — Create new AWS s3 storage with bucket and region
- `fn` **with_credentials**`(bucket_name: &str, region: &str, credentials: Credential) -> StorageResult<Box<dyn StoreDriver>>` — Create new AWS s3 storage with bucket, region and credentials
- `fn` **with_credentials_and_endpoint**`(bucket_name: &str, region: &str, endpoint: &str, credentials: Credential) -> StorageResult<Box<dyn StoreDriver>>` — Create new AWS s3 storage with bucket, region and credentials and URL
## `storage::drivers::azure`

- `fn` **new**`(container_name: &str, account_name: &str, access_key: &str, endpoint: &str) -> StorageResult<Box<dyn StoreDriver>>` — Create new Azure storage
## `storage::drivers::gcp`

- `fn` **new**`(bucket_name: &str, credential_path: &str) -> StorageResult<Box<dyn StoreDriver>>` — Create new GCP storage
## `storage::drivers::local`

- `fn` **new**`() -> Box<dyn StoreDriver>` — Create new filesystem storage rooted at the current working directory
- `fn` **new_with_prefix**`(prefix: impl Trait) -> StorageResult<Box<dyn StoreDriver>>` — Create new filesystem storage with `prefix` applied to all paths
## `storage::drivers::mem`

- `fn` **new**`() -> Box<dyn StoreDriver>` — Create new in-memory storage
## `storage::drivers::null`

- `struct` **NullStorage**
- `fn` **new**`() -> Box<dyn StoreDriver>` — Constructor for creating a new `Store` instance
## `storage::drivers::opendal_adapter`

- `struct` **OpendalAdapter**

### `OpendalAdapter`

- `fn` **new**`(opendal_impl: Operator) -> Self` — Constructor for creating a new `Store` instance
## `storage::strategies`

- `trait` **StorageStrategy**

### `StorageStrategy`

- `fn` **copy**`(self: &Self, storage: &Storage, from: &Path, to: &Path) -> Pin<Box<dyn Future + Send>>`
- `fn` **delete**`(self: &Self, storage: &Storage, path: &Path) -> Pin<Box<dyn Future + Send>>`
- `fn` **download**`(self: &Self, storage: &Storage, path: &Path) -> Pin<Box<dyn Future + Send>>`
- `fn` **download_stream**`(self: &Self, storage: &Storage, path: &Path) -> Pin<Box<dyn Future + Send>>` — Download content as a stream for memory-efficient large file handling
- `fn` **exists**`(self: &Self, storage: &Storage, path: &Path) -> Pin<Box<dyn Future + Send>>`
- `fn` **list**`(self: &Self, storage: &Storage, path: &Path, recursive: bool) -> Pin<Box<dyn Future + Send>>`
- `fn` **presign_get**`(self: &Self, storage: &Storage, path: &Path, expire: Duration) -> Pin<Box<dyn Future + Send>>`
- `fn` **presign_put**`(self: &Self, storage: &Storage, path: &Path, expire: Duration, options: PresignPutOptions) -> Pin<Box<dyn Future + Send>>`
- `fn` **rename**`(self: &Self, storage: &Storage, from: &Path, to: &Path) -> Pin<Box<dyn Future + Send>>`
- `fn` **stat**`(self: &Self, storage: &Storage, path: &Path) -> Pin<Box<dyn Future + Send>>`
- `fn` **upload**`(self: &Self, storage: &Storage, path: &Path, content: &Bytes) -> Pin<Box<dyn Future + Send>>`
- `fn` **upload_stream**`(self: &Self, storage: &Storage, path: &Path, stream: BytesStream) -> Pin<Box<dyn Future + Send>>` — Upload content from a stream for memory-efficient large file handling
## `storage::strategies::replicated`

- `enum` **FailurePolicy** — How many secondary-store failures a [`ReplicatedStrategy`] tolerates before
- `struct` **ReplicatedStrategy**` { primary: String, secondaries: Option<Vec<String>>, failure_policy: FailurePolicy, read_from_secondaries: bool }` — Replicates operations across a primary store and optional secondaries

### `FailurePolicy`

- `variant` **AllowAll** — Never fail because of secondary-store errors
- `variant` **AllowSingleFailure** — Tolerate a single secondary failure; fail if more than one errors
- `variant` **FailAtFailures** — Fail once the number of secondary failures reaches `count`
- `variant` **FailIfAny** — Fail if any secondary store errors
- `fn` **should_fail**`(self: &Self, errors: &BTreeMap<String, String>) -> bool`

### `ReplicatedStrategy`

- `fn` **backup**`(primary: &str, secondaries: Option<Vec<String>>, failure_policy: FailurePolicy) -> Self` — Backup configuration: reads are served from the primary only
- `fn` **mirror**`(primary: &str, secondaries: Option<Vec<String>>, failure_policy: FailurePolicy) -> Self` — Mirror configuration: reads fall back to secondaries when the primary
- `fn` **new**`(primary: &str, secondaries: Option<Vec<String>>, failure_policy: FailurePolicy, read_from_secondaries: bool) -> Self` — Creates a new [`ReplicatedStrategy`]
## `storage::strategies::single`

- `struct` **SingleStrategy**` { primary: String }` — Represents a single storage strategy

### `SingleStrategy`

- `fn` **new**`(primary: &str) -> Self` — Creates a new instance of `SingleStrategy` with the specified primary
## `storage::stream`

- `struct` **BytesStream** — A stream of bytes that abstracts over the underlying storage implementation

### `BytesStream`

- `fn` **collect**`(self: Self) -> Result<Bytes, Error>` — Collect the entire stream into a single `Bytes` buffer
- `fn` **from_body_stream**`(stream: S) -> Self where S: Stream<Item = Result<Bytes, Error>> + Send` — Create a `BytesStream` from an axum request body
- `fn` **into_body**`(self: Self) -> Body` — Convert the `BytesStream` into an axum `Body` for HTTP responses
## `task`

- `trait` **Task** — A trait defining the behavior of a task
- `struct` **TaskInfo**` { name: String, detail: String }` — Information about a task, including its name and details
- `struct` **Tasks** — Managing and running tasks
- `struct` **Vars**` { cli: BTreeMap<String, String> }` — Struct representing a collection of task arguments

### `Task`

- `fn` **run**`(self: &Self, app_context: &AppContext, vars: &Vars) -> Pin<Box<dyn Future + Send>>` — Execute the task with the provided application context and variables
- `fn` **task**`(self: &Self) -> TaskInfo` — Get information about the task

### `Tasks`

- `fn` **list**`(self: &Self) -> Vec<TaskInfo>` — List all registered tasks with their information
- `fn` **names**`(self: &Self) -> Vec<String>` — List of all tasks names
- `fn` **register**`(self: &mut Self, task: impl Trait)` — Register a new task to the registry
- `fn` **run**`(self: &Self, app_context: &AppContext, task: &str, vars: &Vars) -> Result<()>` — Run a registered task by name with provided variables

### `Vars`

- `fn` **cli_arg**`(self: &Self, key: &str) -> Result<&str>` — Retrieves the value associated with the given key from the `cli` list
- `fn` **from_cli_args**`(args: Vec<(String, String)>) -> Self` — Create [`Vars`] instance from cli arguments
## `testing::db`

- `struct` **Any**
- `struct` **PostgresTest**
- `struct` **SqliteTest**
- `trait` **TestSupport**
- `fn` **init_test_db_creation**`(conn_str: &str) -> Result<Box<dyn TestSupport>>` — Initializes a test database connection
- `fn` **seed**`(ctx: &AppContext) -> Result<()>` — Seeds data into the database

### `Any`

- `fn` **new**`(conn_str: &str) -> Self`

### `PostgresTest`

- `fn` **new**`(conn_str: &str) -> Result<Self>` — Creates a new `PostgreSQL` test database

### `SqliteTest`

- `fn` **new**`(conn_str: &str) -> Result<Self>` — Prepare new `SQLite` connection string

### `TestSupport`

- `fn` **cleanup_db**`(self: &Self)` — Cleans up the database
- `fn` **get_connection_str**`(self: &Self) -> &str` — Returns the connection string
- `fn` **init_db**`(self: &Self) -> Pin<Box<dyn Future + Send>>` — Initializes the database
## `testing::redaction`

- `fn` **cleanup_email**`() -> Vec<(&str, &str)>` — Combines cleanup filters from emails  that can be dynamic
- `fn` **cleanup_user_model**`() -> Vec<(&str, &str)>` — Combines cleanup filters from various categories (user model, date, and
- `fn` **get_cleanup_date**`() -> &Vec<(&str, &str)>`
- `fn` **get_cleanup_mail**`() -> &Vec<(&str, &str)>`
- `fn` **get_cleanup_model**`() -> &Vec<(&str, &str)>`
- `fn` **get_cleanup_user_model**`() -> &Vec<(&str, &str)>`
## `testing::request`

- `struct` **BootResultWrapper**
- `struct` **RequestConfig**` { save_cookies: bool, default_content_type: Option<String>, default_scheme: String }` — Configuration for making requests in the test server
- `struct` **RequestConfigBuilder** — Builder pattern for constructing [`RequestConfig`] instances
- `const` **TEST_BINDING_SERVER** — The hostname to which the test server binds
- `const` **TEST_PORT_SERVER** — The port on which the test server will run
- `fn` **boot_test**`() -> Result<BootResult>` — Bootstraps test application with test environment hard coded
- `fn` **boot_test_unique_port**`(port: Option<i32>) -> Result<BootResult>` — Bootstraps test application with test environment hard coded,
- `fn` **boot_test_with_create_db**`() -> Result<BootResultWrapper>` — Bootstraps the test application with a test environment and creates a new database
- `fn` **get_available_port**`() -> i32` — Returns a unique port number. Usually increments by 1 starting from 59126
- `fn` **get_base_url_port**`(port: i32) -> String` — Constructs and returns the base URL used for the test server
- `fn` **request**`(callback: F) where F: FnOnce, Fut: Future<Output = ()>` — Executes a test server request using the provided callback and the default boot process
- `fn` **request_config_with_create_db**`(config: RequestConfig, callback: F) where F: FnOnce, Fut: Future<Output = ()>` — Executes a test server request with a created database using a custom [`RequestConfig`]
- `fn` **request_with_config**`(config: RequestConfig, callback: F) where F: FnOnce, Fut: Future<Output = ()>` — Executes a test server request using a custom [`RequestConfig`]
- `fn` **request_with_create_db**`(callback: F) where F: FnOnce, Fut: Future<Output = ()>` — Executes a test server request with a created database using the provided callback

### `BootResultWrapper`

- `fn` **new**`(boot: BootResult, test_db: Box<dyn TestSupport>) -> Self`

### `RequestConfigBuilder`

- `fn` **build**`(self: Self) -> RequestConfig` — Builds and returns a `RequestConfig` instance
- `fn` **default_content_type**`(self: Self, content_type: S) -> Self` — Sets the default content type for requests
- `fn` **default_scheme**`(self: Self, scheme: S) -> Self` — Sets the default scheme to use for requests
- `fn` **new**`() -> Self` — Creates a new [`RequestConfigBuilder`] with default values
- `fn` **save_cookies**`(self: Self, save: bool) -> Self` — Sets whether cookies should be saved for future requests
## `testing::selector`

- `fn` **assert_attribute_eq**`(html: &str, selector: &str, attribute: &str, expected_value: &str)` — Asserts that the specified attribute of an element matching the given CSS
- `fn` **assert_attribute_exists**`(html: &str, selector: &str, attribute: &str)` — Asserts that an element matching the given CSS selector has the specified
- `fn` **assert_count**`(html: &str, selector: &str, expected_count: usize)` — Asserts that the number of elements matching the given CSS selector in the
- `fn` **assert_css_eq**`(html: &str, selector: &str, expected_text: &str)` — Asserts that the text content of an element matching the given CSS selector
- `fn` **assert_css_eq_list**`(html: &str, selector: &str, expected_texts: &[&str])` — Collects the text content of all elements matching the given CSS selector
- `fn` **assert_css_exists**`(html: &str, selector: &str)` — Asserts that an element matching the given CSS selector exists in the
- `fn` **assert_css_not_exists**`(html: &str, selector: &str)` — Asserts that an element matching the given CSS selector does **not** exist
- `fn` **assert_link**`(html: &str, selector: &str, expected_href: &str)` — Asserts that an `<a>` element matching the given CSS selector has the `href`
- `fn` **select**`(html: &str, selector: &str) -> Vec<String>` — Parses the given HTML string and selects the elements matching the specified CSS selector
## `validation`

- `struct` **ModelValidationErrors**` { errors: BTreeMap<String, Vec<ValidationError>> }`
- `struct` **ModelValidationMessage**` { code: String, message: Option<String> }`
- `trait` **Validatable** — Implement `Validatable` for `ActiveModel` when you want it to have a
- `struct` **ValidationError**` { code: String, message: Option<String>, params: HashMap<String, Value> }` — `DbErr` conversion hack
- `trait` **ValidatorTrait** — Implement `Validatable` for `ActiveModel` when you want it to have a
- `fn` **into_db_error**`(errors: &ModelValidationErrors) -> DbErr`

### `Validatable`

- `fn` **validate**`(self: &Self) -> Result<(), ModelValidationErrors>` — Perform validation
- `fn` **validator**`(self: &Self) -> Box<dyn Validate>`

### `ValidatorTrait`

- `fn` **validate**`(self: &Self) -> Result<(), ModelValidationErrors>` — Perform validation and return a normalized error type
