This implements an option to emit `Arc<Self>` instead of `&self` in
server traits. This enables implementor to reference `Self` data for
indefinite duration, which may be useful for streaming requests.
Fixes: #1351
* feat(core): Default encoding/decoding limits
This PR adds new defaults for both client and server max
encoding/decoding message size limits. By default, the max message
decoding size is `4MB` and the max message encoding size is
`usize::MAX`.
This is follow up work from https://github.com/hyperium/tonic/pull/1274
BREAKING: Default max message encoding/decoding limits
* update generated code
This PR fixes how client side streaming is handled on the server side
and improves overall source error matching.
Fixes:
- Correctly, detect h2 codes when its wrapped in a hyper error.
- Cancelled requests from the client side during client streaming
requests correctly return EOF (`None` from `Streaming::message()`)
Closes#848
* types: add support for `LocalizedMessage` error message type
Following implementation at flemosr/tonic-richer-error.
* types: add `ErrorDetails::with_help_link`
* types: add support for `Help` error message type
Following implementation at flemosr/tonic-richer-error.
* types: add `ResourceInfo` to `gen_status_with_details` test
* types: use `impl Into<Vec<T>>` instead of `Vec<T>` in pub fn's params
* types: comply with clippy
* types: fix names of some tests and vars in `std_messages`
* types: add support for `ResourceInfo` error message type
Following implementation at flemosr/tonic-richer-error.
* types: update doc comment examples
---------
Co-authored-by: Lucio Franco <[email protected]>
* feat(tls): add an option for optional TLS client authentication
Previously there were only two options for client authentication –
either no authentication or mandatory authentication. With this change,
a server can allow for optional authentication with a given root CA
certificate and enforce client authentication on a per-request basis.
Refs: #687
* Update tonic/src/transport/server/tls.rs
---------
Co-authored-by: Lucio Franco <[email protected]>
* types: add support for `PreconditionFailure` error message type
Following implementation at flemosr/tonic-richer-error.
* types: doc comments nits
* types: merge `impl` blocks at `std_messages`
* chore: change the default visibility from pub(crate) to pub for from_parts and into_parts pair.
* chore: add docs for the Response#into_parts and Response#from_parts
* Make some functionality of Status public
Signed-off-by: Nick Cameron <[email protected]>
* Update tonic/src/status.rs
---------
Signed-off-by: Nick Cameron <[email protected]>
Co-authored-by: Lucio Franco <[email protected]>