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 /examples/example-pack-err/page.toml | |
| parent | dd28430b67dcfda6dd2e91750a4c1a62c085150a (diff) | |
Add `pack_err!` macro for error structs with automatic name field
Diffstat (limited to 'examples/example-pack-err/page.toml')
| -rw-r--r-- | examples/example-pack-err/page.toml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/example-pack-err/page.toml b/examples/example-pack-err/page.toml new file mode 100644 index 0000000..5534236 --- /dev/null +++ b/examples/example-pack-err/page.toml @@ -0,0 +1,10 @@ +[example] +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. +""" +tags = ["pack_err!", "extra_macros", "general_renderer", "--json"] +files = ["src/main.rs", "Cargo.toml"] |
