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    /// Recent accepted orders may wait briefly for read availability; retry UNAVAILABLE with the same lookup key.
2012    ///
2013    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
2014    ///
2015    /// `request` is borrowed from the request body and is valid for the
2016    /// duration of the call; message fields are read directly on it
2017    /// (zero-copy). The response cannot borrow from `request` — use
2018    /// `.to_owned_message()` (or copy the specific fields) for anything
2019    /// returned, stored, or moved into `tokio::spawn`.
2020    fn get_order<'a>(
2021        &'a self,
2022        ctx: ::connectrpc::RequestContext,
2023        request: ::connectrpc::ServiceRequest<
2024            '_,
2025            crate::proto::orders::v1::GetOrderRequest,
2026        >,
2027    ) -> impl ::std::future::Future<
2028        Output = ::connectrpc::ServiceResult<
2029            impl ::connectrpc::Encodable<
2030                crate::proto::orders::v1::GetOrderResponse,
2031            > + Send + use<'a, Self>,
2032        >,
2033    > + Send;
2034    /// Retrieve durable execution status for one admitted batch replacement.
2035    ///
2036    /// `'a` lets the response body borrow from `&self` (e.g. server-resident state).
2037    ///
2038    /// `request` is borrowed from the request body and is valid for the
2039    /// duration of the call; message fields are read directly on it
2040    /// (zero-copy). The response cannot borrow from `request` — use
2041    /// `.to_owned_message()` (or copy the specific fields) for anything
2042    /// returned, stored, or moved into `tokio::spawn`.
2043    fn get_batch_replace_status<'a>(
2044        &'a self,
2045        ctx: ::connectrpc::RequestContext,
2046        request: ::connectrpc::ServiceRequest<
2047            '_,
2048            crate::proto::orders::v1::GetBatchReplaceStatusRequest,
2049        >,
2050    ) -> impl ::std::future::Future<
2051        Output = ::connectrpc::ServiceResult<
2052            impl ::connectrpc::Encodable<
2053                crate::proto::orders::v1::GetBatchReplaceStatusResponse,
2054            > + Send + use<'a, Self>,
2055        >,
2056    > + Send;
2057}
2058/// Extension trait for registering a service implementation with a Router.
2059///
2060/// This trait is automatically implemented for all types that implement the service trait.
2061/// Prefer [`Router::add_service`](::connectrpc::Router::add_service) for
2062/// top-down registration; `register` remains available for compatibility
2063/// and cases where the service-first call shape is more convenient.
2064///
2065/// # Example
2066///
2067/// ```rust,ignore
2068/// use std::sync::Arc;
2069///
2070/// let service = Arc::new(MyServiceImpl);
2071/// let router = service.register(Router::new());
2072/// ```
2073pub trait OrdersReadServiceExt: OrdersReadService {
2074    /// Register this service implementation with a Router.
2075    ///
2076    /// Takes ownership of the `Arc<Self>` and returns a new Router with
2077    /// this service's methods registered.
2078    fn register(
2079        self: ::std::sync::Arc<Self>,
2080        router: ::connectrpc::Router,
2081    ) -> ::connectrpc::Router;
2082}
2083impl<S: OrdersReadService> OrdersReadServiceExt for S {
2084    fn register(
2085        self: ::std::sync::Arc<Self>,
2086        router: ::connectrpc::Router,
2087    ) -> ::connectrpc::Router {
2088        router
2089            .route_view(
2090                ORDERS_READ_SERVICE_SERVICE_NAME,
2091                "GetOpenOrders",
2092                {
2093                    let svc = ::std::sync::Arc::clone(&self);
2094                    ::connectrpc::view_handler_fn(move |
2095                        ctx,
2096                        req: ::buffa::view::OwnedView<
2097                            crate::proto::orders::v1::__buffa::view::GetOpenOrdersRequestView<
2098                                'static,
2099                            >,
2100                        >,
2101                        format|
2102                    {
2103                        let svc = ::std::sync::Arc::clone(&svc);
2104                        async move {
2105                            let sreq = ::connectrpc::ServiceRequest::<
2106                                crate::proto::orders::v1::GetOpenOrdersRequest,
2107                            >::from_parts(req.reborrow(), req.bytes());
2108                            svc.get_open_orders(ctx, sreq)
2109                                .await?
2110                                .encode::<
2111                                    crate::proto::orders::v1::GetOpenOrdersResponse,
2112                                >(format)
2113                        }
2114                    })
2115                },
2116            )
2117            .with_spec(ORDERS_READ_SERVICE_GET_OPEN_ORDERS_SPEC)
2118            .route_view(
2119                ORDERS_READ_SERVICE_SERVICE_NAME,
2120                "GetOrderHistory",
2121                {
2122                    let svc = ::std::sync::Arc::clone(&self);
2123                    ::connectrpc::view_handler_fn(move |
2124                        ctx,
2125                        req: ::buffa::view::OwnedView<
2126                            crate::proto::orders::v1::__buffa::view::GetOrderHistoryRequestView<
2127                                'static,
2128                            >,
2129                        >,
2130                        format|
2131                    {
2132                        let svc = ::std::sync::Arc::clone(&svc);
2133                        async move {
2134                            let sreq = ::connectrpc::ServiceRequest::<
2135                                crate::proto::orders::v1::GetOrderHistoryRequest,
2136                            >::from_parts(req.reborrow(), req.bytes());
2137                            svc.get_order_history(ctx, sreq)
2138                                .await?
2139                                .encode::<
2140                                    crate::proto::orders::v1::GetOrderHistoryResponse,
2141                                >(format)
2142                        }
2143                    })
2144                },
2145            )
2146            .with_spec(ORDERS_READ_SERVICE_GET_ORDER_HISTORY_SPEC)
2147            .route_view(
2148                ORDERS_READ_SERVICE_SERVICE_NAME,
2149                "GetUserTrades",
2150                {
2151                    let svc = ::std::sync::Arc::clone(&self);
2152                    ::connectrpc::view_handler_fn(move |
2153                        ctx,
2154                        req: ::buffa::view::OwnedView<
2155                            crate::proto::orders::v1::__buffa::view::GetUserTradesRequestView<
2156                                'static,
2157                            >,
2158                        >,
2159                        format|
2160                    {
2161                        let svc = ::std::sync::Arc::clone(&svc);
2162                        async move {
2163                            let sreq = ::connectrpc::ServiceRequest::<
2164                                crate::proto::orders::v1::GetUserTradesRequest,
2165                            >::from_parts(req.reborrow(), req.bytes());
2166                            svc.get_user_trades(ctx, sreq)
2167                                .await?
2168                                .encode::<
2169                                    crate::proto::orders::v1::GetUserTradesResponse,
2170                                >(format)
2171                        }
2172                    })
2173                },
2174            )
2175            .with_spec(ORDERS_READ_SERVICE_GET_USER_TRADES_SPEC)
2176            .route_view(
2177                ORDERS_READ_SERVICE_SERVICE_NAME,
2178                "GetOrder",
2179                {
2180                    let svc = ::std::sync::Arc::clone(&self);
2181                    ::connectrpc::view_handler_fn(move |
2182                        ctx,
2183                        req: ::buffa::view::OwnedView<
2184                            crate::proto::orders::v1::__buffa::view::GetOrderRequestView<
2185                                'static,
2186                            >,
2187                        >,
2188                        format|
2189                    {
2190                        let svc = ::std::sync::Arc::clone(&svc);
2191                        async move {
2192                            let sreq = ::connectrpc::ServiceRequest::<
2193                                crate::proto::orders::v1::GetOrderRequest,
2194                            >::from_parts(req.reborrow(), req.bytes());
2195                            svc.get_order(ctx, sreq)
2196                                .await?
2197                                .encode::<
2198                                    crate::proto::orders::v1::GetOrderResponse,
2199                                >(format)
2200                        }
2201                    })
2202                },
2203            )
2204            .with_spec(ORDERS_READ_SERVICE_GET_ORDER_SPEC)
2205            .route_view(
2206                ORDERS_READ_SERVICE_SERVICE_NAME,
2207                "GetBatchReplaceStatus",
2208                {
2209                    let svc = ::std::sync::Arc::clone(&self);
2210                    ::connectrpc::view_handler_fn(move |
2211                        ctx,
2212                        req: ::buffa::view::OwnedView<
2213                            crate::proto::orders::v1::__buffa::view::GetBatchReplaceStatusRequestView<
2214                                'static,
2215                            >,
2216                        >,
2217                        format|
2218                    {
2219                        let svc = ::std::sync::Arc::clone(&svc);
2220                        async move {
2221                            let sreq = ::connectrpc::ServiceRequest::<
2222                                crate::proto::orders::v1::GetBatchReplaceStatusRequest,
2223                            >::from_parts(req.reborrow(), req.bytes());
2224                            svc.get_batch_replace_status(ctx, sreq)
2225                                .await?
2226                                .encode::<
2227                                    crate::proto::orders::v1::GetBatchReplaceStatusResponse,
2228                                >(format)
2229                        }
2230                    })
2231                },
2232            )
2233            .with_spec(ORDERS_READ_SERVICE_GET_BATCH_REPLACE_STATUS_SPEC)
2234    }
2235}
2236/// Type-inference marker used by [`Router::add_service`](::connectrpc::Router::add_service).
2237#[doc(hidden)]
2238pub struct OrdersReadServiceRegisterMarker;
2239impl<S: OrdersReadService> ::connectrpc::ServiceRegister<OrdersReadServiceRegisterMarker>
2240for ::std::sync::Arc<S> {
2241    fn register_service(self, router: ::connectrpc::Router) -> ::connectrpc::Router {
2242        <S as OrdersReadServiceExt>::register(self, router)
2243    }
2244}
2245/// Monomorphic dispatcher for `OrdersReadService`.
2246///
2247/// 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.
2248///
2249/// # Example
2250///
2251/// ```rust,ignore
2252/// use connectrpc::ConnectRpcService;
2253///
2254/// let server = OrdersReadServiceServer::new(MyImpl);
2255/// let service = ConnectRpcService::new(server);
2256/// // hand `service` to axum/hyper as a fallback_service
2257/// ```
2258pub struct OrdersReadServiceServer<T> {
2259    inner: ::std::sync::Arc<T>,
2260}
2261impl<T: OrdersReadService> OrdersReadServiceServer<T> {
2262    /// Wrap a service implementation in a monomorphic dispatcher.
2263    pub fn new(service: T) -> Self {
2264        Self {
2265            inner: ::std::sync::Arc::new(service),
2266        }
2267    }
2268    /// Wrap an already-`Arc`'d service implementation.
2269    pub fn from_arc(inner: ::std::sync::Arc<T>) -> Self {
2270        Self { inner }
2271    }
2272}
2273impl<T> Clone for OrdersReadServiceServer<T> {
2274    fn clone(&self) -> Self {
2275        Self {
2276            inner: ::std::sync::Arc::clone(&self.inner),
2277        }
2278    }
2279}
2280impl<T: OrdersReadService> ::connectrpc::Dispatcher for OrdersReadServiceServer<T> {
2281    #[inline]
2282    fn lookup(
2283        &self,
2284        path: &str,
2285    ) -> Option<::connectrpc::dispatcher::codegen::MethodDescriptor> {
2286        let method = path.strip_prefix("orders.v1.OrdersReadService/")?;
2287        match method {
2288            "GetOpenOrders" => {
2289                Some(
2290                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2291                        .with_spec(ORDERS_READ_SERVICE_GET_OPEN_ORDERS_SPEC),
2292                )
2293            }
2294            "GetOrderHistory" => {
2295                Some(
2296                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2297                        .with_spec(ORDERS_READ_SERVICE_GET_ORDER_HISTORY_SPEC),
2298                )
2299            }
2300            "GetUserTrades" => {
2301                Some(
2302                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2303                        .with_spec(ORDERS_READ_SERVICE_GET_USER_TRADES_SPEC),
2304                )
2305            }
2306            "GetOrder" => {
2307                Some(
2308                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2309                        .with_spec(ORDERS_READ_SERVICE_GET_ORDER_SPEC),
2310                )
2311            }
2312            "GetBatchReplaceStatus" => {
2313                Some(
2314                    ::connectrpc::dispatcher::codegen::MethodDescriptor::unary(false)
2315                        .with_spec(ORDERS_READ_SERVICE_GET_BATCH_REPLACE_STATUS_SPEC),
2316                )
2317            }
2318            _ => None,
2319        }
2320    }
2321    fn call_unary(
2322        &self,
2323        path: &str,
2324        ctx: ::connectrpc::RequestContext,
2325        request: ::connectrpc::Payload,
2326        format: ::connectrpc::CodecFormat,
2327    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
2328        let Some(method) = path.strip_prefix("orders.v1.OrdersReadService/") else {
2329            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
2330        };
2331        let _ = (&ctx, &request, &format);
2332        match method {
2333            "GetOpenOrders" => {
2334                let svc = ::std::sync::Arc::clone(&self.inner);
2335                Box::pin(async move {
2336                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2337                        crate::proto::orders::v1::GetOpenOrdersRequest,
2338                    >(request.encoded()?, format)?;
2339                    let req: crate::proto::orders::v1::__buffa::view::GetOpenOrdersRequestView<
2340                        '_,
2341                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2342                        &body,
2343                    )?;
2344                    let req = ::connectrpc::ServiceRequest::<
2345                        crate::proto::orders::v1::GetOpenOrdersRequest,
2346                    >::from_parts(&req, &body);
2347                    svc.get_open_orders(ctx, req)
2348                        .await?
2349                        .encode::<
2350                            crate::proto::orders::v1::GetOpenOrdersResponse,
2351                        >(format)
2352                })
2353            }
2354            "GetOrderHistory" => {
2355                let svc = ::std::sync::Arc::clone(&self.inner);
2356                Box::pin(async move {
2357                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2358                        crate::proto::orders::v1::GetOrderHistoryRequest,
2359                    >(request.encoded()?, format)?;
2360                    let req: crate::proto::orders::v1::__buffa::view::GetOrderHistoryRequestView<
2361                        '_,
2362                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2363                        &body,
2364                    )?;
2365                    let req = ::connectrpc::ServiceRequest::<
2366                        crate::proto::orders::v1::GetOrderHistoryRequest,
2367                    >::from_parts(&req, &body);
2368                    svc.get_order_history(ctx, req)
2369                        .await?
2370                        .encode::<
2371                            crate::proto::orders::v1::GetOrderHistoryResponse,
2372                        >(format)
2373                })
2374            }
2375            "GetUserTrades" => {
2376                let svc = ::std::sync::Arc::clone(&self.inner);
2377                Box::pin(async move {
2378                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2379                        crate::proto::orders::v1::GetUserTradesRequest,
2380                    >(request.encoded()?, format)?;
2381                    let req: crate::proto::orders::v1::__buffa::view::GetUserTradesRequestView<
2382                        '_,
2383                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2384                        &body,
2385                    )?;
2386                    let req = ::connectrpc::ServiceRequest::<
2387                        crate::proto::orders::v1::GetUserTradesRequest,
2388                    >::from_parts(&req, &body);
2389                    svc.get_user_trades(ctx, req)
2390                        .await?
2391                        .encode::<
2392                            crate::proto::orders::v1::GetUserTradesResponse,
2393                        >(format)
2394                })
2395            }
2396            "GetOrder" => {
2397                let svc = ::std::sync::Arc::clone(&self.inner);
2398                Box::pin(async move {
2399                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2400                        crate::proto::orders::v1::GetOrderRequest,
2401                    >(request.encoded()?, format)?;
2402                    let req: crate::proto::orders::v1::__buffa::view::GetOrderRequestView<
2403                        '_,
2404                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2405                        &body,
2406                    )?;
2407                    let req = ::connectrpc::ServiceRequest::<
2408                        crate::proto::orders::v1::GetOrderRequest,
2409                    >::from_parts(&req, &body);
2410                    svc.get_order(ctx, req)
2411                        .await?
2412                        .encode::<crate::proto::orders::v1::GetOrderResponse>(format)
2413                })
2414            }
2415            "GetBatchReplaceStatus" => {
2416                let svc = ::std::sync::Arc::clone(&self.inner);
2417                Box::pin(async move {
2418                    let body = ::connectrpc::dispatcher::codegen::request_proto_bytes::<
2419                        crate::proto::orders::v1::GetBatchReplaceStatusRequest,
2420                    >(request.encoded()?, format)?;
2421                    let req: crate::proto::orders::v1::__buffa::view::GetBatchReplaceStatusRequestView<
2422                        '_,
2423                    > = ::connectrpc::dispatcher::codegen::decode_borrowed_request_view(
2424                        &body,
2425                    )?;
2426                    let req = ::connectrpc::ServiceRequest::<
2427                        crate::proto::orders::v1::GetBatchReplaceStatusRequest,
2428                    >::from_parts(&req, &body);
2429                    svc.get_batch_replace_status(ctx, req)
2430                        .await?
2431                        .encode::<
2432                            crate::proto::orders::v1::GetBatchReplaceStatusResponse,
2433                        >(format)
2434                })
2435            }
2436            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
2437        }
2438    }
2439    fn call_server_streaming(
2440        &self,
2441        path: &str,
2442        ctx: ::connectrpc::RequestContext,
2443        request: ::buffa::bytes::Bytes,
2444        format: ::connectrpc::CodecFormat,
2445    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
2446        let Some(method) = path.strip_prefix("orders.v1.OrdersReadService/") else {
2447            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
2448        };
2449        let _ = (&ctx, &request, &format);
2450        match method {
2451            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
2452        }
2453    }
2454    fn call_client_streaming(
2455        &self,
2456        path: &str,
2457        ctx: ::connectrpc::RequestContext,
2458        requests: ::connectrpc::dispatcher::codegen::RequestStream,
2459        format: ::connectrpc::CodecFormat,
2460    ) -> ::connectrpc::dispatcher::codegen::UnaryResult {
2461        let Some(method) = path.strip_prefix("orders.v1.OrdersReadService/") else {
2462            return ::connectrpc::dispatcher::codegen::unimplemented_unary(path);
2463        };
2464        let _ = (&ctx, &requests, &format);
2465        match method {
2466            _ => ::connectrpc::dispatcher::codegen::unimplemented_unary(path),
2467        }
2468    }
2469    fn call_bidi_streaming(
2470        &self,
2471        path: &str,
2472        ctx: ::connectrpc::RequestContext,
2473        requests: ::connectrpc::dispatcher::codegen::RequestStream,
2474        format: ::connectrpc::CodecFormat,
2475    ) -> ::connectrpc::dispatcher::codegen::StreamingResult {
2476        let Some(method) = path.strip_prefix("orders.v1.OrdersReadService/") else {
2477            return ::connectrpc::dispatcher::codegen::unimplemented_streaming(path);
2478        };
2479        let _ = (&ctx, &requests, &format);
2480        match method {
2481            _ => ::connectrpc::dispatcher::codegen::unimplemented_streaming(path),
2482        }
2483    }
2484}
2485/// Client for this service.
2486///
2487/// Generic over `T: ClientTransport`. For **gRPC** (HTTP/2), use
2488/// `Http2Connection` — it has honest `poll_ready` and composes with
2489/// `tower::balance` for multi-connection load balancing. For **Connect
2490/// over HTTP/1.1** (or unknown protocol), use `HttpClient`.
2491///
2492/// # Working with the response
2493///
2494/// Unary calls return [`UnaryResponse<OwnedView<FooView>>`](::connectrpc::client::UnaryResponse).
2495/// [`view()`](::connectrpc::client::UnaryResponse::view) borrows the response
2496/// message, so field access is zero-copy:
2497///
2498/// ```rust,ignore
2499/// let resp = client.get_open_orders(request).await?;
2500/// let name: &str = resp.view().name;  // borrow into the response buffer
2501/// ```
2502///
2503/// If you need the owned struct (e.g. to store or pass by value), use
2504/// [`into_owned()`](::connectrpc::client::UnaryResponse::into_owned):
2505///
2506/// ```rust,ignore
2507/// let owned = client.get_open_orders(request).await?.into_owned();
2508/// ```
2509///
2510/// [`into_view()`](::connectrpc::client::UnaryResponse::into_view) keeps the
2511/// zero-copy decoded body (an `OwnedView`) without copying; field access on it
2512/// goes through `.reborrow()`. Streaming responses yield one
2513/// [`StreamMessage`](::connectrpc::StreamMessage) per received message from
2514/// `.message().await` — read fields zero-copy through the generated accessor
2515/// methods (`msg.name()`) or `.view()`, or convert with `.to_owned_message()`.
2516#[derive(Clone)]
2517pub struct OrdersReadServiceClient<T> {
2518    transport: T,
2519    config: ::connectrpc::client::ClientConfig,
2520}
2521impl<T> OrdersReadServiceClient<T>
2522where
2523    T: ::connectrpc::client::ClientTransport,
2524    <T::ResponseBody as ::connectrpc::http_body::Body>::Error: ::std::fmt::Display,
2525{
2526    /// Create a new client with the given transport and configuration.
2527    pub fn new(transport: T, config: ::connectrpc::client::ClientConfig) -> Self {
2528        Self { transport, config }
2529    }
2530    /// Get the client configuration.
2531    pub fn config(&self) -> &::connectrpc::client::ClientConfig {
2532        &self.config
2533    }
2534    /// Get a mutable reference to the client configuration.
2535    pub fn config_mut(&mut self) -> &mut ::connectrpc::client::ClientConfig {
2536        &mut self.config
2537    }
2538    /// Call the GetOpenOrders RPC. Sends a request to /orders.v1.OrdersReadService/GetOpenOrders.
2539    pub async fn get_open_orders(
2540        &self,
2541        request: crate::proto::orders::v1::GetOpenOrdersRequest,
2542    ) -> Result<
2543        ::connectrpc::client::UnaryResponse<
2544            ::buffa::view::OwnedView<
2545                crate::proto::orders::v1::__buffa::view::GetOpenOrdersResponseView<
2546                    'static,
2547                >,
2548            >,
2549        >,
2550        ::connectrpc::ConnectError,
2551    > {
2552        self.get_open_orders_with_options(
2553                request,
2554                ::connectrpc::client::CallOptions::default(),
2555            )
2556            .await
2557    }
2558    /// Call the GetOpenOrders RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
2559    pub async fn get_open_orders_with_options(
2560        &self,
2561        request: crate::proto::orders::v1::GetOpenOrdersRequest,
2562        options: ::connectrpc::client::CallOptions,
2563    ) -> Result<
2564        ::connectrpc::client::UnaryResponse<
2565            ::buffa::view::OwnedView<
2566                crate::proto::orders::v1::__buffa::view::GetOpenOrdersResponseView<
2567                    'static,
2568                >,
2569            >,
2570        >,
2571        ::connectrpc::ConnectError,
2572    > {
2573        ::connectrpc::client::call_unary(
2574                &self.transport,
2575                &self.config,
2576                ORDERS_READ_SERVICE_SERVICE_NAME,
2577                "GetOpenOrders",
2578                request,
2579                options,
2580            )
2581            .await
2582    }
2583    /// Call the GetOrderHistory RPC. Sends a request to /orders.v1.OrdersReadService/GetOrderHistory.
2584    pub async fn get_order_history(
2585        &self,
2586        request: crate::proto::orders::v1::GetOrderHistoryRequest,
2587    ) -> Result<
2588        ::connectrpc::client::UnaryResponse<
2589            ::buffa::view::OwnedView<
2590                crate::proto::orders::v1::__buffa::view::GetOrderHistoryResponseView<
2591                    'static,
2592                >,
2593            >,
2594        >,
2595        ::connectrpc::ConnectError,
2596    > {
2597        self.get_order_history_with_options(
2598                request,
2599                ::connectrpc::client::CallOptions::default(),
2600            )
2601            .await
2602    }
2603    /// Call the GetOrderHistory RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
2604    pub async fn get_order_history_with_options(
2605        &self,
2606        request: crate::proto::orders::v1::GetOrderHistoryRequest,
2607        options: ::connectrpc::client::CallOptions,
2608    ) -> Result<
2609        ::connectrpc::client::UnaryResponse<
2610            ::buffa::view::OwnedView<
2611                crate::proto::orders::v1::__buffa::view::GetOrderHistoryResponseView<
2612                    'static,
2613                >,
2614            >,
2615        >,
2616        ::connectrpc::ConnectError,
2617    > {
2618        ::connectrpc::client::call_unary(
2619                &self.transport,
2620                &self.config,
2621                ORDERS_READ_SERVICE_SERVICE_NAME,
2622                "GetOrderHistory",
2623                request,
2624                options,
2625            )
2626            .await
2627    }
2628    /// Call the GetUserTrades RPC. Sends a request to /orders.v1.OrdersReadService/GetUserTrades.
2629    pub async fn get_user_trades(
2630        &self,
2631        request: crate::proto::orders::v1::GetUserTradesRequest,
2632    ) -> Result<
2633        ::connectrpc::client::UnaryResponse<
2634            ::buffa::view::OwnedView<
2635                crate::proto::orders::v1::__buffa::view::GetUserTradesResponseView<
2636                    'static,
2637                >,
2638            >,
2639        >,
2640        ::connectrpc::ConnectError,
2641    > {
2642        self.get_user_trades_with_options(
2643                request,
2644                ::connectrpc::client::CallOptions::default(),
2645            )
2646            .await
2647    }
2648    /// Call the GetUserTrades RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
2649    pub async fn get_user_trades_with_options(
2650        &self,
2651        request: crate::proto::orders::v1::GetUserTradesRequest,
2652        options: ::connectrpc::client::CallOptions,
2653    ) -> Result<
2654        ::connectrpc::client::UnaryResponse<
2655            ::buffa::view::OwnedView<
2656                crate::proto::orders::v1::__buffa::view::GetUserTradesResponseView<
2657                    'static,
2658                >,
2659            >,
2660        >,
2661        ::connectrpc::ConnectError,
2662    > {
2663        ::connectrpc::client::call_unary(
2664                &self.transport,
2665                &self.config,
2666                ORDERS_READ_SERVICE_SERVICE_NAME,
2667                "GetUserTrades",
2668                request,
2669                options,
2670            )
2671            .await
2672    }
2673    /// Call the GetOrder RPC. Sends a request to /orders.v1.OrdersReadService/GetOrder.
2674    pub async fn get_order(
2675        &self,
2676        request: crate::proto::orders::v1::GetOrderRequest,
2677    ) -> Result<
2678        ::connectrpc::client::UnaryResponse<
2679            ::buffa::view::OwnedView<
2680                crate::proto::orders::v1::__buffa::view::GetOrderResponseView<'static>,
2681            >,
2682        >,
2683        ::connectrpc::ConnectError,
2684    > {
2685        self.get_order_with_options(
2686                request,
2687                ::connectrpc::client::CallOptions::default(),
2688            )
2689            .await
2690    }
2691    /// Call the GetOrder RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
2692    pub async fn get_order_with_options(
2693        &self,
2694        request: crate::proto::orders::v1::GetOrderRequest,
2695        options: ::connectrpc::client::CallOptions,
2696    ) -> Result<
2697        ::connectrpc::client::UnaryResponse<
2698            ::buffa::view::OwnedView<
2699                crate::proto::orders::v1::__buffa::view::GetOrderResponseView<'static>,
2700            >,
2701        >,
2702        ::connectrpc::ConnectError,
2703    > {
2704        ::connectrpc::client::call_unary(
2705                &self.transport,
2706                &self.config,
2707                ORDERS_READ_SERVICE_SERVICE_NAME,
2708                "GetOrder",
2709                request,
2710                options,
2711            )
2712            .await
2713    }
2714    /// Call the GetBatchReplaceStatus RPC. Sends a request to /orders.v1.OrdersReadService/GetBatchReplaceStatus.
2715    pub async fn get_batch_replace_status(
2716        &self,
2717        request: crate::proto::orders::v1::GetBatchReplaceStatusRequest,
2718    ) -> Result<
2719        ::connectrpc::client::UnaryResponse<
2720            ::buffa::view::OwnedView<
2721                crate::proto::orders::v1::__buffa::view::GetBatchReplaceStatusResponseView<
2722                    'static,
2723                >,
2724            >,
2725        >,
2726        ::connectrpc::ConnectError,
2727    > {
2728        self.get_batch_replace_status_with_options(
2729                request,
2730                ::connectrpc::client::CallOptions::default(),
2731            )
2732            .await
2733    }
2734    /// Call the GetBatchReplaceStatus RPC with explicit per-call options. Options override [`ClientConfig`](::connectrpc::client::ClientConfig) defaults.
2735    pub async fn get_batch_replace_status_with_options(
2736        &self,
2737        request: crate::proto::orders::v1::GetBatchReplaceStatusRequest,
2738        options: ::connectrpc::client::CallOptions,
2739    ) -> Result<
2740        ::connectrpc::client::UnaryResponse<
2741            ::buffa::view::OwnedView<
2742                crate::proto::orders::v1::__buffa::view::GetBatchReplaceStatusResponseView<
2743                    'static,
2744                >,
2745            >,
2746        >,
2747        ::connectrpc::ConnectError,
2748    > {
2749        ::connectrpc::client::call_unary(
2750                &self.transport,
2751                &self.config,
2752                ORDERS_READ_SERVICE_SERVICE_NAME,
2753                "GetBatchReplaceStatus",
2754                request,
2755                options,
2756            )
2757            .await
2758    }
2759}