Commit 663d5a7
authored
feat(model): add helpers to build enum from concrete values (#393)
This allows building functions like
```rust
fn stream(resp: impl Into<ServerResult>, req_id: RequestId) -> Result<Response, UpstreamError> {
let rpc = ServerJsonRpcMessage::response(resp.into(), req_id);
```1 parent 7a67482 commit 663d5a7
1 file changed
Lines changed: 8 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1474 | 1474 | | |
1475 | 1475 | | |
1476 | 1476 | | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
1477 | 1485 | | |
1478 | 1486 | | |
1479 | 1487 | | |
| |||
1598 | 1606 | | |
1599 | 1607 | | |
1600 | 1608 | | |
1601 | | - | |
1602 | | - | |
1603 | | - | |
1604 | | - | |
1605 | | - | |
1606 | | - | |
1607 | | - | |
1608 | | - | |
1609 | | - | |
1610 | | - | |
1611 | | - | |
1612 | 1609 | | |
1613 | 1610 | | |
1614 | 1611 | | |
| |||
0 commit comments