Instance
Instance registers an existing value directly without any factory function. This is the simplest form of registration for values that are already created.
Key Points:
- 📝 Registers an existing value directly
- ⚠️ No concurrency protection (read-only recommended)
- 🎯 Best for immutable values or configuration
| |
⚠️ WARNING: Instance binds have no protection over concurrency, so they’re not recommended for structs that perform operations that modify their attributes. Use Singleton or LazySingleton for concurrent mutable binds.