pub struct OutboundPoliciesServer<T: OutboundPolicies> { /* private fields */ }
Implementations§
source§impl<T: OutboundPolicies> OutboundPoliciesServer<T>
impl<T: OutboundPolicies> OutboundPoliciesServer<T>
pub fn new(inner: T) -> Self
pub fn from_arc(inner: Arc<T>) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> InterceptedService<Self, F>where
F: Interceptor,
sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing requests with the given encoding.
sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress responses with the given encoding, if the client supports it.
sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Trait Implementations§
source§impl<T: OutboundPolicies> Clone for OutboundPoliciesServer<T>
impl<T: OutboundPolicies> Clone for OutboundPoliciesServer<T>
source§impl<T: Debug + OutboundPolicies> Debug for OutboundPoliciesServer<T>
impl<T: Debug + OutboundPolicies> Debug for OutboundPoliciesServer<T>
source§impl<T: OutboundPolicies> NamedService for OutboundPoliciesServer<T>
impl<T: OutboundPolicies> NamedService for OutboundPoliciesServer<T>
source§impl<T, B> Service<Request<B>> for OutboundPoliciesServer<T>
impl<T, B> Service<Request<B>> for OutboundPoliciesServer<T>
§type Response = Response<UnsyncBoxBody<Bytes, Status>>
type Response = Response<UnsyncBoxBody<Bytes, Status>>
Responses given by the service.
§type Error = Infallible
type Error = Infallible
Errors produced by the service.
§type Future = Pin<Box<dyn Future<Output = Result<<OutboundPoliciesServer<T> as Service<Request<B>>>::Response, <OutboundPoliciesServer<T> as Service<Request<B>>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<OutboundPoliciesServer<T> as Service<Request<B>>>::Response, <OutboundPoliciesServer<T> as Service<Request<B>>>::Error>> + Send>>
The future response value.
Auto Trait Implementations§
impl<T> RefUnwindSafe for OutboundPoliciesServer<T>where
T: RefUnwindSafe,
impl<T> Send for OutboundPoliciesServer<T>
impl<T> Sync for OutboundPoliciesServer<T>
impl<T> Unpin for OutboundPoliciesServer<T>
impl<T> UnwindSafe for OutboundPoliciesServer<T>where
T: RefUnwindSafe,
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
source§impl<T, ReqBody, ResBody> GrpcService<ReqBody> for T
impl<T, ReqBody, ResBody> GrpcService<ReqBody> for T
§type ResponseBody = ResBody
type ResponseBody = ResBody
Responses body given by the service.
source§fn poll_ready(
&mut self,
cx: &mut Context<'_>
) -> Poll<Result<(), <T as GrpcService<ReqBody>>::Error>>
fn poll_ready( &mut self, cx: &mut Context<'_> ) -> Poll<Result<(), <T as GrpcService<ReqBody>>::Error>>
Returns
Ready
when the service is able to process requests. Read moresource§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