pub struct CorsGrpcWeb<S>(/* private fields */);
Expand description
A newtype wrapper around GrpcWebLayer
and tower_http::cors::CorsLayer
to allow
tonic_web::enable
to implement the NamedService
trait.
Trait Implementations§
source§impl<S: Clone> Clone for CorsGrpcWeb<S>
impl<S: Clone> Clone for CorsGrpcWeb<S>
source§fn clone(&self) -> CorsGrpcWeb<S>
fn clone(&self) -> CorsGrpcWeb<S>
Returns a copy of the value. Read more
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<S: Debug> Debug for CorsGrpcWeb<S>
impl<S: Debug> Debug for CorsGrpcWeb<S>
source§impl<S> NamedService for CorsGrpcWeb<S>where
S: NamedService,
impl<S> NamedService for CorsGrpcWeb<S>where
S: NamedService,
source§impl<S> Service<Request<UnsyncBoxBody<Bytes, Status>>> for CorsGrpcWeb<S>
impl<S> Service<Request<UnsyncBoxBody<Bytes, Status>>> for CorsGrpcWeb<S>
source§type Response = <S as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Response
type Response = <S as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Response
Responses given by the service.
source§type Error = <S as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Error
type Error = <S as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Error
Errors produced by the service.
source§type Future = <Cors<GrpcWebService<S>> as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Future
type Future = <Cors<GrpcWebService<S>> as Service<Request<UnsyncBoxBody<Bytes, Status>>>>::Future
The future response value.
Auto Trait Implementations§
impl<S> !Freeze for CorsGrpcWeb<S>
impl<S> !RefUnwindSafe for CorsGrpcWeb<S>
impl<S> Send for CorsGrpcWeb<S>where
S: Send,
impl<S> Sync for CorsGrpcWeb<S>where
S: Sync,
impl<S> Unpin for CorsGrpcWeb<S>where
S: Unpin,
impl<S> !UnwindSafe for CorsGrpcWeb<S>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§impl<T, ReqBody, ResBody> GrpcService<ReqBody> for T
impl<T, ReqBody, ResBody> GrpcService<ReqBody> for T
source§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