Skip to main content

Crate slave_framework

Crate slave_framework 

Source
Expand description

Runtime for applications built with the slave framework.

Generated applications depend on this crate for the pieces every app needs: environment configuration ([env]), structured logging (logging), an HTTP server with graceful shutdown (server) and, with the default database feature, a SurrealDB connection and SurrealQL migrations (database), and with the default oidc feature, sign-in through an OpenID Connect provider (oidc): the app verifies the provider’s ID tokens and never handles passwords. The testing feature adds a test database and a test identity provider.

Re-exports§

pub use surrealdb;

Modules§

database
The application’s SurrealDB database.
env
Reading configuration from the process environment and .env files.
logging
Structured logging via tracing.
oidc
Sign-in through an OpenID Connect provider.
server
HTTP server lifecycle.

Macros§

transaction
Runs a block in a transaction: committed when it evaluates to Ok, cancelled when it evaluates to Err (? leaves the block, not the function). When the transaction conflicts with a concurrent one, the block runs again in a new transaction, up to TRANSACTION_ATTEMPTS times.

Enums§

Error
Errors raised by the slave runtime.

Type Aliases§

Result
Shorthand for results returned by the slave runtime.