Crate strut

Crate strut 

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

This crate is the entrypoint crate of the workspace. Its main job is to transitively pull other Strut crates and to expose relevant public APIs.

Re-exports§

pub use tokio;
pub use strut_config as config;

Structs§

App
The primary entry point for launching a Strut application.
AppConfig
Represents the application’s externalized configuration.
AppContext
Re-exports the public API of strut-core in the root of this crate for convenience. Facade representing the global (singleton) application context.
AppReplica
Re-exports the public API of strut-core in the root of this crate for convenience. Exposes the ways for the application to introspect its own runtime replica, primarily via a numerical index (injected via the environment at runtime).
AppSpindown
Re-exports the public API of strut-core in the root of this crate for convenience. A facade for interacting with the application’s global spindown registry.
AppSpindownToken
Re-exports the public API of strut-core in the root of this crate for convenience. A token issued for every workload registered with AppSpindownRegistry.
DotEnv
Re-exports the DotEnv facade. A facade for loading environment variables from .env files.
Glued
Re-exports the public API of strut-core in the root of this crate for convenience. A wrapped LifetimeId that implements Display by writing the ID in an unbroken chunk. Writes exactly twelve ASCII characters.
Hyphenated
Re-exports the public API of strut-core in the root of this crate for convenience. A wrapped LifetimeId that implements Display by writing the ID in three chunks, separated by the hyphen characters. Writes exactly twelve ASCII characters.
Launchpad
Configures and launches a Strut application.
LifetimeId
Re-exports the public API of strut-core in the root of this crate for convenience. Ten pseudo-random lower-case ASCII letters with a few visually digestible string representations. Not cryptographically secure.
Pivot
Re-exports the public API of strut-core in the root of this crate for convenience. Owns the logic for resolving the runtime pivot directory.
Underscored
Re-exports the public API of strut-core in the root of this crate for convenience. A wrapped LifetimeId that implements Display by writing the ID in three chunks, separated by the underscore characters. Writes exactly twelve ASCII characters.

Enums§

AppConfigError
Re-exports the AppConfig-related types. A cloneable representation of a configuration error.
AppProfile
Re-exports the public API of strut-core in the root of this crate for convenience. Represents the runtime profile of the application. The profile affects primarily which set of configuration files is applied, and the application is free to implement any profile-specific logic.

Constants§

ALERT_FIELD_NAME
Re-exports the public API of strut-core in the root of this crate for convenience. Globally recognized field name that, when present in a tracing macro call, should trigger an event for an external alerting system.

Traits§

ConfigurationWiring
Defines the configuration wiring stage of a Strut application.
PreflightWiring
Defines the preflight wiring stage of a Strut application.
RuntimeWiring
Defines the runtime wiring stage of a Strut application.

Functions§

strut_shutdown
Re-exports the public API of strut-core in the root of this crate for convenience. Terminates the global AppContext and waits for AppSpindown to complete.

Attribute Macros§

main
Re-exports the #[strut::main] attribute macro. Marks an async main function as the main function of this Strut application. This macro helps boot the Strut application without having to use App or Launchpad directly.