Commit 3ce976d
authored
fix: public cbor/json codec module
follow-up to #5792
configuring a request_response behavior with generic codec does not allow for setting request/response size limits.
e.g. the following fails to compile since `request_response::cbor::codec` is private:
```rust
let non_default_codec = request_response::cbor::codec::Codec::<CustomRequest, CustomLargeResponse>::default()
.set_response_size_maximum(large_response_size_max);
let request_response = request_response::Behaviour::with_codec(
non_default_codec,
std::iter::once((
StreamProtocol::new("/request-response/1"),
request_response::ProtocolSupport::Full,
)),
request_response::Config::default(),
);
```
Pull-Request: #5830.1 parent fee8bf0 commit 3ce976d
File tree
6 files changed
+10
-5
lines changed- protocols/request-response
- src
6 files changed
+10
-5
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
1 | 6 | | |
2 | 7 | | |
3 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
| 49 | + | |
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| |||
0 commit comments