pub struct StatusDetails { /* private fields */ }Expand description
Renders the typed details of a gRPC status (grpc-status-details-bin) as
proto3 JSON.
Detail types resolve in one pool: the product descriptors, completed with
the well-known types and the canonical google/rpc/status.proto and
error_details.proto for whatever the product does not define itself. A
service’s own detail messages (and its own google.rpc revision) render as
it defines them, the canonical ones are always available even when the
product descriptors do not import them, and a type packed inside another
detail resolves from the same pool as the detail itself.
Details use the canonical proto3 JSON mapping (unset fields omitted, 64-bit
integers as strings), the form clients of the google.rpc model expect.
Implementations§
Source§impl StatusDetails
impl StatusDetails
Sourcepub fn new(product: &DescriptorPool) -> Self
pub fn new(product: &DescriptorPool) -> Self
Build a renderer over product, completed with the canonical
descriptors it lacks. The opaque-detail extension starts off.
Sourcepub fn with_opaque_details(self, enabled: bool) -> Self
pub fn with_opaque_details(self, enabled: bool) -> Self
Whether a detail whose type no descriptor describes goes to
opaqueDetails ({"index", "typeUrl", "bytes"} entries: its position
among the forwarded details, its type URL and the standard base64 of
its bytes) instead of being withheld. Its
bytes cannot be inspected, so a DebugInfo it carries in a field would
reach the client: switch it on only for upstreams trusted not to nest
one in types the proxy has no descriptor for.
Trait Implementations§
Source§impl Clone for StatusDetails
impl Clone for StatusDetails
Auto Trait Implementations§
impl Freeze for StatusDetails
impl RefUnwindSafe for StatusDetails
impl Send for StatusDetails
impl Sync for StatusDetails
impl Unpin for StatusDetails
impl UnsafeUnpin for StatusDetails
impl UnwindSafe for StatusDetails
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request