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 error;
13pub mod http;
14pub mod middleware;
15pub mod migrations;
16pub mod orm;
17pub mod router;
18pub mod server;
19pub mod templates;
20
21pub use crate::admin::{
22    register_admin_routes, Admin, AdminField, AdminModel, FieldType, Fieldset, ModelAdmin,
23};
24pub use crate::auth::{Identity, Role};
25pub use crate::error::{Error, Result};
26pub use crate::http::{FormData, Request, Response};
27pub use crate::orm::{Db, DbOptions, Model, Row, Value};
28pub use crate::router::{Next, Router};
29pub use crate::server::Server;
30
31pub use rustio_admin_macros::RustioAdmin;
32
33// `RustioAdmin` emits `::rustio_admin::*` paths in its expansion. That
34// resolves cleanly for downstream consumers, but inside this crate's
35// own compilation unit `rustio_admin` isn't a known extern. Aliasing
36// the crate to itself under `cfg(test)` lets the macro be exercised
37// from this crate's own tests without changing any non-test build.
38#[cfg(test)]
39extern crate self as rustio_admin;