Home
last modified time | relevance | path

Searched refs:S (Results 1 – 25 of 26) sorted by relevance

12

/tonic/tonic/src/service/
H A Dlayered.rs13 pub struct Layered<S, T> {
14 inner: S,
18 impl<S, T: NamedService> NamedService for Layered<S, T> {
22 impl<Req, S, T> Service<Req> for Layered<S, T>
24 S: Service<Req>,
42 fn named_layer<S>(&self, service: S) -> Layered<L::Service, S> in named_layer()
44 L: Layer<S>; in named_layer() argument
48 fn named_layer<S>(&self, service: S) -> Layered<<L>::Service, S> in named_layer()
50 L: Layer<S>, in named_layer() argument
78 fn get_name_of_named_service<S: NamedService>(_s: &S) -> &'static str { in get_name_of_named_service()
[all …]
H A Drouter.rs26 pub fn add_service<S>(&mut self, svc: S) -> &mut Self in add_service()
28 S: Service<Request<Body>, Error = Infallible> in add_service()
34 S::Response: axum::response::IntoResponse, in add_service()
35 S::Future: Send + 'static, in add_service()
58 pub fn new<S>(svc: S) -> Self in new()
66 S::Response: axum::response::IntoResponse, in new()
67 S::Future: Send + 'static, in new()
78 pub fn add_service<S>(mut self, svc: S) -> Self in add_service()
86 S::Response: axum::response::IntoResponse, in add_service()
87 S::Future: Send + 'static, in add_service()
[all …]
H A Drecover_error.rs30 impl<S> Layer<S> for RecoverErrorLayer {
31 type Service = RecoverError<S>;
33 fn layer(&self, inner: S) -> Self::Service { in layer()
41 pub struct RecoverError<S> {
42 inner: S,
45 impl<S> RecoverError<S> {
47 pub fn new(inner: S) -> Self { in new()
52 impl<S, Req, ResBody> Service<Req> for RecoverError<S>
54 S: Service<Req, Response = Response<ResBody>>,
55 S::Error: Into<crate::BoxError>,
[all …]
H A Dinterceptor.rs72 impl<S, I> Layer<S> for InterceptorLayer<I>
87 pub struct InterceptedService<S, I> {
88 inner: S,
92 impl<S, I> InterceptedService<S, I> {
103 impl<S, I> fmt::Debug for InterceptedService<S, I>
105 S: fmt::Debug,
115 impl<S, I, ReqBody, ResBody> Service<http::Request<ReqBody>> for InterceptedService<S, I>
121 type Error = S::Error;
157 impl<S, I> crate::server::NamedService for InterceptedService<S, I>
159 S: crate::server::NamedService,
[all …]
/tonic/tonic-web/src/
H A Dclient.rs28 impl<S> Layer<S> for GrpcWebClientLayer {
29 type Service = GrpcWebClientService<S>;
31 fn layer(&self, inner: S) -> Self::Service { in layer()
40 pub struct GrpcWebClientService<S> {
41 inner: S,
44 impl<S> GrpcWebClientService<S> {
46 pub fn new(inner: S) -> Self { in new()
51 impl<S, B1, B2> Service<Request<B1>> for GrpcWebClientService<S>
53 S: Service<Request<GrpcWebCall<B1>>, Response = Response<B2>>,
56 type Error = S::Error;
[all …]
H A Dlayer.rs18 impl<S> Layer<S> for GrpcWebLayer {
19 type Service = GrpcWebService<S>;
21 fn layer(&self, inner: S) -> Self::Service { in layer()
H A Dservice.rs18 pub struct GrpcWebService<S> {
19 inner: S,
40 impl<S> GrpcWebService<S> {
41 pub(crate) fn new(inner: S) -> Self { in new()
46 impl<S, B> Service<Request<B>> for GrpcWebService<S>
52 type Response = S::Response;
53 type Error = S::Error;
54 type Future = ResponseFuture<S::Future>;
179 impl<S: NamedService> NamedService for GrpcWebService<S> {
180 const NAME: &'static str = S::NAME;
[all …]
/tonic/examples/src/tower/
H A Dserver.rs68 impl<S> Layer<S> for MyMiddlewareLayer {
69 type Service = MyMiddleware<S>;
71 fn layer(&self, service: S) -> Self::Service { in layer()
77 struct MyMiddleware<S> {
78 inner: S,
83 impl<S, ReqBody, ResBody> Service<http::Request<ReqBody>> for MyMiddleware<S>
85 S: Service<http::Request<ReqBody>, Response = http::Response<ResBody>> + Clone + Send + 'static,
86 S::Future: Send + 'static,
89 type Response = S::Response;
90 type Error = S::Error;
/tonic/tests/integration_tests/tests/
H A Dcomplex_tower_middleware.rs43 impl<S> Layer<S> for MyServiceLayer {
44 type Service = MyService<S>;
46 fn layer(&self, inner: S) -> Self::Service { in layer()
52 struct MyService<S> {
53 inner: S,
56 impl<S, R, ResBody> Service<R> for MyService<S>
58 S: Service<R, Response = http::Response<ResBody>>,
62 type Future = MyFuture<S::Future, ResBody>;
H A Dextensions.rs121 struct InterceptedService<S> {
122 inner: S,
125 impl<S> Service<http::Request<Body>> for InterceptedService<S>
127 S: Service<http::Request<Body>, Response = http::Response<Body>>
132 S::Future: Send + 'static,
134 type Response = S::Response;
135 type Error = S::Error;
155 impl<S: NamedService> NamedService for InterceptedService<S> {
156 const NAME: &'static str = S::NAME;
H A Dorigin.rs71 impl<S> Layer<S> for OriginLayer {
72 type Service = OriginService<S>;
74 fn layer(&self, inner: S) -> Self::Service { in layer()
80 struct OriginService<S> {
81 inner: S,
/tonic/tonic/src/transport/server/
H A Dmod.rs401 pub fn add_service<S>(&mut self, svc: S) -> Router<L> in add_service()
564 svc: S, in serve_with_shutdown() argument
585 svc: S, in serve_with_incoming() argument
607 svc: S, in serve_with_incoming_shutdown() argument
629 svc: S, in serve_internal() argument
835 pub fn add_service<S>(mut self, svc: S) -> Self in add_service()
982 struct Svc<S> {
983 inner: S,
987 impl<S, ResBody> Service<Request<Body>> for Svc<S>
1050 impl<S> fmt::Debug for Svc<S> {
[all …]
H A Dio_stream.rs26 pub(crate) struct ServerIoStream<S, IO, IE>
28 S: Stream<Item = Result<IO, IE>>,
31 inner: S,
36 impl<S, IO, IE> ServerIoStream<S, IO, IE>
38 S: Stream<Item = Result<IO, IE>>,
40 pub(crate) fn new(incoming: S, #[cfg(feature = "_tls-any")] tls: Option<TlsAcceptor>) -> Self { in new() argument
69 impl<S, IO, IE> Stream for ServerIoStream<S, IO, IE>
71 S: Stream<Item = Result<IO, IE>>,
/tonic/tonic/src/transport/server/service/
H A Dio.rs23 impl<S, T> Layer<S> for ConnectInfoLayer<T>
27 type Service = ConnectInfo<S, T>;
29 fn layer(&self, inner: S) -> Self::Service { in layer()
35 pub(crate) struct ConnectInfo<S, T> {
36 inner: S,
40 impl<S, T> ConnectInfo<S, T> {
49 impl<S, IO, ReqBody> Service<http::Request<ReqBody>> for ConnectInfo<S, ServerIoConnectInfo<IO>>
51 S: Service<http::Request<ReqBody>>,
54 type Response = S::Response;
55 type Error = S::Error;
[all …]
/tonic/tonic/src/server/
H A Dservice.rs51 impl<T, S, M1, M2> ServerStreamingService<M1> for T
53 T: Service<Request<M1>, Response = Response<S>, Error = crate::Status>,
54 S: Stream<Item = Result<M2, crate::Status>>,
57 type ResponseStream = S;
110 impl<T, S, M1, M2> StreamingService<M1> for T
112 T: Service<Request<Streaming<M1>>, Response = Response<S>, Error = crate::Status>,
113 S: Stream<Item = Result<M2, crate::Status>>,
116 type ResponseStream = S;
H A Dgrpc.rs219 pub async fn unary<S, B>( in unary() argument
221 mut service: S, in unary() argument
225 S: UnaryService<T::Decode, Response = T::Encode>, in unary()
262 pub async fn server_streaming<S, B>( in server_streaming() argument
264 mut service: S, in server_streaming() argument
269 S::ResponseStream: Send + 'static, in server_streaming()
303 pub async fn client_streaming<S, B>( in client_streaming() argument
305 mut service: S, in client_streaming() argument
336 pub async fn streaming<S, B>( in streaming() argument
338 mut service: S, in streaming() argument
[all …]
/tonic/interop/src/
H A Dserver.rs169 pub struct EchoHeadersSvc<S> {
170 inner: S,
173 impl<S: NamedService> NamedService for EchoHeadersSvc<S> {
174 const NAME: &'static str = S::NAME;
177 impl<S> EchoHeadersSvc<S> {
178 pub fn new(inner: S) -> Self { in new()
183 impl<S> Service<http::Request<Body>> for EchoHeadersSvc<S>
185 S: Service<http::Request<Body>, Response = http::Response<Body>> + Send,
186 S::Future: Send + 'static,
188 type Response = S::Response;
[all …]
/tonic/tonic/src/transport/service/
H A Dgrpc_timeout.rs14 pub(crate) struct GrpcTimeout<S> {
15 inner: S,
19 impl<S> GrpcTimeout<S> {
20 pub(crate) fn new(inner: S, server_timeout: Option<Duration>) -> Self { in new() argument
28 impl<S, ReqBody> Service<Request<ReqBody>> for GrpcTimeout<S>
30 S: Service<Request<ReqBody>>,
31 S::Error: Into<crate::BoxError>,
33 type Response = S::Response;
35 type Future = ResponseFuture<S::Future>;
/tonic/examples/src/h2c/
H A Dserver.rs76 pub struct H2c<S> {
77 pub s: S,
82 impl<S> Service<Request<Incoming>> for H2c<S>
84 S: Service<Request<Body>, Response = Response<Body>> + Clone + Send + 'static,
85 S::Future: Send,
86 S::Error: Into<BoxError> + 'static,
/tonic/tonic/src/transport/channel/service/
H A Dreconnect.rs26 enum State<F, S> {
29 Connected(S),
49 impl<M, Target, S, Request> Service<Request> for Reconnect<M, Target>
51 M: Service<Target, Response = S>,
52 S: Service<Request>,
54 crate::BoxError: From<M::Error> + From<S::Error>,
58 type Response = S::Response;
60 type Future = ResponseFuture<S::Future>;
/tonic/tests/compression/src/
H A Dcompressing_response.rs17 service: S, in client_enabled_server_enabled()
21 impl<S, B> Service<http::Request<B>> for AssertCorrectAcceptEncoding<S> in client_enabled_server_enabled()
23 S: Service<http::Request<B>>, in client_enabled_server_enabled()
25 type Response = S::Response; in client_enabled_server_enabled()
26 type Error = S::Error; in client_enabled_server_enabled()
27 type Future = S::Future; in client_enabled_server_enabled()
205 struct AssertCorrectAcceptEncoding<S>(S); in client_disabled()
207 impl<S, B> Service<http::Request<B>> for AssertCorrectAcceptEncoding<S> in client_disabled()
211 type Response = S::Response; in client_disabled()
212 type Error = S::Error; in client_disabled()
[all …]
/tonic/tonic-health/src/
H A Dserver.rs51 pub async fn set_serving<S>(&mut self) in set_serving()
53 S: NamedService, in set_serving()
55 let service_name = <S as NamedService>::NAME; in set_serving()
62 pub async fn set_not_serving<S>(&mut self) in set_not_serving()
64 S: NamedService, in set_not_serving()
66 let service_name = <S as NamedService>::NAME; in set_not_serving()
73 pub async fn set_service_status<S>(&mut self, service_name: S, status: ServingStatus) in set_service_status() argument
75 S: AsRef<str>, in set_service_status()
/tonic/tonic/src/client/
H A Dgrpc.rs226 pub async fn client_streaming<S, M1, M2, C>( in client_streaming() argument
228 request: Request<S>, in client_streaming() argument
236 S: Stream<Item = M1> + Send + 'static, in client_streaming()
282 pub async fn streaming<S, M1, M2, C>( in streaming() argument
284 request: Request<S>, in streaming() argument
292 S: Stream<Item = M1> + Send + 'static, in streaming()
/tonic/tonic-build/src/
H A Dprost.rs431 pub fn btree_map<I, S>(mut self, paths: I) -> Self in btree_map()
433 I: IntoIterator<Item = S>, in btree_map()
434 S: AsRef<str>, in btree_map()
451 pub fn bytes<I, S>(mut self, paths: I) -> Self in bytes()
453 I: IntoIterator<Item = S>, in bytes()
454 S: AsRef<str>, in bytes()
H A Dlib.rs258 fn generate_doc_comment<S: AsRef<str>>(comment: S) -> TokenStream { in generate_doc_comment()

12