Skip to main content

polyester/gen/connect/
orders.v1.rs

1// @generated by connectrpc-codegen. DO NOT EDIT.
2
3///Shorthand for `OwnedView<PreviewOrderRequestView<'static>>`.
4pub type OwnedPreviewOrderRequestView = ::buffa::view::OwnedView<
5    crate::proto::orders::v1::__buffa::view::PreviewOrderRequestView<'static>,
6>;
7///Shorthand for `OwnedView<PreviewOrderResponseView<'static>>`.
8pub type OwnedPreviewOrderResponseView = ::buffa::view::OwnedView<
9    crate::proto::orders::v1::__buffa::view::PreviewOrderResponseView<'static>,
10>;
11///Shorthand for `OwnedView<CreateOrderRequestView<'static>>`.
12pub type OwnedCreateOrderRequestView = ::buffa::view::OwnedView<
13    crate::proto::orders::v1::__buffa::view::CreateOrderRequestView<'static>,
14>;
15///Shorthand for `OwnedView<CreateOrderResponseView<'static>>`.
16pub type OwnedCreateOrderResponseView = ::buffa::view::OwnedView<
17    crate::proto::orders::v1::__buffa::view::CreateOrderResponseView<'static>,
18>;
19///Shorthand for `OwnedView<CancelOrderRequestView<'static>>`.
20pub type OwnedCancelOrderRequestView = ::buffa::view::OwnedView<
21    crate::proto::orders::v1::__buffa::view::CancelOrderRequestView<'static>,
22>;
23///Shorthand for `OwnedView<CancelOrderResponseView<'static>>`.
24pub type OwnedCancelOrderResponseView = ::buffa::view::OwnedView<
25    crate::proto::orders::v1::__buffa::view::CancelOrderResponseView<'static>,
26>;
27///Shorthand for `OwnedView<CancelAllOrdersRequestView<'static>>`.
28pub type OwnedCancelAllOrdersRequestView = ::buffa::view::OwnedView<
29    crate::proto::orders::v1::__buffa::view::CancelAllOrdersRequestView<'static>,
30>;
31///Shorthand for `OwnedView<CancelAllOrdersResponseView<'static>>`.
32pub type OwnedCancelAllOrdersResponseView = ::buffa::view::OwnedView<
33    crate::proto::orders::v1::__buffa::view::CancelAllOrdersResponseView<'static>,
34>;
35///Shorthand for `OwnedView<CancelAllAfterRequestView<'static>>`.
36pub type OwnedCancelAllAfterRequestView = ::buffa::view::OwnedView<
37    crate::proto::orders::v1::__buffa::view::CancelAllAfterRequestView<'static>,
38>;
39///Shorthand for `OwnedView<CancelAllAfterResponseView<'static>>`.
40pub type OwnedCancelAllAfterResponseView = ::buffa::view::OwnedView<
41    crate::proto::orders::v1::__buffa::view::CancelAllAfterResponseView<'static>,
42>;
43///Shorthand for `OwnedView<BatchCreateOrdersRequestView<'static>>`.
44pub type OwnedBatchCreateOrdersRequestView = ::buffa::view::OwnedView<
45    crate::proto::orders::v1::__buffa::view::BatchCreateOrdersRequestView<'static>,
46>;
47///Shorthand for `OwnedView<BatchCreateOrdersResponseView<'static>>`.
48pub type OwnedBatchCreateOrdersResponseView = ::buffa::view::OwnedView<
49    crate::proto::orders::v1::__buffa::view::BatchCreateOrdersResponseView<'static>,
50>;
51///Shorthand for `OwnedView<ModifyOrderRequestView<'static>>`.
52pub type OwnedModifyOrderRequestView = ::buffa::view::OwnedView<
53    crate::proto::orders::v1::__buffa::view::ModifyOrderRequestView<'static>,
54>;
55///Shorthand for `OwnedView<ModifyOrderResponseView<'static>>`.
56pub type OwnedModifyOrderResponseView = ::buffa::view::OwnedView<
57    crate::proto::orders::v1::__buffa::view::ModifyOrderResponseView<'static>,
58>;
59///Shorthand for `OwnedView<BatchReplaceOrdersRequestView<'static>>`.
60pub type OwnedBatchReplaceOrdersRequestView = ::buffa::view::OwnedView<
61    crate::proto::orders::v1::__buffa::view::BatchReplaceOrdersRequestView<'static>,
62>;
63///Shorthand for `OwnedView<BatchReplaceOrdersResponseView<'static>>`.
64pub type OwnedBatchReplaceOrdersResponseView = ::buffa::view::OwnedView<
65    crate::proto::orders::v1::__buffa::view::BatchReplaceOrdersResponseView<'static>,
66>;
67///Shorthand for `OwnedView<BatchCancelOrdersRequestView<'static>>`.
68pub type OwnedBatchCancelOrdersRequestView = ::buffa::view::OwnedView<
69    crate::proto::orders::v1::__buffa::view::BatchCancelOrdersRequestView<'static>,
70>;
71///Shorthand for `OwnedView<BatchCancelOrdersResponseView<'static>>`.
72pub type OwnedBatchCancelOrdersResponseView = ::buffa::view::OwnedView<
73    crate::proto::orders::v1::__buffa::view::BatchCancelOrdersResponseView<'static>,
74>;
75impl ::connectrpc::Encodable<crate::proto::orders::v1::PreviewOrderResponse>
76for crate::proto::orders::v1::__buffa::view::PreviewOrderResponseView<'_> {
77    fn encode(
78        &self,
79        codec: ::connectrpc::CodecFormat,
80    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
81        ::connectrpc::__codegen::encode_view_body(self, codec)
82    }
83}
84impl ::connectrpc::Encodable<crate::proto::orders::v1::PreviewOrderResponse>
85for ::buffa::view::OwnedView<
86    crate::proto::orders::v1::__buffa::view::PreviewOrderResponseView<'static>,
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<crate::proto::orders::v1::CreateOrderResponse>
96for crate::proto::orders::v1::__buffa::view::CreateOrderResponseView<'_> {
97    fn encode(
98        &self,
99        codec: ::connectrpc::CodecFormat,
100    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
101        ::connectrpc::__codegen::encode_view_body(self, codec)
102    }
103}
104impl ::connectrpc::Encodable<crate::proto::orders::v1::CreateOrderResponse>
105for ::buffa::view::OwnedView<
106    crate::proto::orders::v1::__buffa::view::CreateOrderResponseView<'static>,
107> {
108    fn encode(
109        &self,
110        codec: ::connectrpc::CodecFormat,
111    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
112        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
113    }
114}
115impl ::connectrpc::Encodable<crate::proto::orders::v1::CancelOrderResponse>
116for crate::proto::orders::v1::__buffa::view::CancelOrderResponseView<'_> {
117    fn encode(
118        &self,
119        codec: ::connectrpc::CodecFormat,
120    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
121        ::connectrpc::__codegen::encode_view_body(self, codec)
122    }
123}
124impl ::connectrpc::Encodable<crate::proto::orders::v1::CancelOrderResponse>
125for ::buffa::view::OwnedView<
126    crate::proto::orders::v1::__buffa::view::CancelOrderResponseView<'static>,
127> {
128    fn encode(
129        &self,
130        codec: ::connectrpc::CodecFormat,
131    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
132        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
133    }
134}
135impl ::connectrpc::Encodable<crate::proto::orders::v1::CancelAllOrdersResponse>
136for crate::proto::orders::v1::__buffa::view::CancelAllOrdersResponseView<'_> {
137    fn encode(
138        &self,
139        codec: ::connectrpc::CodecFormat,
140    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
141        ::connectrpc::__codegen::encode_view_body(self, codec)
142    }
143}
144impl ::connectrpc::Encodable<crate::proto::orders::v1::CancelAllOrdersResponse>
145for ::buffa::view::OwnedView<
146    crate::proto::orders::v1::__buffa::view::CancelAllOrdersResponseView<'static>,
147> {
148    fn encode(
149        &self,
150        codec: ::connectrpc::CodecFormat,
151    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
152        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
153    }
154}
155impl ::connectrpc::Encodable<crate::proto::orders::v1::CancelAllAfterResponse>
156for crate::proto::orders::v1::__buffa::view::CancelAllAfterResponseView<'_> {
157    fn encode(
158        &self,
159        codec: ::connectrpc::CodecFormat,
160    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
161        ::connectrpc::__codegen::encode_view_body(self, codec)
162    }
163}
164impl ::connectrpc::Encodable<crate::proto::orders::v1::CancelAllAfterResponse>
165for ::buffa::view::OwnedView<
166    crate::proto::orders::v1::__buffa::view::CancelAllAfterResponseView<'static>,
167> {
168    fn encode(
169        &self,
170        codec: ::connectrpc::CodecFormat,
171    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
172        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
173    }
174}
175impl ::connectrpc::Encodable<crate::proto::orders::v1::BatchCreateOrdersResponse>
176for crate::proto::orders::v1::__buffa::view::BatchCreateOrdersResponseView<'_> {
177    fn encode(
178        &self,
179        codec: ::connectrpc::CodecFormat,
180    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
181        ::connectrpc::__codegen::encode_view_body(self, codec)
182    }
183}
184impl ::connectrpc::Encodable<crate::proto::orders::v1::BatchCreateOrdersResponse>
185for ::buffa::view::OwnedView<
186    crate::proto::orders::v1::__buffa::view::BatchCreateOrdersResponseView<'static>,
187> {
188    fn encode(
189        &self,
190        codec: ::connectrpc::CodecFormat,
191    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
192        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
193    }
194}
195impl ::connectrpc::Encodable<crate::proto::orders::v1::ModifyOrderResponse>
196for crate::proto::orders::v1::__buffa::view::ModifyOrderResponseView<'_> {
197    fn encode(
198        &self,
199        codec: ::connectrpc::CodecFormat,
200    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
201        ::connectrpc::__codegen::encode_view_body(self, codec)
202    }
203}
204impl ::connectrpc::Encodable<crate::proto::orders::v1::ModifyOrderResponse>
205for ::buffa::view::OwnedView<
206    crate::proto::orders::v1::__buffa::view::ModifyOrderResponseView<'static>,
207> {
208    fn encode(
209        &self,
210        codec: ::connectrpc::CodecFormat,
211    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
212        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
213    }
214}
215impl ::connectrpc::Encodable<crate::proto::orders::v1::BatchReplaceOrdersResponse>
216for crate::proto::orders::v1::__buffa::view::BatchReplaceOrdersResponseView<'_> {
217    fn encode(
218        &self,
219        codec: ::connectrpc::CodecFormat,
220    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
221        ::connectrpc::__codegen::encode_view_body(self, codec)
222    }
223}
224impl ::connectrpc::Encodable<crate::proto::orders::v1::BatchReplaceOrdersResponse>
225for ::buffa::view::OwnedView<
226    crate::proto::orders::v1::__buffa::view::BatchReplaceOrdersResponseView<'static>,
227> {
228    fn encode(
229        &self,
230        codec: ::connectrpc::CodecFormat,
231    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
232        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
233    }
234}
235impl ::connectrpc::Encodable<crate::proto::orders::v1::BatchCancelOrdersResponse>
236for crate::proto::orders::v1::__buffa::view::BatchCancelOrdersResponseView<'_> {
237    fn encode(
238        &self,
239        codec: ::connectrpc::CodecFormat,
240    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
241        ::connectrpc::__codegen::encode_view_body(self, codec)
242    }
243}
244impl ::connectrpc::Encodable<crate::proto::orders::v1::BatchCancelOrdersResponse>
245for ::buffa::view::OwnedView<
246    crate::proto::orders::v1::__buffa::view::BatchCancelOrdersResponseView<'static>,
247> {
248    fn encode(
249        &self,
250        codec: ::connectrpc::CodecFormat,
251    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
252        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
253    }
254}
255/// Full service name for this service.
256pub const ORDERS_SERVICE_SERVICE_NAME: &str = "orders.v1.OrdersService";
257/// Static [`Spec`](::connectrpc::Spec) for the server-side `PreviewOrder` RPC.
258///
259/// The dispatcher surfaces this on
260/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
261pub const ORDERS_SERVICE_PREVIEW_ORDER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
262        "/orders.v1.OrdersService/PreviewOrder",
263        ::connectrpc::StreamType::Unary,
264    )
265    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
266/// Static [`Spec`](::connectrpc::Spec) for the server-side `CreateOrder` RPC.
267///
268/// The dispatcher surfaces this on
269/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
270pub const ORDERS_SERVICE_CREATE_ORDER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
271        "/orders.v1.OrdersService/CreateOrder",
272        ::connectrpc::StreamType::Unary,
273    )
274    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
275/// Static [`Spec`](::connectrpc::Spec) for the server-side `CancelOrder` RPC.
276///
277/// The dispatcher surfaces this on
278/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
279pub const ORDERS_SERVICE_CANCEL_ORDER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
280        "/orders.v1.OrdersService/CancelOrder",
281        ::connectrpc::StreamType::Unary,
282    )
283    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
284/// Static [`Spec`](::connectrpc::Spec) for the server-side `CancelAllOrders` RPC.
285///
286/// The dispatcher surfaces this on
287/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
288pub const ORDERS_SERVICE_CANCEL_ALL_ORDERS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
289        "/orders.v1.OrdersService/CancelAllOrders",
290        ::connectrpc::StreamType::Unary,
291    )
292    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
293/// Static [`Spec`](::connectrpc::Spec) for the server-side `CancelAllAfter` RPC.
294///
295/// The dispatcher surfaces this on
296/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
297pub const ORDERS_SERVICE_CANCEL_ALL_AFTER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
298        "/orders.v1.OrdersService/CancelAllAfter",
299        ::connectrpc::StreamType::Unary,
300    )
301    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
302/// Static [`Spec`](::connectrpc::Spec) for the server-side `BatchCreateOrders` RPC.
303///
304/// The dispatcher surfaces this on
305/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
306pub const ORDERS_SERVICE_BATCH_CREATE_ORDERS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
307        "/orders.v1.OrdersService/BatchCreateOrders",
308        ::connectrpc::StreamType::Unary,
309    )
310    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
311/// Static [`Spec`](::connectrpc::Spec) for the server-side `ModifyOrder` RPC.
312///
313/// The dispatcher surfaces this on
314/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
315pub const ORDERS_SERVICE_MODIFY_ORDER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
316        "/orders.v1.OrdersService/ModifyOrder",
317        ::connectrpc::StreamType::Unary,
318    )
319    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
320/// Static [`Spec`](::connectrpc::Spec) for the server-side `BatchReplaceOrders` RPC.
321///
322/// The dispatcher surfaces this on
323/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
324pub const ORDERS_SERVICE_BATCH_REPLACE_ORDERS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
325        "/orders.v1.OrdersService/BatchReplaceOrders",
326        ::connectrpc::StreamType::Unary,
327    )
328    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
329/// Static [`Spec`](::connectrpc::Spec) for the server-side `BatchCancelOrders` RPC.
330///
331/// The dispatcher surfaces this on
332/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
333pub const ORDERS_SERVICE_BATCH_CANCEL_ORDERS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
334        "/orders.v1.OrdersService/BatchCancelOrders",
335        ::connectrpc::StreamType::Unary,
336    )
337    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
338/// Server trait for OrdersService.
339///
340/// # Implementing handlers
341///
342/// Implement methods with plain `async fn`; the returned future satisfies
343/// the `Send` bound automatically.
344///
345/// **Unary and server-streaming requests** arrive as
346/// [`ServiceRequest<'_, Req>`](::connectrpc::ServiceRequest): a zero-copy
347/// view of the request plus its body, valid for the duration of the call.
348/// Fields are read directly (`request.name` is a `&str` into the decoded
349/// buffer) and the borrow may be held across `.await` points. Anything
350/// that must outlive the call — `tokio::spawn`, channels, server state,
351/// or data captured by a returned response stream — takes owned data:
352/// call `request.to_owned_message()` (or copy the specific fields)
353/// first.
354///
355/// **Client-streaming and bidi requests** arrive as
356/// [`InboundStream<Req>`](::connectrpc::InboundStream) — a
357/// `ServiceStream` of [`StreamMessage`](::connectrpc::StreamMessage)s.
358/// Each item owns its decoded buffer and is `Send + 'static`, so items
359/// can be buffered or moved into spawned tasks; read fields zero-copy
360/// through the generated accessor methods (`item.name()`) or `.view()`,
361/// convert with `.to_owned_message()`, or yield an item back unchanged —
362/// `StreamMessage<M>` implements `Encodable<M>`.
363///
364/// Request types resolved through `extern_path` (e.g. well-known types
365/// from another crate) use the same wrappers; the crate that owns the
366/// type must be generated with buffa ≥ 0.8.0 and views enabled so the
367/// backing `HasMessageView` impl exists.
368///
369/// The `impl Encodable<Out>` return bound accepts the owned `Out`, the
370/// generated `OutView<'_>` / `OwnedOutView`,
371/// [`MaybeBorrowed`](::connectrpc::MaybeBorrowed), or
372/// [`PreEncoded`](::connectrpc::PreEncoded) for handlers that encode a
373/// non-`'static` view internally and pass the bytes across the handler
374/// boundary. View bodies are not emitted for output types mapped via
375/// `extern_path` (the impl would be an orphan); return owned for
376/// WKT/extern outputs.
377///
378/// Server-streaming and bidi-streaming methods return
379/// `ServiceStream<impl Encodable<Out> + Send + use<Self>>`. The
380/// `use<Self>` precise-capturing clause excludes `&self`'s lifetime and
381/// the request's lifetime (unary methods use `use<'a, Self>` and may
382/// borrow from `&self`), so stream items must be `'static` and cannot
383/// borrow from the request. To stream view-encoded data, encode each
384/// item inside the stream body and yield
385/// [`PreEncoded`](::connectrpc::PreEncoded) — see its `# Streaming
386/// example` doc.
387#[allow(clippy::type_complexity)]
388pub trait OrdersService: Send + Sync + 'static {
389    /// Check whether an order is currently admissible without creating an order,
390    /// claiming its client order ID, or reserving funds.
391    ///
392    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
393    ///
394    /// `request` is borrowed from the request body and is valid for the
395    /// duration of the call; message fields are read directly on it
396    /// (zero-copy). The response cannot borrow from `request` — use
397    /// `.to_owned_message()` (or copy the specific fields) for anything
398    /// returned, stored, or moved into `tokio::spawn`.
399    fn preview_order<'a>(
400        &'a self,
401        ctx: ::connectrpc::RequestContext,
402        request: ::connectrpc::ServiceRequest<
403            '_,
404            crate::proto::orders::v1::PreviewOrderRequest,
405        >,
406    ) -> impl ::std::future::Future<
407        Output = ::connectrpc::ServiceResult<
408            impl ::connectrpc::Encodable<
409                crate::proto::orders::v1::PreviewOrderResponse,
410            > + Send + use<'a, Self>,
411        >,
412    > + Send;
413    /// Create a new order.
414    /// REST clients submit decimal quantity and price strings. ConnectRPC clients
415    /// submit scaled integer values.
416    ///
417    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
418    ///
419    /// `request` is borrowed from the request body and is valid for the
420    /// duration of the call; message fields are read directly on it
421    /// (zero-copy). The response cannot borrow from `request` — use
422    /// `.to_owned_message()` (or copy the specific fields) for anything
423    /// returned, stored, or moved into `tokio::spawn`.
424    fn create_order<'a>(
425        &'a self,
426        ctx: ::connectrpc::RequestContext,
427        request: ::connectrpc::ServiceRequest<
428            '_,
429            crate::proto::orders::v1::CreateOrderRequest,
430        >,
431    ) -> impl ::std::future::Future<
432        Output = ::connectrpc::ServiceResult<
433            impl ::connectrpc::Encodable<
434                crate::proto::orders::v1::CreateOrderResponse,
435            > + Send + use<'a, Self>,
436        >,
437    > + Send;
438    /// Cancels an existing order by id or client order id.
439    /// REST clients submit base58 order IDs. ConnectRPC clients submit fixed64
440    /// order IDs.
441    ///
442    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
443    ///
444    /// `request` is borrowed from the request body and is valid for the
445    /// duration of the call; message fields are read directly on it
446    /// (zero-copy). The response cannot borrow from `request` — use
447    /// `.to_owned_message()` (or copy the specific fields) for anything
448    /// returned, stored, or moved into `tokio::spawn`.
449    fn cancel_order<'a>(
450        &'a self,
451        ctx: ::connectrpc::RequestContext,
452        request: ::connectrpc::ServiceRequest<
453            '_,
454            crate::proto::orders::v1::CancelOrderRequest,
455        >,
456    ) -> impl ::std::future::Future<
457        Output = ::connectrpc::ServiceResult<
458            impl ::connectrpc::Encodable<
459                crate::proto::orders::v1::CancelOrderResponse,
460            > + Send + use<'a, Self>,
461        >,
462    > + Send;
463    /// Cancels all matching open orders for an account (kill switch).
464    /// Evaluates matching orders from a consistent snapshot at request start.
465    /// Final state is confirmed via the order update stream or read path.
466    ///
467    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
468    ///
469    /// `request` is borrowed from the request body and is valid for the
470    /// duration of the call; message fields are read directly on it
471    /// (zero-copy). The response cannot borrow from `request` — use
472    /// `.to_owned_message()` (or copy the specific fields) for anything
473    /// returned, stored, or moved into `tokio::spawn`.
474    fn cancel_all_orders<'a>(
475        &'a self,
476        ctx: ::connectrpc::RequestContext,
477        request: ::connectrpc::ServiceRequest<
478            '_,
479            crate::proto::orders::v1::CancelAllOrdersRequest,
480        >,
481    ) -> impl ::std::future::Future<
482        Output = ::connectrpc::ServiceResult<
483            impl ::connectrpc::Encodable<
484                crate::proto::orders::v1::CancelAllOrdersResponse,
485            > + Send + use<'a, Self>,
486        >,
487    > + Send;
488    /// Set cancel-all-after (dead-man switch).
489    /// Arms or disables automatic cancel-all if heartbeat is not refreshed before expiry.
490    ///
491    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
492    ///
493    /// `request` is borrowed from the request body and is valid for the
494    /// duration of the call; message fields are read directly on it
495    /// (zero-copy). The response cannot borrow from `request` — use
496    /// `.to_owned_message()` (or copy the specific fields) for anything
497    /// returned, stored, or moved into `tokio::spawn`.
498    fn cancel_all_after<'a>(
499        &'a self,
500        ctx: ::connectrpc::RequestContext,
501        request: ::connectrpc::ServiceRequest<
502            '_,
503            crate::proto::orders::v1::CancelAllAfterRequest,
504        >,
505    ) -> impl ::std::future::Future<
506        Output = ::connectrpc::ServiceResult<
507            impl ::connectrpc::Encodable<
508                crate::proto::orders::v1::CancelAllAfterResponse,
509            > + Send + use<'a, Self>,
510        >,
511    > + Send;
512    /// Places multiple orders in a single request (best-effort per item).
513    ///
514    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
515    ///
516    /// `request` is borrowed from the request body and is valid for the
517    /// duration of the call; message fields are read directly on it
518    /// (zero-copy). The response cannot borrow from `request` — use
519    /// `.to_owned_message()` (or copy the specific fields) for anything
520    /// returned, stored, or moved into `tokio::spawn`.
521    fn batch_create_orders<'a>(
522        &'a self,
523        ctx: ::connectrpc::RequestContext,
524        request: ::connectrpc::ServiceRequest<
525            '_,
526            crate::proto::orders::v1::BatchCreateOrdersRequest,
527        >,
528    ) -> impl ::std::future::Future<
529        Output = ::connectrpc::ServiceResult<
530            impl ::connectrpc::Encodable<
531                crate::proto::orders::v1::BatchCreateOrdersResponse,
532            > + Send + use<'a, Self>,
533        >,
534    > + Send;
535    /// Modifies an existing order using explicit behavior policy.
536    ///
537    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
538    ///
539    /// `request` is borrowed from the request body and is valid for the
540    /// duration of the call; message fields are read directly on it
541    /// (zero-copy). The response cannot borrow from `request` — use
542    /// `.to_owned_message()` (or copy the specific fields) for anything
543    /// returned, stored, or moved into `tokio::spawn`.
544    fn modify_order<'a>(
545        &'a self,
546        ctx: ::connectrpc::RequestContext,
547        request: ::connectrpc::ServiceRequest<
548            '_,
549            crate::proto::orders::v1::ModifyOrderRequest,
550        >,
551    ) -> impl ::std::future::Future<
552        Output = ::connectrpc::ServiceResult<
553            impl ::connectrpc::Encodable<
554                crate::proto::orders::v1::ModifyOrderResponse,
555            > + Send + use<'a, Self>,
556        >,
557    > + Send;
558    /// Replaces same-symbol orders and returns after authoritative admission.
559    ///
560    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
561    ///
562    /// `request` is borrowed from the request body and is valid for the
563    /// duration of the call; message fields are read directly on it
564    /// (zero-copy). The response cannot borrow from `request` — use
565    /// `.to_owned_message()` (or copy the specific fields) for anything
566    /// returned, stored, or moved into `tokio::spawn`.
567    fn batch_replace_orders<'a>(
568        &'a self,
569        ctx: ::connectrpc::RequestContext,
570        request: ::connectrpc::ServiceRequest<
571            '_,
572            crate::proto::orders::v1::BatchReplaceOrdersRequest,
573        >,
574    ) -> impl ::std::future::Future<
575        Output = ::connectrpc::ServiceResult<
576            impl ::connectrpc::Encodable<
577                crate::proto::orders::v1::BatchReplaceOrdersResponse,
578            > + Send + use<'a, Self>,
579        >,
580    > + Send;
581    /// Cancels multiple orders by explicit ID in a single request.
582    /// Per-item results are returned; partial success is the default.
583    /// Final state is confirmed via the order update stream or read path.
584    ///
585    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
586    ///
587    /// `request` is borrowed from the request body and is valid for the
588    /// duration of the call; message fields are read directly on it
589    /// (zero-copy). The response cannot borrow from `request` — use
590    /// `.to_owned_message()` (or copy the specific fields) for anything
591    /// returned, stored, or moved into `tokio::spawn`.
592    fn batch_cancel_orders<'a>(
593        &'a self,
594        ctx: ::connectrpc::RequestContext,
595        request: ::connectrpc::ServiceRequest<
596            '_,
597            crate::proto::orders::v1::BatchCancelOrdersRequest,
598        >,
599    ) -> impl ::std::future::Future<
600        Output = ::connectrpc::ServiceResult<
601            impl ::connectrpc::Encodable<
602                crate::proto::orders::v1::BatchCancelOrdersResponse,
603            > + Send + use<'a, Self>,
604        >,
605    > + Send;
606}
607/// Extension trait for registering a service implementation with a Router.
608///
609/// This trait is automatically implemented for all types that implement the service trait.
610/// Prefer [`Router::add_service`](::connectrpc::Router::add_service) for
611/// top-down registration; `register` remains available for compatibility
612/// and cases where the service-first call shape is more convenient.
613///
614/// # Example
615///
616/// ```rust,ignore
617/// use std::sync::Arc;
618///
619/// let service = Arc::new(MyServiceImpl);
620/// let router = service.register(Router::new());
621/// ```
622pub trait OrdersServiceExt: OrdersService {
623    /// Register this service implementation with a Router.
624    ///
625    /// Takes ownership of the `Arc<Self>` and returns a new Router with
626    /// this service's methods registered.
627    fn register(
628        self: ::std::sync::Arc<Self>,
629        router: ::connectrpc::Router,
630    ) -> ::connectrpc::Router;
631}
632impl<S: OrdersService> OrdersServiceExt for S {
633    fn register(
634        self: ::std::sync::Arc<Self>,
635        router: ::connectrpc::Router,
636    ) -> ::connectrpc::Router {
637        router
638            .route_view(
639                ORDERS_SERVICE_SERVICE_NAME,
640                "PreviewOrder",
641                {
642                    let svc = ::std::sync::Arc::clone(&self);
643                    ::connectrpc::view_handler_fn(move |
644                        ctx,
645                        req: ::buffa::view::OwnedView<
646                            crate::proto::orders::v1::__buffa::view::PreviewOrderRequestView<
647                                'static,
648                            >,
649                        >,
650                        format|
651                    {
652                        let svc = ::std::sync::Arc::clone(&svc);
653                        async move {
654                            let sreq = ::connectrpc::ServiceRequest::<
655                                crate::proto::orders::v1::PreviewOrderRequest,
656                            >::from_parts(req.reborrow(), req.bytes());
657                            svc.preview_order(ctx, sreq)
658                                .await?
659                                .encode::<
660                                    crate::proto::orders::v1::PreviewOrderResponse,
661                                >(format)
662                        }
663                    })
664                },
665            )
666            .with_spec(ORDERS_SERVICE_PREVIEW_ORDER_SPEC)
667            .route_view(
668                ORDERS_SERVICE_SERVICE_NAME,
669                "CreateOrder",
670                {
671                    let svc = ::std::sync::Arc::clone(&self);
672                    ::connectrpc::view_handler_fn(move |
673                        ctx,
674                        req: ::buffa::view::OwnedView<
675                            crate::proto::orders::v1::__buffa::view::CreateOrderRequestView<
676                                'static,
677                            >,
678                        >,
679                        format|
680                    {
681                        let svc = ::std::sync::Arc::clone(&svc);
682                        async move {
683                            let sreq = ::connectrpc::ServiceRequest::<
684                                crate::proto::orders::v1::CreateOrderRequest,
685                            >::from_parts(req.reborrow(), req.bytes());
686                            svc.create_order(ctx, sreq)
687                                .await?
688                                .encode::<
689                                    crate::proto::orders::v1::CreateOrderResponse,
690                                >(format)
691                        }
692                    })
693                },
694            )
695            .with_spec(ORDERS_SERVICE_CREATE_ORDER_SPEC)
696            .route_view(
697                ORDERS_SERVICE_SERVICE_NAME,
698                "CancelOrder",
699                {
700                    let svc = ::std::sync::Arc::clone(&self);
701                    ::connectrpc::view_handler_fn(move |
702                        ctx,
703                        req: ::buffa::view::OwnedView<
704                            crate::proto::orders::v1::__buffa::view::CancelOrderRequestView<
705                                'static,
706                            >,
707                        >,
708                        format|
709                    {
710                        let svc = ::std::sync::Arc::clone(&svc);
711                        async move {
712                            let sreq = ::connectrpc::ServiceRequest::<
713                                crate::proto::orders::v1::CancelOrderRequest,
714                            >::from_parts(req.reborrow(), req.bytes());
715                            svc.cancel_order(ctx, sreq)
716                                .await?
717                                .encode::<
718                                    crate::proto::orders::v1::CancelOrderResponse,
719                                >(format)
720                        }
721                    })
722                },
723            )
724            .with_spec(ORDERS_SERVICE_CANCEL_ORDER_SPEC)
725            .route_view(
726                ORDERS_SERVICE_SERVICE_NAME,
727                "CancelAllOrders",
728                {
729                    let svc = ::std::sync::Arc::clone(&self);
730                    ::connectrpc::view_handler_fn(move |
731                        ctx,
732                        req: ::buffa::view::OwnedView<
733                            crate::proto::orders::v1::__buffa::view::CancelAllOrdersRequestView<
734                                'static,
735                            >,
736                        >,
737                        format|
738                    {
739                        let svc = ::std::sync::Arc::clone(&svc);
740                        async move {
741                            let sreq = ::connectrpc::ServiceRequest::<
742                                crate::proto::orders::v1::CancelAllOrdersRequest,
743                            >::from_parts(req.reborrow(), req.bytes());
744                            svc.cancel_all_orders(ctx, sreq)
745                                .await?
746                                .encode::<
747                                    crate::proto::orders::v1::CancelAllOrdersResponse,
748                                >(format)
749                        }
750                    })
751                },
752            )
753            .with_spec(ORDERS_SERVICE_CANCEL_ALL_ORDERS_SPEC)
754            .route_view(
755                ORDERS_SERVICE_SERVICE_NAME,
756                "CancelAllAfter",
757                {
758                    let svc = ::std::sync::Arc::clone(&self);
759                    ::connectrpc::view_handler_fn(move |
760                        ctx,
761                        req: ::buffa::view::OwnedView<
762                            crate::proto::orders::v1::__buffa::view::CancelAllAfterRequestView<
763                                'static,
764                            >,
765                        >,
766                        format|
767                    {
768                        let svc = ::std::sync::Arc::clone(&svc);
769                        async move {
770                            let sreq = ::connectrpc::ServiceRequest::<
771                                crate::proto::orders::v1::CancelAllAfterRequest,
772                            >::from_parts(req.reborrow(), req.bytes());
773                            svc.cancel_all_after(ctx, sreq)
774                                .await?
775                                .encode::<
776                                    crate::proto::orders::v1::CancelAllAfterResponse,
777                                >(format)
778                        }
779                    })
780                },
781            )
782            .with_spec(ORDERS_SERVICE_CANCEL_ALL_AFTER_SPEC)
783            .route_view(
784                ORDERS_SERVICE_SERVICE_NAME,
785                "BatchCreateOrders",
786                {
787                    let svc = ::std::sync::Arc::clone(&self);
788                    ::connectrpc::view_handler_fn(move |
789                        ctx,
790                        req: ::buffa::view::OwnedView<
791                            crate::proto::orders::v1::__buffa::view::BatchCreateOrdersRequestView<
792                                'static,
793                            >,
794                        >,
795                        format|
796                    {
797                        let svc = ::std::sync::Arc::clone(&svc);
798                        async move {
799                            let sreq = ::connectrpc::ServiceRequest::<
800                                crate::proto::orders::v1::BatchCreateOrdersRequest,
801                            >::from_parts(req.reborrow(), req.bytes());
802                            svc.batch_create_orders(ctx, sreq)
803                                .await?
804                                .encode::<
805                                    crate::proto::orders::v1::BatchCreateOrdersResponse,
806                                >(format)
807                        }
808                    })
809                },
810            )
811            .with_spec(ORDERS_SERVICE_BATCH_CREATE_ORDERS_SPEC)
812            .route_view(
813                ORDERS_SERVICE_SERVICE_NAME,
814                "ModifyOrder",
815                {
816                    let svc = ::std::sync::Arc::clone(&self);
817                    ::connectrpc::view_handler_fn(move |
818                        ctx,
819                        req: ::buffa::view::OwnedView<
820                            crate::proto::orders::v1::__buffa::view::ModifyOrderRequestView<
821                                'static,
822                            >,
823                        >,
824                        format|
825                    {
826                        let svc = ::std::sync::Arc::clone(&svc);
827                        async move {
828                            let sreq = ::connectrpc::ServiceRequest::<
829                                crate::proto::orders::v1::ModifyOrderRequest,
830                            >::from_parts(req.reborrow(), req.bytes());
831                            svc.modify_order(ctx, sreq)
832                                .await?
833                                .encode::<
834                                    crate::proto::orders::v1::ModifyOrderResponse,
835                                >(format)
836                        }
837                    })
838                },
839            )
840            .with_spec(ORDERS_SERVICE_MODIFY_ORDER_SPEC)
841            .route_view(
842                ORDERS_SERVICE_SERVICE_NAME,
843                "BatchReplaceOrders",
844                {
845                    let svc = ::std::sync::Arc::clone(&self);
846                    ::connectrpc::view_handler_fn(move |
847                        ctx,
848                        req: ::buffa::view::OwnedView<
849                            crate::proto::orders::v1::__buffa::view::BatchReplaceOrdersRequestView<
850                                'static,
851                            >,
852                        >,
853                        format|
854                    {
855                        let svc = ::std::sync::Arc::clone(&svc);
856                        async move {
857                            let sreq = ::connectrpc::ServiceRequest::<
858                                crate::proto::orders::v1::BatchReplaceOrdersRequest,
859                            >::from_parts(req.reborrow(), req.bytes());
860                            svc.batch_replace_orders(ctx, sreq)
861                                .await?
862                                .encode::<
863                                    crate::proto::orders::v1::BatchReplaceOrdersResponse,
864                                >(format)
865                        }
866                    })
867                },
868            )
869            .with_spec(ORDERS_SERVICE_BATCH_REPLACE_ORDERS_SPEC)
870            .route_view(
871                ORDERS_SERVICE_SERVICE_NAME,
872                "BatchCancelOrders",
873                {
874                    let svc = ::std::sync::Arc::clone(&self);
875                    ::connectrpc::view_handler_fn(move |
876                        ctx,
877                        req: ::buffa::view::OwnedView<
878                            crate::proto::orders::v1::__buffa::view::BatchCancelOrdersRequestView<
879                                'static,
880                            >,
881                        >,
882                        format|
883                    {
884                        let svc = ::std::sync::Arc::clone(&svc);
885                        async move {
886                            let sreq = ::connectrpc::ServiceRequest::<
887                                crate::proto::orders::v1::BatchCancelOrdersRequest,
888                            >::from_parts(req.reborrow(), req.bytes());
889                            svc.batch_cancel_orders(ctx, sreq)
890                                .await?
891                                .encode::<
892                                    crate::proto::orders::v1::BatchCancelOrdersResponse,
893                                >(format)
894                        }
895                    })
896                },
897            )
898            .with_spec(ORDERS_SERVICE_BATCH_CANCEL_ORDERS_SPEC)
899    }
900}
901/// Type-inference marker used by [`Router::add_service`](::connectrpc::Router::add_service).
902#[doc(hidden)]
903pub struct OrdersServiceRegisterMarker;
904impl<S: OrdersService> ::connectrpc::ServiceRegister<OrdersServiceRegisterMarker>
905for ::std::sync::Arc<S> {
906    fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
907        <S as OrdersServiceExt>::register(self, router)
908    }
909}
910/// Monomorphic dispatcher for `OrdersService`.
911///
912/// 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.
913///
914/// # Example
915///
916/// ```rust,ignore
917/// use connectrpc::ConnectRpcService;
918///
919/// let server = OrdersServiceServer::new(MyImpl);
920/// let service = ConnectRpcService::new(server);
921/// // hand `service` to axum/hyper as a fallback_service
922/// ```
923pub struct OrdersServiceServer<T> {
924    inner: ::std::sync::Arc<T>,
925}
926impl<T: OrdersService> OrdersServiceServer<T> {
927    /// Wrap a service implementation in a monomorphic dispatcher.
928    pub fn new(service: T) -> Self {
929        Self {
930            inner: ::std::sync::Arc::new(service),
931        }
932    }
933    /// Wrap an already-`Arc`'d service implementation.
934    pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
935        Self { inner }
936    }
937}
938impl<T> Clone for OrdersServiceServer<T> {
939    fn clone(&self) -> Self {
940        Self {
941            inner: ::std::sync::Arc::clone(&self.inner),
942        }
943    }
944}
945impl<T: OrdersService> ::connectrpc::Dispatcher for OrdersServiceServer<T> {
946    #[inline]
947    fn lookup(
948        &self,
949        path: &str,
950    ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
951        let method = path.strip_prefix("orders.v1.OrdersService/")?;
952        match method {
953            "PreviewOrder" => {
954                Some(
955                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
956                        .with_spec(ORDERS_SERVICE_PREVIEW_ORDER_SPEC),
957                )
958            }
959            "CreateOrder" => {
960                Some(
961                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
962                        .with_spec(ORDERS_SERVICE_CREATE_ORDER_SPEC),
963                )
964            }
965            "CancelOrder" => {
966                Some(
967                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
968                        .with_spec(ORDERS_SERVICE_CANCEL_ORDER_SPEC),
969                )
970            }
971            "CancelAllOrders" => {
972                Some(
973                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
974                        .with_spec(ORDERS_SERVICE_CANCEL_ALL_ORDERS_SPEC),
975                )
976            }
977            "CancelAllAfter" => {
978                Some(
979                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
980                        .with_spec(ORDERS_SERVICE_CANCEL_ALL_AFTER_SPEC),
981                )
982            }
983            "BatchCreateOrders" => {
984                Some(
985                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
986                        .with_spec(ORDERS_SERVICE_BATCH_CREATE_ORDERS_SPEC),
987                )
988            }
989            "ModifyOrder" => {
990                Some(
991                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
992                        .with_spec(ORDERS_SERVICE_MODIFY_ORDER_SPEC),
993                )
994            }
995            "BatchReplaceOrders" => {
996                Some(
997                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
998                        .with_spec(ORDERS_SERVICE_BATCH_REPLACE_ORDERS_SPEC),
999                )
1000            }
1001            "BatchCancelOrders" => {
1002                Some(
1003                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
1004                        .with_spec(ORDERS_SERVICE_BATCH_CANCEL_ORDERS_SPEC),
1005                )
1006            }
1007            _ => None,
1008        }
1009    }
1010    fn call_unary(
1011        &self,
1012        path: &str,
1013        ctx: ::connectrpc::RequestContext,
1014        request: ::connectrpc::Payload,
1015        format: ::connectrpc::CodecFormat,
1016    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
1017        let Some(method) = path.strip_prefix("orders.v1.OrdersService/") else {
1018            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
1019        };
1020        let _ = (&ctx, &request, &format);
1021        match method {
1022            "PreviewOrder" => {
1023                let svc = ::std::sync::Arc::clone(&self.inner);
1024                Box::pin(async move {
1025                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1026                        crate::proto::orders::v1::PreviewOrderRequest,
1027                    >(request.encoded()?, format)?;
1028                    let req: crate::proto::orders::v1::__buffa::view::PreviewOrderRequestView<
1029                        '_,
1030                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1031                        &body,
1032                    )?;
1033                    let req = ::connectrpc::ServiceRequest::<
1034                        crate::proto::orders::v1::PreviewOrderRequest,
1035                    >::from_parts(&req, &body);
1036                    svc.preview_order(ctx, req)
1037                        .await?
1038                        .encode::<crate::proto::orders::v1::PreviewOrderResponse>(format)
1039                })
1040            }
1041            "CreateOrder" => {
1042                let svc = ::std::sync::Arc::clone(&self.inner);
1043                Box::pin(async move {
1044                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1045                        crate::proto::orders::v1::CreateOrderRequest,
1046                    >(request.encoded()?, format)?;
1047                    let req: crate::proto::orders::v1::__buffa::view::CreateOrderRequestView<
1048                        '_,
1049                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1050                        &body,
1051                    )?;
1052                    let req = ::connectrpc::ServiceRequest::<
1053                        crate::proto::orders::v1::CreateOrderRequest,
1054                    >::from_parts(&req, &body);
1055                    svc.create_order(ctx, req)
1056                        .await?
1057                        .encode::<crate::proto::orders::v1::CreateOrderResponse>(format)
1058                })
1059            }
1060            "CancelOrder" => {
1061                let svc = ::std::sync::Arc::clone(&self.inner);
1062                Box::pin(async move {
1063                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1064                        crate::proto::orders::v1::CancelOrderRequest,
1065                    >(request.encoded()?, format)?;
1066                    let req: crate::proto::orders::v1::__buffa::view::CancelOrderRequestView<
1067                        '_,
1068                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1069                        &body,
1070                    )?;
1071                    let req = ::connectrpc::ServiceRequest::<
1072                        crate::proto::orders::v1::CancelOrderRequest,
1073                    >::from_parts(&req, &body);
1074                    svc.cancel_order(ctx, req)
1075                        .await?
1076                        .encode::<crate::proto::orders::v1::CancelOrderResponse>(format)
1077                })
1078            }
1079            "CancelAllOrders" => {
1080                let svc = ::std::sync::Arc::clone(&self.inner);
1081                Box::pin(async move {
1082                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1083                        crate::proto::orders::v1::CancelAllOrdersRequest,
1084                    >(request.encoded()?, format)?;
1085                    let req: crate::proto::orders::v1::__buffa::view::CancelAllOrdersRequestView<
1086                        '_,
1087                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1088                        &body,
1089                    )?;
1090                    let req = ::connectrpc::ServiceRequest::<
1091                        crate::proto::orders::v1::CancelAllOrdersRequest,
1092                    >::from_parts(&req, &body);
1093                    svc.cancel_all_orders(ctx, req)
1094                        .await?
1095                        .encode::<
1096                            crate::proto::orders::v1::CancelAllOrdersResponse,
1097                        >(format)
1098                })
1099            }
1100            "CancelAllAfter" => {
1101                let svc = ::std::sync::Arc::clone(&self.inner);
1102                Box::pin(async move {
1103                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1104                        crate::proto::orders::v1::CancelAllAfterRequest,
1105                    >(request.encoded()?, format)?;
1106                    let req: crate::proto::orders::v1::__buffa::view::CancelAllAfterRequestView<
1107                        '_,
1108                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1109                        &body,
1110                    )?;
1111                    let req = ::connectrpc::ServiceRequest::<
1112                        crate::proto::orders::v1::CancelAllAfterRequest,
1113                    >::from_parts(&req, &body);
1114                    svc.cancel_all_after(ctx, req)
1115                        .await?
1116                        .encode::<
1117                            crate::proto::orders::v1::CancelAllAfterResponse,
1118                        >(format)
1119                })
1120            }
1121            "BatchCreateOrders" => {
1122                let svc = ::std::sync::Arc::clone(&self.inner);
1123                Box::pin(async move {
1124                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1125                        crate::proto::orders::v1::BatchCreateOrdersRequest,
1126                    >(request.encoded()?, format)?;
1127                    let req: crate::proto::orders::v1::__buffa::view::BatchCreateOrdersRequestView<
1128                        '_,
1129                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1130                        &body,
1131                    )?;
1132                    let req = ::connectrpc::ServiceRequest::<
1133                        crate::proto::orders::v1::BatchCreateOrdersRequest,
1134                    >::from_parts(&req, &body);
1135                    svc.batch_create_orders(ctx, req)
1136                        .await?
1137                        .encode::<
1138                            crate::proto::orders::v1::BatchCreateOrdersResponse,
1139                        >(format)
1140                })
1141            }
1142            "ModifyOrder" => {
1143                let svc = ::std::sync::Arc::clone(&self.inner);
1144                Box::pin(async move {
1145                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1146                        crate::proto::orders::v1::ModifyOrderRequest,
1147                    >(request.encoded()?, format)?;
1148                    let req: crate::proto::orders::v1::__buffa::view::ModifyOrderRequestView<
1149                        '_,
1150                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1151                        &body,
1152                    )?;
1153                    let req = ::connectrpc::ServiceRequest::<
1154                        crate::proto::orders::v1::ModifyOrderRequest,
1155                    >::from_parts(&req, &body);
1156                    svc.modify_order(ctx, req)
1157                        .await?
1158                        .encode::<crate::proto::orders::v1::ModifyOrderResponse>(format)
1159                })
1160            }
1161            "BatchReplaceOrders" => {
1162                let svc = ::std::sync::Arc::clone(&self.inner);
1163                Box::pin(async move {
1164                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1165                        crate::proto::orders::v1::BatchReplaceOrdersRequest,
1166                    >(request.encoded()?, format)?;
1167                    let req: crate::proto::orders::v1::__buffa::view::BatchReplaceOrdersRequestView<
1168                        '_,
1169                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1170                        &body,
1171                    )?;
1172                    let req = ::connectrpc::ServiceRequest::<
1173                        crate::proto::orders::v1::BatchReplaceOrdersRequest,
1174                    >::from_parts(&req, &body);
1175                    svc.batch_replace_orders(ctx, req)
1176                        .await?
1177                        .encode::<
1178                            crate::proto::orders::v1::BatchReplaceOrdersResponse,
1179                        >(format)
1180                })
1181            }
1182            "BatchCancelOrders" => {
1183                let svc = ::std::sync::Arc::clone(&self.inner);
1184                Box::pin(async move {
1185                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
1186                        crate::proto::orders::v1::BatchCancelOrdersRequest,
1187                    >(request.encoded()?, format)?;
1188                    let req: crate::proto::orders::v1::__buffa::view::BatchCancelOrdersRequestView<
1189                        '_,
1190                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
1191                        &body,
1192                    )?;
1193                    let req = ::connectrpc::ServiceRequest::<
1194                        crate::proto::orders::v1::BatchCancelOrdersRequest,
1195                    >::from_parts(&req, &body);
1196                    svc.batch_cancel_orders(ctx, req)
1197                        .await?
1198                        .encode::<
1199                            crate::proto::orders::v1::BatchCancelOrdersResponse,
1200                        >(format)
1201                })
1202            }
1203            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
1204        }
1205    }
1206    fn call_server_streaming(
1207        &self,
1208        path: &str,
1209        ctx: ::connectrpc::RequestContext,
1210        request: ::buffa::bytes::Bytes,
1211        format: ::connectrpc::CodecFormat,
1212    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
1213        let Some(method) = path.strip_prefix("orders.v1.OrdersService/") else {
1214            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
1215        };
1216        let _ = (&ctx, &request, &format);
1217        match method {
1218            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
1219        }
1220    }
1221    fn call_client_streaming(
1222        &self,
1223        path: &str,
1224        ctx: ::connectrpc::RequestContext,
1225        requests: ::connectrpc::dispatcher::codegen::RequestStream,
1226        format: ::connectrpc::CodecFormat,
1227    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
1228        let Some(method) = path.strip_prefix("orders.v1.OrdersService/") else {
1229            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
1230        };
1231        let _ = (&ctx, &requests, &format);
1232        match method {
1233            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
1234        }
1235    }
1236    fn call_bidi_streaming(
1237        &self,
1238        path: &str,
1239        ctx: ::connectrpc::RequestContext,
1240        requests: ::connectrpc::dispatcher::codegen::RequestStream,
1241        format: ::connectrpc::CodecFormat,
1242    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
1243        let Some(method) = path.strip_prefix("orders.v1.OrdersService/") else {
1244            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
1245        };
1246        let _ = (&ctx, &requests, &format);
1247        match method {
1248            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
1249        }
1250    }
1251}
1252/// Client for this service.
1253///
1254/// Generic over `T: ClientTransport`. For **gRPC** (HTTP/2), use
1255/// `Http2Connection` — it has honest `poll_ready` and composes with
1256/// `tower::balance` for multi-connection load balancing. For **Connect
1257/// over HTTP/1.1** (or unknown protocol), use `HttpClient`.
1258///
1259/// # Working with the response
1260///
1261/// Unary calls return [`UnaryResponse<OwnedView<FooView>>`](::connectrpc::client::UnaryResponse).
1262/// [`view()`](::connectrpc::client::UnaryResponse::view) borrows the response
1263/// message, so field access is zero-copy:
1264///
1265/// ```rust,ignore
1266/// let resp = client.preview_order(request).await?;
1267/// let name: &str = resp.view().name;  // borrow into the response buffer
1268/// ```
1269///
1270/// If you need the owned struct (e.g. to store or pass by value), use
1271/// [`into_owned()`](::connectrpc::client::UnaryResponse::into_owned):
1272///
1273/// ```rust,ignore
1274/// let owned = client.preview_order(request).await?.into_owned();
1275/// ```
1276///
1277/// [`into_view()`](::connectrpc::client::UnaryResponse::into_view) keeps the
1278/// zero-copy decoded body (an `OwnedView`) without copying; field access on it
1279/// goes through `.reborrow()`. Streaming responses yield one
1280/// [`StreamMessage`](::connectrpc::StreamMessage) per received message from
1281/// `.message().await` — read fields zero-copy through the generated accessor
1282/// methods (`msg.name()`) or `.view()`, or convert with `.to_owned_message()`.
1283#[derive(Clone)]
1284pub struct OrdersServiceClient<T> {
1285    transport: T,
1286    config: ::connectrpc::client::ClientConfig,
1287}
1288impl<T> OrdersServiceClient<T>
1289where
1290    T: ::connectrpc::client::ClientTransport,
1291    <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
1292{
1293    /// Create a new client with the given transport and configuration.
1294    pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
1295        Self { transport, config }
1296    }
1297    /// Get the client configuration.
1298    pub fn config(&self) -> &::connectrpc::client::ClientConfig {
1299        &self.config
1300    }
1301    /// Get a mutable reference to the client configuration.
1302    pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
1303        &mut self.config
1304    }
1305    /// Call the PreviewOrder RPC. Sends a request to /orders.v1.OrdersService/PreviewOrder.
1306    pub async fn preview_order(
1307        &self,
1308        request: crate::proto::orders::v1::PreviewOrderRequest,
1309    ) -> Result<
1310        ::connectrpc::client::UnaryResponse<
1311            ::buffa::view::OwnedView<
1312                crate::proto::orders::v1::__buffa::view::PreviewOrderResponseView<
1313                    'static,
1314                >,
1315            >,
1316        >,
1317        ::connectrpc::ConnectError,
1318    > {
1319        self.preview_order_with_options(
1320                request,
1321                ::connectrpc::client::CallOptions::default(),
1322            )
1323            .await
1324    }
1325    /// Call the PreviewOrder RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1326    pub async fn preview_order_with_options(
1327        &self,
1328        request: crate::proto::orders::v1::PreviewOrderRequest,
1329        options: ::connectrpc::client::CallOptions,
1330    ) -> Result<
1331        ::connectrpc::client::UnaryResponse<
1332            ::buffa::view::OwnedView<
1333                crate::proto::orders::v1::__buffa::view::PreviewOrderResponseView<
1334                    'static,
1335                >,
1336            >,
1337        >,
1338        ::connectrpc::ConnectError,
1339    > {
1340        ::connectrpc::client::call_unary(
1341                &self.transport,
1342                &self.config,
1343                ORDERS_SERVICE_SERVICE_NAME,
1344                "PreviewOrder",
1345                request,
1346                options,
1347            )
1348            .await
1349    }
1350    /// Call the CreateOrder RPC. Sends a request to /orders.v1.OrdersService/CreateOrder.
1351    pub async fn create_order(
1352        &self,
1353        request: crate::proto::orders::v1::CreateOrderRequest,
1354    ) -> Result<
1355        ::connectrpc::client::UnaryResponse<
1356            ::buffa::view::OwnedView<
1357                crate::proto::orders::v1::__buffa::view::CreateOrderResponseView<'static>,
1358            >,
1359        >,
1360        ::connectrpc::ConnectError,
1361    > {
1362        self.create_order_with_options(
1363                request,
1364                ::connectrpc::client::CallOptions::default(),
1365            )
1366            .await
1367    }
1368    /// Call the CreateOrder RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1369    pub async fn create_order_with_options(
1370        &self,
1371        request: crate::proto::orders::v1::CreateOrderRequest,
1372        options: ::connectrpc::client::CallOptions,
1373    ) -> Result<
1374        ::connectrpc::client::UnaryResponse<
1375            ::buffa::view::OwnedView<
1376                crate::proto::orders::v1::__buffa::view::CreateOrderResponseView<'static>,
1377            >,
1378        >,
1379        ::connectrpc::ConnectError,
1380    > {
1381        ::connectrpc::client::call_unary(
1382                &self.transport,
1383                &self.config,
1384                ORDERS_SERVICE_SERVICE_NAME,
1385                "CreateOrder",
1386                request,
1387                options,
1388            )
1389            .await
1390    }
1391    /// Call the CancelOrder RPC. Sends a request to /orders.v1.OrdersService/CancelOrder.
1392    pub async fn cancel_order(
1393        &self,
1394        request: crate::proto::orders::v1::CancelOrderRequest,
1395    ) -> Result<
1396        ::connectrpc::client::UnaryResponse<
1397            ::buffa::view::OwnedView<
1398                crate::proto::orders::v1::__buffa::view::CancelOrderResponseView<'static>,
1399            >,
1400        >,
1401        ::connectrpc::ConnectError,
1402    > {
1403        self.cancel_order_with_options(
1404                request,
1405                ::connectrpc::client::CallOptions::default(),
1406            )
1407            .await
1408    }
1409    /// Call the CancelOrder RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1410    pub async fn cancel_order_with_options(
1411        &self,
1412        request: crate::proto::orders::v1::CancelOrderRequest,
1413        options: ::connectrpc::client::CallOptions,
1414    ) -> Result<
1415        ::connectrpc::client::UnaryResponse<
1416            ::buffa::view::OwnedView<
1417                crate::proto::orders::v1::__buffa::view::CancelOrderResponseView<'static>,
1418            >,
1419        >,
1420        ::connectrpc::ConnectError,
1421    > {
1422        ::connectrpc::client::call_unary(
1423                &self.transport,
1424                &self.config,
1425                ORDERS_SERVICE_SERVICE_NAME,
1426                "CancelOrder",
1427                request,
1428                options,
1429            )
1430            .await
1431    }
1432    /// Call the CancelAllOrders RPC. Sends a request to /orders.v1.OrdersService/CancelAllOrders.
1433    pub async fn cancel_all_orders(
1434        &self,
1435        request: crate::proto::orders::v1::CancelAllOrdersRequest,
1436    ) -> Result<
1437        ::connectrpc::client::UnaryResponse<
1438            ::buffa::view::OwnedView<
1439                crate::proto::orders::v1::__buffa::view::CancelAllOrdersResponseView<
1440                    'static,
1441                >,
1442            >,
1443        >,
1444        ::connectrpc::ConnectError,
1445    > {
1446        self.cancel_all_orders_with_options(
1447                request,
1448                ::connectrpc::client::CallOptions::default(),
1449            )
1450            .await
1451    }
1452    /// Call the CancelAllOrders RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1453    pub async fn cancel_all_orders_with_options(
1454        &self,
1455        request: crate::proto::orders::v1::CancelAllOrdersRequest,
1456        options: ::connectrpc::client::CallOptions,
1457    ) -> Result<
1458        ::connectrpc::client::UnaryResponse<
1459            ::buffa::view::OwnedView<
1460                crate::proto::orders::v1::__buffa::view::CancelAllOrdersResponseView<
1461                    'static,
1462                >,
1463            >,
1464        >,
1465        ::connectrpc::ConnectError,
1466    > {
1467        ::connectrpc::client::call_unary(
1468                &self.transport,
1469                &self.config,
1470                ORDERS_SERVICE_SERVICE_NAME,
1471                "CancelAllOrders",
1472                request,
1473                options,
1474            )
1475            .await
1476    }
1477    /// Call the CancelAllAfter RPC. Sends a request to /orders.v1.OrdersService/CancelAllAfter.
1478    pub async fn cancel_all_after(
1479        &self,
1480        request: crate::proto::orders::v1::CancelAllAfterRequest,
1481    ) -> Result<
1482        ::connectrpc::client::UnaryResponse<
1483            ::buffa::view::OwnedView<
1484                crate::proto::orders::v1::__buffa::view::CancelAllAfterResponseView<
1485                    'static,
1486                >,
1487            >,
1488        >,
1489        ::connectrpc::ConnectError,
1490    > {
1491        self.cancel_all_after_with_options(
1492                request,
1493                ::connectrpc::client::CallOptions::default(),
1494            )
1495            .await
1496    }
1497    /// Call the CancelAllAfter RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1498    pub async fn cancel_all_after_with_options(
1499        &self,
1500        request: crate::proto::orders::v1::CancelAllAfterRequest,
1501        options: ::connectrpc::client::CallOptions,
1502    ) -> Result<
1503        ::connectrpc::client::UnaryResponse<
1504            ::buffa::view::OwnedView<
1505                crate::proto::orders::v1::__buffa::view::CancelAllAfterResponseView<
1506                    'static,
1507                >,
1508            >,
1509        >,
1510        ::connectrpc::ConnectError,
1511    > {
1512        ::connectrpc::client::call_unary(
1513                &self.transport,
1514                &self.config,
1515                ORDERS_SERVICE_SERVICE_NAME,
1516                "CancelAllAfter",
1517                request,
1518                options,
1519            )
1520            .await
1521    }
1522    /// Call the BatchCreateOrders RPC. Sends a request to /orders.v1.OrdersService/BatchCreateOrders.
1523    pub async fn batch_create_orders(
1524        &self,
1525        request: crate::proto::orders::v1::BatchCreateOrdersRequest,
1526    ) -> Result<
1527        ::connectrpc::client::UnaryResponse<
1528            ::buffa::view::OwnedView<
1529                crate::proto::orders::v1::__buffa::view::BatchCreateOrdersResponseView<
1530                    'static,
1531                >,
1532            >,
1533        >,
1534        ::connectrpc::ConnectError,
1535    > {
1536        self.batch_create_orders_with_options(
1537                request,
1538                ::connectrpc::client::CallOptions::default(),
1539            )
1540            .await
1541    }
1542    /// Call the BatchCreateOrders RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1543    pub async fn batch_create_orders_with_options(
1544        &self,
1545        request: crate::proto::orders::v1::BatchCreateOrdersRequest,
1546        options: ::connectrpc::client::CallOptions,
1547    ) -> Result<
1548        ::connectrpc::client::UnaryResponse<
1549            ::buffa::view::OwnedView<
1550                crate::proto::orders::v1::__buffa::view::BatchCreateOrdersResponseView<
1551                    'static,
1552                >,
1553            >,
1554        >,
1555        ::connectrpc::ConnectError,
1556    > {
1557        ::connectrpc::client::call_unary(
1558                &self.transport,
1559                &self.config,
1560                ORDERS_SERVICE_SERVICE_NAME,
1561                "BatchCreateOrders",
1562                request,
1563                options,
1564            )
1565            .await
1566    }
1567    /// Call the ModifyOrder RPC. Sends a request to /orders.v1.OrdersService/ModifyOrder.
1568    pub async fn modify_order(
1569        &self,
1570        request: crate::proto::orders::v1::ModifyOrderRequest,
1571    ) -> Result<
1572        ::connectrpc::client::UnaryResponse<
1573            ::buffa::view::OwnedView<
1574                crate::proto::orders::v1::__buffa::view::ModifyOrderResponseView<'static>,
1575            >,
1576        >,
1577        ::connectrpc::ConnectError,
1578    > {
1579        self.modify_order_with_options(
1580                request,
1581                ::connectrpc::client::CallOptions::default(),
1582            )
1583            .await
1584    }
1585    /// Call the ModifyOrder RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1586    pub async fn modify_order_with_options(
1587        &self,
1588        request: crate::proto::orders::v1::ModifyOrderRequest,
1589        options: ::connectrpc::client::CallOptions,
1590    ) -> Result<
1591        ::connectrpc::client::UnaryResponse<
1592            ::buffa::view::OwnedView<
1593                crate::proto::orders::v1::__buffa::view::ModifyOrderResponseView<'static>,
1594            >,
1595        >,
1596        ::connectrpc::ConnectError,
1597    > {
1598        ::connectrpc::client::call_unary(
1599                &self.transport,
1600                &self.config,
1601                ORDERS_SERVICE_SERVICE_NAME,
1602                "ModifyOrder",
1603                request,
1604                options,
1605            )
1606            .await
1607    }
1608    /// Call the BatchReplaceOrders RPC. Sends a request to /orders.v1.OrdersService/BatchReplaceOrders.
1609    pub async fn batch_replace_orders(
1610        &self,
1611        request: crate::proto::orders::v1::BatchReplaceOrdersRequest,
1612    ) -> Result<
1613        ::connectrpc::client::UnaryResponse<
1614            ::buffa::view::OwnedView<
1615                crate::proto::orders::v1::__buffa::view::BatchReplaceOrdersResponseView<
1616                    'static,
1617                >,
1618            >,
1619        >,
1620        ::connectrpc::ConnectError,
1621    > {
1622        self.batch_replace_orders_with_options(
1623                request,
1624                ::connectrpc::client::CallOptions::default(),
1625            )
1626            .await
1627    }
1628    /// Call the BatchReplaceOrders RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1629    pub async fn batch_replace_orders_with_options(
1630        &self,
1631        request: crate::proto::orders::v1::BatchReplaceOrdersRequest,
1632        options: ::connectrpc::client::CallOptions,
1633    ) -> Result<
1634        ::connectrpc::client::UnaryResponse<
1635            ::buffa::view::OwnedView<
1636                crate::proto::orders::v1::__buffa::view::BatchReplaceOrdersResponseView<
1637                    'static,
1638                >,
1639            >,
1640        >,
1641        ::connectrpc::ConnectError,
1642    > {
1643        ::connectrpc::client::call_unary(
1644                &self.transport,
1645                &self.config,
1646                ORDERS_SERVICE_SERVICE_NAME,
1647                "BatchReplaceOrders",
1648                request,
1649                options,
1650            )
1651            .await
1652    }
1653    /// Call the BatchCancelOrders RPC. Sends a request to /orders.v1.OrdersService/BatchCancelOrders.
1654    pub async fn batch_cancel_orders(
1655        &self,
1656        request: crate::proto::orders::v1::BatchCancelOrdersRequest,
1657    ) -> Result<
1658        ::connectrpc::client::UnaryResponse<
1659            ::buffa::view::OwnedView<
1660                crate::proto::orders::v1::__buffa::view::BatchCancelOrdersResponseView<
1661                    'static,
1662                >,
1663            >,
1664        >,
1665        ::connectrpc::ConnectError,
1666    > {
1667        self.batch_cancel_orders_with_options(
1668                request,
1669                ::connectrpc::client::CallOptions::default(),
1670            )
1671            .await
1672    }
1673    /// Call the BatchCancelOrders RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
1674    pub async fn batch_cancel_orders_with_options(
1675        &self,
1676        request: crate::proto::orders::v1::BatchCancelOrdersRequest,
1677        options: ::connectrpc::client::CallOptions,
1678    ) -> Result<
1679        ::connectrpc::client::UnaryResponse<
1680            ::buffa::view::OwnedView<
1681                crate::proto::orders::v1::__buffa::view::BatchCancelOrdersResponseView<
1682                    'static,
1683                >,
1684            >,
1685        >,
1686        ::connectrpc::ConnectError,
1687    > {
1688        ::connectrpc::client::call_unary(
1689                &self.transport,
1690                &self.config,
1691                ORDERS_SERVICE_SERVICE_NAME,
1692                "BatchCancelOrders",
1693                request,
1694                options,
1695            )
1696            .await
1697    }
1698}
1699
1700///Shorthand for `OwnedView<GetOpenOrdersRequestView<'static>>`.
1701pub type OwnedGetOpenOrdersRequestView = ::buffa::view::OwnedView<
1702    crate::proto::orders::v1::__buffa::view::GetOpenOrdersRequestView<'static>,
1703>;
1704///Shorthand for `OwnedView<GetOpenOrdersResponseView<'static>>`.
1705pub type OwnedGetOpenOrdersResponseView = ::buffa::view::OwnedView<
1706    crate::proto::orders::v1::__buffa::view::GetOpenOrdersResponseView<'static>,
1707>;
1708///Shorthand for `OwnedView<GetOrderHistoryRequestView<'static>>`.
1709pub type OwnedGetOrderHistoryRequestView = ::buffa::view::OwnedView<
1710    crate::proto::orders::v1::__buffa::view::GetOrderHistoryRequestView<'static>,
1711>;
1712///Shorthand for `OwnedView<GetOrderHistoryResponseView<'static>>`.
1713pub type OwnedGetOrderHistoryResponseView = ::buffa::view::OwnedView<
1714    crate::proto::orders::v1::__buffa::view::GetOrderHistoryResponseView<'static>,
1715>;
1716///Shorthand for `OwnedView<GetUserTradesRequestView<'static>>`.
1717pub type OwnedGetUserTradesRequestView = ::buffa::view::OwnedView<
1718    crate::proto::orders::v1::__buffa::view::GetUserTradesRequestView<'static>,
1719>;
1720///Shorthand for `OwnedView<GetUserTradesResponseView<'static>>`.
1721pub type OwnedGetUserTradesResponseView = ::buffa::view::OwnedView<
1722    crate::proto::orders::v1::__buffa::view::GetUserTradesResponseView<'static>,
1723>;
1724///Shorthand for `OwnedView<GetOrderRequestView<'static>>`.
1725pub type OwnedGetOrderRequestView = ::buffa::view::OwnedView<
1726    crate::proto::orders::v1::__buffa::view::GetOrderRequestView<'static>,
1727>;
1728///Shorthand for `OwnedView<GetOrderResponseView<'static>>`.
1729pub type OwnedGetOrderResponseView = ::buffa::view::OwnedView<
1730    crate::proto::orders::v1::__buffa::view::GetOrderResponseView<'static>,
1731>;
1732///Shorthand for `OwnedView<GetBatchReplaceStatusRequestView<'static>>`.
1733pub type OwnedGetBatchReplaceStatusRequestView = ::buffa::view::OwnedView<
1734    crate::proto::orders::v1::__buffa::view::GetBatchReplaceStatusRequestView<'static>,
1735>;
1736///Shorthand for `OwnedView<GetBatchReplaceStatusResponseView<'static>>`.
1737pub type OwnedGetBatchReplaceStatusResponseView = ::buffa::view::OwnedView<
1738    crate::proto::orders::v1::__buffa::view::GetBatchReplaceStatusResponseView<'static>,
1739>;
1740impl ::connectrpc::Encodable<crate::proto::orders::v1::GetOpenOrdersResponse>
1741for crate::proto::orders::v1::__buffa::view::GetOpenOrdersResponseView<'_> {
1742    fn encode(
1743        &self,
1744        codec: ::connectrpc::CodecFormat,
1745    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1746        ::connectrpc::__codegen::encode_view_body(self, codec)
1747    }
1748}
1749impl ::connectrpc::Encodable<crate::proto::orders::v1::GetOpenOrdersResponse>
1750for ::buffa::view::OwnedView<
1751    crate::proto::orders::v1::__buffa::view::GetOpenOrdersResponseView<'static>,
1752> {
1753    fn encode(
1754        &self,
1755        codec: ::connectrpc::CodecFormat,
1756    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1757        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1758    }
1759}
1760impl ::connectrpc::Encodable<crate::proto::orders::v1::GetOrderHistoryResponse>
1761for crate::proto::orders::v1::__buffa::view::GetOrderHistoryResponseView<'_> {
1762    fn encode(
1763        &self,
1764        codec: ::connectrpc::CodecFormat,
1765    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1766        ::connectrpc::__codegen::encode_view_body(self, codec)
1767    }
1768}
1769impl ::connectrpc::Encodable<crate::proto::orders::v1::GetOrderHistoryResponse>
1770for ::buffa::view::OwnedView<
1771    crate::proto::orders::v1::__buffa::view::GetOrderHistoryResponseView<'static>,
1772> {
1773    fn encode(
1774        &self,
1775        codec: ::connectrpc::CodecFormat,
1776    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1777        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1778    }
1779}
1780impl ::connectrpc::Encodable<crate::proto::orders::v1::GetUserTradesResponse>
1781for crate::proto::orders::v1::__buffa::view::GetUserTradesResponseView<'_> {
1782    fn encode(
1783        &self,
1784        codec: ::connectrpc::CodecFormat,
1785    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1786        ::connectrpc::__codegen::encode_view_body(self, codec)
1787    }
1788}
1789impl ::connectrpc::Encodable<crate::proto::orders::v1::GetUserTradesResponse>
1790for ::buffa::view::OwnedView<
1791    crate::proto::orders::v1::__buffa::view::GetUserTradesResponseView<'static>,
1792> {
1793    fn encode(
1794        &self,
1795        codec: ::connectrpc::CodecFormat,
1796    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1797        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1798    }
1799}
1800impl ::connectrpc::Encodable<crate::proto::orders::v1::GetOrderResponse>
1801for crate::proto::orders::v1::__buffa::view::GetOrderResponseView<'_> {
1802    fn encode(
1803        &self,
1804        codec: ::connectrpc::CodecFormat,
1805    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1806        ::connectrpc::__codegen::encode_view_body(self, codec)
1807    }
1808}
1809impl ::connectrpc::Encodable<crate::proto::orders::v1::GetOrderResponse>
1810for ::buffa::view::OwnedView<
1811    crate::proto::orders::v1::__buffa::view::GetOrderResponseView<'static>,
1812> {
1813    fn encode(
1814        &self,
1815        codec: ::connectrpc::CodecFormat,
1816    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1817        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1818    }
1819}
1820impl ::connectrpc::Encodable<crate::proto::orders::v1::GetBatchReplaceStatusResponse>
1821for crate::proto::orders::v1::__buffa::view::GetBatchReplaceStatusResponseView<'_> {
1822    fn encode(
1823        &self,
1824        codec: ::connectrpc::CodecFormat,
1825    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1826        ::connectrpc::__codegen::encode_view_body(self, codec)
1827    }
1828}
1829impl ::connectrpc::Encodable<crate::proto::orders::v1::GetBatchReplaceStatusResponse>
1830for ::buffa::view::OwnedView<
1831    crate::proto::orders::v1::__buffa::view::GetBatchReplaceStatusResponseView<'static>,
1832> {
1833    fn encode(
1834        &self,
1835        codec: ::connectrpc::CodecFormat,
1836    ) -> ::std::result::Result<::buffa::bytes::Bytes, ::connectrpc::ConnectError> {
1837        ::connectrpc::__codegen::encode_view_body(self.reborrow(), codec)
1838    }
1839}
1840/// Full service name for this service.
1841pub const ORDERS_READ_SERVICE_SERVICE_NAME: &str = "orders.v1.OrdersReadService";
1842/// Static [`Spec`](::connectrpc::Spec) for the server-side `GetOpenOrders` RPC.
1843///
1844/// The dispatcher surfaces this on
1845/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
1846pub const ORDERS_READ_SERVICE_GET_OPEN_ORDERS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1847        "/orders.v1.OrdersReadService/GetOpenOrders",
1848        ::connectrpc::StreamType::Unary,
1849    )
1850    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1851/// Static [`Spec`](::connectrpc::Spec) for the server-side `GetOrderHistory` RPC.
1852///
1853/// The dispatcher surfaces this on
1854/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
1855pub const ORDERS_READ_SERVICE_GET_ORDER_HISTORY_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1856        "/orders.v1.OrdersReadService/GetOrderHistory",
1857        ::connectrpc::StreamType::Unary,
1858    )
1859    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1860/// Static [`Spec`](::connectrpc::Spec) for the server-side `GetUserTrades` RPC.
1861///
1862/// The dispatcher surfaces this on
1863/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
1864pub const ORDERS_READ_SERVICE_GET_USER_TRADES_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1865        "/orders.v1.OrdersReadService/GetUserTrades",
1866        ::connectrpc::StreamType::Unary,
1867    )
1868    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1869/// Static [`Spec`](::connectrpc::Spec) for the server-side `GetOrder` RPC.
1870///
1871/// The dispatcher surfaces this on
1872/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
1873pub const ORDERS_READ_SERVICE_GET_ORDER_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1874        "/orders.v1.OrdersReadService/GetOrder",
1875        ::connectrpc::StreamType::Unary,
1876    )
1877    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1878/// Static [`Spec`](::connectrpc::Spec) for the server-side `GetBatchReplaceStatus` RPC.
1879///
1880/// The dispatcher surfaces this on
1881/// [`RequestContext::spec`](::connectrpc::RequestContext::spec).
1882pub const ORDERS_READ_SERVICE_GET_BATCH_REPLACE_STATUS_SPEC: ::connectrpc::Spec = ::connectrpc::Spec::server(
1883        "/orders.v1.OrdersReadService/GetBatchReplaceStatus",
1884        ::connectrpc::StreamType::Unary,
1885    )
1886    .with_idempotency_level(::connectrpc::IdempotencyLevel::Unknown);
1887/// Server trait for OrdersReadService.
1888///
1889/// # Implementing handlers
1890///
1891/// Implement methods with plain `async fn`; the returned future satisfies
1892/// the `Send` bound automatically.
1893///
1894/// **Unary and server-streaming requests** arrive as
1895/// [`ServiceRequest<'_, Req>`](::connectrpc::ServiceRequest): a zero-copy
1896/// view of the request plus its body, valid for the duration of the call.
1897/// Fields are read directly (`request.name` is a `&str` into the decoded
1898/// buffer) and the borrow may be held across `.await` points. Anything
1899/// that must outlive the call — `tokio::spawn`, channels, server state,
1900/// or data captured by a returned response stream — takes owned data:
1901/// call `request.to_owned_message()` (or copy the specific fields)
1902/// first.
1903///
1904/// **Client-streaming and bidi requests** arrive as
1905/// [`InboundStream<Req>`](::connectrpc::InboundStream) — a
1906/// `ServiceStream` of [`StreamMessage`](::connectrpc::StreamMessage)s.
1907/// Each item owns its decoded buffer and is `Send + 'static`, so items
1908/// can be buffered or moved into spawned tasks; read fields zero-copy
1909/// through the generated accessor methods (`item.name()`) or `.view()`,
1910/// convert with `.to_owned_message()`, or yield an item back unchanged —
1911/// `StreamMessage<M>` implements `Encodable<M>`.
1912///
1913/// Request types resolved through `extern_path` (e.g. well-known types
1914/// from another crate) use the same wrappers; the crate that owns the
1915/// type must be generated with buffa ≥ 0.8.0 and views enabled so the
1916/// backing `HasMessageView` impl exists.
1917///
1918/// The `impl Encodable<Out>` return bound accepts the owned `Out`, the
1919/// generated `OutView<'_>` / `OwnedOutView`,
1920/// [`MaybeBorrowed`](::connectrpc::MaybeBorrowed), or
1921/// [`PreEncoded`](::connectrpc::PreEncoded) for handlers that encode a
1922/// non-`'static` view internally and pass the bytes across the handler
1923/// boundary. View bodies are not emitted for output types mapped via
1924/// `extern_path` (the impl would be an orphan); return owned for
1925/// WKT/extern outputs.
1926///
1927/// Server-streaming and bidi-streaming methods return
1928/// `ServiceStream<impl Encodable<Out> + Send + use<Self>>`. The
1929/// `use<Self>` precise-capturing clause excludes `&self`'s lifetime and
1930/// the request's lifetime (unary methods use `use<'a, Self>` and may
1931/// borrow from `&self`), so stream items must be `'static` and cannot
1932/// borrow from the request. To stream view-encoded data, encode each
1933/// item inside the stream body and yield
1934/// [`PreEncoded`](::connectrpc::PreEncoded) — see its `# Streaming
1935/// example` doc.
1936#[allow(clippy::type_complexity)]
1937pub trait OrdersReadService: Send + Sync + 'static {
1938    /// Retrieve non-terminal orders for an account.
1939    /// Supports optional subaccount, symbol, and side filters with cursor pagination.
1940    ///
1941    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
1942    ///
1943    /// `request` is borrowed from the request body and is valid for the
1944    /// duration of the call; message fields are read directly on it
1945    /// (zero-copy). The response cannot borrow from `request` — use
1946    /// `.to_owned_message()` (or copy the specific fields) for anything
1947    /// returned, stored, or moved into `tokio::spawn`.
1948    fn get_open_orders<'a>(
1949        &'a self,
1950        ctx: ::connectrpc::RequestContext,
1951        request: ::connectrpc::ServiceRequest<
1952            '_,
1953            crate::proto::orders::v1::GetOpenOrdersRequest,
1954        >,
1955    ) -> impl ::std::future::Future<
1956        Output = ::connectrpc::ServiceResult<
1957            impl ::connectrpc::Encodable<
1958                crate::proto::orders::v1::GetOpenOrdersResponse,
1959            > + Send + use<'a, Self>,
1960        >,
1961    > + Send;
1962    /// Retrieve terminal order history for an account.
1963    /// Supports optional subaccount, symbol, side, status, and time-range filters with cursor pagination.
1964    ///
1965    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
1966    ///
1967    /// `request` is borrowed from the request body and is valid for the
1968    /// duration of the call; message fields are read directly on it
1969    /// (zero-copy). The response cannot borrow from `request` — use
1970    /// `.to_owned_message()` (or copy the specific fields) for anything
1971    /// returned, stored, or moved into `tokio::spawn`.
1972    fn get_order_history<'a>(
1973        &'a self,
1974        ctx: ::connectrpc::RequestContext,
1975        request: ::connectrpc::ServiceRequest<
1976            '_,
1977            crate::proto::orders::v1::GetOrderHistoryRequest,
1978        >,
1979    ) -> impl ::std::future::Future<
1980        Output = ::connectrpc::ServiceResult<
1981            impl ::connectrpc::Encodable<
1982                crate::proto::orders::v1::GetOrderHistoryResponse,
1983            > + Send + use<'a, Self>,
1984        >,
1985    > + Send;
1986    /// Retrieve per-user trade fills for an account.
1987    /// Supports optional subaccount, symbol, side, and time-range filters with cursor pagination.
1988    ///
1989    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
1990    ///
1991    /// `request` is borrowed from the request body and is valid for the
1992    /// duration of the call; message fields are read directly on it
1993    /// (zero-copy). The response cannot borrow from `request` — use
1994    /// `.to_owned_message()` (or copy the specific fields) for anything
1995    /// returned, stored, or moved into `tokio::spawn`.
1996    fn get_user_trades<'a>(
1997        &'a self,
1998        ctx: ::connectrpc::RequestContext,
1999        request: ::connectrpc::ServiceRequest<
2000            '_,
2001            crate::proto::orders::v1::GetUserTradesRequest,
2002        >,
2003    ) -> impl ::std::future::Future<
2004        Output = ::connectrpc::ServiceResult<
2005            impl ::connectrpc::Encodable<
2006                crate::proto::orders::v1::GetUserTradesResponse,
2007            > + Send + use<'a, Self>,
2008        >,
2009    > + Send;
2010    /// Retrieve a single order by order ID or client order ID, including related user trades and ledger transfers.
2011    ///
2012    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
2013    ///
2014    /// `request` is borrowed from the request body and is valid for the
2015    /// duration of the call; message fields are read directly on it
2016    /// (zero-copy). The response cannot borrow from `request` — use
2017    /// `.to_owned_message()` (or copy the specific fields) for anything
2018    /// returned, stored, or moved into `tokio::spawn`.
2019    fn get_order<'a>(
2020        &'a self,
2021        ctx: ::connectrpc::RequestContext,
2022        request: ::connectrpc::ServiceRequest<
2023            '_,
2024            crate::proto::orders::v1::GetOrderRequest,
2025        >,
2026    ) -> impl ::std::future::Future<
2027        Output = ::connectrpc::ServiceResult<
2028            impl ::connectrpc::Encodable<
2029                crate::proto::orders::v1::GetOrderResponse,
2030            > + Send + use<'a, Self>,
2031        >,
2032    > + Send;
2033    /// Retrieve durable execution status for one admitted batch replacement.
2034    ///
2035    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
2036    ///
2037    /// `request` is borrowed from the request body and is valid for the
2038    /// duration of the call; message fields are read directly on it
2039    /// (zero-copy). The response cannot borrow from `request` — use
2040    /// `.to_owned_message()` (or copy the specific fields) for anything
2041    /// returned, stored, or moved into `tokio::spawn`.
2042    fn get_batch_replace_status<'a>(
2043        &'a self,
2044        ctx: ::connectrpc::RequestContext,
2045        request: ::connectrpc::ServiceRequest<
2046            '_,
2047            crate::proto::orders::v1::GetBatchReplaceStatusRequest,
2048        >,
2049    ) -> impl ::std::future::Future<
2050        Output = ::connectrpc::ServiceResult<
2051            impl ::connectrpc::Encodable<
2052                crate::proto::orders::v1::GetBatchReplaceStatusResponse,
2053            > + Send + use<'a, Self>,
2054        >,
2055    > + Send;
2056}
2057/// Extension trait for registering a service implementation with a Router.
2058///
2059/// This trait is automatically implemented for all types that implement the service trait.
2060/// Prefer [`Router::add_service`](::connectrpc::Router::add_service) for
2061/// top-down registration; `register` remains available for compatibility
2062/// and cases where the service-first call shape is more convenient.
2063///
2064/// # Example
2065///
2066/// ```rust,ignore
2067/// use std::sync::Arc;
2068///
2069/// let service = Arc::new(MyServiceImpl);
2070/// let router = service.register(Router::new());
2071/// ```
2072pub trait OrdersReadServiceExt: OrdersReadService {
2073    /// Register this service implementation with a Router.
2074    ///
2075    /// Takes ownership of the `Arc<Self>` and returns a new Router with
2076    /// this service's methods registered.
2077    fn register(
2078        self: ::std::sync::Arc<Self>,
2079        router: ::connectrpc::Router,
2080    ) -> ::connectrpc::Router;
2081}
2082impl<S: OrdersReadService> OrdersReadServiceExt for S {
2083    fn register(
2084        self: ::std::sync::Arc<Self>,
2085        router: ::connectrpc::Router,
2086    ) -> ::connectrpc::Router {
2087        router
2088            .route_view(
2089                ORDERS_READ_SERVICE_SERVICE_NAME,
2090                "GetOpenOrders",
2091                {
2092                    let svc = ::std::sync::Arc::clone(&self);
2093                    ::connectrpc::view_handler_fn(move |
2094                        ctx,
2095                        req: ::buffa::view::OwnedView<
2096                            crate::proto::orders::v1::__buffa::view::GetOpenOrdersRequestView<
2097                                'static,
2098                            >,
2099                        >,
2100                        format|
2101                    {
2102                        let svc = ::std::sync::Arc::clone(&svc);
2103                        async move {
2104                            let sreq = ::connectrpc::ServiceRequest::<
2105                                crate::proto::orders::v1::GetOpenOrdersRequest,
2106                            >::from_parts(req.reborrow(), req.bytes());
2107                            svc.get_open_orders(ctx, sreq)
2108                                .await?
2109                                .encode::<
2110                                    crate::proto::orders::v1::GetOpenOrdersResponse,
2111                                >(format)
2112                        }
2113                    })
2114                },
2115            )
2116            .with_spec(ORDERS_READ_SERVICE_GET_OPEN_ORDERS_SPEC)
2117            .route_view(
2118                ORDERS_READ_SERVICE_SERVICE_NAME,
2119                "GetOrderHistory",
2120                {
2121                    let svc = ::std::sync::Arc::clone(&self);
2122                    ::connectrpc::view_handler_fn(move |
2123                        ctx,
2124                        req: ::buffa::view::OwnedView<
2125                            crate::proto::orders::v1::__buffa::view::GetOrderHistoryRequestView<
2126                                'static,
2127                            >,
2128                        >,
2129                        format|
2130                    {
2131                        let svc = ::std::sync::Arc::clone(&svc);
2132                        async move {
2133                            let sreq = ::connectrpc::ServiceRequest::<
2134                                crate::proto::orders::v1::GetOrderHistoryRequest,
2135                            >::from_parts(req.reborrow(), req.bytes());
2136                            svc.get_order_history(ctx, sreq)
2137                                .await?
2138                                .encode::<
2139                                    crate::proto::orders::v1::GetOrderHistoryResponse,
2140                                >(format)
2141                        }
2142                    })
2143                },
2144            )
2145            .with_spec(ORDERS_READ_SERVICE_GET_ORDER_HISTORY_SPEC)
2146            .route_view(
2147                ORDERS_READ_SERVICE_SERVICE_NAME,
2148                "GetUserTrades",
2149                {
2150                    let svc = ::std::sync::Arc::clone(&self);
2151                    ::connectrpc::view_handler_fn(move |
2152                        ctx,
2153                        req: ::buffa::view::OwnedView<
2154                            crate::proto::orders::v1::__buffa::view::GetUserTradesRequestView<
2155                                'static,
2156                            >,
2157                        >,
2158                        format|
2159                    {
2160                        let svc = ::std::sync::Arc::clone(&svc);
2161                        async move {
2162                            let sreq = ::connectrpc::ServiceRequest::<
2163                                crate::proto::orders::v1::GetUserTradesRequest,
2164                            >::from_parts(req.reborrow(), req.bytes());
2165                            svc.get_user_trades(ctx, sreq)
2166                                .await?
2167                                .encode::<
2168                                    crate::proto::orders::v1::GetUserTradesResponse,
2169                                >(format)
2170                        }
2171                    })
2172                },
2173            )
2174            .with_spec(ORDERS_READ_SERVICE_GET_USER_TRADES_SPEC)
2175            .route_view(
2176                ORDERS_READ_SERVICE_SERVICE_NAME,
2177                "GetOrder",
2178                {
2179                    let svc = ::std::sync::Arc::clone(&self);
2180                    ::connectrpc::view_handler_fn(move |
2181                        ctx,
2182                        req: ::buffa::view::OwnedView<
2183                            crate::proto::orders::v1::__buffa::view::GetOrderRequestView<
2184                                'static,
2185                            >,
2186                        >,
2187                        format|
2188                    {
2189                        let svc = ::std::sync::Arc::clone(&svc);
2190                        async move {
2191                            let sreq = ::connectrpc::ServiceRequest::<
2192                                crate::proto::orders::v1::GetOrderRequest,
2193                            >::from_parts(req.reborrow(), req.bytes());
2194                            svc.get_order(ctx, sreq)
2195                                .await?
2196                                .encode::<
2197                                    crate::proto::orders::v1::GetOrderResponse,
2198                                >(format)
2199                        }
2200                    })
2201                },
2202            )
2203            .with_spec(ORDERS_READ_SERVICE_GET_ORDER_SPEC)
2204            .route_view(
2205                ORDERS_READ_SERVICE_SERVICE_NAME,
2206                "GetBatchReplaceStatus",
2207                {
2208                    let svc = ::std::sync::Arc::clone(&self);
2209                    ::connectrpc::view_handler_fn(move |
2210                        ctx,
2211                        req: ::buffa::view::OwnedView<
2212                            crate::proto::orders::v1::__buffa::view::GetBatchReplaceStatusRequestView<
2213                                'static,
2214                            >,
2215                        >,
2216                        format|
2217                    {
2218                        let svc = ::std::sync::Arc::clone(&svc);
2219                        async move {
2220                            let sreq = ::connectrpc::ServiceRequest::<
2221                                crate::proto::orders::v1::GetBatchReplaceStatusRequest,
2222                            >::from_parts(req.reborrow(), req.bytes());
2223                            svc.get_batch_replace_status(ctx, sreq)
2224                                .await?
2225                                .encode::<
2226                                    crate::proto::orders::v1::GetBatchReplaceStatusResponse,
2227                                >(format)
2228                        }
2229                    })
2230                },
2231            )
2232            .with_spec(ORDERS_READ_SERVICE_GET_BATCH_REPLACE_STATUS_SPEC)
2233    }
2234}
2235/// Type-inference marker used by [`Router::add_service`](::connectrpc::Router::add_service).
2236#[doc(hidden)]
2237pub struct OrdersReadServiceRegisterMarker;
2238impl<S: OrdersReadService> ::connectrpc::ServiceRegister<OrdersReadServiceRegisterMarker>
2239for ::std::sync::Arc<S> {
2240    fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
2241        <S as OrdersReadServiceExt>::register(self, router)
2242    }
2243}
2244/// Monomorphic dispatcher for `OrdersReadService`.
2245///
2246/// 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.
2247///
2248/// # Example
2249///
2250/// ```rust,ignore
2251/// use connectrpc::ConnectRpcService;
2252///
2253/// let server = OrdersReadServiceServer::new(MyImpl);
2254/// let service = ConnectRpcService::new(server);
2255/// // hand `service` to axum/hyper as a fallback_service
2256/// ```
2257pub struct OrdersReadServiceServer<T> {
2258    inner: ::std::sync::Arc<T>,
2259}
2260impl<T: OrdersReadService> OrdersReadServiceServer<T> {
2261    /// Wrap a service implementation in a monomorphic dispatcher.
2262    pub fn new(service: T) -> Self {
2263        Self {
2264            inner: ::std::sync::Arc::new(service),
2265        }
2266    }
2267    /// Wrap an already-`Arc`'d service implementation.
2268    pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
2269        Self { inner }
2270    }
2271}
2272impl<T> Clone for OrdersReadServiceServer<T> {
2273    fn clone(&self) -> Self {
2274        Self {
2275            inner: ::std::sync::Arc::clone(&self.inner),
2276        }
2277    }
2278}
2279impl<T: OrdersReadService> ::connectrpc::Dispatcher for OrdersReadServiceServer<T> {
2280    #[inline]
2281    fn lookup(
2282        &self,
2283        path: &str,
2284    ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
2285        let method = path.strip_prefix("orders.v1.OrdersReadService/")?;
2286        match method {
2287            "GetOpenOrders" => {
2288                Some(
2289                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2290                        .with_spec(ORDERS_READ_SERVICE_GET_OPEN_ORDERS_SPEC),
2291                )
2292            }
2293            "GetOrderHistory" => {
2294                Some(
2295                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2296                        .with_spec(ORDERS_READ_SERVICE_GET_ORDER_HISTORY_SPEC),
2297                )
2298            }
2299            "GetUserTrades" => {
2300                Some(
2301                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2302                        .with_spec(ORDERS_READ_SERVICE_GET_USER_TRADES_SPEC),
2303                )
2304            }
2305            "GetOrder" => {
2306                Some(
2307                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2308                        .with_spec(ORDERS_READ_SERVICE_GET_ORDER_SPEC),
2309                )
2310            }
2311            "GetBatchReplaceStatus" => {
2312                Some(
2313                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2314                        .with_spec(ORDERS_READ_SERVICE_GET_BATCH_REPLACE_STATUS_SPEC),
2315                )
2316            }
2317            _ => None,
2318        }
2319    }
2320    fn call_unary(
2321        &self,
2322        path: &str,
2323        ctx: ::connectrpc::RequestContext,
2324        request: ::connectrpc::Payload,
2325        format: ::connectrpc::CodecFormat,
2326    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
2327        let Some(method) = path.strip_prefix("orders.v1.OrdersReadService/") else {
2328            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
2329        };
2330        let _ = (&ctx, &request, &format);
2331        match method {
2332            "GetOpenOrders" => {
2333                let svc = ::std::sync::Arc::clone(&self.inner);
2334                Box::pin(async move {
2335                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2336                        crate::proto::orders::v1::GetOpenOrdersRequest,
2337                    >(request.encoded()?, format)?;
2338                    let req: crate::proto::orders::v1::__buffa::view::GetOpenOrdersRequestView<
2339                        '_,
2340                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2341                        &body,
2342                    )?;
2343                    let req = ::connectrpc::ServiceRequest::<
2344                        crate::proto::orders::v1::GetOpenOrdersRequest,
2345                    >::from_parts(&req, &body);
2346                    svc.get_open_orders(ctx, req)
2347                        .await?
2348                        .encode::<
2349                            crate::proto::orders::v1::GetOpenOrdersResponse,
2350                        >(format)
2351                })
2352            }
2353            "GetOrderHistory" => {
2354                let svc = ::std::sync::Arc::clone(&self.inner);
2355                Box::pin(async move {
2356                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2357                        crate::proto::orders::v1::GetOrderHistoryRequest,
2358                    >(request.encoded()?, format)?;
2359                    let req: crate::proto::orders::v1::__buffa::view::GetOrderHistoryRequestView<
2360                        '_,
2361                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2362                        &body,
2363                    )?;
2364                    let req = ::connectrpc::ServiceRequest::<
2365                        crate::proto::orders::v1::GetOrderHistoryRequest,
2366                    >::from_parts(&req, &body);
2367                    svc.get_order_history(ctx, req)
2368                        .await?
2369                        .encode::<
2370                            crate::proto::orders::v1::GetOrderHistoryResponse,
2371                        >(format)
2372                })
2373            }
2374            "GetUserTrades" => {
2375                let svc = ::std::sync::Arc::clone(&self.inner);
2376                Box::pin(async move {
2377                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2378                        crate::proto::orders::v1::GetUserTradesRequest,
2379                    >(request.encoded()?, format)?;
2380                    let req: crate::proto::orders::v1::__buffa::view::GetUserTradesRequestView<
2381                        '_,
2382                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2383                        &body,
2384                    )?;
2385                    let req = ::connectrpc::ServiceRequest::<
2386                        crate::proto::orders::v1::GetUserTradesRequest,
2387                    >::from_parts(&req, &body);
2388                    svc.get_user_trades(ctx, req)
2389                        .await?
2390                        .encode::<
2391                            crate::proto::orders::v1::GetUserTradesResponse,
2392                        >(format)
2393                })
2394            }
2395            "GetOrder" => {
2396                let svc = ::std::sync::Arc::clone(&self.inner);
2397                Box::pin(async move {
2398                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2399                        crate::proto::orders::v1::GetOrderRequest,
2400                    >(request.encoded()?, format)?;
2401                    let req: crate::proto::orders::v1::__buffa::view::GetOrderRequestView<
2402                        '_,
2403                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2404                        &body,
2405                    )?;
2406                    let req = ::connectrpc::ServiceRequest::<
2407                        crate::proto::orders::v1::GetOrderRequest,
2408                    >::from_parts(&req, &body);
2409                    svc.get_order(ctx, req)
2410                        .await?
2411                        .encode::<crate::proto::orders::v1::GetOrderResponse>(format)
2412                })
2413            }
2414            "GetBatchReplaceStatus" => {
2415                let svc = ::std::sync::Arc::clone(&self.inner);
2416                Box::pin(async move {
2417                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2418                        crate::proto::orders::v1::GetBatchReplaceStatusRequest,
2419                    >(request.encoded()?, format)?;
2420                    let req: crate::proto::orders::v1::__buffa::view::GetBatchReplaceStatusRequestView<
2421                        '_,
2422                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2423                        &body,
2424                    )?;
2425                    let req = ::connectrpc::ServiceRequest::<
2426                        crate::proto::orders::v1::GetBatchReplaceStatusRequest,
2427                    >::from_parts(&req, &body);
2428                    svc.get_batch_replace_status(ctx, req)
2429                        .await?
2430                        .encode::<
2431                            crate::proto::orders::v1::GetBatchReplaceStatusResponse,
2432                        >(format)
2433                })
2434            }
2435            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
2436        }
2437    }
2438    fn call_server_streaming(
2439        &self,
2440        path: &str,
2441        ctx: ::connectrpc::RequestContext,
2442        request: ::buffa::bytes::Bytes,
2443        format: ::connectrpc::CodecFormat,
2444    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
2445        let Some(method) = path.strip_prefix("orders.v1.OrdersReadService/") else {
2446            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
2447        };
2448        let _ = (&ctx, &request, &format);
2449        match method {
2450            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
2451        }
2452    }
2453    fn call_client_streaming(
2454        &self,
2455        path: &str,
2456        ctx: ::connectrpc::RequestContext,
2457        requests: ::connectrpc::dispatcher::codegen::RequestStream,
2458        format: ::connectrpc::CodecFormat,
2459    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
2460        let Some(method) = path.strip_prefix("orders.v1.OrdersReadService/") else {
2461            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
2462        };
2463        let _ = (&ctx, &requests, &format);
2464        match method {
2465            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
2466        }
2467    }
2468    fn call_bidi_streaming(
2469        &self,
2470        path: &str,
2471        ctx: ::connectrpc::RequestContext,
2472        requests: ::connectrpc::dispatcher::codegen::RequestStream,
2473        format: ::connectrpc::CodecFormat,
2474    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
2475        let Some(method) = path.strip_prefix("orders.v1.OrdersReadService/") else {
2476            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
2477        };
2478        let _ = (&ctx, &requests, &format);
2479        match method {
2480            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
2481        }
2482    }
2483}
2484/// Client for this service.
2485///
2486/// Generic over `T: ClientTransport`. For **gRPC** (HTTP/2), use
2487/// `Http2Connection` — it has honest `poll_ready` and composes with
2488/// `tower::balance` for multi-connection load balancing. For **Connect
2489/// over HTTP/1.1** (or unknown protocol), use `HttpClient`.
2490///
2491/// # Working with the response
2492///
2493/// Unary calls return [`UnaryResponse<OwnedView<FooView>>`](::connectrpc::client::UnaryResponse).
2494/// [`view()`](::connectrpc::client::UnaryResponse::view) borrows the response
2495/// message, so field access is zero-copy:
2496///
2497/// ```rust,ignore
2498/// let resp = client.get_open_orders(request).await?;
2499/// let name: &str = resp.view().name;  // borrow into the response buffer
2500/// ```
2501///
2502/// If you need the owned struct (e.g. to store or pass by value), use
2503/// [`into_owned()`](::connectrpc::client::UnaryResponse::into_owned):
2504///
2505/// ```rust,ignore
2506/// let owned = client.get_open_orders(request).await?.into_owned();
2507/// ```
2508///
2509/// [`into_view()`](::connectrpc::client::UnaryResponse::into_view) keeps the
2510/// zero-copy decoded body (an `OwnedView`) without copying; field access on it
2511/// goes through `.reborrow()`. Streaming responses yield one
2512/// [`StreamMessage`](::connectrpc::StreamMessage) per received message from
2513/// `.message().await` — read fields zero-copy through the generated accessor
2514/// methods (`msg.name()`) or `.view()`, or convert with `.to_owned_message()`.
2515#[derive(Clone)]
2516pub struct OrdersReadServiceClient<T> {
2517    transport: T,
2518    config: ::connectrpc::client::ClientConfig,
2519}
2520impl<T> OrdersReadServiceClient<T>
2521where
2522    T: ::connectrpc::client::ClientTransport,
2523    <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
2524{
2525    /// Create a new client with the given transport and configuration.
2526    pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
2527        Self { transport, config }
2528    }
2529    /// Get the client configuration.
2530    pub fn config(&self) -> &::connectrpc::client::ClientConfig {
2531        &self.config
2532    }
2533    /// Get a mutable reference to the client configuration.
2534    pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
2535        &mut self.config
2536    }
2537    /// Call the GetOpenOrders RPC. Sends a request to /orders.v1.OrdersReadService/GetOpenOrders.
2538    pub async fn get_open_orders(
2539        &self,
2540        request: crate::proto::orders::v1::GetOpenOrdersRequest,
2541    ) -> Result<
2542        ::connectrpc::client::UnaryResponse<
2543            ::buffa::view::OwnedView<
2544                crate::proto::orders::v1::__buffa::view::GetOpenOrdersResponseView<
2545                    'static,
2546                >,
2547            >,
2548        >,
2549        ::connectrpc::ConnectError,
2550    > {
2551        self.get_open_orders_with_options(
2552                request,
2553                ::connectrpc::client::CallOptions::default(),
2554            )
2555            .await
2556    }
2557    /// Call the GetOpenOrders RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
2558    pub async fn get_open_orders_with_options(
2559        &self,
2560        request: crate::proto::orders::v1::GetOpenOrdersRequest,
2561        options: ::connectrpc::client::CallOptions,
2562    ) -> Result<
2563        ::connectrpc::client::UnaryResponse<
2564            ::buffa::view::OwnedView<
2565                crate::proto::orders::v1::__buffa::view::GetOpenOrdersResponseView<
2566                    'static,
2567                >,
2568            >,
2569        >,
2570        ::connectrpc::ConnectError,
2571    > {
2572        ::connectrpc::client::call_unary(
2573                &self.transport,
2574                &self.config,
2575                ORDERS_READ_SERVICE_SERVICE_NAME,
2576                "GetOpenOrders",
2577                request,
2578                options,
2579            )
2580            .await
2581    }
2582    /// Call the GetOrderHistory RPC. Sends a request to /orders.v1.OrdersReadService/GetOrderHistory.
2583    pub async fn get_order_history(
2584        &self,
2585        request: crate::proto::orders::v1::GetOrderHistoryRequest,
2586    ) -> Result<
2587        ::connectrpc::client::UnaryResponse<
2588            ::buffa::view::OwnedView<
2589                crate::proto::orders::v1::__buffa::view::GetOrderHistoryResponseView<
2590                    'static,
2591                >,
2592            >,
2593        >,
2594        ::connectrpc::ConnectError,
2595    > {
2596        self.get_order_history_with_options(
2597                request,
2598                ::connectrpc::client::CallOptions::default(),
2599            )
2600            .await
2601    }
2602    /// Call the GetOrderHistory RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
2603    pub async fn get_order_history_with_options(
2604        &self,
2605        request: crate::proto::orders::v1::GetOrderHistoryRequest,
2606        options: ::connectrpc::client::CallOptions,
2607    ) -> Result<
2608        ::connectrpc::client::UnaryResponse<
2609            ::buffa::view::OwnedView<
2610                crate::proto::orders::v1::__buffa::view::GetOrderHistoryResponseView<
2611                    'static,
2612                >,
2613            >,
2614        >,
2615        ::connectrpc::ConnectError,
2616    > {
2617        ::connectrpc::client::call_unary(
2618                &self.transport,
2619                &self.config,
2620                ORDERS_READ_SERVICE_SERVICE_NAME,
2621                "GetOrderHistory",
2622                request,
2623                options,
2624            )
2625            .await
2626    }
2627    /// Call the GetUserTrades RPC. Sends a request to /orders.v1.OrdersReadService/GetUserTrades.
2628    pub async fn get_user_trades(
2629        &self,
2630        request: crate::proto::orders::v1::GetUserTradesRequest,
2631    ) -> Result<
2632        ::connectrpc::client::UnaryResponse<
2633            ::buffa::view::OwnedView<
2634                crate::proto::orders::v1::__buffa::view::GetUserTradesResponseView<
2635                    'static,
2636                >,
2637            >,
2638        >,
2639        ::connectrpc::ConnectError,
2640    > {
2641        self.get_user_trades_with_options(
2642                request,
2643                ::connectrpc::client::CallOptions::default(),
2644            )
2645            .await
2646    }
2647    /// Call the GetUserTrades RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
2648    pub async fn get_user_trades_with_options(
2649        &self,
2650        request: crate::proto::orders::v1::GetUserTradesRequest,
2651        options: ::connectrpc::client::CallOptions,
2652    ) -> Result<
2653        ::connectrpc::client::UnaryResponse<
2654            ::buffa::view::OwnedView<
2655                crate::proto::orders::v1::__buffa::view::GetUserTradesResponseView<
2656                    'static,
2657                >,
2658            >,
2659        >,
2660        ::connectrpc::ConnectError,
2661    > {
2662        ::connectrpc::client::call_unary(
2663                &self.transport,
2664                &self.config,
2665                ORDERS_READ_SERVICE_SERVICE_NAME,
2666                "GetUserTrades",
2667                request,
2668                options,
2669            )
2670            .await
2671    }
2672    /// Call the GetOrder RPC. Sends a request to /orders.v1.OrdersReadService/GetOrder.
2673    pub async fn get_order(
2674        &self,
2675        request: crate::proto::orders::v1::GetOrderRequest,
2676    ) -> Result<
2677        ::connectrpc::client::UnaryResponse<
2678            ::buffa::view::OwnedView<
2679                crate::proto::orders::v1::__buffa::view::GetOrderResponseView<'static>,
2680            >,
2681        >,
2682        ::connectrpc::ConnectError,
2683    > {
2684        self.get_order_with_options(
2685                request,
2686                ::connectrpc::client::CallOptions::default(),
2687            )
2688            .await
2689    }
2690    /// Call the GetOrder RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
2691    pub async fn get_order_with_options(
2692        &self,
2693        request: crate::proto::orders::v1::GetOrderRequest,
2694        options: ::connectrpc::client::CallOptions,
2695    ) -> Result<
2696        ::connectrpc::client::UnaryResponse<
2697            ::buffa::view::OwnedView<
2698                crate::proto::orders::v1::__buffa::view::GetOrderResponseView<'static>,
2699            >,
2700        >,
2701        ::connectrpc::ConnectError,
2702    > {
2703        ::connectrpc::client::call_unary(
2704                &self.transport,
2705                &self.config,
2706                ORDERS_READ_SERVICE_SERVICE_NAME,
2707                "GetOrder",
2708                request,
2709                options,
2710            )
2711            .await
2712    }
2713    /// Call the GetBatchReplaceStatus RPC. Sends a request to /orders.v1.OrdersReadService/GetBatchReplaceStatus.
2714    pub async fn get_batch_replace_status(
2715        &self,
2716        request: crate::proto::orders::v1::GetBatchReplaceStatusRequest,
2717    ) -> Result<
2718        ::connectrpc::client::UnaryResponse<
2719            ::buffa::view::OwnedView<
2720                crate::proto::orders::v1::__buffa::view::GetBatchReplaceStatusResponseView<
2721                    'static,
2722                >,
2723            >,
2724        >,
2725        ::connectrpc::ConnectError,
2726    > {
2727        self.get_batch_replace_status_with_options(
2728                request,
2729                ::connectrpc::client::CallOptions::default(),
2730            )
2731            .await
2732    }
2733    /// Call the GetBatchReplaceStatus RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
2734    pub async fn get_batch_replace_status_with_options(
2735        &self,
2736        request: crate::proto::orders::v1::GetBatchReplaceStatusRequest,
2737        options: ::connectrpc::client::CallOptions,
2738    ) -> Result<
2739        ::connectrpc::client::UnaryResponse<
2740            ::buffa::view::OwnedView<
2741                crate::proto::orders::v1::__buffa::view::GetBatchReplaceStatusResponseView<
2742                    'static,
2743                >,
2744            >,
2745        >,
2746        ::connectrpc::ConnectError,
2747    > {
2748        ::connectrpc::client::call_unary(
2749                &self.transport,
2750                &self.config,
2751                ORDERS_READ_SERVICE_SERVICE_NAME,
2752                "GetBatchReplaceStatus",
2753                request,
2754                options,
2755            )
2756            .await
2757    }
2758}