pub enum SchemaSource {
None,
Reflection,
Bundled(Bytes),
ReflectionOrBundled(Bytes),
}Expand description
Where the proxy gets the descriptors it needs to transcode +json.
Variants§
None
Binary-only: +json is rejected with Unimplemented (the default).
Reflection
Fetch descriptors from the upstream’s gRPC reflection service. The whole schema
is enumerated eagerly and refreshed on a TTL (see ProxyConfig::reflection_ttl).
Bundled(Bytes)
A precompiled FileDescriptorSet (protoc --descriptor_set_out / prost
file_descriptor_set_path), for upstreams that don’t expose reflection.
ReflectionOrBundled(Bytes)
Reflection primary, with the bundle as a fallback: the bundle serves immediately (and if the upstream has no reflection at all), and the live reflection snapshot takes over once it loads. Best of both — a baked-in safety net plus live descriptors when the upstream supports reflection.
Trait Implementations§
Source§impl Clone for SchemaSource
impl Clone for SchemaSource
Source§fn clone(&self) -> SchemaSource
fn clone(&self) -> SchemaSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for SchemaSource
impl Default for SchemaSource
Source§fn default() -> SchemaSource
fn default() -> SchemaSource
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for SchemaSource
impl RefUnwindSafe for SchemaSource
impl Send for SchemaSource
impl Sync for SchemaSource
impl Unpin for SchemaSource
impl UnsafeUnpin for SchemaSource
impl UnwindSafe for SchemaSource
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Wrap the input message
T in a tonic::Request