Skip to main content

Crate rustio_core

Crate rustio_core 

Source
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:

  • httpRequest, Response, response builders, form/query parsing.
  • router — path matching (:param) and request dispatch.
  • middleware — around-style middleware with Next.
  • context — typed per-request storage.
  • error — unified Error enum and safety-net conversion.
  • auth — identity in context, require_auth / require_admin helpers.
  • orm — SQLite-backed Model trait with find / all / create / update / delete.
  • admin — auto-generated CRUD UI for structs deriving RustioAdmin.
  • migrations — versioned .sql files tracked in rustio_migrations.
  • server — hyper-backed Server that 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) and /docs (placeholder).
error
Unified error type for the framework.
http
HTTP primitives: Request, Response, response builders, and a small FormData parser 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 :param support.
server
Hyper-backed HTTP/1 server.

Derive Macros§

RustioAdmin