Skip to main content

Crate injectable_rs_graph

Crate injectable_rs_graph 

Source
Expand description

Dependency graph validation for the injectable framework.

This crate provides compile-time (startup-time) validation of the dependency graph, including:

  • Circular dependency detection via DFS
  • Missing dependency detection
  • Duplicate constructor/lifecycle hook detection

The graph is built from metadata submitted by the proc macros via the inventory crate. Each #[derive(Injectable)] or #[injectable_impl] submits a GraphNode that is automatically collected when Container::build() is called. The graph is validated once at container build time and is not used during runtime resolution — providers resolve dependencies through static dispatch.

Structs§

DependencyGraph
A dependency graph of all injectable types in the application.
GraphNode
A node in the dependency graph representing an injectable type.

Enums§

GraphError
Errors that can occur during graph construction or validation.
ValidationError
Errors found during dependency graph validation.