diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-18 22:48:16 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-18 22:48:16 +0800 |
| commit | 0f7b2a50b05f38d886234ff6b031766c7af1dabb (patch) | |
| tree | 9c9b5d4aa11c91c117b08e829ec33361c4aa6275 /docs/example-pages | |
| parent | dd28430b67dcfda6dd2e91750a4c1a62c085150a (diff) | |
Add `pack_err!` macro for error structs with automatic name field
Diffstat (limited to 'docs/example-pages')
| -rw-r--r-- | docs/example-pages/examples.json | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/docs/example-pages/examples.json b/docs/example-pages/examples.json index e7f0c0c..8e8719b 100644 --- a/docs/example-pages/examples.json +++ b/docs/example-pages/examples.json @@ -220,6 +220,23 @@ ] }, { + "id": "example-pack-err", + "name": "pack_err!", + "icon": "🛑", + "category": "macros", + "desc": "Demonstrates how to use the `pack_err!` macro to define error types with automatic `name` field (snake_case at compile time) and optional `info` field. Also shows `--json` serialization when `general_renderer` is enabled.\n", + "tags": [ + "pack_err!", + "extra_macros", + "general_renderer", + "--json" + ], + "files": [ + "src/main.rs", + "Cargo.toml" + ] + }, + { "id": "example-panic-unwind", "name": "Panic Unwind", "icon": "💥", @@ -258,9 +275,8 @@ "injection" ], "files": [ - "Cargo.toml", "src/main.rs", - "src/lib.rs" + "Cargo.toml" ] }, { @@ -289,8 +305,8 @@ "extra_macros" ], "files": [ - "Cargo.toml", - "src/main.rs" + "src/main.rs", + "Cargo.toml" ] }, { |
