capydi
Loading...
Searching...
No Matches
Resolution.hpp File Reference

Resolution concept and result type for dependency injection queries. More...

#include <capymeta/concepts/WrappedWIth.hpp>
#include <capymeta/primitives/referencing/Reference.hpp>
#include <type_traits>
#include <expected>
Include dependency graph for Resolution.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  capy
namespace  capy::di

Concepts

concept  capy::di::Resolution

Detailed Description

Resolution concept and result type for dependency injection queries.

A resolution represents the successful resolution of a dependency: it is a reference to an object of the requested type, wrapped in std::expected to handle errors gracefully.

The Resolution concept enforces that:

  • The result type is std::expected<Reference<Dependency>, Error>
  • The wrapped value is a valid reference to the requested dependency
  • Errors are uniformly represented via the Error enum
See also
Error
Reference