Expand description
RustIO — a batteries-included web framework for Rust.
Typical usage goes through the rustio CLI, which scaffolds projects
that depend on this crate. See https://github.com/abdulwahed-sweden/rustio.
The headline modules:
http—Request,Response, response builders, form/query parsing.router— path matching (:param) and request dispatch.middleware— around-style middleware withNext.context— typed per-request storage.error— unifiedErrorenum and safety-net conversion.auth— identity in context,require_auth/require_adminhelpers.orm— SQLite-backedModeltrait withfind/all/create/update/delete.admin— auto-generated CRUD UI for structs derivingRustioAdmin.migrations— versioned.sqlfiles tracked inrustio_migrations.server— hyper-backedServerthat serves a router.
Re-exports§
pub use auth::Identity;pub use context::Context;pub use error::resolve;pub use error::Error;pub use http::html;pub use http::json_raw;pub use http::status_text;pub use http::text;pub use http::FormData;pub use http::Request;pub use http::Response;pub use middleware::Next;pub use orm::Db;pub use orm::Model;pub use orm::Row;pub use orm::Value;pub use router::Params;pub use router::Router;pub use server::Server;
Modules§
- admin
- Auto-generated CRUD admin backed by
crate::orm. - auth
- Identity-in-context authentication.
- context
- Typed per-request storage keyed by
TypeId. - defaults
- Default routes that scaffolded projects mount via
with_defaults:/(homepage),/admin(placeholder),/docs(placeholder). - error
- Unified error type for the framework.
- http
- HTTP primitives:
Request,Response, response builders, and a smallFormDataparser shared by query strings and form bodies. - middleware
- Around-style middleware.
- migrations
- Forward-only migrations tracked in a SQLite table.
- orm
- SQLite-backed ORM.
- router
- Path router with
:paramsupport. - server
- Hyper-backed HTTP/1 server.