diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-22 18:54:10 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-22 18:54:10 +0900 |
| commit | 6195e33dfc87cf4b231006b3e5e686a9d8fe2dc1 (patch) | |
| tree | bd97be1b9307eb78ef1d4e3d9ef9d5a0dc797a3f /crates/shirabe/tests/command/show_command_test.rs | |
| parent | 62c206032a09f6b19777c1b3bc6f4ca3da71cdc3 (diff) | |
| download | php-shirabe-6195e33dfc87cf4b231006b3e5e686a9d8fe2dc1.tar.gz php-shirabe-6195e33dfc87cf4b231006b3e5e686a9d8fe2dc1.tar.zst php-shirabe-6195e33dfc87cf4b231006b3e5e686a9d8fe2dc1.zip | |
refactor(plugin): decode RPC values through conversion traits
The R-table dispatchers hand-rolled argument decoding and return encoding per
method, spread over 24 helpers. `FromPluginArg` and `ToPluginValue` replace
them: blanket impls for `Option<T>`, `Vec<T>` and `IndexMap<String, T>` compose
over a handful of leaf types, so a composite like `Vec<IndexMap<String, String>>`
needs no helper of its own, and the lossy UTF-8 conversion of a PHP string lives
in one impl instead of a dozen call sites.
Argument errors now read `{method} expects {expected} at position {position}`
rather than a message written per call site. `arg_or` takes its default for an
explicit null too, not only for an omitted argument; every parameter it serves
is declared non-nullable in the proxy stubs, so PHP never passes one.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/command/show_command_test.rs')
0 files changed, 0 insertions, 0 deletions
