Expand description
rustio-admin — Django Admin, but for Rust.
This crate is the public face of the framework. Phase 2 ships the
HTTP / router / server / ORM / migrations / templates core; later
phases populate auth and admin.
Re-exports§
pub use crate::admin::register_admin_routes;pub use crate::admin::Admin;pub use crate::admin::AdminField;pub use crate::admin::AdminModel;pub use crate::admin::BulkAction;pub use crate::admin::BulkActionContext;pub use crate::admin::BulkActionFailure;pub use crate::admin::BulkActionResult;pub use crate::admin::FieldType;pub use crate::admin::FieldValidationError;pub use crate::admin::Fieldset;pub use crate::admin::Inline;pub use crate::admin::ModelAdmin;pub use crate::auth::Identity;pub use crate::auth::Role;pub use crate::error::Error;pub use crate::error::Result;pub use crate::http::FormData;pub use crate::http::Request;pub use crate::http::Response;pub use crate::orm::Db;pub use crate::orm::DbOptions;pub use crate::orm::Model;pub use crate::orm::Row;pub use crate::orm::Value;pub use crate::router::Next;pub use crate::router::Router;pub use crate::server::Server;pub use crate::templates::embedded_template_names;pub use crate::templates::embedded_template_source;
Modules§
- admin
- The admin panel — Django Admin, Rust-flavoured.
- auth
- Authentication & authorization.
- background
- Background tasks. A tiny runner that spawns one tokio task per recurring job. Kept simple on purpose — we don’t ship a cron DSL, just “run this every N seconds”.
- Email delivery abstraction.
- error
- Unified error type. Every fallible path in the framework returns
Result<T, Error>, and the HTTP layer knows how to turn anErrorinto a proper response. - http
- The HTTP primitives.
RequestandResponseare thin wrappers around hyper’s types that carry a typed context and a few conveniences. - middleware
- Built-in middleware. Each piece is an async function with the
signature
async fn(Request, Next) -> Result<Response>. Drop any of them intoRouter::middleware(...)in whatever order you want. - migrations
- Versioned SQL migrations for PostgreSQL. Transactional; the
rustio_migrationstracking table records which versions have been applied. - orm
- PostgreSQL-backed ORM. A thin shim over sqlx —
Db,Model,Value,Row— and a handful of generic CRUD helpers. Hand-writtenimpl Modelis the contract; users keep writing SQL where it matters. - router
- A small, opinionated router.
- server
- The HTTP server. Binds a TCP listener, runs each connection on its own Tokio task, and shuts down gracefully on Ctrl-C.
- templates
- Template rendering. Rust code passes typed context; this module owns everything about HTML generation.