Skip to main content

Crate xecute

Crate xecute 

Source
Expand description

A small, explicit dependency-injection runtime for Axum applications.

Container owns application providers while ModuleGraph verifies module boundaries before the application starts. The older Injector API is retained for applications migrating from the first preview release.

Re-exports§

pub use middleware::Application;

Modules§

middleware
HTTP middleware and application pipeline composition. Ordered HTTP middleware for applications, controllers, and routes.
prelude
Common controller types and macros.

Structs§

ApiOperation
Route documentation collected by #[routes]; this is metadata, not an OpenAPI schema.
ApiResponse
Documentation attached to one declared controller response.
Container
Thread-safe provider container. Singleton values are cached for its lifetime.
ContainerBuilder
Builds a validated Container.
DocumentationError
Invalid or conflicting route documentation discovered before serving traffic.
HttpError
Safe HTTP failure. Generated server middleware adds the standard error envelope.
Injector
Compatibility injector storing cloneable application values.
ModuleDefinition
Declarative module metadata, used to validate imports and exports.
ModuleGraph
Validates module metadata and flattens modules into a container.
ProviderDefinition
A provider registration. Dependencies are metadata used for startup validation.
ProviderKey
A type-safe key used to identify a provider.
RequestContainer
Per-request provider cache. Request-scoped values cannot escape this type.
ValidatedJson
JSON extractor used by generated #[body] adapters to validate DTOs automatically.
ValidatedQuery
Query extractor used by generated #[query] adapters to validate DTOs automatically.

Enums§

InjectError
Errors discovered while constructing or validating an application.
Scope
The lifecycle of a provider instance.

Traits§

Injectable
Compatibility construction contract for applications using the original injector.
Provider
Types generated by #[injectable] can register themselves with a container.

Functions§

json_schema
Generate a schema using the same Serde contract as the DTO or response entity.
openapi_document
Build an OpenAPI 3.1 document; reject duplicate paths, IDs, and schema names.

Type Aliases§

HttpStatus
HTTP status codes usable by controllers without importing Axum internals.

Attribute Macros§

body
Preserve this annotation for the owning route or module macro.
controller
Generate a controller router from method route attributes.
delete
Declare an HTTP DELETE handler.
exception
Preserve this annotation for the owning route or module macro.
extension
Preserve this annotation for the owning route or module macro.
get
Declare an HTTP GET handler.
global
Marks a module as globally visible. It is consumed by #[module].
guard
Preserve this annotation for the owning route or module macro.
head
Declare an HTTP HEAD handler.
header
Preserve this annotation for the owning route or module macro.
injectable
Generate dependency-injection factories for a struct.
interceptor
Preserve this annotation for the owning route or module macro.
middleware
Declare ordered controller or route middleware under #[controller] or #[routes].
module
Declare module providers, imports, and exported dependencies.
on_bootstrap
Preserve this annotation for the owning route or module macro.
on_module_destroy
Preserve this annotation for the owning route or module macro.
on_module_init
Preserve this annotation for the owning route or module macro.
on_shutdown
Preserve this annotation for the owning route or module macro.
options
Declare an HTTP OPTIONS handler.
param
Preserve this annotation for the owning route or module macro.
patch
Declare an HTTP PATCH handler.
post
Declare an HTTP POST handler.
put
Declare an HTTP PUT handler.
query
Preserve this annotation for the owning route or module macro.
request
Preserve this annotation for the owning route or module macro.
routes
Generate an Axum router for an inherent controller implementation.
scope
Selects the provider lifecycle used by #[injectable] (singleton, transient, or request).
state
Preserve this annotation for the owning route or module macro.
test_module
Preserve this annotation for the owning route or module macro.
validate
Preserve this annotation for the owning route or module macro.

Derive Macros§

Injectable
Derive dependency-injection factories without changing the struct declaration.