diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-05-15 18:57:27 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-05-15 18:57:27 +0800 |
| commit | 99b0fab4f0d711ebc958e27731e2d9bcbea6ab55 (patch) | |
| tree | ee7e7c35f356605c598398059727175b6bb51ece /CHANGELOG.md | |
| parent | 76a2cd52acee80eed2097b777270912abf734db0 (diff) | |
Add `modify` method to `ResourceMarker` trait
Diffstat (limited to 'CHANGELOG.md')
| -rw-r--r-- | CHANGELOG.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f2c07e..6b0be09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,20 @@ fn your_chain(_prev: Prev) -> NextProcess { 9. **\[core\]** `RenderResult` now carries new data `exit_code` +10. **\[core\]** Added `modify` function to `ResourceMarker` for modifying a program's global resources + +```rust +// Example +ExitCode::modify::<ThisProgram>(|code| { + code.exit_code = 1; +}); + +// Equivalent to: +this::<ThisProgram>().modify_res::<ExitCode>(|code| { + code.exit_code = 1; +}); +``` + #### **BREAKING CHANGES**: 1. **\[core\]** The signature of `exec` has been changed to `exec(self) -> i32` (previously was `exec(self)`) |
