bind-macro

Community

Simplify dependency injection in Rust with bind!()

Authorjymchng
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill unit simplifies the process of binding trait objects to concrete implementations in Rust, making dependency injection more straightforward and maintainable.

Core Features & Use Cases

  • Trait to Concrete Binding: Facilitates the binding of trait objects to concrete types, allowing for more flexible dependency injection.
  • Axum Compatibility: Ensures that dependencies can be easily used with Axum frameworks.
  • Fail Early: Detects circular dependencies, missing registrations, and scope mismatches at compile time, reducing runtime errors.
  • Test Without Container: Enables direct testing of constructors with test doubles, facilitating easier unit testing.

Quick Start

Bind the trait 'EmailSender' to the concrete type 'SmtpSender' for dependency injection.

Dependency Matrix

Required Modules

None required

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: bind-macro
Download link: https://github.com/jymchng/injectable/archive/main.zip#bind-macro

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 620,000+ vetted skills library on demand.