Skip to main content

Module error

Module error 

Source
Expand description

Error types for the SADI dependency injection container.

This module defines a lightweight error model used across the container to describe failures that can occur during service registration, resolution, scope handling, and module initialization.

§Design

  • ErrorKind captures the error category.
  • Error stores the category and a human-readable message.

The helpers in Error are provided to keep call sites concise and to maintain consistent error messages.

§Feature Flags

  • tracing: logs errors when they are created.
  • debug: enables extra diagnostic formatting in Display.

§Examples

use sadi::error::Error;

let err = Error::service_not_provided("MyService");
assert!(err.message.contains("MyService"));

Structs§

Error
Container error structure.

Enums§

ErrorKind
Error categories for the container.