Skip to main content

umbral_core/
lib.rs

1//! umbral internals: ORM, migrations, routing, DB backends, the Plugin trait.
2//!
3//! Do not depend on this crate directly. Use the `umbral` facade.
4//!
5//! Status: M0 shipped — Settings, db pool, web re-exports, App builder.
6
7pub mod api_error;
8pub mod app;
9pub mod auth_contract;
10pub mod backend;
11pub mod backup;
12pub mod check;
13pub mod cli;
14pub mod codegen;
15pub mod cors;
16pub mod db;
17pub mod errors;
18pub mod fixtures;
19pub mod forms;
20pub(crate) mod hosts;
21pub mod inspect;
22pub mod middleware;
23pub mod validate;
24pub use inventory;
25// `Settings.extra` publicly stores `toml::Value`, so the crate that names
26// the foreign type re-exports it — a consumer constructing or matching an
27// extra value (tests, plugin config readers) must not need its own `toml`
28// dep pinned to a compatible version.
29pub use toml;
30
31pub mod migrate;
32pub mod orm;
33pub mod pagination;
34pub mod plugin;
35pub mod ratelimit;
36pub mod routes;
37pub mod settings;
38pub mod shutdown;
39pub mod signals;
40pub mod slash;
41pub mod static_files;
42pub mod storage;
43pub mod templates;
44pub mod timezone;
45pub mod transfer;
46pub mod typegen;
47pub mod web;
48
49/// Top-level transaction helper. Sugar for `umbral_core::db::transaction`.
50///
51/// Exposes `umbral_core::transaction(|tx| async { ... })` at the crate root
52/// so the facade re-export becomes `umbral::transaction(...)`.
53pub use db::{transaction, transaction_pg, transaction_sqlite};
54
55/// Re-export of `sea_query` for use in macro-generated code.
56///
57/// The `#[derive(Model)]` macro emits `::umbral::_sea_query::Value` in the
58/// `HydrateRelated::write_pending_m2m` body (form-staged M2M junction
59/// writes). Routing through this re-export means user crates don't need a
60/// direct `sea-query` dep for the generated code to compile.
61#[doc(hidden)]
62pub use sea_query as _sea_query;