Skip to main content

Crate ferroquent

Crate ferroquent 

Source
Expand description

§Ferroquent

A faithful port of Laravel’s Eloquent ORM to Rust. This facade crate re-exports the public API from the workspace crates, hosts the prelude, and provides Ferroquent - the global bootstrap that mirrors Laravel’s Capsule (setAsGlobal + bootEloquent).

See the workspace README.md for an overview and docs/DEVIATIONS.md for where Ferroquent intentionally diverges from Eloquent.

Re-exports§

pub use ferroquent_core as core;
pub use ferroquent_model as model;
pub use ferroquent_cli as cli;
pub use ferroquent_migrations as migrations;
pub use ferroquent_mysql as mysql;
pub use ferroquent_schema as schema;

Modules§

prelude
The common imports for day-to-day use. Grows as milestones land.

Structs§

Ferroquent
The global bootstrap. Register drivers and connections once at startup, then resolve connections anywhere via Ferroquent::connection.

Derive Macros§

Model
#[derive(Model)] - see ferroquent_model::Model. Derive ferroquent::model::Model for a struct.
MorphTarget
#[derive(MorphTarget)] - a closed enum backing a MorphTo relation. Derive ferroquent::model::MorphTarget for a closed enum whose variants each wrap one model type. Powers MorphTo<ThisEnum> polymorphic relations. Variant aliases default to the snake-cased variant name; override with #[morph(alias = "...")].