Skip to main content

polyester/gen/connect/
chain.analytics.v1.rs

1// @generated by connectrpc-codegen. DO NOT EDIT.
2
3///Shorthand for `OwnedView<GetZippedAssetSupplyRequestView<'static>>`.
4pub type OwnedGetZippedAssetSupplyRequestView = ::buffa::view::OwnedView<
5    crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyRequestView<
6        'static,
7    >,
8>;
9///Shorthand for `OwnedView<GetZippedAssetSupplyResponseView<'static>>`.
10pub type OwnedGetZippedAssetSupplyResponseView = ::buffa::view::OwnedView<
11    crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyResponseView<
12        'static,
13    >,
14>;
15///Shorthand for `OwnedView<GetZippedAssetSupplyGroupRequestView<'static>>`.
16pub type OwnedGetZippedAssetSupplyGroupRequestView = ::buffa::view::OwnedView<
17    crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyGroupRequestView<
18        'static,
19    >,
20>;
21///Shorthand for `OwnedView<GetZippedAssetSupplyGroupResponseView<'static>>`.
22pub type OwnedGetZippedAssetSupplyGroupResponseView = ::buffa::view::OwnedView<
23    crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyGroupResponseView<
24        'static,
25    >,
26>;
27///Shorthand for `OwnedView<GetUnifiedAssetBalancesRequestView<'static>>`.
28pub type OwnedGetUnifiedAssetBalancesRequestView = ::buffa::view::OwnedView<
29    crate::proto::chain::analytics::v1::__buffa::view::GetUnifiedAssetBalancesRequestView<
30        'static,
31    >,
32>;
33///Shorthand for `OwnedView<GetUnifiedAssetBalancesResponseView<'static>>`.
34pub type OwnedGetUnifiedAssetBalancesResponseView = ::buffa::view::OwnedView<
35    crate::proto::chain::analytics::v1::__buffa::view::GetUnifiedAssetBalancesResponseView<
36        'static,
37    >,
38>;
39impl ::connectrpc::Encodable<
40    crate::proto::chain::analytics::v1::GetZippedAssetSupplyResponse,
41>
42for crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyResponseView<
43    '_,
44> {
45    fn encode(
46        &self,
47        codec: ::connectrpc::CodecFormat,
48    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
49        ::connectrpc::__codegen::encode_view_body(self, codec)
50    }
51}
52impl ::connectrpc::Encodable<
53    crate::proto::chain::analytics::v1::GetZippedAssetSupplyResponse,
54>
55for ::buffa::view::OwnedView<
56    crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyResponseView<
57        'static,
58    >,
59> {
60    fn encode(
61        &self,
62        codec: ::connectrpc::CodecFormat,
63    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
64        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
65    }
66}
67impl ::connectrpc::Encodable<
68    crate::proto::chain::analytics::v1::GetZippedAssetSupplyGroupResponse,
69>
70for crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyGroupResponseView<
71    '_,
72> {
73    fn encode(
74        &self,
75        codec: ::connectrpc::CodecFormat,
76    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
77        ::connectrpc::__codegen::encode_view_body(self, codec)
78    }
79}
80impl ::connectrpc::Encodable<
81    crate::proto::chain::analytics::v1::GetZippedAssetSupplyGroupResponse,
82>
83for ::buffa::view::OwnedView<
84    crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyGroupResponseView<
85        'static,
86    >,
87> {
88    fn encode(
89        &self,
90        codec: ::connectrpc::CodecFormat,
91    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
92        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
93    }
94}
95impl ::connectrpc::Encodable<
96    crate::proto::chain::analytics::v1::GetUnifiedAssetBalancesResponse,
97>
98for crate::proto::chain::analytics::v1::__buffa::view::GetUnifiedAssetBalancesResponseView<
99    '_,
100> {
101    fn encode(
102        &self,
103        codec: ::connectrpc::CodecFormat,
104    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
105        ::connectrpc::__codegen::encode_view_body(self, codec)
106    }
107}
108impl ::connectrpc::Encodable<
109    crate::proto::chain::analytics::v1::GetUnifiedAssetBalancesResponse,
110>
111for ::buffa::view::OwnedView<
112    crate::proto::chain::analytics::v1::__buffa::view::GetUnifiedAssetBalancesResponseView<
113        'static,
114    >,
115> {
116    fn encode(
117        &self,
118        codec: ::connectrpc::CodecFormat,
119    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
120        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
121    }
122}
123/// Full service name for this service.
124pub const CHAIN_ANALYTICS_SERVICE_SERVICE_NAME: &str = "chain.analytics.v1.ChainAnalyticsService";
125/// Static [`Spec`](::connectrpc::Spec) for the server-side `GetZippedAssetSupply` RPC.
126///
127/// The dispatcher surfaces this on
128/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
129pub const CHAIN_ANALYTICS_SERVICE_GET_ZIPPED_ASSET_SUPPLY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
130        "/chain.analytics.v1.ChainAnalyticsService/GetZippedAssetSupply",
131        ::connectrpc::StreamType::Unary,
132    )
133    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
134/// Static [`Spec`](::connectrpc::Spec) for the server-side `GetZippedAssetSupplyGroup` RPC.
135///
136/// The dispatcher surfaces this on
137/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
138pub const CHAIN_ANALYTICS_SERVICE_GET_ZIPPED_ASSET_SUPPLY_GROUP_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
139        "/chain.analytics.v1.ChainAnalyticsService/GetZippedAssetSupplyGroup",
140        ::connectrpc::StreamType::Unary,
141    )
142    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
143/// Static [`Spec`](::connectrpc::Spec) for the server-side `GetUnifiedAssetBalances` RPC.
144///
145/// The dispatcher surfaces this on
146/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
147pub const CHAIN_ANALYTICS_SERVICE_GET_UNIFIED_ASSET_BALANCES_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
148        "/chain.analytics.v1.ChainAnalyticsService/GetUnifiedAssetBalances",
149        ::connectrpc::StreamType::Unary,
150    )
151    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
152/// ChainAnalyticsService serves public chain analytics chart series.
153///
154/// # Implementing handlers
155///
156/// Implement methods with plain `async fn`; the returned future satisfies
157/// the `Send` bound automatically.
158///
159/// **Unary and server-streaming requests** arrive as
160/// [`ServiceRequest<'_, Req>`](::connectrpc::ServiceRequest): a zero-copy
161/// view of the request plus its body, valid for the duration of the call.
162/// Fields are read directly (`request.name` is a `&str` into the decoded
163/// buffer) and the borrow may be held across `.await` points. Anything
164/// that must outlive the call — `tokio::spawn`, channels, server state,
165/// or data captured by a returned response stream — takes owned data:
166/// call `request.to_owned_message()` (or copy the specific fields)
167/// first.
168///
169/// **Client-streaming and bidi requests** arrive as
170/// [`InboundStream<Req>`](::connectrpc::InboundStream) — a
171/// `ServiceStream` of [`StreamMessage`](::connectrpc::StreamMessage)s.
172/// Each item owns its decoded buffer and is `Send + 'static`, so items
173/// can be buffered or moved into spawned tasks; read fields zero-copy
174/// through the generated accessor methods (`item.name()`) or `.view()`,
175/// convert with `.to_owned_message()`, or yield an item back unchanged —
176/// `StreamMessage<M>` implements `Encodable<M>`.
177///
178/// Request types resolved through `extern_path` (e.g. well-known types
179/// from another crate) use the same wrappers; the crate that owns the
180/// type must be generated with buffa ≥ 0.8.0 and views enabled so the
181/// backing `HasMessageView` impl exists.
182///
183/// The `impl Encodable<Out>` return bound accepts the owned `Out`, the
184/// generated `OutView<'_>` / `OwnedOutView`,
185/// [`MaybeBorrowed`](::connectrpc::MaybeBorrowed), or
186/// [`PreEncoded`](::connectrpc::PreEncoded) for handlers that encode a
187/// non-`'static` view internally and pass the bytes across the handler
188/// boundary. View bodies are not emitted for output types mapped via
189/// `extern_path` (the impl would be an orphan); return owned for
190/// WKT/extern outputs.
191///
192/// Server-streaming and bidi-streaming methods return
193/// `ServiceStream<impl Encodable<Out> + Send + use<Self>>`. The
194/// `use<Self>` precise-capturing clause excludes `&self`'s lifetime and
195/// the request's lifetime (unary methods use `use<'a, Self>` and may
196/// borrow from `&self`), so stream items must be `'static` and cannot
197/// borrow from the request. To stream view-encoded data, encode each
198/// item inside the stream body and yield
199/// [`PreEncoded`](::connectrpc::PreEncoded) — see its `# Streaming
200/// example` doc.
201#[allow(clippy::type_complexity)]
202pub trait ChainAnalyticsService: Send + Sync + 'static {
203    /// Get route-scoped zipped asset supply chart columns.
204    ///
205    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
206    ///
207    /// `request` is borrowed from the request body and is valid for the
208    /// duration of the call; message fields are read directly on it
209    /// (zero-copy). The response cannot borrow from `request` — use
210    /// `.to_owned_message()` (or copy the specific fields) for anything
211    /// returned, stored, or moved into `tokio::spawn`.
212    fn get_zipped_asset_supply<'a>(
213        &'a self,
214        ctx: ::connectrpc::RequestContext,
215        request: ::connectrpc::ServiceRequest<
216            '_,
217            crate::proto::chain::analytics::v1::GetZippedAssetSupplyRequest,
218        >,
219    ) -> impl ::std::future::Future<
220        Output = ::connectrpc::ServiceResult<
221            impl ::connectrpc::Encodable<
222                crate::proto::chain::analytics::v1::GetZippedAssetSupplyResponse,
223            > + Send + use<'a, Self>,
224        >,
225    > + Send;
226    /// Get grouped zipped asset supply chart columns.
227    ///
228    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
229    ///
230    /// `request` is borrowed from the request body and is valid for the
231    /// duration of the call; message fields are read directly on it
232    /// (zero-copy). The response cannot borrow from `request` — use
233    /// `.to_owned_message()` (or copy the specific fields) for anything
234    /// returned, stored, or moved into `tokio::spawn`.
235    fn get_zipped_asset_supply_group<'a>(
236        &'a self,
237        ctx: ::connectrpc::RequestContext,
238        request: ::connectrpc::ServiceRequest<
239            '_,
240            crate::proto::chain::analytics::v1::GetZippedAssetSupplyGroupRequest,
241        >,
242    ) -> impl ::std::future::Future<
243        Output = ::connectrpc::ServiceResult<
244            impl ::connectrpc::Encodable<
245                crate::proto::chain::analytics::v1::GetZippedAssetSupplyGroupResponse,
246            > + Send + use<'a, Self>,
247        >,
248    > + Send;
249    /// Get unified asset total balance chart columns.
250    ///
251    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
252    ///
253    /// `request` is borrowed from the request body and is valid for the
254    /// duration of the call; message fields are read directly on it
255    /// (zero-copy). The response cannot borrow from `request` — use
256    /// `.to_owned_message()` (or copy the specific fields) for anything
257    /// returned, stored, or moved into `tokio::spawn`.
258    fn get_unified_asset_balances<'a>(
259        &'a self,
260        ctx: ::connectrpc::RequestContext,
261        request: ::connectrpc::ServiceRequest<
262            '_,
263            crate::proto::chain::analytics::v1::GetUnifiedAssetBalancesRequest,
264        >,
265    ) -> impl ::std::future::Future<
266        Output = ::connectrpc::ServiceResult<
267            impl ::connectrpc::Encodable<
268                crate::proto::chain::analytics::v1::GetUnifiedAssetBalancesResponse,
269            > + Send + use<'a, Self>,
270        >,
271    > + Send;
272}
273/// Extension trait for registering a service implementation with a Router.
274///
275/// This trait is automatically implemented for all types that implement the service trait.
276/// Prefer [`Router::add_service`](::connectrpc::Router::add_service) for
277/// top-down registration; `register` remains available for compatibility
278/// and cases where the service-first call shape is more convenient.
279///
280/// # Example
281///
282/// ```rust,ignore
283/// use std::sync::Arc;
284///
285/// let service = Arc::new(MyServiceImpl);
286/// let router = service.register(Router::new());
287/// ```
288pub trait ChainAnalyticsServiceExt: ChainAnalyticsService {
289    /// Register this service implementation with a Router.
290    ///
291    /// Takes ownership of the `Arc<Self>` and returns a new Router with
292    /// this service's methods registered.
293    fn register(
294        self: ::std::sync::Arc<Self>,
295        router: ::connectrpc::Router,
296    ) -> ::connectrpc::Router;
297}
298impl<S: ChainAnalyticsService> ChainAnalyticsServiceExt for S {
299    fn register(
300        self: ::std::sync::Arc<Self>,
301        router: ::connectrpc::Router,
302    ) -> ::connectrpc::Router {
303        router
304            .route_view(
305                CHAIN_ANALYTICS_SERVICE_SERVICE_NAME,
306                "GetZippedAssetSupply",
307                {
308                    let svc = ::std::sync::Arc::clone(&self);
309                    ::connectrpc::view_handler_fn(move |
310                        ctx,
311                        req: ::buffa::view::OwnedView<
312                            crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyRequestView<
313                                'static,
314                            >,
315                        >,
316                        format|
317                    {
318                        let svc = ::std::sync::Arc::clone(&svc);
319                        async move {
320                            let sreq = ::connectrpc::ServiceRequest::<
321                                crate::proto::chain::analytics::v1::GetZippedAssetSupplyRequest,
322                            >::from_parts(req.reborrow(), req.bytes());
323                            svc.get_zipped_asset_supply(ctx, sreq)
324                                .await?
325                                .encode::<
326                                    crate::proto::chain::analytics::v1::GetZippedAssetSupplyResponse,
327                                >(format)
328                        }
329                    })
330                },
331            )
332            .with_spec(CHAIN_ANALYTICS_SERVICE_GET_ZIPPED_ASSET_SUPPLY_SPEC)
333            .route_view(
334                CHAIN_ANALYTICS_SERVICE_SERVICE_NAME,
335                "GetZippedAssetSupplyGroup",
336                {
337                    let svc = ::std::sync::Arc::clone(&self);
338                    ::connectrpc::view_handler_fn(move |
339                        ctx,
340                        req: ::buffa::view::OwnedView<
341                            crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyGroupRequestView<
342                                'static,
343                            >,
344                        >,
345                        format|
346                    {
347                        let svc = ::std::sync::Arc::clone(&svc);
348                        async move {
349                            let sreq = ::connectrpc::ServiceRequest::<
350                                crate::proto::chain::analytics::v1::GetZippedAssetSupplyGroupRequest,
351                            >::from_parts(req.reborrow(), req.bytes());
352                            svc.get_zipped_asset_supply_group(ctx, sreq)
353                                .await?
354                                .encode::<
355                                    crate::proto::chain::analytics::v1::GetZippedAssetSupplyGroupResponse,
356                                >(format)
357                        }
358                    })
359                },
360            )
361            .with_spec(CHAIN_ANALYTICS_SERVICE_GET_ZIPPED_ASSET_SUPPLY_GROUP_SPEC)
362            .route_view(
363                CHAIN_ANALYTICS_SERVICE_SERVICE_NAME,
364                "GetUnifiedAssetBalances",
365                {
366                    let svc = ::std::sync::Arc::clone(&self);
367                    ::connectrpc::view_handler_fn(move |
368                        ctx,
369                        req: ::buffa::view::OwnedView<
370                            crate::proto::chain::analytics::v1::__buffa::view::GetUnifiedAssetBalancesRequestView<
371                                'static,
372                            >,
373                        >,
374                        format|
375                    {
376                        let svc = ::std::sync::Arc::clone(&svc);
377                        async move {
378                            let sreq = ::connectrpc::ServiceRequest::<
379                                crate::proto::chain::analytics::v1::GetUnifiedAssetBalancesRequest,
380                            >::from_parts(req.reborrow(), req.bytes());
381                            svc.get_unified_asset_balances(ctx, sreq)
382                                .await?
383                                .encode::<
384                                    crate::proto::chain::analytics::v1::GetUnifiedAssetBalancesResponse,
385                                >(format)
386                        }
387                    })
388                },
389            )
390            .with_spec(CHAIN_ANALYTICS_SERVICE_GET_UNIFIED_ASSET_BALANCES_SPEC)
391    }
392}
393/// Type-inference marker used by [`Router::add_service`](::connectrpc::Router::add_service).
394#[doc(hidden)]
395pub struct ChainAnalyticsServiceRegisterMarker;
396impl<
397    S: ChainAnalyticsService,
398> ::connectrpc::ServiceRegister<ChainAnalyticsServiceRegisterMarker>
399for ::std::sync::Arc<S> {
400    fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
401        <S as ChainAnalyticsServiceExt>::register(self, router)
402    }
403}
404/// Monomorphic dispatcher for `ChainAnalyticsService`.
405///
406/// Unlike `.register(Router)` which type-erases each method into an `Arc<dyn ErasedHandler>` stored in a `HashMap`, this struct dispatches via a compile-time `match` on method name: no vtable, no hash lookup.
407///
408/// # Example
409///
410/// ```rust,ignore
411/// use connectrpc::ConnectRpcService;
412///
413/// let server = ChainAnalyticsServiceServer::new(MyImpl);
414/// let service = ConnectRpcService::new(server);
415/// // hand `service` to axum/hyper as a fallback_service
416/// ```
417pub struct ChainAnalyticsServiceServer<T> {
418    inner: ::std::sync::Arc<T>,
419}
420impl<T: ChainAnalyticsService> ChainAnalyticsServiceServer<T> {
421    /// Wrap a service implementation in a monomorphic dispatcher.
422    pub fn new(service: T) -> Self {
423        Self {
424            inner: ::std::sync::Arc::new(service),
425        }
426    }
427    /// Wrap an already-`Arc`'d service implementation.
428    pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
429        Self { inner }
430    }
431}
432impl<T> Clone for ChainAnalyticsServiceServer<T> {
433    fn clone(&self) -> Self {
434        Self {
435            inner: ::std::sync::Arc::clone(&self.inner),
436        }
437    }
438}
439impl<T: ChainAnalyticsService> ::connectrpc::Dispatcher
440for ChainAnalyticsServiceServer<T> {
441    #[inline]
442    fn lookup(
443        &self,
444        path: &str,
445    ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
446        let method = path.strip_prefix("chain.analytics.v1.ChainAnalyticsService/")?;
447        match method {
448            "GetZippedAssetSupply" => {
449                Some(
450                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
451                        .with_spec(CHAIN_ANALYTICS_SERVICE_GET_ZIPPED_ASSET_SUPPLY_SPEC),
452                )
453            }
454            "GetZippedAssetSupplyGroup" => {
455                Some(
456                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
457                        .with_spec(
458                            CHAIN_ANALYTICS_SERVICE_GET_ZIPPED_ASSET_SUPPLY_GROUP_SPEC,
459                        ),
460                )
461            }
462            "GetUnifiedAssetBalances" => {
463                Some(
464                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
465                        .with_spec(
466                            CHAIN_ANALYTICS_SERVICE_GET_UNIFIED_ASSET_BALANCES_SPEC,
467                        ),
468                )
469            }
470            _ => None,
471        }
472    }
473    fn call_unary(
474        &self,
475        path: &str,
476        ctx: ::connectrpc::RequestContext,
477        request: ::connectrpc::Payload,
478        format: ::connectrpc::CodecFormat,
479    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
480        let Some(method) = path.strip_prefix("chain.analytics.v1.ChainAnalyticsService/")
481        else {
482            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
483        };
484        let _ = (&ctx, &request, &format);
485        match method {
486            "GetZippedAssetSupply" => {
487                let svc = ::std::sync::Arc::clone(&self.inner);
488                Box::pin(async move {
489                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
490                        crate::proto::chain::analytics::v1::GetZippedAssetSupplyRequest,
491                    >(request.encoded()?, format)?;
492                    let req: crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyRequestView<
493                        '_,
494                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
495                        &body,
496                    )?;
497                    let req = ::connectrpc::ServiceRequest::<
498                        crate::proto::chain::analytics::v1::GetZippedAssetSupplyRequest,
499                    >::from_parts(&req, &body);
500                    svc.get_zipped_asset_supply(ctx, req)
501                        .await?
502                        .encode::<
503                            crate::proto::chain::analytics::v1::GetZippedAssetSupplyResponse,
504                        >(format)
505                })
506            }
507            "GetZippedAssetSupplyGroup" => {
508                let svc = ::std::sync::Arc::clone(&self.inner);
509                Box::pin(async move {
510                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
511                        crate::proto::chain::analytics::v1::GetZippedAssetSupplyGroupRequest,
512                    >(request.encoded()?, format)?;
513                    let req: crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyGroupRequestView<
514                        '_,
515                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
516                        &body,
517                    )?;
518                    let req = ::connectrpc::ServiceRequest::<
519                        crate::proto::chain::analytics::v1::GetZippedAssetSupplyGroupRequest,
520                    >::from_parts(&req, &body);
521                    svc.get_zipped_asset_supply_group(ctx, req)
522                        .await?
523                        .encode::<
524                            crate::proto::chain::analytics::v1::GetZippedAssetSupplyGroupResponse,
525                        >(format)
526                })
527            }
528            "GetUnifiedAssetBalances" => {
529                let svc = ::std::sync::Arc::clone(&self.inner);
530                Box::pin(async move {
531                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
532                        crate::proto::chain::analytics::v1::GetUnifiedAssetBalancesRequest,
533                    >(request.encoded()?, format)?;
534                    let req: crate::proto::chain::analytics::v1::__buffa::view::GetUnifiedAssetBalancesRequestView<
535                        '_,
536                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
537                        &body,
538                    )?;
539                    let req = ::connectrpc::ServiceRequest::<
540                        crate::proto::chain::analytics::v1::GetUnifiedAssetBalancesRequest,
541                    >::from_parts(&req, &body);
542                    svc.get_unified_asset_balances(ctx, req)
543                        .await?
544                        .encode::<
545                            crate::proto::chain::analytics::v1::GetUnifiedAssetBalancesResponse,
546                        >(format)
547                })
548            }
549            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
550        }
551    }
552    fn call_server_streaming(
553        &self,
554        path: &str,
555        ctx: ::connectrpc::RequestContext,
556        request: ::buffa::bytes::Bytes,
557        format: ::connectrpc::CodecFormat,
558    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
559        let Some(method) = path.strip_prefix("chain.analytics.v1.ChainAnalyticsService/")
560        else {
561            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
562        };
563        let _ = (&ctx, &request, &format);
564        match method {
565            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
566        }
567    }
568    fn call_client_streaming(
569        &self,
570        path: &str,
571        ctx: ::connectrpc::RequestContext,
572        requests: ::connectrpc::dispatcher::codegen::RequestStream,
573        format: ::connectrpc::CodecFormat,
574    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
575        let Some(method) = path.strip_prefix("chain.analytics.v1.ChainAnalyticsService/")
576        else {
577            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
578        };
579        let _ = (&ctx, &requests, &format);
580        match method {
581            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
582        }
583    }
584    fn call_bidi_streaming(
585        &self,
586        path: &str,
587        ctx: ::connectrpc::RequestContext,
588        requests: ::connectrpc::dispatcher::codegen::RequestStream,
589        format: ::connectrpc::CodecFormat,
590    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
591        let Some(method) = path.strip_prefix("chain.analytics.v1.ChainAnalyticsService/")
592        else {
593            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
594        };
595        let _ = (&ctx, &requests, &format);
596        match method {
597            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
598        }
599    }
600}
601/// Client for this service.
602///
603/// Generic over `T: ClientTransport`. For **gRPC** (HTTP/2), use
604/// `Http2Connection` — it has honest `poll_ready` and composes with
605/// `tower::balance` for multi-connection load balancing. For **Connect
606/// over HTTP/1.1** (or unknown protocol), use `HttpClient`.
607///
608/// # Working with the response
609///
610/// Unary calls return [`UnaryResponse<OwnedView<FooView>>`](::connectrpc::client::UnaryResponse).
611/// [`view()`](::connectrpc::client::UnaryResponse::view) borrows the response
612/// message, so field access is zero-copy:
613///
614/// ```rust,ignore
615/// let resp = client.get_zipped_asset_supply(request).await?;
616/// let name: &str = resp.view().name;  // borrow into the response buffer
617/// ```
618///
619/// If you need the owned struct (e.g. to store or pass by value), use
620/// [`into_owned()`](::connectrpc::client::UnaryResponse::into_owned):
621///
622/// ```rust,ignore
623/// let owned = client.get_zipped_asset_supply(request).await?.into_owned();
624/// ```
625///
626/// [`into_view()`](::connectrpc::client::UnaryResponse::into_view) keeps the
627/// zero-copy decoded body (an `OwnedView`) without copying; field access on it
628/// goes through `.reborrow()`. Streaming responses yield one
629/// [`StreamMessage`](::connectrpc::StreamMessage) per received message from
630/// `.message().await` — read fields zero-copy through the generated accessor
631/// methods (`msg.name()`) or `.view()`, or convert with `.to_owned_message()`.
632#[derive(Clone)]
633pub struct ChainAnalyticsServiceClient<T> {
634    transport: T,
635    config: ::connectrpc::client::ClientConfig,
636}
637impl<T> ChainAnalyticsServiceClient<T>
638where
639    T: ::connectrpc::client::ClientTransport,
640    <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
641{
642    /// Create a new client with the given transport and configuration.
643    pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
644        Self { transport, config }
645    }
646    /// Get the client configuration.
647    pub fn config(&self) -> &::connectrpc::client::ClientConfig {
648        &self.config
649    }
650    /// Get a mutable reference to the client configuration.
651    pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
652        &mut self.config
653    }
654    /// Call the GetZippedAssetSupply RPC. Sends a request to /chain.analytics.v1.ChainAnalyticsService/GetZippedAssetSupply.
655    pub async fn get_zipped_asset_supply(
656        &self,
657        request: crate::proto::chain::analytics::v1::GetZippedAssetSupplyRequest,
658    ) -> Result<
659        ::connectrpc::client::UnaryResponse<
660            ::buffa::view::OwnedView<
661                crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyResponseView<
662                    'static,
663                >,
664            >,
665        >,
666        ::connectrpc::ConnectError,
667    > {
668        self.get_zipped_asset_supply_with_options(
669                request,
670                ::connectrpc::client::CallOptions::default(),
671            )
672            .await
673    }
674    /// Call the GetZippedAssetSupply RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
675    pub async fn get_zipped_asset_supply_with_options(
676        &self,
677        request: crate::proto::chain::analytics::v1::GetZippedAssetSupplyRequest,
678        options: ::connectrpc::client::CallOptions,
679    ) -> Result<
680        ::connectrpc::client::UnaryResponse<
681            ::buffa::view::OwnedView<
682                crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyResponseView<
683                    'static,
684                >,
685            >,
686        >,
687        ::connectrpc::ConnectError,
688    > {
689        ::connectrpc::client::call_unary(
690                &self.transport,
691                &self.config,
692                CHAIN_ANALYTICS_SERVICE_SERVICE_NAME,
693                "GetZippedAssetSupply",
694                request,
695                options,
696            )
697            .await
698    }
699    /// Call the GetZippedAssetSupplyGroup RPC. Sends a request to /chain.analytics.v1.ChainAnalyticsService/GetZippedAssetSupplyGroup.
700    pub async fn get_zipped_asset_supply_group(
701        &self,
702        request: crate::proto::chain::analytics::v1::GetZippedAssetSupplyGroupRequest,
703    ) -> Result<
704        ::connectrpc::client::UnaryResponse<
705            ::buffa::view::OwnedView<
706                crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyGroupResponseView<
707                    'static,
708                >,
709            >,
710        >,
711        ::connectrpc::ConnectError,
712    > {
713        self.get_zipped_asset_supply_group_with_options(
714                request,
715                ::connectrpc::client::CallOptions::default(),
716            )
717            .await
718    }
719    /// Call the GetZippedAssetSupplyGroup RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
720    pub async fn get_zipped_asset_supply_group_with_options(
721        &self,
722        request: crate::proto::chain::analytics::v1::GetZippedAssetSupplyGroupRequest,
723        options: ::connectrpc::client::CallOptions,
724    ) -> Result<
725        ::connectrpc::client::UnaryResponse<
726            ::buffa::view::OwnedView<
727                crate::proto::chain::analytics::v1::__buffa::view::GetZippedAssetSupplyGroupResponseView<
728                    'static,
729                >,
730            >,
731        >,
732        ::connectrpc::ConnectError,
733    > {
734        ::connectrpc::client::call_unary(
735                &self.transport,
736                &self.config,
737                CHAIN_ANALYTICS_SERVICE_SERVICE_NAME,
738                "GetZippedAssetSupplyGroup",
739                request,
740                options,
741            )
742            .await
743    }
744    /// Call the GetUnifiedAssetBalances RPC. Sends a request to /chain.analytics.v1.ChainAnalyticsService/GetUnifiedAssetBalances.
745    pub async fn get_unified_asset_balances(
746        &self,
747        request: crate::proto::chain::analytics::v1::GetUnifiedAssetBalancesRequest,
748    ) -> Result<
749        ::connectrpc::client::UnaryResponse<
750            ::buffa::view::OwnedView<
751                crate::proto::chain::analytics::v1::__buffa::view::GetUnifiedAssetBalancesResponseView<
752                    'static,
753                >,
754            >,
755        >,
756        ::connectrpc::ConnectError,
757    > {
758        self.get_unified_asset_balances_with_options(
759                request,
760                ::connectrpc::client::CallOptions::default(),
761            )
762            .await
763    }
764    /// Call the GetUnifiedAssetBalances RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
765    pub async fn get_unified_asset_balances_with_options(
766        &self,
767        request: crate::proto::chain::analytics::v1::GetUnifiedAssetBalancesRequest,
768        options: ::connectrpc::client::CallOptions,
769    ) -> Result<
770        ::connectrpc::client::UnaryResponse<
771            ::buffa::view::OwnedView<
772                crate::proto::chain::analytics::v1::__buffa::view::GetUnifiedAssetBalancesResponseView<
773                    'static,
774                >,
775            >,
776        >,
777        ::connectrpc::ConnectError,
778    > {
779        ::connectrpc::client::call_unary(
780                &self.transport,
781                &self.config,
782                CHAIN_ANALYTICS_SERVICE_SERVICE_NAME,
783                "GetUnifiedAssetBalances",
784                request,
785                options,
786            )
787            .await
788    }
789}