1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub type CloseableCloseResponse = ();
8
9 #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
10 pub struct QueryableQueryResponse {
11 pub protocol: ::std::vec::Vec<u8>,
12 }
13
14 unsafe impl<___E> ::fidl_next::Encode<crate::wire::QueryableQueryResponse<'static>, ___E>
15 for QueryableQueryResponse
16 where
17 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
18 ___E: ::fidl_next::Encoder,
19 {
20 #[inline]
21 fn encode(
22 self,
23 encoder_: &mut ___E,
24 out_: &mut ::core::mem::MaybeUninit<crate::wire::QueryableQueryResponse<'static>>,
25 _: (),
26 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
27 ::fidl_next::munge! {
28 let crate::wire::QueryableQueryResponse {
29 protocol,
30
31 } = out_;
32 }
33
34 ::fidl_next::Encode::encode(self.protocol, encoder_, protocol, (4294967295, ()))?;
35
36 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(protocol.as_mut_ptr()) };
37 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
38
39 Ok(())
40 }
41 }
42
43 unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::QueryableQueryResponse<'static>, ___E>
44 for &'a QueryableQueryResponse
45 where
46 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
47 ___E: ::fidl_next::Encoder,
48 {
49 #[inline]
50 fn encode(
51 self,
52 encoder_: &mut ___E,
53 out_: &mut ::core::mem::MaybeUninit<crate::wire::QueryableQueryResponse<'static>>,
54 _: (),
55 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
56 ::fidl_next::munge! {
57 let crate::wire::QueryableQueryResponse {
58 protocol,
59
60 } = out_;
61 }
62
63 ::fidl_next::Encode::encode(&self.protocol, encoder_, protocol, (4294967295, ()))?;
64
65 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(protocol.as_mut_ptr()) };
66 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
67
68 Ok(())
69 }
70 }
71
72 unsafe impl<___E>
73 ::fidl_next::EncodeOption<
74 ::fidl_next::wire::Box<'static, crate::wire::QueryableQueryResponse<'static>>,
75 ___E,
76 > for QueryableQueryResponse
77 where
78 ___E: ::fidl_next::Encoder + ?Sized,
79 QueryableQueryResponse:
80 ::fidl_next::Encode<crate::wire::QueryableQueryResponse<'static>, ___E>,
81 {
82 #[inline]
83 fn encode_option(
84 this: ::core::option::Option<Self>,
85 encoder: &mut ___E,
86 out: &mut ::core::mem::MaybeUninit<
87 ::fidl_next::wire::Box<'static, crate::wire::QueryableQueryResponse<'static>>,
88 >,
89 _: (),
90 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
91 if let Some(inner) = this {
92 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
93 ::fidl_next::wire::Box::encode_present(out);
94 } else {
95 ::fidl_next::wire::Box::encode_absent(out);
96 }
97
98 Ok(())
99 }
100 }
101
102 unsafe impl<'a, ___E>
103 ::fidl_next::EncodeOption<
104 ::fidl_next::wire::Box<'static, crate::wire::QueryableQueryResponse<'static>>,
105 ___E,
106 > for &'a QueryableQueryResponse
107 where
108 ___E: ::fidl_next::Encoder + ?Sized,
109 &'a QueryableQueryResponse:
110 ::fidl_next::Encode<crate::wire::QueryableQueryResponse<'static>, ___E>,
111 {
112 #[inline]
113 fn encode_option(
114 this: ::core::option::Option<Self>,
115 encoder: &mut ___E,
116 out: &mut ::core::mem::MaybeUninit<
117 ::fidl_next::wire::Box<'static, crate::wire::QueryableQueryResponse<'static>>,
118 >,
119 _: (),
120 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
121 if let Some(inner) = this {
122 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
123 ::fidl_next::wire::Box::encode_present(out);
124 } else {
125 ::fidl_next::wire::Box::encode_absent(out);
126 }
127
128 Ok(())
129 }
130 }
131
132 impl<'de> ::fidl_next::FromWire<crate::wire::QueryableQueryResponse<'de>>
133 for QueryableQueryResponse
134 {
135 #[inline]
136 fn from_wire(wire: crate::wire::QueryableQueryResponse<'de>) -> Self {
137 Self { protocol: ::fidl_next::FromWire::from_wire(wire.protocol) }
138 }
139 }
140
141 impl<'de> ::fidl_next::FromWireRef<crate::wire::QueryableQueryResponse<'de>>
142 for QueryableQueryResponse
143 {
144 #[inline]
145 fn from_wire_ref(wire: &crate::wire::QueryableQueryResponse<'de>) -> Self {
146 Self { protocol: ::fidl_next::FromWireRef::from_wire_ref(&wire.protocol) }
147 }
148 }
149}
150
151pub mod wire {
152
153 pub type CloseableCloseResponse = ::fidl_next::wire::Unit;
155
156 #[derive(Debug)]
158 #[repr(C)]
159 pub struct QueryableQueryResponse<'de> {
160 pub protocol: ::fidl_next::wire::Vector<'de, u8>,
161 }
162
163 static_assertions::const_assert_eq!(std::mem::size_of::<QueryableQueryResponse<'_>>(), 16);
164 static_assertions::const_assert_eq!(std::mem::align_of::<QueryableQueryResponse<'_>>(), 8);
165
166 static_assertions::const_assert_eq!(
167 std::mem::offset_of!(QueryableQueryResponse<'_>, protocol),
168 0
169 );
170
171 impl ::fidl_next::Constrained for QueryableQueryResponse<'_> {
172 type Constraint = ();
173
174 fn validate(
175 _: ::fidl_next::Slot<'_, Self>,
176 _: Self::Constraint,
177 ) -> Result<(), ::fidl_next::ValidationError> {
178 Ok(())
179 }
180 }
181
182 unsafe impl ::fidl_next::Wire for QueryableQueryResponse<'static> {
183 type Narrowed<'de> = QueryableQueryResponse<'de>;
184
185 #[inline]
186 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
187 ::fidl_next::munge! {
188 let Self {
189 protocol,
190
191 } = &mut *out_;
192 }
193
194 ::fidl_next::Wire::zero_padding(protocol);
195 }
196 }
197
198 unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for QueryableQueryResponse<'de>
199 where
200 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
201 ___D: ::fidl_next::Decoder<'de>,
202 {
203 fn decode(
204 slot_: ::fidl_next::Slot<'_, Self>,
205 decoder_: &mut ___D,
206 _: (),
207 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
208 ::fidl_next::munge! {
209 let Self {
210 mut protocol,
211
212 } = slot_;
213 }
214
215 let _field = protocol.as_mut();
216 ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
217 ::fidl_next::Decode::decode(protocol.as_mut(), decoder_, (4294967295, ()))?;
218
219 Ok(())
220 }
221 }
222
223 impl<'de> ::fidl_next::IntoNatural for QueryableQueryResponse<'de> {
224 type Natural = crate::natural::QueryableQueryResponse;
225 }
226}
227
228pub mod wire_optional {}
229
230pub mod generic {
231
232 pub type CloseableCloseResponse = ();
234
235 pub struct QueryableQueryResponse<T0> {
237 pub protocol: T0,
238 }
239
240 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::QueryableQueryResponse<'static>, ___E>
241 for QueryableQueryResponse<T0>
242 where
243 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
244 ___E: ::fidl_next::Encoder,
245 T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
246 {
247 #[inline]
248 fn encode(
249 self,
250 encoder_: &mut ___E,
251 out_: &mut ::core::mem::MaybeUninit<crate::wire::QueryableQueryResponse<'static>>,
252 _: (),
253 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
254 ::fidl_next::munge! {
255 let crate::wire::QueryableQueryResponse {
256 protocol,
257
258 } = out_;
259 }
260
261 ::fidl_next::Encode::encode(self.protocol, encoder_, protocol, (4294967295, ()))?;
262
263 Ok(())
264 }
265 }
266}
267
268pub use self::natural::*;
269
270#[doc = " Provides a means of synchronously closing a connection.\n"]
272#[derive(PartialEq, Debug)]
273pub struct Closeable;
274
275#[cfg(target_os = "fuchsia")]
276impl ::fidl_next::HasTransport for Closeable {
277 type Transport = ::fidl_next::fuchsia::zx::Channel;
278}
279
280pub mod closeable {
281 pub mod prelude {
282 pub use crate::{
283 Closeable, CloseableClientHandler, CloseableLocalClientHandler,
284 CloseableLocalServerHandler, CloseableServerHandler, closeable,
285 };
286
287 pub use crate::natural::CloseableCloseResponse;
288 }
289
290 pub struct Close;
291
292 impl ::fidl_next::Method for Close {
293 const ORDINAL: u64 = 6540867515453498750;
294 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
295 ::fidl_next::protocol::Flexibility::Strict;
296
297 type Protocol = crate::Closeable;
298
299 type Request = ::fidl_next::wire::EmptyMessageBody;
300 }
301
302 impl ::fidl_next::TwoWayMethod for Close {
303 type Response = ::fidl_next::wire::Result<
304 'static,
305 crate::wire::CloseableCloseResponse,
306 ::fidl_next::wire::Int32,
307 >;
308 }
309
310 impl<___R> ::fidl_next::Respond<___R> for Close {
311 type Output = ::core::result::Result<___R, ::fidl_next::util::Never>;
312
313 fn respond(response: ___R) -> Self::Output {
314 ::core::result::Result::Ok(response)
315 }
316 }
317
318 impl<___R> ::fidl_next::RespondErr<___R> for Close {
319 type Output = ::core::result::Result<::fidl_next::util::Never, ___R>;
320
321 fn respond_err(response: ___R) -> Self::Output {
322 ::core::result::Result::Err(response)
323 }
324 }
325
326 mod ___detail {
327 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Closeable
328 where
329 ___T: ::fidl_next::Transport,
330 {
331 type Client = CloseableClient<___T>;
332 type Server = CloseableServer<___T>;
333 }
334
335 #[repr(transparent)]
337 pub struct CloseableClient<___T: ::fidl_next::Transport> {
338 #[allow(dead_code)]
339 client: ::fidl_next::protocol::Client<___T>,
340 }
341
342 impl<___T> CloseableClient<___T>
343 where
344 ___T: ::fidl_next::Transport,
345 {
346 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
347 pub fn close(&self) -> ::fidl_next::TwoWayFuture<'_, super::Close, ___T> {
348 ::fidl_next::TwoWayFuture::from_untyped(
349 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
350 6540867515453498750,
351 <super::Close as ::fidl_next::Method>::FLEXIBILITY,
352 (),
353 ),
354 )
355 }
356 }
357
358 #[repr(transparent)]
360 pub struct CloseableServer<___T: ::fidl_next::Transport> {
361 server: ::fidl_next::protocol::Server<___T>,
362 }
363
364 impl<___T> CloseableServer<___T> where ___T: ::fidl_next::Transport {}
365 }
366}
367
368#[diagnostic::on_unimplemented(
369 note = "If {Self} implements the non-local CloseableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
370)]
371
372pub trait CloseableLocalClientHandler<
376 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
377 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
378>
379{
380}
381
382impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Closeable
383where
384 ___H: CloseableLocalClientHandler<___T>,
385 ___T: ::fidl_next::Transport,
386{
387 async fn on_event(
388 handler: &mut ___H,
389 ordinal: u64,
390 flexibility: ::fidl_next::protocol::Flexibility,
391 body: ::fidl_next::Body<___T>,
392 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
393 match ordinal {
394 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
395 }
396 }
397}
398
399#[diagnostic::on_unimplemented(
400 note = "If {Self} implements the non-local CloseableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
401)]
402
403pub trait CloseableLocalServerHandler<
407 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
408 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
409>
410{
411 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
412 fn close(
413 &mut self,
414
415 responder: ::fidl_next::Responder<closeable::Close, ___T>,
416 ) -> impl ::core::future::Future<Output = ()>;
417}
418
419impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Closeable
420where
421 ___H: CloseableLocalServerHandler<___T>,
422 ___T: ::fidl_next::Transport,
423{
424 async fn on_one_way(
425 handler: &mut ___H,
426 ordinal: u64,
427 flexibility: ::fidl_next::protocol::Flexibility,
428 body: ::fidl_next::Body<___T>,
429 ) -> ::core::result::Result<
430 (),
431 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
432 > {
433 match ordinal {
434 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
435 }
436 }
437
438 async fn on_two_way(
439 handler: &mut ___H,
440 ordinal: u64,
441 flexibility: ::fidl_next::protocol::Flexibility,
442 body: ::fidl_next::Body<___T>,
443 responder: ::fidl_next::protocol::Responder<___T>,
444 ) -> ::core::result::Result<
445 (),
446 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
447 > {
448 match ordinal {
449 6540867515453498750 => {
450 let responder = ::fidl_next::Responder::from_untyped(responder);
451
452 handler.close(responder).await;
453 Ok(())
454 }
455
456 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
457 }
458 }
459}
460
461pub trait CloseableClientHandler<
465 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
466 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
467>
468{
469}
470
471impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Closeable
472where
473 ___H: CloseableClientHandler<___T> + ::core::marker::Send,
474 ___T: ::fidl_next::Transport,
475{
476 async fn on_event(
477 handler: &mut ___H,
478 ordinal: u64,
479 flexibility: ::fidl_next::protocol::Flexibility,
480 body: ::fidl_next::Body<___T>,
481 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
482 match ordinal {
483 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
484 }
485 }
486}
487
488pub trait CloseableServerHandler<
492 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
493 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
494>
495{
496 #[doc = " Terminates the connection.\n\n After calling `Close`, the client must not send any other requests.\n\n Servers, after sending the status response, should close the connection\n regardless of status and without sending an epitaph.\n\n Closing the client end of the channel should be semantically equivalent\n to calling `Close` without knowing when the close has completed or its\n status.\n"]
497 fn close(
498 &mut self,
499
500 responder: ::fidl_next::Responder<closeable::Close, ___T>,
501 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
502}
503
504impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Closeable
505where
506 ___H: CloseableServerHandler<___T> + ::core::marker::Send,
507 ___T: ::fidl_next::Transport,
508{
509 async fn on_one_way(
510 handler: &mut ___H,
511 ordinal: u64,
512 flexibility: ::fidl_next::protocol::Flexibility,
513 body: ::fidl_next::Body<___T>,
514 ) -> ::core::result::Result<
515 (),
516 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
517 > {
518 match ordinal {
519 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
520 }
521 }
522
523 async fn on_two_way(
524 handler: &mut ___H,
525 ordinal: u64,
526 flexibility: ::fidl_next::protocol::Flexibility,
527 body: ::fidl_next::Body<___T>,
528 responder: ::fidl_next::protocol::Responder<___T>,
529 ) -> ::core::result::Result<
530 (),
531 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
532 > {
533 match ordinal {
534 6540867515453498750 => {
535 let responder = ::fidl_next::Responder::from_untyped(responder);
536
537 handler.close(responder).await;
538 Ok(())
539 }
540
541 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
542 }
543 }
544}
545
546impl<___T> CloseableClientHandler<___T> for ::fidl_next::IgnoreEvents where
547 ___T: ::fidl_next::Transport
548{
549}
550
551impl<___H, ___T> CloseableLocalClientHandler<___T> for ::fidl_next::Local<___H>
552where
553 ___H: CloseableClientHandler<___T>,
554 ___T: ::fidl_next::Transport,
555{
556}
557
558impl<___H, ___T> CloseableLocalServerHandler<___T> for ::fidl_next::Local<___H>
559where
560 ___H: CloseableServerHandler<___T>,
561 ___T: ::fidl_next::Transport,
562{
563 async fn close(&mut self, responder: ::fidl_next::Responder<closeable::Close, ___T>) {
564 ___H::close(&mut self.0, responder).await
565 }
566}
567
568#[doc = " Provides a means of identifying a type-erased protocol.\n"]
570#[derive(PartialEq, Debug)]
571pub struct Queryable;
572
573#[cfg(target_os = "fuchsia")]
574impl ::fidl_next::HasTransport for Queryable {
575 type Transport = ::fidl_next::fuchsia::zx::Channel;
576}
577
578pub mod queryable {
579 pub mod prelude {
580 pub use crate::{
581 Queryable, QueryableClientHandler, QueryableLocalClientHandler,
582 QueryableLocalServerHandler, QueryableServerHandler, queryable,
583 };
584
585 pub use crate::natural::QueryableQueryResponse;
586 }
587
588 pub struct Query;
589
590 impl ::fidl_next::Method for Query {
591 const ORDINAL: u64 = 2763219980499352582;
592 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
593 ::fidl_next::protocol::Flexibility::Strict;
594
595 type Protocol = crate::Queryable;
596
597 type Request = ::fidl_next::wire::EmptyMessageBody;
598 }
599
600 impl ::fidl_next::TwoWayMethod for Query {
601 type Response = crate::wire::QueryableQueryResponse<'static>;
602 }
603
604 impl<___R> ::fidl_next::Respond<___R> for Query {
605 type Output = crate::generic::QueryableQueryResponse<___R>;
606
607 fn respond(response: ___R) -> Self::Output {
608 crate::generic::QueryableQueryResponse { protocol: response }
609 }
610 }
611
612 mod ___detail {
613 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Queryable
614 where
615 ___T: ::fidl_next::Transport,
616 {
617 type Client = QueryableClient<___T>;
618 type Server = QueryableServer<___T>;
619 }
620
621 #[repr(transparent)]
623 pub struct QueryableClient<___T: ::fidl_next::Transport> {
624 #[allow(dead_code)]
625 client: ::fidl_next::protocol::Client<___T>,
626 }
627
628 impl<___T> QueryableClient<___T>
629 where
630 ___T: ::fidl_next::Transport,
631 {
632 pub fn query(&self) -> ::fidl_next::TwoWayFuture<'_, super::Query, ___T> {
633 ::fidl_next::TwoWayFuture::from_untyped(
634 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
635 2763219980499352582,
636 <super::Query as ::fidl_next::Method>::FLEXIBILITY,
637 (),
638 ),
639 )
640 }
641 }
642
643 #[repr(transparent)]
645 pub struct QueryableServer<___T: ::fidl_next::Transport> {
646 server: ::fidl_next::protocol::Server<___T>,
647 }
648
649 impl<___T> QueryableServer<___T> where ___T: ::fidl_next::Transport {}
650 }
651}
652
653#[diagnostic::on_unimplemented(
654 note = "If {Self} implements the non-local QueryableClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
655)]
656
657pub trait QueryableLocalClientHandler<
661 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
662 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
663>
664{
665}
666
667impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Queryable
668where
669 ___H: QueryableLocalClientHandler<___T>,
670 ___T: ::fidl_next::Transport,
671{
672 async fn on_event(
673 handler: &mut ___H,
674 ordinal: u64,
675 flexibility: ::fidl_next::protocol::Flexibility,
676 body: ::fidl_next::Body<___T>,
677 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
678 match ordinal {
679 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
680 }
681 }
682}
683
684#[diagnostic::on_unimplemented(
685 note = "If {Self} implements the non-local QueryableServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
686)]
687
688pub trait QueryableLocalServerHandler<
692 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
693 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
694>
695{
696 fn query(
697 &mut self,
698
699 responder: ::fidl_next::Responder<queryable::Query, ___T>,
700 ) -> impl ::core::future::Future<Output = ()>;
701}
702
703impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Queryable
704where
705 ___H: QueryableLocalServerHandler<___T>,
706 ___T: ::fidl_next::Transport,
707{
708 async fn on_one_way(
709 handler: &mut ___H,
710 ordinal: u64,
711 flexibility: ::fidl_next::protocol::Flexibility,
712 body: ::fidl_next::Body<___T>,
713 ) -> ::core::result::Result<
714 (),
715 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
716 > {
717 match ordinal {
718 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
719 }
720 }
721
722 async fn on_two_way(
723 handler: &mut ___H,
724 ordinal: u64,
725 flexibility: ::fidl_next::protocol::Flexibility,
726 body: ::fidl_next::Body<___T>,
727 responder: ::fidl_next::protocol::Responder<___T>,
728 ) -> ::core::result::Result<
729 (),
730 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
731 > {
732 match ordinal {
733 2763219980499352582 => {
734 let responder = ::fidl_next::Responder::from_untyped(responder);
735
736 handler.query(responder).await;
737 Ok(())
738 }
739
740 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
741 }
742 }
743}
744
745pub trait QueryableClientHandler<
749 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
750 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
751>
752{
753}
754
755impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Queryable
756where
757 ___H: QueryableClientHandler<___T> + ::core::marker::Send,
758 ___T: ::fidl_next::Transport,
759{
760 async fn on_event(
761 handler: &mut ___H,
762 ordinal: u64,
763 flexibility: ::fidl_next::protocol::Flexibility,
764 body: ::fidl_next::Body<___T>,
765 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
766 match ordinal {
767 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
768 }
769 }
770}
771
772pub trait QueryableServerHandler<
776 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
777 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
778>
779{
780 fn query(
781 &mut self,
782
783 responder: ::fidl_next::Responder<queryable::Query, ___T>,
784 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
785}
786
787impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Queryable
788where
789 ___H: QueryableServerHandler<___T> + ::core::marker::Send,
790 ___T: ::fidl_next::Transport,
791{
792 async fn on_one_way(
793 handler: &mut ___H,
794 ordinal: u64,
795 flexibility: ::fidl_next::protocol::Flexibility,
796 body: ::fidl_next::Body<___T>,
797 ) -> ::core::result::Result<
798 (),
799 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
800 > {
801 match ordinal {
802 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
803 }
804 }
805
806 async fn on_two_way(
807 handler: &mut ___H,
808 ordinal: u64,
809 flexibility: ::fidl_next::protocol::Flexibility,
810 body: ::fidl_next::Body<___T>,
811 responder: ::fidl_next::protocol::Responder<___T>,
812 ) -> ::core::result::Result<
813 (),
814 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
815 > {
816 match ordinal {
817 2763219980499352582 => {
818 let responder = ::fidl_next::Responder::from_untyped(responder);
819
820 handler.query(responder).await;
821 Ok(())
822 }
823
824 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
825 }
826 }
827}
828
829impl<___T> QueryableClientHandler<___T> for ::fidl_next::IgnoreEvents where
830 ___T: ::fidl_next::Transport
831{
832}
833
834impl<___H, ___T> QueryableLocalClientHandler<___T> for ::fidl_next::Local<___H>
835where
836 ___H: QueryableClientHandler<___T>,
837 ___T: ::fidl_next::Transport,
838{
839}
840
841impl<___H, ___T> QueryableLocalServerHandler<___T> for ::fidl_next::Local<___H>
842where
843 ___H: QueryableServerHandler<___T>,
844 ___T: ::fidl_next::Transport,
845{
846 async fn query(&mut self, responder: ::fidl_next::Responder<queryable::Query, ___T>) {
847 ___H::query(&mut self.0, responder).await
848 }
849}