Commit e1fcca9
committed
feat(model): add helpers to build enum from concrete values
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 a84a3eb commit e1fcca9
1 file changed
Lines changed: 8 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1471 | 1471 | | |
1472 | 1472 | | |
1473 | 1473 | | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
1474 | 1482 | | |
1475 | 1483 | | |
1476 | 1484 | | |
| |||
1575 | 1583 | | |
1576 | 1584 | | |
1577 | 1585 | | |
1578 | | - | |
1579 | | - | |
1580 | | - | |
1581 | | - | |
1582 | | - | |
1583 | | - | |
1584 | | - | |
1585 | | - | |
1586 | | - | |
1587 | | - | |
1588 | | - | |
1589 | 1586 | | |
1590 | 1587 | | |
1591 | 1588 | | |
| |||
0 commit comments