rustio_core/lib.rs
1//! RustIO — a batteries-included web framework for Rust.
2//!
3//! Typical usage goes through the `rustio` CLI, which scaffolds projects
4//! that depend on this crate. See <https://github.com/abdulwahed-sweden/rustio>.
5//!
6//! The headline modules:
7//!
8//! - [`http`] — [`Request`], [`Response`], response builders, form/query parsing.
9//! - [`router`] — path matching (`:param`) and request dispatch.
10//! - [`middleware`] — around-style middleware with [`Next`].
11//! - [`context`] — typed per-request storage.
12//! - [`error`] — unified [`Error`] enum and safety-net conversion.
13//! - [`auth`] — identity in context, `require_auth` / `require_admin` helpers.
14//! - [`orm`] — SQLite-backed [`Model`] trait with `find` / `all` / `create` / `update` / `delete`.
15//! - [`admin`] — auto-generated CRUD UI for structs deriving [`RustioAdmin`].
16//! - [`migrations`] — versioned `.sql` files tracked in `rustio_migrations`.
17//! - [`server`] — hyper-backed [`Server`] that serves a router.
18
19pub mod admin;
20pub mod auth;
21pub mod context;
22pub mod defaults;
23pub mod error;
24pub mod http;
25pub mod middleware;
26pub mod migrations;
27pub mod orm;
28pub mod router;
29pub mod server;
30
31pub use auth::Identity;
32pub use context::Context;
33pub use error::{resolve, Error};
34pub use http::{html, json_raw, status_text, text, FormData, Request, Response};
35pub use middleware::Next;
36pub use orm::{Db, Model, Row, Value};
37pub use router::{Params, Router};
38pub use rustio_macros::RustioAdmin;
39pub use server::Server;