Skip to main content

rustio_admin/
lib.rs

1//! rustio-admin — Django Admin, but for Rust.
2//!
3//! This crate is the public face of the framework. Phase 2 ships the
4//! HTTP / router / server / ORM / migrations / templates core; later
5//! phases populate `auth` and `admin`.
6
7#![forbid(unsafe_code)]
8
9pub mod admin;
10pub mod auth;
11pub mod background;
12pub mod email;
13pub mod error;
14pub mod http;
15pub mod middleware;
16pub mod migrations;
17pub mod orm;
18pub mod router;
19pub mod server;
20pub mod templates;
21
22pub use crate::admin::{
23    register_admin_routes, Admin, AdminField, AdminModel, FieldType, Fieldset, ModelAdmin,
24};
25pub use crate::auth::{Identity, Role};
26pub use crate::error::{Error, Result};
27pub use crate::http::{FormData, Request, Response};
28pub use crate::orm::{Db, DbOptions, Model, Row, Value};
29pub use crate::router::{Next, Router};
30pub use crate::server::Server;
31
32pub use rustio_admin_macros::RustioAdmin;
33
34// `RustioAdmin` emits `::rustio_admin::*` paths in its expansion. That
35// resolves cleanly for downstream consumers, but inside this crate's
36// own compilation unit `rustio_admin` isn't a known extern. Aliasing
37// the crate to itself under `cfg(test)` lets the macro be exercised
38// from this crate's own tests without changing any non-test build.
39#[cfg(test)]
40extern crate self as rustio_admin;