1+ // This file is @generated by prost-build.
12/// InstrumentRequest requests the stream of updates
23/// to observe the async runtime state over time.
34///
45/// TODO: In the future allow for the request to specify
56/// only the data that the caller cares about (i.e. only
67/// tasks but no resources)
78#[ allow( clippy:: derive_partial_eq_without_eq) ]
8- #[ derive( Clone , PartialEq , :: prost:: Message ) ]
9+ #[ derive( Clone , Copy , PartialEq , :: prost:: Message ) ]
910pub struct InstrumentRequest { }
1011/// TaskDetailsRequest requests the stream of updates about
1112/// the specific task identified in the request.
1213#[ allow( clippy:: derive_partial_eq_without_eq) ]
13- #[ derive( Clone , PartialEq , :: prost:: Message ) ]
14+ #[ derive( Clone , Copy , PartialEq , :: prost:: Message ) ]
1415pub struct TaskDetailsRequest {
1516 /// Identifies the task for which details were requested.
1617 #[ prost( message, optional, tag = "1" ) ]
1718 pub id : :: core:: option:: Option < super :: common:: Id > ,
1819}
1920/// PauseRequest requests the stream of updates to pause.
2021#[ allow( clippy:: derive_partial_eq_without_eq) ]
21- #[ derive( Clone , PartialEq , :: prost:: Message ) ]
22+ #[ derive( Clone , Copy , PartialEq , :: prost:: Message ) ]
2223pub struct PauseRequest { }
2324/// ResumeRequest requests the stream of updates to resume after a pause.
2425#[ allow( clippy:: derive_partial_eq_without_eq) ]
25- #[ derive( Clone , PartialEq , :: prost:: Message ) ]
26+ #[ derive( Clone , Copy , PartialEq , :: prost:: Message ) ]
2627pub struct ResumeRequest { }
2728/// Update carries all information regarding tasks, resources, async operations
2829/// and resource operations in one message. There are a couple of reasons to combine all
@@ -56,11 +57,11 @@ pub struct Update {
5657}
5758/// `PauseResponse` is the value returned after a pause request.
5859#[ allow( clippy:: derive_partial_eq_without_eq) ]
59- #[ derive( Clone , PartialEq , :: prost:: Message ) ]
60+ #[ derive( Clone , Copy , PartialEq , :: prost:: Message ) ]
6061pub struct PauseResponse { }
6162/// `ResumeResponse` is the value returned after a resume request.
6263#[ allow( clippy:: derive_partial_eq_without_eq) ]
63- #[ derive( Clone , PartialEq , :: prost:: Message ) ]
64+ #[ derive( Clone , Copy , PartialEq , :: prost:: Message ) ]
6465pub struct ResumeResponse { }
6566/// Generated client implementations.
6667pub mod instrument_client {
@@ -314,19 +315,17 @@ pub mod instrument_server {
314315 /// `InstrumentServer<T>` implements `Instrument` as a service.
315316 #[ derive( Debug ) ]
316317 pub struct InstrumentServer < T : Instrument > {
317- inner : _Inner < T > ,
318+ inner : Arc < T > ,
318319 accept_compression_encodings : EnabledCompressionEncodings ,
319320 send_compression_encodings : EnabledCompressionEncodings ,
320321 max_decoding_message_size : Option < usize > ,
321322 max_encoding_message_size : Option < usize > ,
322323 }
323- struct _Inner < T > ( Arc < T > ) ;
324324 impl < T : Instrument > InstrumentServer < T > {
325325 pub fn new ( inner : T ) -> Self {
326326 Self :: from_arc ( Arc :: new ( inner) )
327327 }
328328 pub fn from_arc ( inner : Arc < T > ) -> Self {
329- let inner = _Inner ( inner) ;
330329 Self {
331330 inner,
332331 accept_compression_encodings : Default :: default ( ) ,
@@ -389,7 +388,6 @@ pub mod instrument_server {
389388 Poll :: Ready ( Ok ( ( ) ) )
390389 }
391390 fn call ( & mut self , req : http:: Request < B > ) -> Self :: Future {
392- let inner = self . inner . clone ( ) ;
393391 match req. uri ( ) . path ( ) {
394392 "/rs.tokio.console.instrument.Instrument/WatchUpdates" => {
395393 #[ allow( non_camel_case_types) ]
@@ -421,7 +419,6 @@ pub mod instrument_server {
421419 let max_encoding_message_size = self . max_encoding_message_size ;
422420 let inner = self . inner . clone ( ) ;
423421 let fut = async move {
424- let inner = inner. 0 ;
425422 let method = WatchUpdatesSvc ( inner) ;
426423 let codec = tonic:: codec:: ProstCodec :: default ( ) ;
427424 let mut grpc = tonic:: server:: Grpc :: new ( codec)
@@ -468,7 +465,6 @@ pub mod instrument_server {
468465 let max_encoding_message_size = self . max_encoding_message_size ;
469466 let inner = self . inner . clone ( ) ;
470467 let fut = async move {
471- let inner = inner. 0 ;
472468 let method = WatchTaskDetailsSvc ( inner) ;
473469 let codec = tonic:: codec:: ProstCodec :: default ( ) ;
474470 let mut grpc = tonic:: server:: Grpc :: new ( codec)
@@ -512,7 +508,6 @@ pub mod instrument_server {
512508 let max_encoding_message_size = self . max_encoding_message_size ;
513509 let inner = self . inner . clone ( ) ;
514510 let fut = async move {
515- let inner = inner. 0 ;
516511 let method = PauseSvc ( inner) ;
517512 let codec = tonic:: codec:: ProstCodec :: default ( ) ;
518513 let mut grpc = tonic:: server:: Grpc :: new ( codec)
@@ -556,7 +551,6 @@ pub mod instrument_server {
556551 let max_encoding_message_size = self . max_encoding_message_size ;
557552 let inner = self . inner . clone ( ) ;
558553 let fut = async move {
559- let inner = inner. 0 ;
560554 let method = ResumeSvc ( inner) ;
561555 let codec = tonic:: codec:: ProstCodec :: default ( ) ;
562556 let mut grpc = tonic:: server:: Grpc :: new ( codec)
@@ -578,8 +572,11 @@ pub mod instrument_server {
578572 Ok (
579573 http:: Response :: builder ( )
580574 . status ( 200 )
581- . header ( "grpc-status" , "12" )
582- . header ( "content-type" , "application/grpc" )
575+ . header ( "grpc-status" , tonic:: Code :: Unimplemented as i32 )
576+ . header (
577+ http:: header:: CONTENT_TYPE ,
578+ tonic:: metadata:: GRPC_CONTENT_TYPE ,
579+ )
583580 . body ( empty_body ( ) )
584581 . unwrap ( ) ,
585582 )
@@ -600,16 +597,6 @@ pub mod instrument_server {
600597 }
601598 }
602599 }
603- impl < T : Instrument > Clone for _Inner < T > {
604- fn clone ( & self ) -> Self {
605- Self ( Arc :: clone ( & self . 0 ) )
606- }
607- }
608- impl < T : std:: fmt:: Debug > std:: fmt:: Debug for _Inner < T > {
609- fn fmt ( & self , f : & mut std:: fmt:: Formatter < ' _ > ) -> std:: fmt:: Result {
610- write ! ( f, "{:?}" , self . 0 )
611- }
612- }
613600 impl < T : Instrument > tonic:: server:: NamedService for InstrumentServer < T > {
614601 const NAME : & ' static str = "rs.tokio.console.instrument.Instrument" ;
615602 }
0 commit comments