Expand description
Strut
Backend in Rust: convenient and configurable with Strut. 🏗️
- Strut is a Rust application scaffold that aims to simplify common backend chores.
- The documentation is available on the ➡️ homepage.
§Crate strut-database
⚠️ Internal crate
Unless you know exactly what you are doing, there is probably no need to directly depend on this crate.
This crate is a convenience layer around sqlx crate.
Re-exports§
pub use sqlx;
Structs§
- Connector
- Runs in the background, holds a copy of
sqlxdatabase connectionPoolcreated from the given [Handle], and closes the pooled connections once the globalAppContextis terminated. - Database
Config - Represents the application-level configuration section that covers everything related to database connectivity, primarily the instance URL and credentials for all database servers that this application works with.
- Gate
- A single-release barrier that is opened when the associated
Latchis released. - Migrations
Worker - An asynchronous worker that applies database migrations in the background
and signals completion to whoever cares to listen via the returned
Gate.
Functions§
- strut_
shutdown - Re-exports the
strut_shutdownfunction to facilitate stand-alone usage of this crate.