v0.3.0
In this release, I've continued to polish the use of attribute macros with the goal of making them more ergonomic.
Although the attribute macros have been very much refactored internally, the migration steps are simple for developers.
-
#[di(option(T))]
=>#[di(option = T)]
-
#[di(vector(T))]
=>#[di(vector = T)]
-
#[Singleton(not_auto_register)]
/#[Transient(not_auto_register)]
=>#[Singleton(auto_register = false)]
/#[Transient(auto_register = false)]
-
#[Singleton(async_constructor)]
/#[Transient(async_constructor)]
=>#[Singleton(async)]
/#[Transient(async)]
-
#[rudi(crate = path::to::rudi)]
=>#[Singleton(rudi_path = path::to::rudi)]
/#[Transient(rudi_path = path::to::rudi)]
For more details on how the attributes are used in the current release, see:
- https://docs.rs/rudi/latest/rudi/attr.Singleton.html#on-struct-and-function
- https://docs.rs/rudi/latest/rudi/attr.Singleton.html#on-field-of-struct-and-argument-of-function
- https://docs.rs/rudi/latest/rudi/attr.Singleton.html#struct-or-function-attributes-examples
- https://docs.rs/rudi/latest/rudi/attr.Singleton.html#field-or-argument-attributes-examples