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 schema::Schema;
pub use server::Server;

Modules§

admin
Auto-generated CRUD admin backed by crate::orm.
ai
The AI boundary: a fixed vocabulary of primitives that the Phase 2 intelligence layer is allowed to emit.
auth
Authentication: users, passwords, sessions, middleware.
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.
schema
Schema export: a deterministic, machine-readable description of every model the admin knows about.
server
Hyper-backed HTTP/1 server.

Structs§

DateTime
ISO 8601 combined date and time with time zone.
Utc
The UTC time zone. This is the most efficient time zone when you don’t need the local time. It is also used as an offset (which is also a dummy type).

Derive Macros§

RustioAdmin