Home
last modified time | relevance | path

Searched refs:Body (Results 1 – 25 of 41) sorted by relevance

12

/tonic/tonic/src/service/
H A Drouter.rs1 use crate::{body::Body, server::NamedService, Status};
28 S: Service<Request<Body>, Error = Infallible> in add_service() argument
60 S: Service<Request<Body>, Error = Infallible> in new() argument
80 S: Service<Request<Body>, Error = Infallible> in add_service() argument
91 svc.map_request(|req: Request<axum::body::Body>| req.map(Body::new)), in add_service()
138 async fn unimplemented() -> Response<Body> { in unimplemented()
140 Response::from_parts(parts, Body::empty()) in unimplemented()
145 B: http_body::Body<Data = bytes::Bytes> + Send + 'static,
148 type Response = Response<Body>;
171 type Output = Result<Response<Body>, crate::BoxError>;
[all …]
H A Dmod.rs15 pub use axum::{body::Body as AxumBody, Router as AxumRouter};
/tonic/tonic-web/src/
H A Dservice.rs9 use tonic::{body::Body, server::NamedService};
48 S: Service<Request<Body>, Response = Response<Body>>,
234 .map(Body::new); in coerce_response()
259 type Response = Response<Body>;
278 S: Service<http::Request<Body>, Response = http::Response<Body>>, in enable()
291 fn request() -> Request<Body> { in request()
296 .body(Body::default()) in request()
378 .body(Body::default()) in request()
398 .body(Body::default()) in request()
418 .body(Body::default()) in h1_is_err()
[all …]
/tonic/tonic/src/
H A Dbody.rs12 pub struct Body { struct
22 impl Body { argument
35 B: http_body::Body<Data = bytes::Bytes> + Send + 'static, in new()
44 if let Some(body) = <dyn std::any::Any>::downcast_mut::<Option<Body>>(&mut body) { in new()
61 impl Default for Body { implementation
67 impl http_body::Body for Body { implementation
/tonic/tonic/src/transport/server/
H A Dmod.rs46 use crate::body::Body;
75 type BoxService = tower::util::BoxCloneService<Request<Body>, Response<Body>, crate::BoxError>;
403 S: Service<Request<Body>, Error = Infallible> in add_service() argument
427 S: Service<Request<Body>, Error = Infallible> in add_optional_service() argument
774 B: http_body::Body + Send + 'static, in serve_connection()
837 S: Service<Request<Body>, Error = Infallible> in add_service() argument
857 S: Service<Request<Body>, Error = Infallible> in add_optional_service() argument
987 impl<S, ResBody> Service<Request<Body>> for Svc<S>
989 S: Service<Request<Body>, Response = Response<ResBody>>,
994 type Response = Response<Body>;
[all …]
/tonic/tonic/src/client/
H A Dservice.rs1 use http_body::Body;
15 type ResponseBody: Body;
36 ResBody: Body,
37 <ResBody as Body>::Error: Into<crate::BoxError>,
H A Dgrpc.rs5 body::Body,
15 use http_body::Body as HttpBody;
201 T: GrpcService<Body>, in ready() argument
214 T: GrpcService<Body>, in unary() argument
233 T: GrpcService<Body>, in client_streaming() argument
270 T: GrpcService<Body>, in server_streaming() argument
289 T: GrpcService<Body>, in streaming() argument
306 .map(Body::new); in streaming()
329 T: GrpcService<Body>, in create_response() argument
372 fn prepare_request(&self, request: Request<Body>, path: PathAndQuery) -> http::Request<Body> { in prepare_request() argument
/tonic/tonic/src/transport/channel/service/
H A Dconnection.rs3 body::Body,
24 inner: BoxService<Request<Body>, Response<Body>, crate::BoxError>,
104 impl Service<Request<Body>> for Connection {
105 type Response = Response<Body>;
113 fn call(&mut self, req: Request<Body>) -> Self::Future { in call()
133 inner: hyper::client::conn::http2::SendRequest<Body>,
136 impl From<hyper::client::conn::http2::SendRequest<Body>> for SendRequest {
137 fn from(inner: hyper::client::conn::http2::SendRequest<Body>) -> Self { in from()
142 impl tower::Service<Request<Body>> for SendRequest {
143 type Response = Response<Body>;
[all …]
/tonic/examples/src/h2c/
H A Dserver.rs72 use tonic::body::Body;
84 S: Service<Request<Body>, Response = Response<Body>> + Clone + Send + 'static,
88 type Response = hyper::Response<Body>;
101 let mut req = req.map(Body::new); in call()
105 .map_request(|req: Request<_>| req.map(Body::new)); in call()
116 let mut res = hyper::Response::new(Body::default()); in call()
H A Dclient.rs42 use tonic::body::Body;
46 pub client: Client<HttpConnector, Body>,
49 impl Service<http::Request<Body>> for H2cChannel {
59 fn call(&mut self, request: http::Request<Body>) -> Self::Future { in call()
68 .body(Body::default()) in call()
/tonic/examples/src/tower/
H A Dclient.rs46 use tonic::body::Body;
60 impl Service<Request<Body>> for AuthSvc {
61 type Response = Response<Body>;
70 fn call(&mut self, req: Request<Body>) -> Self::Future { in call()
/tonic/tonic/src/transport/channel/
H A Dmod.rs14 use crate::body::Body;
67 svc: Buffer<Request<Body>, BoxFuture<'static, Result<Response<Body>, crate::BoxError>>>,
74 inner: BufferResponseFuture<BoxFuture<'static, Result<Response<Body>, crate::BoxError>>>,
207 impl Service<http::Request<Body>> for Channel {
208 type Response = http::Response<Body>;
216 fn call(&mut self, request: http::Request<Body>) -> Self::Future { in call()
224 type Output = Result<Response<Body>, super::Error>;
/tonic/tests/compression/src/
H A Dutil.rs3 use http_body::{Body as HttpBody, Frame};
16 use tonic::body::Body;
117 ) -> MapRequestBodyLayer<impl Fn(Body) -> Body + Clone> { in measure_request_body_size_layer()
118 MapRequestBodyLayer::new(move |mut body: Body| { in measure_request_body_size_layer()
131 Body::new(new_body) in measure_request_body_size_layer()
H A Dbidirectional_stream.rs2 use http_body::Body;
34 pub fn call<B: Body>(self, req: http::Request<B>) -> http::Request<B> { in client_enabled_server_enabled()
/tonic/tests/integration_tests/tests/
H A Dextensions.rs11 body::Body,
125 impl<S> Service<http::Request<Body>> for InterceptedService<S>
127 S: Service<http::Request<Body>, Response = http::Response<Body>>
142 fn call(&mut self, mut req: http::Request<Body>) -> Self::Future { in call()
H A Dcomplex_tower_middleware.rs3 use http_body::Body;
93 impl<B> Body for MyBody<B>
95 B: Body,
H A Dorigin.rs84 impl<T> Service<Request<tonic::body::Body>> for OriginService<T>
86 T: Service<Request<tonic::body::Body>>,
98 fn call(&mut self, req: Request<tonic::body::Body>) -> Self::Future { in call()
/tonic/tonic/src/server/
H A Dgrpc.rs7 body::Body,
12 use http_body::Body as HttpBody;
223 ) -> http::Response<Body> in unary()
266 ) -> http::Response<Body> in server_streaming()
307 ) -> http::Response<Body> in client_streaming()
340 ) -> http::Response<Body> in streaming()
425 ) -> http::Response<Body> in map_response()
455 http::Response::from_parts(parts, Body::new(body)) in map_response()
/tonic/tonic-health/src/generated/
H A Dgrpc_health_v1.rs75 T: tonic::client::GrpcService<tonic::body::Body>,
77 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
78 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
96 http::Request<tonic::body::Body>, in with_interceptor() argument
98 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody, in with_interceptor()
102 http::Request<tonic::body::Body>, in with_interceptor() argument
315 B: Body + std::marker::Send + 'static,
318 type Response = http::Response<tonic::body::Body>;
423 tonic::body::Body::default(), in call()
/tonic/interop/src/
H A Dserver.rs11 use tonic::{body::Body, server::NamedService, Code, Request, Response, Status};
183 impl<S> Service<http::Request<Body>> for EchoHeadersSvc<S>
185 S: Service<http::Request<Body>, Response = http::Response<Body>> + Send,
196 fn call(&mut self, req: http::Request<Body>) -> Self::Future { in call()
216 .map(Body::new)) in call()
/tonic/tonic-reflection/src/generated/
H A Dgrpc_reflection_v1.rs164 T: tonic::client::GrpcService<tonic::body::Body>,
166 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
167 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
185 http::Request<tonic::body::Body>, in with_interceptor() argument
187 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody, in with_interceptor()
191 http::Request<tonic::body::Body>, in with_interceptor() argument
356 B: Body + std::marker::Send + 'static,
359 type Response = http::Response<tonic::body::Body>;
425 tonic::body::Body::default(), in call()
H A Dgrpc_reflection_v1alpha.rs164 T: tonic::client::GrpcService<tonic::body::Body>,
166 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
167 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
185 http::Request<tonic::body::Body>, in with_interceptor() argument
187 <T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody, in with_interceptor()
191 http::Request<tonic::body::Body>, in with_interceptor() argument
356 B: Body + std::marker::Send + 'static,
359 type Response = http::Response<tonic::body::Body>;
425 tonic::body::Body::default(), in call()
/tonic/tonic-build/src/
H A Dclient.rs70 T: tonic::client::GrpcService<tonic::body::Body>, in generate_internal()
72 T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static, in generate_internal()
73 <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send, in generate_internal()
90 http::Request<tonic::body::Body>, in generate_internal()
91 … Response = http::Response<<T as tonic::client::GrpcService<tonic::body::Body>>::ResponseBody> in generate_internal()
93 …<T as tonic::codegen::Service<http::Request<tonic::body::Body>>>::Error: Into<StdError> + std::mar… in generate_internal()
/tonic/tests/web/tests/
H A Dgrpc_web.rs14 use tonic::body::Body;
111 fn build_request(base_uri: String, content_type: &str, accept: &str) -> Request<Body> { in build_request() argument
132 .body(Body::new( in build_request()
/tonic/tonic/src/transport/
H A Dmod.rs111 pub use hyper::{body::Body, Uri};

12