pub trait TranscodeState:
Clone
+ Send
+ Sync
+ 'static {
// Required methods
fn grpc_channel(&self) -> Channel;
fn forwarded_headers(&self) -> &[String];
}Expand description
Trait for state types that support REST→gRPC transcoding.
Implement this for your application’s state type to use transcode::routes().
Provides the minimal interface needed by transcode handlers.
Required Methods§
Sourcefn grpc_channel(&self) -> Channel
fn grpc_channel(&self) -> Channel
Lazy gRPC channel to upstream service.
Sourcefn forwarded_headers(&self) -> &[String]
fn forwarded_headers(&self) -> &[String]
Headers to forward from HTTP to gRPC metadata.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.