API Reference
Oxide is a set of Rust crates — the full API is documented inline via rustdoc. Generate it locally with a single command:
# From the framework repo rootcargo doc --no-deps --workspace --open--no-deps— skips generating documentation for dependencies.--workspace— includes everyoxide-*crate.--open— opens the rendered site in your default browser.
Output lands at target/doc/index.html. From there you can navigate to
any published crate:
oxide— umbrella crate. Modules:core(IoC + scheduler +time),config,http,db(incl.lifecycle)oxide_auth— Sanctum-style tokens,Hash, abilities,auth_middlewareoxide_macros—#[controller],#[api_resource],#[injectable],#[request],#[get/post/put/patch/delete]markersoxide_cli— CLI binary entry points
Frequently-used public surface
Quick map from concept → import path. The full type signatures live in rustdoc.
| Concept | Import |
|---|---|
| App + bootstrap | oxide::http::prelude::* |
| Container resolve | oxide::Container, oxide::FromContainer |
| Config | oxide::{Config, config, config_set} |
| HTTP | oxide::http::{Request, Response, IntoResponse, Middleware, Next} |
| DB default conn | oxide::db::{conn, Database, Model} |
| DB named conn | oxide::db::DB (DB::connection("mysql2")) |
| Lifecycle hooks | oxide::lifecycle::{HasUuid, HasTimestamps} |
| Lifecycle macro | oxide::model_behavior! |
| Time / timezone | oxide::time::{now, now_in_tz, now_naive, tz, utc_now} |
| Auth (opt-in) | oxide_auth::{Auth, Authenticatable, HasApiTokens, Hash, auth_middleware, abilities, ability} |
| Console commands | oxide::Command |
| Scheduler | oxide::Schedule, ServiceProvider::schedule |
| Error masking | Response::server_error(e) / server_error_with(e, "msg") |
Inside a consumer project
When you depend on Oxide as a git dep, you can still generate the API
docs the same way — cargo will include oxide-* in the doc output:
cargo doc --no-deps --openThe crate docs appear under target/doc/oxide/, target/doc/oxide_auth/, etc.
Hosted rustdoc
Not currently served alongside this docs site. When Oxide publishes to
crates.io the usual docs.rs rendering will be
available for each crate. Until then, cargo doc --no-deps locally is
the authoritative reference.
The source is the specification
Every public type, function, and macro carries a rustdoc comment. Where
this guide and the rustdoc differ, the rustdoc is authoritative — it is
generated from the same source that cargo compiles.