| /tonic/tests/default_stubs/src/ |
| H A D | lib.rs | 17 type ServerStreamStream = Pin<Box<dyn Stream<Item = Result<(), Status>> + Send + 'static>>; 19 Pin<Box<dyn Stream<Item = Result<(), Status>> + Send + 'static>>; 21 async fn unary(&self, _: Request<()>) -> Result<Response<()>, Status> { in unary() 28 ) -> Result<Response<Self::ServerStreamStream>, Status> { in server_stream() 32 async fn client_stream(&self, _: Request<Streaming<()>>) -> Result<Response<()>, Status> { in client_stream() 39 ) -> Result<Response<Self::BidirectionalStreamStream>, Status> { in bidirectional_stream()
|
| /tonic/tonic/src/metadata/ |
| H A D | encoding.rs | 26 fn from_bytes(value: &[u8]) -> Result<HeaderValue, InvalidMetadataValueBytes>; in from_bytes() 29 fn from_shared(value: Bytes) -> Result<HeaderValue, InvalidMetadataValueBytes>; in from_shared() 35 fn decode(value: &[u8]) -> Result<Bytes, InvalidMetadataValueBytes>; in decode() 44 fn fmt(value: &HeaderValue, f: &mut fmt::Formatter<'_>) -> fmt::Result; in fmt() argument 85 fn from_bytes(value: &[u8]) -> Result<HeaderValue, InvalidMetadataValueBytes> { in from_bytes() 97 fn decode(value: &[u8]) -> Result<Bytes, InvalidMetadataValueBytes> { in decode() 109 fn fmt(value: &HeaderValue, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument 151 fn decode(value: &[u8]) -> Result<Bytes, InvalidMetadataValueBytes> { in decode() 174 fn fmt(value: &HeaderValue, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument 198 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument [all …]
|
| /tonic/examples/src/interceptor/ |
| H A D | client.rs | 15 async fn main() -> Result<(), Box<dyn std::error::Error>> { in main() 36 fn intercept(req: Request<()>) -> Result<Request<()>, Status> { in intercept() 46 fn call(&mut self, request: tonic::Request<()>) -> Result<tonic::Request<()>, Status> { in call() 52 async fn using_named_interceptor() -> Result<(), Box<dyn std::error::Error>> { in using_named_interceptor() 66 async fn using_function_pointer_interceptro() -> Result<(), Box<dyn std::error::Error>> { in using_function_pointer_interceptro() 72 InterceptedService<Channel, fn(tonic::Request<()>) -> Result<tonic::Request<()>, Status>>, in using_function_pointer_interceptro()
|
| H A D | server.rs | 18 ) -> Result<Response<HelloReply>, Status> { in say_hello() 30 async fn main() -> Result<(), Box<dyn std::error::Error>> { in main() 49 fn intercept(mut req: Request<()>) -> Result<Request<()>, Status> { in intercept()
|
| /tonic/tonic/src/server/ |
| H A D | service.rs | 15 type Future: Future<Output = Result<Response<Self::Response>, Status>>; 42 type ResponseStream: Stream<Item = Result<Self::Response, Status>>; 45 type Future: Future<Output = Result<Response<Self::ResponseStream>, Status>>; 54 S: Stream<Item = Result<M2, crate::Status>>, 74 type Future: Future<Output = Result<Response<Self::Response>, Status>>; 101 type ResponseStream: Stream<Item = Result<Self::Response, Status>>; 104 type Future: Future<Output = Result<Response<Self::ResponseStream>, Status>>; 113 S: Stream<Item = Result<M2, crate::Status>>,
|
| /tonic/examples/src/blocking/ |
| H A D | client.rs | 10 type Result<T, E = StdError> = ::std::result::Result<T, E>; typedef 22 pub fn connect<D>(dst: D) -> Result<Self, tonic::transport::Error> in connect() 36 ) -> Result<tonic::Response<HelloReply>, tonic::Status> { in say_hello() 41 fn main() -> Result<()> { in main()
|
| /tonic/tests/compression/src/ |
| H A D | lib.rs | 49 async fn compress_output_unary(&self, _req: Request<()>) -> Result<Response<SomeData>, Status> { in compress_output_unary() 57 async fn compress_input_unary(&self, req: Request<SomeData>) -> Result<Response<()>, Status> { in compress_input_unary() 63 Pin<Box<dyn Stream<Item = Result<SomeData, Status>> + Send + 'static>>; 68 ) -> Result<Response<Self::CompressOutputServerStreamStream>, Status> { in compress_output_server_stream() 79 ) -> Result<Response<()>, Status> { in compress_input_client_stream() 90 ) -> Result<Response<SomeData>, Status> { in compress_output_client_stream() 104 Pin<Box<dyn Stream<Item = Result<SomeData, Status>> + Send + 'static>>; 109 ) -> Result<Response<Self::CompressInputOutputBidirectionalStreamStream>, Status> { in compress_input_output_bidirectional_stream()
|
| /tonic/tests/integration_tests/src/ |
| H A D | lib.rs | 31 ) -> Poll<std::io::Result<()>> { in poll_read() argument 41 ) -> Poll<std::io::Result<usize>> { in poll_write() 45 fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<std::io::Result<()>> { in poll_flush() argument 52 ) -> Poll<std::io::Result<()>> { in poll_shutdown() argument 60 ) -> Poll<Result<usize, std::io::Error>> { in poll_write_vectored()
|
| /tonic/tonic/src/transport/channel/service/ |
| H A D | io.rs | 34 ) -> Poll<io::Result<()>> { in poll_read() argument 44 ) -> Poll<io::Result<usize>> { in poll_write() 48 fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> { in poll_flush() argument 52 fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> { in poll_shutdown() argument 60 ) -> Poll<Result<usize, io::Error>> { in poll_write_vectored()
|
| /tonic/tonic/src/transport/service/ |
| H A D | tls.rs | 21 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument 40 ) -> Result<Vec<CertificateDer<'static>>, TlsError> { in convert_certificate_to_pki_types() 42 .collect::<Result<Vec<_>, _>>() in convert_certificate_to_pki_types() 48 ) -> Result<(Vec<CertificateDer<'static>>, PrivateKeyDer<'static>), TlsError> { in convert_identity_to_pki_types()
|
| /tonic/examples/src/cancellation/ |
| H A D | server.rs | 25 ) -> Result<Response<HelloReply>, Status> { in say_hello() 52 ) -> Result<Response<HelloReply>, Status> in with_cancellation_handler() 54 FRequest: Future<Output = Result<Response<HelloReply>, Status>> + Send + 'static, in with_cancellation_handler() 55 FCancellation: Future<Output = Result<Response<HelloReply>, Status>> + Send + 'static, in with_cancellation_handler() 73 async fn main() -> Result<(), Box<dyn std::error::Error>> { in main()
|
| /tonic/interop/src/ |
| H A D | server.rs | 7 use std::result::Result as StdResult; 20 type Result<T> = StdResult<Response<T>, Status>; typedef 27 async fn empty_call(&self, _request: Request<Empty>) -> Result<Empty> { in empty_call() 31 async fn unary_call(&self, request: Request<SimpleRequest>) -> Result<SimpleResponse> { in unary_call() 57 async fn cacheable_unary_call(&self, _: Request<SimpleRequest>) -> Result<SimpleResponse> { in cacheable_unary_call() 66 ) -> Result<Self::StreamingOutputCallStream> { in streaming_output_call() 89 ) -> Result<StreamingInputCallResponse> { in streaming_input_call() 109 ) -> Result<Self::FullDuplexCallStream> { in full_duplex_call() 149 ) -> Result<Self::HalfDuplexCallStream> { in half_duplex_call() 153 async fn unimplemented_call(&self, _: Request<Empty>) -> Result<Empty> { in unimplemented_call() [all …]
|
| /tonic/tonic-reflection/src/server/ |
| H A D | mod.rs | 79 ) -> Result<v1::ServerReflectionServer<impl v1::ServerReflection>, Error> { in build_v1() 97 ) -> Result<v1alpha::ServerReflectionServer<impl v1alpha::ServerReflection>, Error> { in build_v1alpha() 127 ) -> Result<Self, Error> { in new() 164 ) -> Result<(), Error> { in process_file() argument 196 ) -> Result<(), Error> { in process_message() argument 225 ) -> Result<(), Error> { in process_enum() argument 242 ) -> Result<(), Error> { in process_field() argument 252 fn symbol_by_name(&self, symbol: &str) -> Result<Vec<u8>, Status> { in symbol_by_name() 266 fn file_by_filename(&self, filename: &str) -> Result<Vec<u8>, Status> { in file_by_filename() 285 ) -> Result<String, Error> { in extract_name() [all …]
|
| H A D | v1alpha.rs | 29 ) -> Result<Response<Self::ServerReflectionInfoStream>, Status> { in server_reflection_info() 31 let (resp_tx, resp_rx) = mpsc::channel::<Result<ServerReflectionResponse, Status>>(1); in server_reflection_info() 109 inner: tokio_stream::wrappers::ReceiverStream<Result<ServerReflectionResponse, Status>>, 113 fn new(resp_rx: mpsc::Receiver<Result<ServerReflectionResponse, Status>>) -> Self { in new() 120 type Item = Result<ServerReflectionResponse, Status>; 135 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument
|
| H A D | v1.rs | 29 ) -> Result<Response<Self::ServerReflectionInfoStream>, Status> { in server_reflection_info() 31 let (resp_tx, resp_rx) = mpsc::channel::<Result<ServerReflectionResponse, Status>>(1); in server_reflection_info() 109 inner: tokio_stream::wrappers::ReceiverStream<Result<ServerReflectionResponse, Status>>, 113 fn new(resp_rx: mpsc::Receiver<Result<ServerReflectionResponse, Status>>) -> Self { in new() 120 type Item = Result<ServerReflectionResponse, Status>; 135 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument
|
| /tonic/tests/integration_tests/tests/ |
| H A D | complex_tower_middleware.rs | 19 async fn unary_call(&self, req: Request<Input>) -> Result<Response<Output>, Status> { in complex_tower_layers_work() 64 fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { in poll_ready() argument 80 F: Future<Output = Result<http::Response<B>, E>>, 82 type Output = Result<http::Response<MyBody<B>>, BoxError>; 103 ) -> Poll<Option<Result<http_body::Frame<Self::Data>, Self::Error>>> { in poll_frame()
|
| /tonic/tonic/src/client/ |
| H A D | service.rs | 19 type Future: Future<Output = Result<http::Response<Self::ResponseBody>, Self::Error>>; 24 fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>; in poll_ready() argument 43 fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { in poll_ready() argument
|
| /tonic/tests/web/src/ |
| H A D | lib.rs | 12 type BoxStream<T> = Pin<Box<dyn Stream<Item = Result<T, Status>> + Send + 'static>>; 18 async fn unary_call(&self, req: Request<Input>) -> Result<Response<Output>, Status> { in unary_call() 36 ) -> Result<Response<Self::ServerStreamStream>, Status> { in server_stream() 52 ) -> Result<Response<Output>, Status> { in client_stream()
|
| /tonic/examples/src/tower/ |
| H A D | server.rs | 23 ) -> Result<Response<HelloReply>, Status> { in say_hello() 34 async fn main() -> Result<(), Box<dyn std::error::Error>> { in main() 61 fn intercept(req: Request<()>) -> Result<Request<()>, Status> { in intercept() 91 type Future = BoxFuture<'static, Result<Self::Response, Self::Error>>; 93 fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { in poll_ready() argument
|
| H A D | client.rs | 13 async fn main() -> Result<(), Box<dyn std::error::Error>> { in main() 36 fn intercept(req: Request<()>) -> Result<Request<()>, Status> { in intercept() 64 type Future = Pin<Box<dyn Future<Output = Result<Self::Response, Self::Error>> + Send>>; 66 fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { in poll_ready() argument
|
| /tonic/tonic/src/service/ |
| H A D | recover_error.rs | 61 fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> { in poll_ready() argument 80 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument 87 F: Future<Output = Result<Response<ResBody>, E>>, 90 type Output = Result<Response<ResponseBody<ResBody>>, crate::BoxError>; 118 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument 143 ) -> Poll<Option<Result<http_body::Frame<Self::Data>, Self::Error>>> { in poll_frame()
|
| /tonic/tonic/src/transport/server/ |
| H A D | io_stream.rs | 23 struct State<IO>(TlsAcceptor, JoinSet<Result<ServerIo<IO>, crate::BoxError>>); 28 S: Stream<Item = Result<IO, IE>>, 38 S: Stream<Item = Result<IO, IE>>, 51 ) -> Poll<Option<Result<ServerIo<IO>, crate::BoxError>>> in poll_next_without_tls() 71 S: Stream<Item = Result<IO, IE>>, 75 type Item = Result<ServerIo<IO>, crate::BoxError>; 146 incoming: &mut (impl Stream<Item = Result<IO, IE>> + Unpin), in select() 147 tasks: &mut JoinSet<Result<ServerIo<IO>, crate::BoxError>>, in select()
|
| /tonic/tonic/src/transport/channel/ |
| H A D | endpoint.rs | 47 pub fn new<D>(dst: D) -> Result<Self, Error> in new() 82 pub fn from_shared(s: impl Into<Bytes>) -> Result<Self, Error> { in from_shared() 98 pub fn user_agent<T>(self, user_agent: T) -> Result<Self, Error> in user_agent() 249 pub fn tls_config(self, tls_config: ClientTlsConfig) -> Result<Self, Error> { in tls_config() 350 pub async fn connect(&self) -> Result<Channel, Error> { in connect() 369 pub async fn connect_with_connector<C>(&self, connector: C) -> Result<Channel, Error> in connect_with_connector() 475 fn try_from(t: Bytes) -> Result<Self, Self::Error> { in try_from() 483 fn try_from(t: String) -> Result<Self, Self::Error> { in try_from() 491 fn try_from(t: &'static str) -> Result<Self, Self::Error> { in try_from() 497 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { in fmt() argument [all …]
|
| /tonic/examples/src/authentication/ |
| H A D | server.rs | 8 type EchoResult<T> = Result<Response<T>, Status>; 22 async fn main() -> Result<(), Box<dyn std::error::Error>> { in main() 33 fn check_auth(req: Request<()>) -> Result<Request<()>, Status> { in check_auth()
|
| /tonic/examples/src/multiplex/ |
| H A D | server.rs | 22 async fn main() -> Result<(), Box<dyn std::error::Error>> { in main() 45 ) -> Result<Response<HelloReply>, Status> { in say_hello() 61 ) -> Result<Response<EchoResponse>, Status> { in unary_echo()
|