A lot of new features have been added to the `#[cgp_getter]` macro! For the basic use cases, you can now define getter methods that return &str or Option<&T>, and the macro will generate getter implementations that read from String or Option<T> fields. github.com/contextgener...
Post
github.comRefactoring and Improvements on `#[cgp_getter]` by soareschen · Pull Request #81 · contextgeneric/cgpSummary
This PR brings several quality of life improvements on the proc macros #[cgp_getter] and #[cgp_auto_getter], allowing them to support more general getter interfaces to be defined.
Specializ...
This mainly improves use of CGP with idiomatic Rust code. Apparently, some readers pointed out about the aesthetic of getter methods returning &String instead of &str. This especially affects first impressions, when the hello world of CGP demonstrates the dependency injection of string fields.
0 reposts2 likes