Crate strut_database

Crate strut_database 

Source
Expand description

Strut

Strut: convenient Rust backend

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 sqlx database connection Pool created from the given [Handle], and closes the pooled connections once the global AppContext is terminated.
DatabaseConfig
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 Latch is released.
MigrationsWorker
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_shutdown function to facilitate stand-alone usage of this crate.