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