feat: Add returns_result support and when pattern-matching design
- Add returns_result.md documenting Result正規化 (returns_result = true) - Add when-pattern-matching.md with future pattern matching syntax design - Update E2E tests to use get_value() for HTTP responses - Update plugin system README with B案 (Result-based) support - Remove singleton from HttpServerBox and SocketServerBox for stability This prepares for gradual migration to Result-based error handling, starting with Net plugin methods, as agreed with ChatGPT5's design. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -28,6 +28,9 @@
|
||||
- **[net-plugin.md](./net-plugin.md)** - Netプラグイン(HTTP/TCP PoC)
|
||||
- GET/POST、ヘッダ、Content-Length、環境変数によるログ
|
||||
|
||||
- **[returns-result.md](./returns-result.md)** - 可選のResultBox正規化
|
||||
- `returns_result = true` で成功/失敗を `Ok/Err` に統一(段階導入推奨)
|
||||
|
||||
### ⚙️ 戻り値のResult化(B案サポート)
|
||||
- `nyash.toml` のメソッド定義に `returns_result = true` を付けると、
|
||||
- 成功: `Ok(value)` の `ResultBox` に包んで返す
|
||||
|
||||
Reference in New Issue
Block a user