Skip to main content

fidl_next_fuchsia_hardware_sdmmc/
fidl_next_fuchsia_hardware_sdmmc.rs

1// DO NOT EDIT: This file is machine-generated by fidlgen
2#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7    pub use fidl_next_common_fuchsia_hardware_sdmmc::natural::*;
8
9    #[derive(Debug, PartialEq)]
10    #[repr(C)]
11    pub struct CqhciInitializeCommandQueueingRequest {
12        pub virtual_interrupt: ::fidl_next::fuchsia::zx::Interrupt,
13
14        pub virtual_interrupt_lifeline: ::fidl_next::fuchsia::zx::EventPair,
15    }
16
17    unsafe impl<___E> ::fidl_next::Encode<crate::wire::CqhciInitializeCommandQueueingRequest, ___E>
18        for CqhciInitializeCommandQueueingRequest
19    where
20        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
21        ___E: ::fidl_next::fuchsia::HandleEncoder,
22    {
23        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
24            Self,
25            crate::wire::CqhciInitializeCommandQueueingRequest,
26        > = unsafe {
27            ::fidl_next::CopyOptimization::enable_if(
28                true && <::fidl_next::fuchsia::zx::Interrupt as ::fidl_next::Encode<
29                    ::fidl_next::wire::fuchsia::Interrupt,
30                    ___E,
31                >>::COPY_OPTIMIZATION
32                    .is_enabled()
33                    && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encode<
34                        ::fidl_next::wire::fuchsia::EventPair,
35                        ___E,
36                    >>::COPY_OPTIMIZATION
37                        .is_enabled(),
38            )
39        };
40
41        #[inline]
42        fn encode(
43            self,
44            encoder_: &mut ___E,
45            out_: &mut ::core::mem::MaybeUninit<crate::wire::CqhciInitializeCommandQueueingRequest>,
46            _: (),
47        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
48            ::fidl_next::munge! {
49                let crate::wire::CqhciInitializeCommandQueueingRequest {
50                    virtual_interrupt,
51                    virtual_interrupt_lifeline,
52
53                } = out_;
54            }
55
56            ::fidl_next::Encode::encode(self.virtual_interrupt, encoder_, virtual_interrupt, ())?;
57
58            let mut _field =
59                unsafe { ::fidl_next::Slot::new_unchecked(virtual_interrupt.as_mut_ptr()) };
60
61            ::fidl_next::Encode::encode(
62                self.virtual_interrupt_lifeline,
63                encoder_,
64                virtual_interrupt_lifeline,
65                (),
66            )?;
67
68            let mut _field = unsafe {
69                ::fidl_next::Slot::new_unchecked(virtual_interrupt_lifeline.as_mut_ptr())
70            };
71
72            Ok(())
73        }
74    }
75
76    unsafe impl<___E>
77        ::fidl_next::EncodeOption<
78            ::fidl_next::wire::Box<'static, crate::wire::CqhciInitializeCommandQueueingRequest>,
79            ___E,
80        > for CqhciInitializeCommandQueueingRequest
81    where
82        ___E: ::fidl_next::Encoder + ?Sized,
83        CqhciInitializeCommandQueueingRequest:
84            ::fidl_next::Encode<crate::wire::CqhciInitializeCommandQueueingRequest, ___E>,
85    {
86        #[inline]
87        fn encode_option(
88            this: ::core::option::Option<Self>,
89            encoder: &mut ___E,
90            out: &mut ::core::mem::MaybeUninit<
91                ::fidl_next::wire::Box<'static, crate::wire::CqhciInitializeCommandQueueingRequest>,
92            >,
93            _: (),
94        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
95            if let Some(inner) = this {
96                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
97                ::fidl_next::wire::Box::encode_present(out);
98            } else {
99                ::fidl_next::wire::Box::encode_absent(out);
100            }
101
102            Ok(())
103        }
104    }
105
106    impl ::fidl_next::FromWire<crate::wire::CqhciInitializeCommandQueueingRequest>
107        for CqhciInitializeCommandQueueingRequest
108    {
109        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
110            crate::wire::CqhciInitializeCommandQueueingRequest,
111            Self,
112        > = unsafe {
113            ::fidl_next::CopyOptimization::enable_if(
114                true && <::fidl_next::fuchsia::zx::Interrupt as ::fidl_next::FromWire<
115                    ::fidl_next::wire::fuchsia::Interrupt,
116                >>::COPY_OPTIMIZATION
117                    .is_enabled()
118                    && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
119                        ::fidl_next::wire::fuchsia::EventPair,
120                    >>::COPY_OPTIMIZATION
121                        .is_enabled(),
122            )
123        };
124
125        #[inline]
126        fn from_wire(wire: crate::wire::CqhciInitializeCommandQueueingRequest) -> Self {
127            Self {
128                virtual_interrupt: ::fidl_next::FromWire::from_wire(wire.virtual_interrupt),
129
130                virtual_interrupt_lifeline: ::fidl_next::FromWire::from_wire(
131                    wire.virtual_interrupt_lifeline,
132                ),
133            }
134        }
135    }
136
137    #[derive(Debug, PartialEq)]
138    pub struct CqhciInitializeCommandQueueingResponse {
139        pub cqhci_mmio: ::fidl_next::fuchsia::zx::Vmo,
140
141        pub cqhci_mmio_offset: u64,
142
143        pub sdhci_mmio: ::fidl_next::fuchsia::zx::Vmo,
144
145        pub sdhci_mmio_offset: u64,
146
147        pub bti: ::fidl_next::fuchsia::zx::Bti,
148
149        pub interrupt: ::fidl_next::fuchsia::zx::Interrupt,
150    }
151
152    unsafe impl<___E> ::fidl_next::Encode<crate::wire::CqhciInitializeCommandQueueingResponse, ___E>
153        for CqhciInitializeCommandQueueingResponse
154    where
155        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
156        ___E: ::fidl_next::fuchsia::HandleEncoder,
157    {
158        #[inline]
159        fn encode(
160            self,
161            encoder_: &mut ___E,
162            out_: &mut ::core::mem::MaybeUninit<
163                crate::wire::CqhciInitializeCommandQueueingResponse,
164            >,
165            _: (),
166        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
167            ::fidl_next::munge! {
168                let crate::wire::CqhciInitializeCommandQueueingResponse {
169                    cqhci_mmio,
170                    cqhci_mmio_offset,
171                    sdhci_mmio,
172                    sdhci_mmio_offset,
173                    bti,
174                    interrupt,
175
176                } = out_;
177            }
178
179            ::fidl_next::Encode::encode(self.cqhci_mmio, encoder_, cqhci_mmio, ())?;
180
181            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(cqhci_mmio.as_mut_ptr()) };
182
183            ::fidl_next::Encode::encode(self.cqhci_mmio_offset, encoder_, cqhci_mmio_offset, ())?;
184
185            let mut _field =
186                unsafe { ::fidl_next::Slot::new_unchecked(cqhci_mmio_offset.as_mut_ptr()) };
187
188            ::fidl_next::Encode::encode(self.sdhci_mmio, encoder_, sdhci_mmio, ())?;
189
190            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(sdhci_mmio.as_mut_ptr()) };
191
192            ::fidl_next::Encode::encode(self.sdhci_mmio_offset, encoder_, sdhci_mmio_offset, ())?;
193
194            let mut _field =
195                unsafe { ::fidl_next::Slot::new_unchecked(sdhci_mmio_offset.as_mut_ptr()) };
196
197            ::fidl_next::Encode::encode(self.bti, encoder_, bti, ())?;
198
199            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bti.as_mut_ptr()) };
200
201            ::fidl_next::Encode::encode(self.interrupt, encoder_, interrupt, ())?;
202
203            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(interrupt.as_mut_ptr()) };
204
205            Ok(())
206        }
207    }
208
209    unsafe impl<___E>
210        ::fidl_next::EncodeOption<
211            ::fidl_next::wire::Box<'static, crate::wire::CqhciInitializeCommandQueueingResponse>,
212            ___E,
213        > for CqhciInitializeCommandQueueingResponse
214    where
215        ___E: ::fidl_next::Encoder + ?Sized,
216        CqhciInitializeCommandQueueingResponse:
217            ::fidl_next::Encode<crate::wire::CqhciInitializeCommandQueueingResponse, ___E>,
218    {
219        #[inline]
220        fn encode_option(
221            this: ::core::option::Option<Self>,
222            encoder: &mut ___E,
223            out: &mut ::core::mem::MaybeUninit<
224                ::fidl_next::wire::Box<
225                    'static,
226                    crate::wire::CqhciInitializeCommandQueueingResponse,
227                >,
228            >,
229            _: (),
230        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
231            if let Some(inner) = this {
232                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
233                ::fidl_next::wire::Box::encode_present(out);
234            } else {
235                ::fidl_next::wire::Box::encode_absent(out);
236            }
237
238            Ok(())
239        }
240    }
241
242    impl ::fidl_next::FromWire<crate::wire::CqhciInitializeCommandQueueingResponse>
243        for CqhciInitializeCommandQueueingResponse
244    {
245        #[inline]
246        fn from_wire(wire: crate::wire::CqhciInitializeCommandQueueingResponse) -> Self {
247            Self {
248                cqhci_mmio: ::fidl_next::FromWire::from_wire(wire.cqhci_mmio),
249
250                cqhci_mmio_offset: ::fidl_next::FromWire::from_wire(wire.cqhci_mmio_offset),
251
252                sdhci_mmio: ::fidl_next::FromWire::from_wire(wire.sdhci_mmio),
253
254                sdhci_mmio_offset: ::fidl_next::FromWire::from_wire(wire.sdhci_mmio_offset),
255
256                bti: ::fidl_next::FromWire::from_wire(wire.bti),
257
258                interrupt: ::fidl_next::FromWire::from_wire(wire.interrupt),
259            }
260        }
261    }
262
263    #[derive(Debug, PartialEq)]
264    #[repr(C)]
265    pub struct SdmmcRegisterInBandInterruptRequest {
266        pub interrupt_cb: ::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::DriverChannel>,
267    }
268
269    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcRegisterInBandInterruptRequest, ___E>
270        for SdmmcRegisterInBandInterruptRequest
271    where
272        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
273        ___E: ::fidl_next::fuchsia::HandleEncoder,
274    {
275        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
276            Self,
277            crate::wire::SdmmcRegisterInBandInterruptRequest,
278        > = unsafe {
279            ::fidl_next::CopyOptimization::enable_if(
280            true
281
282                && <
283                    ::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::DriverChannel> as ::fidl_next::Encode<::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::wire::DriverChannel>, ___E>
284                >::COPY_OPTIMIZATION.is_enabled()
285
286        )
287        };
288
289        #[inline]
290        fn encode(
291            self,
292            encoder_: &mut ___E,
293            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRegisterInBandInterruptRequest>,
294            _: (),
295        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
296            ::fidl_next::munge! {
297                let crate::wire::SdmmcRegisterInBandInterruptRequest {
298                    interrupt_cb,
299
300                } = out_;
301            }
302
303            ::fidl_next::Encode::encode(self.interrupt_cb, encoder_, interrupt_cb, ())?;
304
305            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(interrupt_cb.as_mut_ptr()) };
306
307            Ok(())
308        }
309    }
310
311    unsafe impl<___E>
312        ::fidl_next::EncodeOption<
313            ::fidl_next::wire::Box<'static, crate::wire::SdmmcRegisterInBandInterruptRequest>,
314            ___E,
315        > for SdmmcRegisterInBandInterruptRequest
316    where
317        ___E: ::fidl_next::Encoder + ?Sized,
318        SdmmcRegisterInBandInterruptRequest:
319            ::fidl_next::Encode<crate::wire::SdmmcRegisterInBandInterruptRequest, ___E>,
320    {
321        #[inline]
322        fn encode_option(
323            this: ::core::option::Option<Self>,
324            encoder: &mut ___E,
325            out: &mut ::core::mem::MaybeUninit<
326                ::fidl_next::wire::Box<'static, crate::wire::SdmmcRegisterInBandInterruptRequest>,
327            >,
328            _: (),
329        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
330            if let Some(inner) = this {
331                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
332                ::fidl_next::wire::Box::encode_present(out);
333            } else {
334                ::fidl_next::wire::Box::encode_absent(out);
335            }
336
337            Ok(())
338        }
339    }
340
341    impl ::fidl_next::FromWire<crate::wire::SdmmcRegisterInBandInterruptRequest>
342        for SdmmcRegisterInBandInterruptRequest
343    {
344        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
345            crate::wire::SdmmcRegisterInBandInterruptRequest,
346            Self,
347        > = unsafe {
348            ::fidl_next::CopyOptimization::enable_if(
349            true
350
351                && <
352                    ::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::DriverChannel> as ::fidl_next::FromWire<::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::wire::DriverChannel>>
353                >::COPY_OPTIMIZATION.is_enabled()
354
355        )
356        };
357
358        #[inline]
359        fn from_wire(wire: crate::wire::SdmmcRegisterInBandInterruptRequest) -> Self {
360            Self { interrupt_cb: ::fidl_next::FromWire::from_wire(wire.interrupt_cb) }
361        }
362    }
363
364    #[derive(Debug, PartialEq)]
365    pub struct SdmmcRegisterVmoRequest {
366        pub vmo_id: u32,
367
368        pub client_id: u8,
369
370        pub vmo: ::fidl_next::fuchsia::zx::Vmo,
371
372        pub offset: u64,
373
374        pub size: u64,
375
376        pub vmo_rights: crate::natural::SdmmcVmoRight,
377    }
378
379    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcRegisterVmoRequest, ___E>
380        for SdmmcRegisterVmoRequest
381    where
382        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
383        ___E: ::fidl_next::fuchsia::HandleEncoder,
384    {
385        #[inline]
386        fn encode(
387            self,
388            encoder_: &mut ___E,
389            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRegisterVmoRequest>,
390            _: (),
391        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
392            ::fidl_next::munge! {
393                let crate::wire::SdmmcRegisterVmoRequest {
394                    vmo_id,
395                    client_id,
396                    vmo,
397                    offset,
398                    size,
399                    vmo_rights,
400
401                } = out_;
402            }
403
404            ::fidl_next::Encode::encode(self.vmo_id, encoder_, vmo_id, ())?;
405
406            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo_id.as_mut_ptr()) };
407
408            ::fidl_next::Encode::encode(self.client_id, encoder_, client_id, ())?;
409
410            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client_id.as_mut_ptr()) };
411
412            ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
413
414            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo.as_mut_ptr()) };
415
416            ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
417
418            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
419
420            ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
421
422            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(size.as_mut_ptr()) };
423
424            ::fidl_next::Encode::encode(self.vmo_rights, encoder_, vmo_rights, ())?;
425
426            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo_rights.as_mut_ptr()) };
427
428            Ok(())
429        }
430    }
431
432    unsafe impl<___E>
433        ::fidl_next::EncodeOption<
434            ::fidl_next::wire::Box<'static, crate::wire::SdmmcRegisterVmoRequest>,
435            ___E,
436        > for SdmmcRegisterVmoRequest
437    where
438        ___E: ::fidl_next::Encoder + ?Sized,
439        SdmmcRegisterVmoRequest: ::fidl_next::Encode<crate::wire::SdmmcRegisterVmoRequest, ___E>,
440    {
441        #[inline]
442        fn encode_option(
443            this: ::core::option::Option<Self>,
444            encoder: &mut ___E,
445            out: &mut ::core::mem::MaybeUninit<
446                ::fidl_next::wire::Box<'static, crate::wire::SdmmcRegisterVmoRequest>,
447            >,
448            _: (),
449        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
450            if let Some(inner) = this {
451                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
452                ::fidl_next::wire::Box::encode_present(out);
453            } else {
454                ::fidl_next::wire::Box::encode_absent(out);
455            }
456
457            Ok(())
458        }
459    }
460
461    impl ::fidl_next::FromWire<crate::wire::SdmmcRegisterVmoRequest> for SdmmcRegisterVmoRequest {
462        #[inline]
463        fn from_wire(wire: crate::wire::SdmmcRegisterVmoRequest) -> Self {
464            Self {
465                vmo_id: ::fidl_next::FromWire::from_wire(wire.vmo_id),
466
467                client_id: ::fidl_next::FromWire::from_wire(wire.client_id),
468
469                vmo: ::fidl_next::FromWire::from_wire(wire.vmo),
470
471                offset: ::fidl_next::FromWire::from_wire(wire.offset),
472
473                size: ::fidl_next::FromWire::from_wire(wire.size),
474
475                vmo_rights: ::fidl_next::FromWire::from_wire(wire.vmo_rights),
476            }
477        }
478    }
479
480    #[derive(Debug, PartialEq)]
481    #[repr(C)]
482    pub struct SdmmcUnregisterVmoResponse {
483        pub vmo: ::fidl_next::fuchsia::zx::Vmo,
484    }
485
486    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcUnregisterVmoResponse, ___E>
487        for SdmmcUnregisterVmoResponse
488    where
489        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
490        ___E: ::fidl_next::fuchsia::HandleEncoder,
491    {
492        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
493            Self,
494            crate::wire::SdmmcUnregisterVmoResponse,
495        > = unsafe {
496            ::fidl_next::CopyOptimization::enable_if(
497                true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::Encode<
498                    ::fidl_next::wire::fuchsia::Vmo,
499                    ___E,
500                >>::COPY_OPTIMIZATION
501                    .is_enabled(),
502            )
503        };
504
505        #[inline]
506        fn encode(
507            self,
508            encoder_: &mut ___E,
509            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcUnregisterVmoResponse>,
510            _: (),
511        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
512            ::fidl_next::munge! {
513                let crate::wire::SdmmcUnregisterVmoResponse {
514                    vmo,
515
516                } = out_;
517            }
518
519            ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
520
521            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo.as_mut_ptr()) };
522
523            Ok(())
524        }
525    }
526
527    unsafe impl<___E>
528        ::fidl_next::EncodeOption<
529            ::fidl_next::wire::Box<'static, crate::wire::SdmmcUnregisterVmoResponse>,
530            ___E,
531        > for SdmmcUnregisterVmoResponse
532    where
533        ___E: ::fidl_next::Encoder + ?Sized,
534        SdmmcUnregisterVmoResponse:
535            ::fidl_next::Encode<crate::wire::SdmmcUnregisterVmoResponse, ___E>,
536    {
537        #[inline]
538        fn encode_option(
539            this: ::core::option::Option<Self>,
540            encoder: &mut ___E,
541            out: &mut ::core::mem::MaybeUninit<
542                ::fidl_next::wire::Box<'static, crate::wire::SdmmcUnregisterVmoResponse>,
543            >,
544            _: (),
545        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
546            if let Some(inner) = this {
547                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
548                ::fidl_next::wire::Box::encode_present(out);
549            } else {
550                ::fidl_next::wire::Box::encode_absent(out);
551            }
552
553            Ok(())
554        }
555    }
556
557    impl ::fidl_next::FromWire<crate::wire::SdmmcUnregisterVmoResponse> for SdmmcUnregisterVmoResponse {
558        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
559            crate::wire::SdmmcUnregisterVmoResponse,
560            Self,
561        > = unsafe {
562            ::fidl_next::CopyOptimization::enable_if(
563                true && <::fidl_next::fuchsia::zx::Vmo as ::fidl_next::FromWire<
564                    ::fidl_next::wire::fuchsia::Vmo,
565                >>::COPY_OPTIMIZATION
566                    .is_enabled(),
567            )
568        };
569
570        #[inline]
571        fn from_wire(wire: crate::wire::SdmmcUnregisterVmoResponse) -> Self {
572            Self { vmo: ::fidl_next::FromWire::from_wire(wire.vmo) }
573        }
574    }
575
576    #[derive(Debug, PartialEq)]
577    pub enum SdmmcBuffer {
578        VmoId(u32),
579
580        Vmo(::fidl_next::fuchsia::zx::Vmo),
581    }
582
583    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcBuffer, ___E> for SdmmcBuffer
584    where
585        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
586        ___E: ::fidl_next::fuchsia::HandleEncoder,
587    {
588        #[inline]
589        fn encode(
590            self,
591            encoder: &mut ___E,
592            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcBuffer>,
593            _: (),
594        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
595            ::fidl_next::munge!(let crate::wire::SdmmcBuffer { raw, _phantom: _ } = out);
596
597            match self {
598                Self::VmoId(value) => ::fidl_next::wire::Union::encode_as_static::<
599                    ___E,
600                    ::fidl_next::wire::Uint32,
601                >(value, 1, encoder, raw, ())?,
602
603                Self::Vmo(value) => ::fidl_next::wire::Union::encode_as_static::<
604                    ___E,
605                    ::fidl_next::wire::fuchsia::Vmo,
606                >(value, 2, encoder, raw, ())?,
607            }
608
609            Ok(())
610        }
611    }
612
613    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::SdmmcBuffer, ___E> for SdmmcBuffer
614    where
615        ___E: ?Sized,
616        SdmmcBuffer: ::fidl_next::Encode<crate::wire::SdmmcBuffer, ___E>,
617    {
618        #[inline]
619        fn encode_option(
620            this: ::core::option::Option<Self>,
621            encoder: &mut ___E,
622            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::SdmmcBuffer>,
623            _: (),
624        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
625            ::fidl_next::munge!(let crate::wire_optional::SdmmcBuffer { raw, _phantom: _ } = &mut *out);
626
627            if let Some(inner) = this {
628                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
629                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
630            } else {
631                ::fidl_next::wire::Union::encode_absent(raw);
632            }
633
634            Ok(())
635        }
636    }
637
638    impl ::fidl_next::FromWire<crate::wire::SdmmcBuffer> for SdmmcBuffer {
639        #[inline]
640        fn from_wire(wire: crate::wire::SdmmcBuffer) -> Self {
641            let wire = ::core::mem::ManuallyDrop::new(wire);
642            match wire.raw.ordinal() {
643                1 => Self::VmoId(::fidl_next::FromWire::from_wire(unsafe {
644                    wire.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
645                })),
646
647                2 => Self::Vmo(::fidl_next::FromWire::from_wire(unsafe {
648                    wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
649                })),
650
651                _ => unsafe { ::core::hint::unreachable_unchecked() },
652            }
653        }
654    }
655
656    impl ::fidl_next::FromWireOption<crate::wire_optional::SdmmcBuffer> for SdmmcBuffer {
657        #[inline]
658        fn from_wire_option(
659            wire: crate::wire_optional::SdmmcBuffer,
660        ) -> ::core::option::Option<Self> {
661            if let Some(inner) = wire.into_option() {
662                Some(::fidl_next::FromWire::from_wire(inner))
663            } else {
664                None
665            }
666        }
667    }
668
669    impl ::fidl_next::FromWireOption<crate::wire_optional::SdmmcBuffer> for Box<SdmmcBuffer> {
670        #[inline]
671        fn from_wire_option(
672            wire: crate::wire_optional::SdmmcBuffer,
673        ) -> ::core::option::Option<Self> {
674            <
675            SdmmcBuffer as ::fidl_next::FromWireOption<crate::wire_optional::SdmmcBuffer>
676        >::from_wire_option(wire).map(Box::new)
677        }
678    }
679
680    #[derive(Debug, PartialEq)]
681    #[repr(C)]
682    pub struct SdmmcBufferRegion {
683        pub buffer: crate::natural::SdmmcBuffer,
684
685        pub offset: u64,
686
687        pub size: u64,
688    }
689
690    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcBufferRegion, ___E> for SdmmcBufferRegion
691    where
692        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
693        ___E: ::fidl_next::fuchsia::HandleEncoder,
694    {
695        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
696            Self,
697            crate::wire::SdmmcBufferRegion,
698        > = unsafe {
699            ::fidl_next::CopyOptimization::enable_if(
700            true
701
702                && <
703                    crate::natural::SdmmcBuffer as ::fidl_next::Encode<crate::wire::SdmmcBuffer, ___E>
704                >::COPY_OPTIMIZATION.is_enabled()
705
706                && <
707                    u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
708                >::COPY_OPTIMIZATION.is_enabled()
709
710                && <
711                    u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
712                >::COPY_OPTIMIZATION.is_enabled()
713
714        )
715        };
716
717        #[inline]
718        fn encode(
719            self,
720            encoder_: &mut ___E,
721            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcBufferRegion>,
722            _: (),
723        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
724            ::fidl_next::munge! {
725                let crate::wire::SdmmcBufferRegion {
726                    buffer,
727                    offset,
728                    size,
729
730                } = out_;
731            }
732
733            ::fidl_next::Encode::encode(self.buffer, encoder_, buffer, ())?;
734
735            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buffer.as_mut_ptr()) };
736
737            ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
738
739            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(offset.as_mut_ptr()) };
740
741            ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
742
743            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(size.as_mut_ptr()) };
744
745            Ok(())
746        }
747    }
748
749    unsafe impl<___E>
750        ::fidl_next::EncodeOption<
751            ::fidl_next::wire::Box<'static, crate::wire::SdmmcBufferRegion>,
752            ___E,
753        > for SdmmcBufferRegion
754    where
755        ___E: ::fidl_next::Encoder + ?Sized,
756        SdmmcBufferRegion: ::fidl_next::Encode<crate::wire::SdmmcBufferRegion, ___E>,
757    {
758        #[inline]
759        fn encode_option(
760            this: ::core::option::Option<Self>,
761            encoder: &mut ___E,
762            out: &mut ::core::mem::MaybeUninit<
763                ::fidl_next::wire::Box<'static, crate::wire::SdmmcBufferRegion>,
764            >,
765            _: (),
766        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
767            if let Some(inner) = this {
768                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
769                ::fidl_next::wire::Box::encode_present(out);
770            } else {
771                ::fidl_next::wire::Box::encode_absent(out);
772            }
773
774            Ok(())
775        }
776    }
777
778    impl ::fidl_next::FromWire<crate::wire::SdmmcBufferRegion> for SdmmcBufferRegion {
779        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
780            crate::wire::SdmmcBufferRegion,
781            Self,
782        > = unsafe {
783            ::fidl_next::CopyOptimization::enable_if(
784                true && <crate::natural::SdmmcBuffer as ::fidl_next::FromWire<
785                    crate::wire::SdmmcBuffer,
786                >>::COPY_OPTIMIZATION
787                    .is_enabled()
788                    && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
789                        .is_enabled()
790                    && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
791                        .is_enabled(),
792            )
793        };
794
795        #[inline]
796        fn from_wire(wire: crate::wire::SdmmcBufferRegion) -> Self {
797            Self {
798                buffer: ::fidl_next::FromWire::from_wire(wire.buffer),
799
800                offset: ::fidl_next::FromWire::from_wire(wire.offset),
801
802                size: ::fidl_next::FromWire::from_wire(wire.size),
803            }
804        }
805    }
806
807    #[derive(Debug, PartialEq)]
808    pub struct SdmmcReq {
809        pub cmd_idx: u32,
810
811        pub cmd_flags: u32,
812
813        pub arg: u32,
814
815        pub blocksize: u32,
816
817        pub suppress_error_messages: bool,
818
819        pub client_id: u8,
820
821        pub use_inline_crypto: bool,
822
823        pub slot: u8,
824
825        pub dun: u32,
826
827        pub buffers: ::std::vec::Vec<crate::natural::SdmmcBufferRegion>,
828    }
829
830    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcReq<'static>, ___E> for SdmmcReq
831    where
832        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
833        ___E: ::fidl_next::Encoder,
834        ___E: ::fidl_next::fuchsia::HandleEncoder,
835    {
836        #[inline]
837        fn encode(
838            self,
839            encoder_: &mut ___E,
840            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcReq<'static>>,
841            _: (),
842        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
843            ::fidl_next::munge! {
844                let crate::wire::SdmmcReq {
845                    cmd_idx,
846                    cmd_flags,
847                    arg,
848                    blocksize,
849                    suppress_error_messages,
850                    client_id,
851                    use_inline_crypto,
852                    slot,
853                    dun,
854                    buffers,
855
856                } = out_;
857            }
858
859            ::fidl_next::Encode::encode(self.cmd_idx, encoder_, cmd_idx, ())?;
860
861            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(cmd_idx.as_mut_ptr()) };
862
863            ::fidl_next::Encode::encode(self.cmd_flags, encoder_, cmd_flags, ())?;
864
865            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(cmd_flags.as_mut_ptr()) };
866
867            ::fidl_next::Encode::encode(self.arg, encoder_, arg, ())?;
868
869            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(arg.as_mut_ptr()) };
870
871            ::fidl_next::Encode::encode(self.blocksize, encoder_, blocksize, ())?;
872
873            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(blocksize.as_mut_ptr()) };
874
875            ::fidl_next::Encode::encode(
876                self.suppress_error_messages,
877                encoder_,
878                suppress_error_messages,
879                (),
880            )?;
881
882            let mut _field =
883                unsafe { ::fidl_next::Slot::new_unchecked(suppress_error_messages.as_mut_ptr()) };
884
885            ::fidl_next::Encode::encode(self.client_id, encoder_, client_id, ())?;
886
887            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client_id.as_mut_ptr()) };
888
889            ::fidl_next::Encode::encode(self.use_inline_crypto, encoder_, use_inline_crypto, ())?;
890
891            let mut _field =
892                unsafe { ::fidl_next::Slot::new_unchecked(use_inline_crypto.as_mut_ptr()) };
893
894            ::fidl_next::Encode::encode(self.slot, encoder_, slot, ())?;
895
896            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(slot.as_mut_ptr()) };
897
898            ::fidl_next::Encode::encode(self.dun, encoder_, dun, ())?;
899
900            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dun.as_mut_ptr()) };
901
902            ::fidl_next::Encode::encode(self.buffers, encoder_, buffers, (4294967295, ()))?;
903
904            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(buffers.as_mut_ptr()) };
905            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
906
907            Ok(())
908        }
909    }
910
911    unsafe impl<___E>
912        ::fidl_next::EncodeOption<
913            ::fidl_next::wire::Box<'static, crate::wire::SdmmcReq<'static>>,
914            ___E,
915        > for SdmmcReq
916    where
917        ___E: ::fidl_next::Encoder + ?Sized,
918        SdmmcReq: ::fidl_next::Encode<crate::wire::SdmmcReq<'static>, ___E>,
919    {
920        #[inline]
921        fn encode_option(
922            this: ::core::option::Option<Self>,
923            encoder: &mut ___E,
924            out: &mut ::core::mem::MaybeUninit<
925                ::fidl_next::wire::Box<'static, crate::wire::SdmmcReq<'static>>,
926            >,
927            _: (),
928        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
929            if let Some(inner) = this {
930                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
931                ::fidl_next::wire::Box::encode_present(out);
932            } else {
933                ::fidl_next::wire::Box::encode_absent(out);
934            }
935
936            Ok(())
937        }
938    }
939
940    impl<'de> ::fidl_next::FromWire<crate::wire::SdmmcReq<'de>> for SdmmcReq {
941        #[inline]
942        fn from_wire(wire: crate::wire::SdmmcReq<'de>) -> Self {
943            Self {
944                cmd_idx: ::fidl_next::FromWire::from_wire(wire.cmd_idx),
945
946                cmd_flags: ::fidl_next::FromWire::from_wire(wire.cmd_flags),
947
948                arg: ::fidl_next::FromWire::from_wire(wire.arg),
949
950                blocksize: ::fidl_next::FromWire::from_wire(wire.blocksize),
951
952                suppress_error_messages: ::fidl_next::FromWire::from_wire(
953                    wire.suppress_error_messages,
954                ),
955
956                client_id: ::fidl_next::FromWire::from_wire(wire.client_id),
957
958                use_inline_crypto: ::fidl_next::FromWire::from_wire(wire.use_inline_crypto),
959
960                slot: ::fidl_next::FromWire::from_wire(wire.slot),
961
962                dun: ::fidl_next::FromWire::from_wire(wire.dun),
963
964                buffers: ::fidl_next::FromWire::from_wire(wire.buffers),
965            }
966        }
967    }
968
969    #[derive(Debug, PartialEq)]
970    pub struct SdmmcRequestRequest {
971        pub reqs: ::std::vec::Vec<crate::natural::SdmmcReq>,
972    }
973
974    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcRequestRequest<'static>, ___E>
975        for SdmmcRequestRequest
976    where
977        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
978        ___E: ::fidl_next::Encoder,
979        ___E: ::fidl_next::fuchsia::HandleEncoder,
980    {
981        #[inline]
982        fn encode(
983            self,
984            encoder_: &mut ___E,
985            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRequestRequest<'static>>,
986            _: (),
987        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
988            ::fidl_next::munge! {
989                let crate::wire::SdmmcRequestRequest {
990                    reqs,
991
992                } = out_;
993            }
994
995            ::fidl_next::Encode::encode(self.reqs, encoder_, reqs, (4294967295, ()))?;
996
997            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(reqs.as_mut_ptr()) };
998            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
999
1000            Ok(())
1001        }
1002    }
1003
1004    unsafe impl<___E>
1005        ::fidl_next::EncodeOption<
1006            ::fidl_next::wire::Box<'static, crate::wire::SdmmcRequestRequest<'static>>,
1007            ___E,
1008        > for SdmmcRequestRequest
1009    where
1010        ___E: ::fidl_next::Encoder + ?Sized,
1011        SdmmcRequestRequest: ::fidl_next::Encode<crate::wire::SdmmcRequestRequest<'static>, ___E>,
1012    {
1013        #[inline]
1014        fn encode_option(
1015            this: ::core::option::Option<Self>,
1016            encoder: &mut ___E,
1017            out: &mut ::core::mem::MaybeUninit<
1018                ::fidl_next::wire::Box<'static, crate::wire::SdmmcRequestRequest<'static>>,
1019            >,
1020            _: (),
1021        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1022            if let Some(inner) = this {
1023                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1024                ::fidl_next::wire::Box::encode_present(out);
1025            } else {
1026                ::fidl_next::wire::Box::encode_absent(out);
1027            }
1028
1029            Ok(())
1030        }
1031    }
1032
1033    impl<'de> ::fidl_next::FromWire<crate::wire::SdmmcRequestRequest<'de>> for SdmmcRequestRequest {
1034        #[inline]
1035        fn from_wire(wire: crate::wire::SdmmcRequestRequest<'de>) -> Self {
1036            Self { reqs: ::fidl_next::FromWire::from_wire(wire.reqs) }
1037        }
1038    }
1039}
1040
1041pub mod wire {
1042
1043    pub use fidl_next_common_fuchsia_hardware_sdmmc::wire::*;
1044
1045    /// The wire type corresponding to [`CqhciInitializeCommandQueueingRequest`].
1046    #[derive(Debug)]
1047    #[repr(C)]
1048    pub struct CqhciInitializeCommandQueueingRequest {
1049        pub virtual_interrupt: ::fidl_next::wire::fuchsia::Interrupt,
1050
1051        pub virtual_interrupt_lifeline: ::fidl_next::wire::fuchsia::EventPair,
1052    }
1053
1054    static_assertions::const_assert_eq!(
1055        std::mem::size_of::<CqhciInitializeCommandQueueingRequest>(),
1056        8
1057    );
1058    static_assertions::const_assert_eq!(
1059        std::mem::align_of::<CqhciInitializeCommandQueueingRequest>(),
1060        4
1061    );
1062
1063    static_assertions::const_assert_eq!(
1064        std::mem::offset_of!(CqhciInitializeCommandQueueingRequest, virtual_interrupt),
1065        0
1066    );
1067
1068    static_assertions::const_assert_eq!(
1069        std::mem::offset_of!(CqhciInitializeCommandQueueingRequest, virtual_interrupt_lifeline),
1070        4
1071    );
1072
1073    impl ::fidl_next::Constrained for CqhciInitializeCommandQueueingRequest {
1074        type Constraint = ();
1075
1076        fn validate(
1077            _: ::fidl_next::Slot<'_, Self>,
1078            _: Self::Constraint,
1079        ) -> Result<(), ::fidl_next::ValidationError> {
1080            Ok(())
1081        }
1082    }
1083
1084    unsafe impl ::fidl_next::Wire for CqhciInitializeCommandQueueingRequest {
1085        type Narrowed<'de> = CqhciInitializeCommandQueueingRequest;
1086
1087        #[inline]
1088        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1089            ::fidl_next::munge! {
1090                let Self {
1091                    virtual_interrupt,
1092                    virtual_interrupt_lifeline,
1093
1094                } = &mut *out_;
1095            }
1096
1097            ::fidl_next::Wire::zero_padding(virtual_interrupt);
1098
1099            ::fidl_next::Wire::zero_padding(virtual_interrupt_lifeline);
1100        }
1101    }
1102
1103    unsafe impl<___D> ::fidl_next::Decode<___D> for CqhciInitializeCommandQueueingRequest
1104    where
1105        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1106        ___D: ::fidl_next::fuchsia::HandleDecoder,
1107    {
1108        fn decode(
1109            slot_: ::fidl_next::Slot<'_, Self>,
1110            decoder_: &mut ___D,
1111            _: (),
1112        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1113            ::fidl_next::munge! {
1114                let Self {
1115                    mut virtual_interrupt,
1116                    mut virtual_interrupt_lifeline,
1117
1118                } = slot_;
1119            }
1120
1121            let _field = virtual_interrupt.as_mut();
1122
1123            ::fidl_next::Decode::decode(virtual_interrupt.as_mut(), decoder_, ())?;
1124
1125            let _field = virtual_interrupt_lifeline.as_mut();
1126
1127            ::fidl_next::Decode::decode(virtual_interrupt_lifeline.as_mut(), decoder_, ())?;
1128
1129            Ok(())
1130        }
1131    }
1132
1133    impl ::fidl_next::IntoNatural for CqhciInitializeCommandQueueingRequest {
1134        type Natural = crate::natural::CqhciInitializeCommandQueueingRequest;
1135    }
1136
1137    /// The wire type corresponding to [`CqhciInitializeCommandQueueingResponse`].
1138    #[derive(Debug)]
1139    #[repr(C)]
1140    pub struct CqhciInitializeCommandQueueingResponse {
1141        pub cqhci_mmio: ::fidl_next::wire::fuchsia::Vmo,
1142
1143        pub cqhci_mmio_offset: ::fidl_next::wire::Uint64,
1144
1145        pub sdhci_mmio: ::fidl_next::wire::fuchsia::Vmo,
1146
1147        pub sdhci_mmio_offset: ::fidl_next::wire::Uint64,
1148
1149        pub bti: ::fidl_next::wire::fuchsia::Bti,
1150
1151        pub interrupt: ::fidl_next::wire::fuchsia::Interrupt,
1152    }
1153
1154    static_assertions::const_assert_eq!(
1155        std::mem::size_of::<CqhciInitializeCommandQueueingResponse>(),
1156        40
1157    );
1158    static_assertions::const_assert_eq!(
1159        std::mem::align_of::<CqhciInitializeCommandQueueingResponse>(),
1160        8
1161    );
1162
1163    static_assertions::const_assert_eq!(
1164        std::mem::offset_of!(CqhciInitializeCommandQueueingResponse, cqhci_mmio),
1165        0
1166    );
1167
1168    static_assertions::const_assert_eq!(
1169        std::mem::offset_of!(CqhciInitializeCommandQueueingResponse, cqhci_mmio_offset),
1170        8
1171    );
1172
1173    static_assertions::const_assert_eq!(
1174        std::mem::offset_of!(CqhciInitializeCommandQueueingResponse, sdhci_mmio),
1175        16
1176    );
1177
1178    static_assertions::const_assert_eq!(
1179        std::mem::offset_of!(CqhciInitializeCommandQueueingResponse, sdhci_mmio_offset),
1180        24
1181    );
1182
1183    static_assertions::const_assert_eq!(
1184        std::mem::offset_of!(CqhciInitializeCommandQueueingResponse, bti),
1185        32
1186    );
1187
1188    static_assertions::const_assert_eq!(
1189        std::mem::offset_of!(CqhciInitializeCommandQueueingResponse, interrupt),
1190        36
1191    );
1192
1193    impl ::fidl_next::Constrained for CqhciInitializeCommandQueueingResponse {
1194        type Constraint = ();
1195
1196        fn validate(
1197            _: ::fidl_next::Slot<'_, Self>,
1198            _: Self::Constraint,
1199        ) -> Result<(), ::fidl_next::ValidationError> {
1200            Ok(())
1201        }
1202    }
1203
1204    unsafe impl ::fidl_next::Wire for CqhciInitializeCommandQueueingResponse {
1205        type Narrowed<'de> = CqhciInitializeCommandQueueingResponse;
1206
1207        #[inline]
1208        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1209            ::fidl_next::munge! {
1210                let Self {
1211                    cqhci_mmio,
1212                    cqhci_mmio_offset,
1213                    sdhci_mmio,
1214                    sdhci_mmio_offset,
1215                    bti,
1216                    interrupt,
1217
1218                } = &mut *out_;
1219            }
1220
1221            ::fidl_next::Wire::zero_padding(cqhci_mmio);
1222
1223            ::fidl_next::Wire::zero_padding(cqhci_mmio_offset);
1224
1225            ::fidl_next::Wire::zero_padding(sdhci_mmio);
1226
1227            ::fidl_next::Wire::zero_padding(sdhci_mmio_offset);
1228
1229            ::fidl_next::Wire::zero_padding(bti);
1230
1231            ::fidl_next::Wire::zero_padding(interrupt);
1232
1233            unsafe {
1234                out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
1235            }
1236
1237            unsafe {
1238                out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
1239            }
1240        }
1241    }
1242
1243    unsafe impl<___D> ::fidl_next::Decode<___D> for CqhciInitializeCommandQueueingResponse
1244    where
1245        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1246        ___D: ::fidl_next::fuchsia::HandleDecoder,
1247    {
1248        fn decode(
1249            slot_: ::fidl_next::Slot<'_, Self>,
1250            decoder_: &mut ___D,
1251            _: (),
1252        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1253            if slot_.as_bytes()[20..24] != [0u8; 4] {
1254                return Err(::fidl_next::DecodeError::InvalidPadding);
1255            }
1256
1257            if slot_.as_bytes()[4..8] != [0u8; 4] {
1258                return Err(::fidl_next::DecodeError::InvalidPadding);
1259            }
1260
1261            ::fidl_next::munge! {
1262                let Self {
1263                    mut cqhci_mmio,
1264                    mut cqhci_mmio_offset,
1265                    mut sdhci_mmio,
1266                    mut sdhci_mmio_offset,
1267                    mut bti,
1268                    mut interrupt,
1269
1270                } = slot_;
1271            }
1272
1273            let _field = cqhci_mmio.as_mut();
1274
1275            ::fidl_next::Decode::decode(cqhci_mmio.as_mut(), decoder_, ())?;
1276
1277            let _field = cqhci_mmio_offset.as_mut();
1278
1279            ::fidl_next::Decode::decode(cqhci_mmio_offset.as_mut(), decoder_, ())?;
1280
1281            let _field = sdhci_mmio.as_mut();
1282
1283            ::fidl_next::Decode::decode(sdhci_mmio.as_mut(), decoder_, ())?;
1284
1285            let _field = sdhci_mmio_offset.as_mut();
1286
1287            ::fidl_next::Decode::decode(sdhci_mmio_offset.as_mut(), decoder_, ())?;
1288
1289            let _field = bti.as_mut();
1290
1291            ::fidl_next::Decode::decode(bti.as_mut(), decoder_, ())?;
1292
1293            let _field = interrupt.as_mut();
1294
1295            ::fidl_next::Decode::decode(interrupt.as_mut(), decoder_, ())?;
1296
1297            Ok(())
1298        }
1299    }
1300
1301    impl ::fidl_next::IntoNatural for CqhciInitializeCommandQueueingResponse {
1302        type Natural = crate::natural::CqhciInitializeCommandQueueingResponse;
1303    }
1304
1305    /// The wire type corresponding to [`SdmmcRegisterInBandInterruptRequest`].
1306    #[derive(Debug)]
1307    #[repr(C)]
1308    pub struct SdmmcRegisterInBandInterruptRequest {
1309        pub interrupt_cb:
1310            ::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::wire::DriverChannel>,
1311    }
1312
1313    static_assertions::const_assert_eq!(
1314        std::mem::size_of::<SdmmcRegisterInBandInterruptRequest>(),
1315        4
1316    );
1317    static_assertions::const_assert_eq!(
1318        std::mem::align_of::<SdmmcRegisterInBandInterruptRequest>(),
1319        4
1320    );
1321
1322    static_assertions::const_assert_eq!(
1323        std::mem::offset_of!(SdmmcRegisterInBandInterruptRequest, interrupt_cb),
1324        0
1325    );
1326
1327    impl ::fidl_next::Constrained for SdmmcRegisterInBandInterruptRequest {
1328        type Constraint = ();
1329
1330        fn validate(
1331            _: ::fidl_next::Slot<'_, Self>,
1332            _: Self::Constraint,
1333        ) -> Result<(), ::fidl_next::ValidationError> {
1334            Ok(())
1335        }
1336    }
1337
1338    unsafe impl ::fidl_next::Wire for SdmmcRegisterInBandInterruptRequest {
1339        type Narrowed<'de> = SdmmcRegisterInBandInterruptRequest;
1340
1341        #[inline]
1342        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1343            ::fidl_next::munge! {
1344                let Self {
1345                    interrupt_cb,
1346
1347                } = &mut *out_;
1348            }
1349
1350            ::fidl_next::Wire::zero_padding(interrupt_cb);
1351        }
1352    }
1353
1354    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcRegisterInBandInterruptRequest
1355    where
1356        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1357        ___D: ::fidl_next::fuchsia::HandleDecoder,
1358    {
1359        fn decode(
1360            slot_: ::fidl_next::Slot<'_, Self>,
1361            decoder_: &mut ___D,
1362            _: (),
1363        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1364            ::fidl_next::munge! {
1365                let Self {
1366                    mut interrupt_cb,
1367
1368                } = slot_;
1369            }
1370
1371            let _field = interrupt_cb.as_mut();
1372
1373            ::fidl_next::Decode::decode(interrupt_cb.as_mut(), decoder_, ())?;
1374
1375            Ok(())
1376        }
1377    }
1378
1379    impl ::fidl_next::IntoNatural for SdmmcRegisterInBandInterruptRequest {
1380        type Natural = crate::natural::SdmmcRegisterInBandInterruptRequest;
1381    }
1382
1383    /// The wire type corresponding to [`SdmmcRegisterVmoRequest`].
1384    #[derive(Debug)]
1385    #[repr(C)]
1386    pub struct SdmmcRegisterVmoRequest {
1387        pub vmo_id: ::fidl_next::wire::Uint32,
1388
1389        pub client_id: u8,
1390
1391        pub vmo: ::fidl_next::wire::fuchsia::Vmo,
1392
1393        pub offset: ::fidl_next::wire::Uint64,
1394
1395        pub size: ::fidl_next::wire::Uint64,
1396
1397        pub vmo_rights: crate::wire::SdmmcVmoRight,
1398    }
1399
1400    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcRegisterVmoRequest>(), 40);
1401    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcRegisterVmoRequest>(), 8);
1402
1403    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcRegisterVmoRequest, vmo_id), 0);
1404
1405    static_assertions::const_assert_eq!(
1406        std::mem::offset_of!(SdmmcRegisterVmoRequest, client_id),
1407        4
1408    );
1409
1410    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcRegisterVmoRequest, vmo), 8);
1411
1412    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcRegisterVmoRequest, offset), 16);
1413
1414    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcRegisterVmoRequest, size), 24);
1415
1416    static_assertions::const_assert_eq!(
1417        std::mem::offset_of!(SdmmcRegisterVmoRequest, vmo_rights),
1418        32
1419    );
1420
1421    impl ::fidl_next::Constrained for SdmmcRegisterVmoRequest {
1422        type Constraint = ();
1423
1424        fn validate(
1425            _: ::fidl_next::Slot<'_, Self>,
1426            _: Self::Constraint,
1427        ) -> Result<(), ::fidl_next::ValidationError> {
1428            Ok(())
1429        }
1430    }
1431
1432    unsafe impl ::fidl_next::Wire for SdmmcRegisterVmoRequest {
1433        type Narrowed<'de> = SdmmcRegisterVmoRequest;
1434
1435        #[inline]
1436        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1437            ::fidl_next::munge! {
1438                let Self {
1439                    vmo_id,
1440                    client_id,
1441                    vmo,
1442                    offset,
1443                    size,
1444                    vmo_rights,
1445
1446                } = &mut *out_;
1447            }
1448
1449            ::fidl_next::Wire::zero_padding(vmo_id);
1450
1451            ::fidl_next::Wire::zero_padding(client_id);
1452
1453            ::fidl_next::Wire::zero_padding(vmo);
1454
1455            ::fidl_next::Wire::zero_padding(offset);
1456
1457            ::fidl_next::Wire::zero_padding(size);
1458
1459            ::fidl_next::Wire::zero_padding(vmo_rights);
1460
1461            unsafe {
1462                out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
1463            }
1464
1465            unsafe {
1466                out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
1467            }
1468
1469            unsafe {
1470                out_.as_mut_ptr().cast::<u8>().add(5).write_bytes(0, 3);
1471            }
1472        }
1473    }
1474
1475    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcRegisterVmoRequest
1476    where
1477        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1478        ___D: ::fidl_next::fuchsia::HandleDecoder,
1479    {
1480        fn decode(
1481            slot_: ::fidl_next::Slot<'_, Self>,
1482            decoder_: &mut ___D,
1483            _: (),
1484        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1485            if slot_.as_bytes()[36..40] != [0u8; 4] {
1486                return Err(::fidl_next::DecodeError::InvalidPadding);
1487            }
1488
1489            if slot_.as_bytes()[12..16] != [0u8; 4] {
1490                return Err(::fidl_next::DecodeError::InvalidPadding);
1491            }
1492
1493            if slot_.as_bytes()[5..8] != [0u8; 3] {
1494                return Err(::fidl_next::DecodeError::InvalidPadding);
1495            }
1496
1497            ::fidl_next::munge! {
1498                let Self {
1499                    mut vmo_id,
1500                    mut client_id,
1501                    mut vmo,
1502                    mut offset,
1503                    mut size,
1504                    mut vmo_rights,
1505
1506                } = slot_;
1507            }
1508
1509            let _field = vmo_id.as_mut();
1510
1511            ::fidl_next::Decode::decode(vmo_id.as_mut(), decoder_, ())?;
1512
1513            let _field = client_id.as_mut();
1514
1515            ::fidl_next::Decode::decode(client_id.as_mut(), decoder_, ())?;
1516
1517            let _field = vmo.as_mut();
1518
1519            ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
1520
1521            let _field = offset.as_mut();
1522
1523            ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
1524
1525            let _field = size.as_mut();
1526
1527            ::fidl_next::Decode::decode(size.as_mut(), decoder_, ())?;
1528
1529            let _field = vmo_rights.as_mut();
1530
1531            ::fidl_next::Decode::decode(vmo_rights.as_mut(), decoder_, ())?;
1532
1533            Ok(())
1534        }
1535    }
1536
1537    impl ::fidl_next::IntoNatural for SdmmcRegisterVmoRequest {
1538        type Natural = crate::natural::SdmmcRegisterVmoRequest;
1539    }
1540
1541    /// The wire type corresponding to [`SdmmcUnregisterVmoResponse`].
1542    #[derive(Debug)]
1543    #[repr(C)]
1544    pub struct SdmmcUnregisterVmoResponse {
1545        pub vmo: ::fidl_next::wire::fuchsia::Vmo,
1546    }
1547
1548    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcUnregisterVmoResponse>(), 4);
1549    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcUnregisterVmoResponse>(), 4);
1550
1551    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcUnregisterVmoResponse, vmo), 0);
1552
1553    impl ::fidl_next::Constrained for SdmmcUnregisterVmoResponse {
1554        type Constraint = ();
1555
1556        fn validate(
1557            _: ::fidl_next::Slot<'_, Self>,
1558            _: Self::Constraint,
1559        ) -> Result<(), ::fidl_next::ValidationError> {
1560            Ok(())
1561        }
1562    }
1563
1564    unsafe impl ::fidl_next::Wire for SdmmcUnregisterVmoResponse {
1565        type Narrowed<'de> = SdmmcUnregisterVmoResponse;
1566
1567        #[inline]
1568        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1569            ::fidl_next::munge! {
1570                let Self {
1571                    vmo,
1572
1573                } = &mut *out_;
1574            }
1575
1576            ::fidl_next::Wire::zero_padding(vmo);
1577        }
1578    }
1579
1580    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcUnregisterVmoResponse
1581    where
1582        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1583        ___D: ::fidl_next::fuchsia::HandleDecoder,
1584    {
1585        fn decode(
1586            slot_: ::fidl_next::Slot<'_, Self>,
1587            decoder_: &mut ___D,
1588            _: (),
1589        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1590            ::fidl_next::munge! {
1591                let Self {
1592                    mut vmo,
1593
1594                } = slot_;
1595            }
1596
1597            let _field = vmo.as_mut();
1598
1599            ::fidl_next::Decode::decode(vmo.as_mut(), decoder_, ())?;
1600
1601            Ok(())
1602        }
1603    }
1604
1605    impl ::fidl_next::IntoNatural for SdmmcUnregisterVmoResponse {
1606        type Natural = crate::natural::SdmmcUnregisterVmoResponse;
1607    }
1608
1609    /// The wire type corresponding to [`SdmmcBuffer`].
1610    #[repr(transparent)]
1611    pub struct SdmmcBuffer {
1612        pub(crate) raw: ::fidl_next::wire::Union,
1613        pub(crate) _phantom: ::core::marker::PhantomData<()>,
1614    }
1615
1616    impl Drop for SdmmcBuffer {
1617        fn drop(&mut self) {
1618            match self.raw.ordinal() {
1619                1 => {
1620                    let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint32>() };
1621                }
1622
1623                2 => {
1624                    let _ = unsafe {
1625                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
1626                    };
1627                }
1628
1629                _ => unsafe { ::core::hint::unreachable_unchecked() },
1630            }
1631        }
1632    }
1633
1634    impl ::fidl_next::Constrained for SdmmcBuffer {
1635        type Constraint = ();
1636
1637        fn validate(
1638            _: ::fidl_next::Slot<'_, Self>,
1639            _: Self::Constraint,
1640        ) -> Result<(), ::fidl_next::ValidationError> {
1641            Ok(())
1642        }
1643    }
1644
1645    unsafe impl ::fidl_next::Wire for SdmmcBuffer {
1646        type Narrowed<'de> = SdmmcBuffer;
1647
1648        #[inline]
1649        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1650            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
1651            ::fidl_next::wire::Union::zero_padding(raw);
1652        }
1653    }
1654
1655    pub mod sdmmc_buffer {
1656        pub enum Ref<'de> {
1657            VmoId(&'de ::fidl_next::wire::Uint32),
1658
1659            Vmo(&'de ::fidl_next::wire::fuchsia::Vmo),
1660        }
1661
1662        pub enum Value {
1663            VmoId(::fidl_next::wire::Uint32),
1664
1665            Vmo(::fidl_next::wire::fuchsia::Vmo),
1666        }
1667    }
1668
1669    impl SdmmcBuffer {
1670        pub fn as_ref(&self) -> crate::wire::sdmmc_buffer::Ref<'_> {
1671            match self.raw.ordinal() {
1672                1 => crate::wire::sdmmc_buffer::Ref::VmoId(unsafe {
1673                    self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>()
1674                }),
1675
1676                2 => crate::wire::sdmmc_buffer::Ref::Vmo(unsafe {
1677                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
1678                }),
1679
1680                _ => unsafe { ::core::hint::unreachable_unchecked() },
1681            }
1682        }
1683
1684        pub fn into_inner(self) -> crate::wire::sdmmc_buffer::Value {
1685            let this = ::core::mem::ManuallyDrop::new(self);
1686
1687            match this.raw.ordinal() {
1688                1 => crate::wire::sdmmc_buffer::Value::VmoId(unsafe {
1689                    this.raw.get().read_unchecked::<::fidl_next::wire::Uint32>()
1690                }),
1691
1692                2 => crate::wire::sdmmc_buffer::Value::Vmo(unsafe {
1693                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
1694                }),
1695
1696                _ => unsafe { ::core::hint::unreachable_unchecked() },
1697            }
1698        }
1699    }
1700
1701    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcBuffer
1702    where
1703        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1704        ___D: ::fidl_next::fuchsia::HandleDecoder,
1705    {
1706        fn decode(
1707            mut slot: ::fidl_next::Slot<'_, Self>,
1708            decoder: &mut ___D,
1709            _: (),
1710        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1711            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
1712            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
1713                1 => ::fidl_next::wire::Union::decode_as_static::<___D, ::fidl_next::wire::Uint32>(
1714                    raw,
1715                    decoder,
1716                    (),
1717                )?,
1718
1719                2 => ::fidl_next::wire::Union::decode_as_static::<
1720                    ___D,
1721                    ::fidl_next::wire::fuchsia::Vmo,
1722                >(raw, decoder, ())?,
1723
1724                ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
1725            }
1726
1727            Ok(())
1728        }
1729    }
1730
1731    impl ::core::fmt::Debug for SdmmcBuffer {
1732        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1733            match self.raw.ordinal() {
1734                1 => unsafe {
1735                    self.raw.get().deref_unchecked::<::fidl_next::wire::Uint32>().fmt(f)
1736                },
1737                2 => unsafe {
1738                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Vmo>().fmt(f)
1739                },
1740                _ => unsafe { ::core::hint::unreachable_unchecked() },
1741            }
1742        }
1743    }
1744
1745    impl ::fidl_next::IntoNatural for SdmmcBuffer {
1746        type Natural = crate::natural::SdmmcBuffer;
1747    }
1748
1749    /// The wire type corresponding to [`SdmmcBufferRegion`].
1750    #[derive(Debug)]
1751    #[repr(C)]
1752    pub struct SdmmcBufferRegion {
1753        pub buffer: crate::wire::SdmmcBuffer,
1754
1755        pub offset: ::fidl_next::wire::Uint64,
1756
1757        pub size: ::fidl_next::wire::Uint64,
1758    }
1759
1760    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcBufferRegion>(), 32);
1761    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcBufferRegion>(), 8);
1762
1763    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcBufferRegion, buffer), 0);
1764
1765    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcBufferRegion, offset), 16);
1766
1767    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcBufferRegion, size), 24);
1768
1769    impl ::fidl_next::Constrained for SdmmcBufferRegion {
1770        type Constraint = ();
1771
1772        fn validate(
1773            _: ::fidl_next::Slot<'_, Self>,
1774            _: Self::Constraint,
1775        ) -> Result<(), ::fidl_next::ValidationError> {
1776            Ok(())
1777        }
1778    }
1779
1780    unsafe impl ::fidl_next::Wire for SdmmcBufferRegion {
1781        type Narrowed<'de> = SdmmcBufferRegion;
1782
1783        #[inline]
1784        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1785            ::fidl_next::munge! {
1786                let Self {
1787                    buffer,
1788                    offset,
1789                    size,
1790
1791                } = &mut *out_;
1792            }
1793
1794            ::fidl_next::Wire::zero_padding(buffer);
1795
1796            ::fidl_next::Wire::zero_padding(offset);
1797
1798            ::fidl_next::Wire::zero_padding(size);
1799        }
1800    }
1801
1802    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcBufferRegion
1803    where
1804        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1805        ___D: ::fidl_next::fuchsia::HandleDecoder,
1806    {
1807        fn decode(
1808            slot_: ::fidl_next::Slot<'_, Self>,
1809            decoder_: &mut ___D,
1810            _: (),
1811        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1812            ::fidl_next::munge! {
1813                let Self {
1814                    mut buffer,
1815                    mut offset,
1816                    mut size,
1817
1818                } = slot_;
1819            }
1820
1821            let _field = buffer.as_mut();
1822
1823            ::fidl_next::Decode::decode(buffer.as_mut(), decoder_, ())?;
1824
1825            let _field = offset.as_mut();
1826
1827            ::fidl_next::Decode::decode(offset.as_mut(), decoder_, ())?;
1828
1829            let _field = size.as_mut();
1830
1831            ::fidl_next::Decode::decode(size.as_mut(), decoder_, ())?;
1832
1833            Ok(())
1834        }
1835    }
1836
1837    impl ::fidl_next::IntoNatural for SdmmcBufferRegion {
1838        type Natural = crate::natural::SdmmcBufferRegion;
1839    }
1840
1841    /// The wire type corresponding to [`SdmmcReq`].
1842    #[derive(Debug)]
1843    #[repr(C)]
1844    pub struct SdmmcReq<'de> {
1845        pub cmd_idx: ::fidl_next::wire::Uint32,
1846
1847        pub cmd_flags: ::fidl_next::wire::Uint32,
1848
1849        pub arg: ::fidl_next::wire::Uint32,
1850
1851        pub blocksize: ::fidl_next::wire::Uint32,
1852
1853        pub suppress_error_messages: bool,
1854
1855        pub client_id: u8,
1856
1857        pub use_inline_crypto: bool,
1858
1859        pub slot: u8,
1860
1861        pub dun: ::fidl_next::wire::Uint32,
1862
1863        pub buffers: ::fidl_next::wire::Vector<'de, crate::wire::SdmmcBufferRegion>,
1864    }
1865
1866    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcReq<'_>>(), 40);
1867    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcReq<'_>>(), 8);
1868
1869    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, cmd_idx), 0);
1870
1871    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, cmd_flags), 4);
1872
1873    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, arg), 8);
1874
1875    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, blocksize), 12);
1876
1877    static_assertions::const_assert_eq!(
1878        std::mem::offset_of!(SdmmcReq<'_>, suppress_error_messages),
1879        16
1880    );
1881
1882    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, client_id), 17);
1883
1884    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, use_inline_crypto), 18);
1885
1886    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, slot), 19);
1887
1888    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, dun), 20);
1889
1890    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcReq<'_>, buffers), 24);
1891
1892    impl ::fidl_next::Constrained for SdmmcReq<'_> {
1893        type Constraint = ();
1894
1895        fn validate(
1896            _: ::fidl_next::Slot<'_, Self>,
1897            _: Self::Constraint,
1898        ) -> Result<(), ::fidl_next::ValidationError> {
1899            Ok(())
1900        }
1901    }
1902
1903    unsafe impl ::fidl_next::Wire for SdmmcReq<'static> {
1904        type Narrowed<'de> = SdmmcReq<'de>;
1905
1906        #[inline]
1907        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1908            ::fidl_next::munge! {
1909                let Self {
1910                    cmd_idx,
1911                    cmd_flags,
1912                    arg,
1913                    blocksize,
1914                    suppress_error_messages,
1915                    client_id,
1916                    use_inline_crypto,
1917                    slot,
1918                    dun,
1919                    buffers,
1920
1921                } = &mut *out_;
1922            }
1923
1924            ::fidl_next::Wire::zero_padding(cmd_idx);
1925
1926            ::fidl_next::Wire::zero_padding(cmd_flags);
1927
1928            ::fidl_next::Wire::zero_padding(arg);
1929
1930            ::fidl_next::Wire::zero_padding(blocksize);
1931
1932            ::fidl_next::Wire::zero_padding(suppress_error_messages);
1933
1934            ::fidl_next::Wire::zero_padding(client_id);
1935
1936            ::fidl_next::Wire::zero_padding(use_inline_crypto);
1937
1938            ::fidl_next::Wire::zero_padding(slot);
1939
1940            ::fidl_next::Wire::zero_padding(dun);
1941
1942            ::fidl_next::Wire::zero_padding(buffers);
1943        }
1944    }
1945
1946    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SdmmcReq<'de>
1947    where
1948        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1949        ___D: ::fidl_next::Decoder<'de>,
1950        ___D: ::fidl_next::fuchsia::HandleDecoder,
1951    {
1952        fn decode(
1953            slot_: ::fidl_next::Slot<'_, Self>,
1954            decoder_: &mut ___D,
1955            _: (),
1956        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1957            ::fidl_next::munge! {
1958                let Self {
1959                    mut cmd_idx,
1960                    mut cmd_flags,
1961                    mut arg,
1962                    mut blocksize,
1963                    mut suppress_error_messages,
1964                    mut client_id,
1965                    mut use_inline_crypto,
1966                    mut slot,
1967                    mut dun,
1968                    mut buffers,
1969
1970                } = slot_;
1971            }
1972
1973            let _field = cmd_idx.as_mut();
1974
1975            ::fidl_next::Decode::decode(cmd_idx.as_mut(), decoder_, ())?;
1976
1977            let _field = cmd_flags.as_mut();
1978
1979            ::fidl_next::Decode::decode(cmd_flags.as_mut(), decoder_, ())?;
1980
1981            let _field = arg.as_mut();
1982
1983            ::fidl_next::Decode::decode(arg.as_mut(), decoder_, ())?;
1984
1985            let _field = blocksize.as_mut();
1986
1987            ::fidl_next::Decode::decode(blocksize.as_mut(), decoder_, ())?;
1988
1989            let _field = suppress_error_messages.as_mut();
1990
1991            ::fidl_next::Decode::decode(suppress_error_messages.as_mut(), decoder_, ())?;
1992
1993            let _field = client_id.as_mut();
1994
1995            ::fidl_next::Decode::decode(client_id.as_mut(), decoder_, ())?;
1996
1997            let _field = use_inline_crypto.as_mut();
1998
1999            ::fidl_next::Decode::decode(use_inline_crypto.as_mut(), decoder_, ())?;
2000
2001            let _field = slot.as_mut();
2002
2003            ::fidl_next::Decode::decode(slot.as_mut(), decoder_, ())?;
2004
2005            let _field = dun.as_mut();
2006
2007            ::fidl_next::Decode::decode(dun.as_mut(), decoder_, ())?;
2008
2009            let _field = buffers.as_mut();
2010            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2011            ::fidl_next::Decode::decode(buffers.as_mut(), decoder_, (4294967295, ()))?;
2012
2013            Ok(())
2014        }
2015    }
2016
2017    impl<'de> ::fidl_next::IntoNatural for SdmmcReq<'de> {
2018        type Natural = crate::natural::SdmmcReq;
2019    }
2020
2021    /// The wire type corresponding to [`SdmmcRequestRequest`].
2022    #[derive(Debug)]
2023    #[repr(C)]
2024    pub struct SdmmcRequestRequest<'de> {
2025        pub reqs: ::fidl_next::wire::Vector<'de, crate::wire::SdmmcReq<'de>>,
2026    }
2027
2028    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcRequestRequest<'_>>(), 16);
2029    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcRequestRequest<'_>>(), 8);
2030
2031    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcRequestRequest<'_>, reqs), 0);
2032
2033    impl ::fidl_next::Constrained for SdmmcRequestRequest<'_> {
2034        type Constraint = ();
2035
2036        fn validate(
2037            _: ::fidl_next::Slot<'_, Self>,
2038            _: Self::Constraint,
2039        ) -> Result<(), ::fidl_next::ValidationError> {
2040            Ok(())
2041        }
2042    }
2043
2044    unsafe impl ::fidl_next::Wire for SdmmcRequestRequest<'static> {
2045        type Narrowed<'de> = SdmmcRequestRequest<'de>;
2046
2047        #[inline]
2048        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2049            ::fidl_next::munge! {
2050                let Self {
2051                    reqs,
2052
2053                } = &mut *out_;
2054            }
2055
2056            ::fidl_next::Wire::zero_padding(reqs);
2057        }
2058    }
2059
2060    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SdmmcRequestRequest<'de>
2061    where
2062        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2063        ___D: ::fidl_next::Decoder<'de>,
2064        ___D: ::fidl_next::fuchsia::HandleDecoder,
2065    {
2066        fn decode(
2067            slot_: ::fidl_next::Slot<'_, Self>,
2068            decoder_: &mut ___D,
2069            _: (),
2070        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2071            ::fidl_next::munge! {
2072                let Self {
2073                    mut reqs,
2074
2075                } = slot_;
2076            }
2077
2078            let _field = reqs.as_mut();
2079            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
2080            ::fidl_next::Decode::decode(reqs.as_mut(), decoder_, (4294967295, ()))?;
2081
2082            Ok(())
2083        }
2084    }
2085
2086    impl<'de> ::fidl_next::IntoNatural for SdmmcRequestRequest<'de> {
2087        type Natural = crate::natural::SdmmcRequestRequest;
2088    }
2089}
2090
2091pub mod wire_optional {
2092
2093    pub use fidl_next_common_fuchsia_hardware_sdmmc::wire_optional::*;
2094
2095    #[repr(transparent)]
2096    pub struct SdmmcBuffer {
2097        pub(crate) raw: ::fidl_next::wire::Union,
2098        pub(crate) _phantom: ::core::marker::PhantomData<()>,
2099    }
2100
2101    impl ::fidl_next::Constrained for SdmmcBuffer {
2102        type Constraint = ();
2103
2104        fn validate(
2105            _: ::fidl_next::Slot<'_, Self>,
2106            _: Self::Constraint,
2107        ) -> Result<(), ::fidl_next::ValidationError> {
2108            Ok(())
2109        }
2110    }
2111
2112    unsafe impl ::fidl_next::Wire for SdmmcBuffer {
2113        type Narrowed<'de> = SdmmcBuffer;
2114
2115        #[inline]
2116        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2117            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2118            ::fidl_next::wire::Union::zero_padding(raw);
2119        }
2120    }
2121
2122    impl SdmmcBuffer {
2123        pub fn is_some(&self) -> bool {
2124            self.raw.is_some()
2125        }
2126
2127        pub fn is_none(&self) -> bool {
2128            self.raw.is_none()
2129        }
2130
2131        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::SdmmcBuffer> {
2132            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
2133        }
2134
2135        pub fn into_option(self) -> ::core::option::Option<crate::wire::SdmmcBuffer> {
2136            if self.is_some() {
2137                Some(crate::wire::SdmmcBuffer {
2138                    raw: self.raw,
2139                    _phantom: ::core::marker::PhantomData,
2140                })
2141            } else {
2142                None
2143            }
2144        }
2145    }
2146
2147    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcBuffer
2148    where
2149        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2150        ___D: ::fidl_next::fuchsia::HandleDecoder,
2151    {
2152        fn decode(
2153            mut slot: ::fidl_next::Slot<'_, Self>,
2154            decoder: &mut ___D,
2155            _: (),
2156        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2157            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2158            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
2159                1 => ::fidl_next::wire::Union::decode_as_static::<___D, ::fidl_next::wire::Uint32>(
2160                    raw,
2161                    decoder,
2162                    (),
2163                )?,
2164
2165                2 => ::fidl_next::wire::Union::decode_as_static::<
2166                    ___D,
2167                    ::fidl_next::wire::fuchsia::Vmo,
2168                >(raw, decoder, ())?,
2169
2170                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
2171                _ => ::fidl_next::wire::Union::decode_unknown_static(raw, decoder)?,
2172            }
2173
2174            Ok(())
2175        }
2176    }
2177
2178    impl ::core::fmt::Debug for SdmmcBuffer {
2179        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2180            self.as_ref().fmt(f)
2181        }
2182    }
2183
2184    impl ::fidl_next::IntoNatural for SdmmcBuffer {
2185        type Natural = ::core::option::Option<crate::natural::SdmmcBuffer>;
2186    }
2187}
2188
2189pub mod generic {
2190
2191    pub use fidl_next_common_fuchsia_hardware_sdmmc::generic::*;
2192
2193    /// The generic type corresponding to [`CqhciInitializeCommandQueueingRequest`].
2194    pub struct CqhciInitializeCommandQueueingRequest<T0, T1> {
2195        pub virtual_interrupt: T0,
2196
2197        pub virtual_interrupt_lifeline: T1,
2198    }
2199
2200    unsafe impl<___E, T0, T1>
2201        ::fidl_next::Encode<crate::wire::CqhciInitializeCommandQueueingRequest, ___E>
2202        for CqhciInitializeCommandQueueingRequest<T0, T1>
2203    where
2204        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2205        ___E: ::fidl_next::fuchsia::HandleEncoder,
2206        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Interrupt, ___E>,
2207        T1: ::fidl_next::Encode<::fidl_next::wire::fuchsia::EventPair, ___E>,
2208    {
2209        #[inline]
2210        fn encode(
2211            self,
2212            encoder_: &mut ___E,
2213            out_: &mut ::core::mem::MaybeUninit<crate::wire::CqhciInitializeCommandQueueingRequest>,
2214            _: (),
2215        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2216            ::fidl_next::munge! {
2217                let crate::wire::CqhciInitializeCommandQueueingRequest {
2218                    virtual_interrupt,
2219                    virtual_interrupt_lifeline,
2220
2221                } = out_;
2222            }
2223
2224            ::fidl_next::Encode::encode(self.virtual_interrupt, encoder_, virtual_interrupt, ())?;
2225
2226            ::fidl_next::Encode::encode(
2227                self.virtual_interrupt_lifeline,
2228                encoder_,
2229                virtual_interrupt_lifeline,
2230                (),
2231            )?;
2232
2233            Ok(())
2234        }
2235    }
2236
2237    /// The generic type corresponding to [`CqhciInitializeCommandQueueingResponse`].
2238    pub struct CqhciInitializeCommandQueueingResponse<T0, T1, T2, T3, T4, T5> {
2239        pub cqhci_mmio: T0,
2240
2241        pub cqhci_mmio_offset: T1,
2242
2243        pub sdhci_mmio: T2,
2244
2245        pub sdhci_mmio_offset: T3,
2246
2247        pub bti: T4,
2248
2249        pub interrupt: T5,
2250    }
2251
2252    unsafe impl<___E, T0, T1, T2, T3, T4, T5>
2253        ::fidl_next::Encode<crate::wire::CqhciInitializeCommandQueueingResponse, ___E>
2254        for CqhciInitializeCommandQueueingResponse<T0, T1, T2, T3, T4, T5>
2255    where
2256        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2257        ___E: ::fidl_next::fuchsia::HandleEncoder,
2258        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
2259        T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
2260        T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
2261        T3: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
2262        T4: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Bti, ___E>,
2263        T5: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Interrupt, ___E>,
2264    {
2265        #[inline]
2266        fn encode(
2267            self,
2268            encoder_: &mut ___E,
2269            out_: &mut ::core::mem::MaybeUninit<
2270                crate::wire::CqhciInitializeCommandQueueingResponse,
2271            >,
2272            _: (),
2273        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2274            ::fidl_next::munge! {
2275                let crate::wire::CqhciInitializeCommandQueueingResponse {
2276                    cqhci_mmio,
2277                    cqhci_mmio_offset,
2278                    sdhci_mmio,
2279                    sdhci_mmio_offset,
2280                    bti,
2281                    interrupt,
2282
2283                } = out_;
2284            }
2285
2286            ::fidl_next::Encode::encode(self.cqhci_mmio, encoder_, cqhci_mmio, ())?;
2287
2288            ::fidl_next::Encode::encode(self.cqhci_mmio_offset, encoder_, cqhci_mmio_offset, ())?;
2289
2290            ::fidl_next::Encode::encode(self.sdhci_mmio, encoder_, sdhci_mmio, ())?;
2291
2292            ::fidl_next::Encode::encode(self.sdhci_mmio_offset, encoder_, sdhci_mmio_offset, ())?;
2293
2294            ::fidl_next::Encode::encode(self.bti, encoder_, bti, ())?;
2295
2296            ::fidl_next::Encode::encode(self.interrupt, encoder_, interrupt, ())?;
2297
2298            Ok(())
2299        }
2300    }
2301
2302    /// The generic type corresponding to [`SdmmcRegisterInBandInterruptRequest`].
2303    pub struct SdmmcRegisterInBandInterruptRequest<T0> {
2304        pub interrupt_cb: T0,
2305    }
2306
2307    unsafe impl<___E, T0>
2308        ::fidl_next::Encode<crate::wire::SdmmcRegisterInBandInterruptRequest, ___E>
2309        for SdmmcRegisterInBandInterruptRequest<T0>
2310    where
2311        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2312        ___E: ::fidl_next::fuchsia::HandleEncoder,
2313        T0: ::fidl_next::Encode<
2314                ::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::wire::DriverChannel>,
2315                ___E,
2316            >,
2317    {
2318        #[inline]
2319        fn encode(
2320            self,
2321            encoder_: &mut ___E,
2322            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRegisterInBandInterruptRequest>,
2323            _: (),
2324        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2325            ::fidl_next::munge! {
2326                let crate::wire::SdmmcRegisterInBandInterruptRequest {
2327                    interrupt_cb,
2328
2329                } = out_;
2330            }
2331
2332            ::fidl_next::Encode::encode(self.interrupt_cb, encoder_, interrupt_cb, ())?;
2333
2334            Ok(())
2335        }
2336    }
2337
2338    /// The generic type corresponding to [`SdmmcRegisterVmoRequest`].
2339    pub struct SdmmcRegisterVmoRequest<T0, T1, T2, T3, T4, T5> {
2340        pub vmo_id: T0,
2341
2342        pub client_id: T1,
2343
2344        pub vmo: T2,
2345
2346        pub offset: T3,
2347
2348        pub size: T4,
2349
2350        pub vmo_rights: T5,
2351    }
2352
2353    unsafe impl<___E, T0, T1, T2, T3, T4, T5>
2354        ::fidl_next::Encode<crate::wire::SdmmcRegisterVmoRequest, ___E>
2355        for SdmmcRegisterVmoRequest<T0, T1, T2, T3, T4, T5>
2356    where
2357        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2358        ___E: ::fidl_next::fuchsia::HandleEncoder,
2359        T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2360        T1: ::fidl_next::Encode<u8, ___E>,
2361        T2: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
2362        T3: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
2363        T4: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
2364        T5: ::fidl_next::Encode<crate::wire::SdmmcVmoRight, ___E>,
2365    {
2366        #[inline]
2367        fn encode(
2368            self,
2369            encoder_: &mut ___E,
2370            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRegisterVmoRequest>,
2371            _: (),
2372        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2373            ::fidl_next::munge! {
2374                let crate::wire::SdmmcRegisterVmoRequest {
2375                    vmo_id,
2376                    client_id,
2377                    vmo,
2378                    offset,
2379                    size,
2380                    vmo_rights,
2381
2382                } = out_;
2383            }
2384
2385            ::fidl_next::Encode::encode(self.vmo_id, encoder_, vmo_id, ())?;
2386
2387            ::fidl_next::Encode::encode(self.client_id, encoder_, client_id, ())?;
2388
2389            ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
2390
2391            ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
2392
2393            ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
2394
2395            ::fidl_next::Encode::encode(self.vmo_rights, encoder_, vmo_rights, ())?;
2396
2397            Ok(())
2398        }
2399    }
2400
2401    /// The generic type corresponding to [`SdmmcUnregisterVmoResponse`].
2402    pub struct SdmmcUnregisterVmoResponse<T0> {
2403        pub vmo: T0,
2404    }
2405
2406    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SdmmcUnregisterVmoResponse, ___E>
2407        for SdmmcUnregisterVmoResponse<T0>
2408    where
2409        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2410        ___E: ::fidl_next::fuchsia::HandleEncoder,
2411        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Vmo, ___E>,
2412    {
2413        #[inline]
2414        fn encode(
2415            self,
2416            encoder_: &mut ___E,
2417            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcUnregisterVmoResponse>,
2418            _: (),
2419        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2420            ::fidl_next::munge! {
2421                let crate::wire::SdmmcUnregisterVmoResponse {
2422                    vmo,
2423
2424                } = out_;
2425            }
2426
2427            ::fidl_next::Encode::encode(self.vmo, encoder_, vmo, ())?;
2428
2429            Ok(())
2430        }
2431    }
2432
2433    /// The generic type corresponding to [`SdmmcBufferRegion`].
2434    pub struct SdmmcBufferRegion<T0, T1, T2> {
2435        pub buffer: T0,
2436
2437        pub offset: T1,
2438
2439        pub size: T2,
2440    }
2441
2442    unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::SdmmcBufferRegion, ___E>
2443        for SdmmcBufferRegion<T0, T1, T2>
2444    where
2445        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2446        ___E: ::fidl_next::fuchsia::HandleEncoder,
2447        T0: ::fidl_next::Encode<crate::wire::SdmmcBuffer, ___E>,
2448        T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
2449        T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
2450    {
2451        #[inline]
2452        fn encode(
2453            self,
2454            encoder_: &mut ___E,
2455            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcBufferRegion>,
2456            _: (),
2457        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2458            ::fidl_next::munge! {
2459                let crate::wire::SdmmcBufferRegion {
2460                    buffer,
2461                    offset,
2462                    size,
2463
2464                } = out_;
2465            }
2466
2467            ::fidl_next::Encode::encode(self.buffer, encoder_, buffer, ())?;
2468
2469            ::fidl_next::Encode::encode(self.offset, encoder_, offset, ())?;
2470
2471            ::fidl_next::Encode::encode(self.size, encoder_, size, ())?;
2472
2473            Ok(())
2474        }
2475    }
2476
2477    /// The generic type corresponding to [`SdmmcReq`].
2478    pub struct SdmmcReq<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> {
2479        pub cmd_idx: T0,
2480
2481        pub cmd_flags: T1,
2482
2483        pub arg: T2,
2484
2485        pub blocksize: T3,
2486
2487        pub suppress_error_messages: T4,
2488
2489        pub client_id: T5,
2490
2491        pub use_inline_crypto: T6,
2492
2493        pub slot: T7,
2494
2495        pub dun: T8,
2496
2497        pub buffers: T9,
2498    }
2499
2500    unsafe impl<___E, T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
2501        ::fidl_next::Encode<crate::wire::SdmmcReq<'static>, ___E>
2502        for SdmmcReq<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
2503    where
2504        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2505        ___E: ::fidl_next::Encoder,
2506        ___E: ::fidl_next::fuchsia::HandleEncoder,
2507        T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2508        T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2509        T2: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2510        T3: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2511        T4: ::fidl_next::Encode<bool, ___E>,
2512        T5: ::fidl_next::Encode<u8, ___E>,
2513        T6: ::fidl_next::Encode<bool, ___E>,
2514        T7: ::fidl_next::Encode<u8, ___E>,
2515        T8: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
2516        T9: ::fidl_next::Encode<
2517                ::fidl_next::wire::Vector<'static, crate::wire::SdmmcBufferRegion>,
2518                ___E,
2519            >,
2520    {
2521        #[inline]
2522        fn encode(
2523            self,
2524            encoder_: &mut ___E,
2525            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcReq<'static>>,
2526            _: (),
2527        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2528            ::fidl_next::munge! {
2529                let crate::wire::SdmmcReq {
2530                    cmd_idx,
2531                    cmd_flags,
2532                    arg,
2533                    blocksize,
2534                    suppress_error_messages,
2535                    client_id,
2536                    use_inline_crypto,
2537                    slot,
2538                    dun,
2539                    buffers,
2540
2541                } = out_;
2542            }
2543
2544            ::fidl_next::Encode::encode(self.cmd_idx, encoder_, cmd_idx, ())?;
2545
2546            ::fidl_next::Encode::encode(self.cmd_flags, encoder_, cmd_flags, ())?;
2547
2548            ::fidl_next::Encode::encode(self.arg, encoder_, arg, ())?;
2549
2550            ::fidl_next::Encode::encode(self.blocksize, encoder_, blocksize, ())?;
2551
2552            ::fidl_next::Encode::encode(
2553                self.suppress_error_messages,
2554                encoder_,
2555                suppress_error_messages,
2556                (),
2557            )?;
2558
2559            ::fidl_next::Encode::encode(self.client_id, encoder_, client_id, ())?;
2560
2561            ::fidl_next::Encode::encode(self.use_inline_crypto, encoder_, use_inline_crypto, ())?;
2562
2563            ::fidl_next::Encode::encode(self.slot, encoder_, slot, ())?;
2564
2565            ::fidl_next::Encode::encode(self.dun, encoder_, dun, ())?;
2566
2567            ::fidl_next::Encode::encode(self.buffers, encoder_, buffers, (4294967295, ()))?;
2568
2569            Ok(())
2570        }
2571    }
2572
2573    /// The generic type corresponding to [`SdmmcRequestRequest`].
2574    pub struct SdmmcRequestRequest<T0> {
2575        pub reqs: T0,
2576    }
2577
2578    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SdmmcRequestRequest<'static>, ___E>
2579        for SdmmcRequestRequest<T0>
2580    where
2581        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2582        ___E: ::fidl_next::Encoder,
2583        ___E: ::fidl_next::fuchsia::HandleEncoder,
2584        T0: ::fidl_next::Encode<
2585                ::fidl_next::wire::Vector<'static, crate::wire::SdmmcReq<'static>>,
2586                ___E,
2587            >,
2588    {
2589        #[inline]
2590        fn encode(
2591            self,
2592            encoder_: &mut ___E,
2593            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRequestRequest<'static>>,
2594            _: (),
2595        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2596            ::fidl_next::munge! {
2597                let crate::wire::SdmmcRequestRequest {
2598                    reqs,
2599
2600                } = out_;
2601            }
2602
2603            ::fidl_next::Encode::encode(self.reqs, encoder_, reqs, (4294967295, ()))?;
2604
2605            Ok(())
2606        }
2607    }
2608}
2609
2610pub use self::natural::*;
2611
2612/// The type corresponding to the Cqhci protocol.
2613#[derive(PartialEq, Debug)]
2614pub struct Cqhci;
2615
2616#[cfg(feature = "driver")]
2617impl ::fidl_next::HasTransport for Cqhci {
2618    type Transport = ::fdf_fidl::DriverChannel;
2619}
2620
2621pub mod cqhci {
2622    pub mod prelude {
2623        pub use crate::{
2624            Cqhci, CqhciClientHandler, CqhciLocalClientHandler, CqhciLocalServerHandler,
2625            CqhciServerHandler, cqhci,
2626        };
2627
2628        pub use crate::natural::CqhciInitializeCommandQueueingRequest;
2629
2630        pub use crate::natural::CqhciDisableCqhciResponse;
2631
2632        pub use crate::natural::CqhciEnableCqhciResponse;
2633
2634        pub use crate::natural::CqhciInitializeCommandQueueingResponse;
2635    }
2636
2637    pub struct InitializeCommandQueueing;
2638
2639    impl ::fidl_next::Method for InitializeCommandQueueing {
2640        const ORDINAL: u64 = 359559202570093266;
2641        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2642            ::fidl_next::protocol::Flexibility::Strict;
2643
2644        type Protocol = crate::Cqhci;
2645
2646        type Request = crate::wire::CqhciInitializeCommandQueueingRequest;
2647    }
2648
2649    impl ::fidl_next::TwoWayMethod for InitializeCommandQueueing {
2650        type Response = ::fidl_next::wire::Result<
2651            'static,
2652            crate::wire::CqhciInitializeCommandQueueingResponse,
2653            ::fidl_next::wire::fuchsia::Status,
2654        >;
2655    }
2656
2657    impl<___R> ::fidl_next::Respond<___R> for InitializeCommandQueueing {
2658        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
2659
2660        fn respond(response: ___R) -> Self::Output {
2661            ::core::result::Result::Ok(response)
2662        }
2663    }
2664
2665    impl<___R> ::fidl_next::RespondErr<___R> for InitializeCommandQueueing {
2666        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
2667
2668        fn respond_err(response: ___R) -> Self::Output {
2669            ::core::result::Result::Err(response)
2670        }
2671    }
2672
2673    pub struct EnableCqhci;
2674
2675    impl ::fidl_next::Method for EnableCqhci {
2676        const ORDINAL: u64 = 7267012061448928954;
2677        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2678            ::fidl_next::protocol::Flexibility::Strict;
2679
2680        type Protocol = crate::Cqhci;
2681
2682        type Request = ::fidl_next::wire::EmptyMessageBody;
2683    }
2684
2685    impl ::fidl_next::TwoWayMethod for EnableCqhci {
2686        type Response = ::fidl_next::wire::Result<
2687            'static,
2688            crate::wire::CqhciEnableCqhciResponse,
2689            ::fidl_next::wire::fuchsia::Status,
2690        >;
2691    }
2692
2693    impl<___R> ::fidl_next::Respond<___R> for EnableCqhci {
2694        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
2695
2696        fn respond(response: ___R) -> Self::Output {
2697            ::core::result::Result::Ok(response)
2698        }
2699    }
2700
2701    impl<___R> ::fidl_next::RespondErr<___R> for EnableCqhci {
2702        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
2703
2704        fn respond_err(response: ___R) -> Self::Output {
2705            ::core::result::Result::Err(response)
2706        }
2707    }
2708
2709    pub struct DisableCqhci;
2710
2711    impl ::fidl_next::Method for DisableCqhci {
2712        const ORDINAL: u64 = 4177196635683073751;
2713        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2714            ::fidl_next::protocol::Flexibility::Strict;
2715
2716        type Protocol = crate::Cqhci;
2717
2718        type Request = ::fidl_next::wire::EmptyMessageBody;
2719    }
2720
2721    impl ::fidl_next::TwoWayMethod for DisableCqhci {
2722        type Response = ::fidl_next::wire::Result<
2723            'static,
2724            crate::wire::CqhciDisableCqhciResponse,
2725            ::fidl_next::wire::fuchsia::Status,
2726        >;
2727    }
2728
2729    impl<___R> ::fidl_next::Respond<___R> for DisableCqhci {
2730        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
2731
2732        fn respond(response: ___R) -> Self::Output {
2733            ::core::result::Result::Ok(response)
2734        }
2735    }
2736
2737    impl<___R> ::fidl_next::RespondErr<___R> for DisableCqhci {
2738        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
2739
2740        fn respond_err(response: ___R) -> Self::Output {
2741            ::core::result::Result::Err(response)
2742        }
2743    }
2744
2745    mod ___detail {
2746        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Cqhci
2747        where
2748            ___T: ::fidl_next::Transport,
2749        {
2750            type Client = CqhciClient<___T>;
2751            type Server = CqhciServer<___T>;
2752        }
2753
2754        /// The client for the `Cqhci` protocol.
2755        #[repr(transparent)]
2756        pub struct CqhciClient<___T: ::fidl_next::Transport> {
2757            #[allow(dead_code)]
2758            client: ::fidl_next::protocol::Client<___T>,
2759        }
2760
2761        impl<___T> CqhciClient<___T>
2762        where
2763            ___T: ::fidl_next::Transport,
2764        {
2765            #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once.  The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts.  Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`.  The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n   The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt.  The CQHCI\n   driver will destroy the peer end upon shutdown, which should be handled by the server as a\n   signal to stop monitoring the virtual interrupt and return to monitoring the physical\n   interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
2766            pub fn initialize_command_queueing(
2767                &self,
2768
2769                virtual_interrupt: impl ::fidl_next::Encode<
2770                    ::fidl_next::wire::fuchsia::Interrupt,
2771                    <___T as ::fidl_next::Transport>::SendBuffer,
2772                >,
2773
2774                virtual_interrupt_lifeline: impl ::fidl_next::Encode<
2775                    ::fidl_next::wire::fuchsia::EventPair,
2776                    <___T as ::fidl_next::Transport>::SendBuffer,
2777                >,
2778            ) -> ::fidl_next::TwoWayFuture<'_, super::InitializeCommandQueueing, ___T>
2779            where
2780                <___T as ::fidl_next::Transport>::SendBuffer:
2781                    ::fidl_next::encoder::InternalHandleEncoder,
2782                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2783            {
2784                self.initialize_command_queueing_with(
2785                    crate::generic::CqhciInitializeCommandQueueingRequest {
2786                        virtual_interrupt,
2787
2788                        virtual_interrupt_lifeline,
2789                    },
2790                )
2791            }
2792
2793            #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once.  The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts.  Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`.  The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n   The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt.  The CQHCI\n   driver will destroy the peer end upon shutdown, which should be handled by the server as a\n   signal to stop monitoring the virtual interrupt and return to monitoring the physical\n   interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
2794            pub fn initialize_command_queueing_with<___R>(
2795                &self,
2796                request: ___R,
2797            ) -> ::fidl_next::TwoWayFuture<'_, super::InitializeCommandQueueing, ___T>
2798            where
2799                ___R: ::fidl_next::Encode<
2800                        crate::wire::CqhciInitializeCommandQueueingRequest,
2801                        <___T as ::fidl_next::Transport>::SendBuffer,
2802                    >,
2803            {
2804                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
2805                    359559202570093266,
2806                    <super::InitializeCommandQueueing as ::fidl_next::Method>::FLEXIBILITY,
2807                    request,
2808                ))
2809            }
2810
2811            #[doc = " Enables the Command Queueing Engine.  The CQHCI driver is expected to already have called\n [`InitializeCommandQueueing`] to handle interrupts.\n While CQHCI is enabled, it is the caller\'s responsibility to only submit regular requests\n (via [`Request`]) via DCMD, or after disabling CQHCI.\n"]
2812            pub fn enable_cqhci(&self) -> ::fidl_next::TwoWayFuture<'_, super::EnableCqhci, ___T> {
2813                ::fidl_next::TwoWayFuture::from_untyped(
2814                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
2815                        7267012061448928954,
2816                        <super::EnableCqhci as ::fidl_next::Method>::FLEXIBILITY,
2817                        (),
2818                    ),
2819                )
2820            }
2821
2822            #[doc = " Disables the Command Queueing Engine.  `EnableCqhci` must have previously been called.  From\n this point onwards, regular requests can be submitted (until `EnableCqhci` is called again).\n"]
2823            pub fn disable_cqhci(
2824                &self,
2825            ) -> ::fidl_next::TwoWayFuture<'_, super::DisableCqhci, ___T> {
2826                ::fidl_next::TwoWayFuture::from_untyped(
2827                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
2828                        4177196635683073751,
2829                        <super::DisableCqhci as ::fidl_next::Method>::FLEXIBILITY,
2830                        (),
2831                    ),
2832                )
2833            }
2834        }
2835
2836        /// The server for the `Cqhci` protocol.
2837        #[repr(transparent)]
2838        pub struct CqhciServer<___T: ::fidl_next::Transport> {
2839            server: ::fidl_next::protocol::Server<___T>,
2840        }
2841
2842        impl<___T> CqhciServer<___T> where ___T: ::fidl_next::Transport {}
2843    }
2844}
2845
2846#[diagnostic::on_unimplemented(
2847    note = "If {Self} implements the non-local CqhciClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
2848)]
2849
2850/// A client handler for the Cqhci protocol.
2851///
2852/// See [`Cqhci`] for more details.
2853pub trait CqhciLocalClientHandler<
2854    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
2855    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
2856>
2857{
2858}
2859
2860impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Cqhci
2861where
2862    ___H: CqhciLocalClientHandler<___T>,
2863    ___T: ::fidl_next::Transport,
2864{
2865    async fn on_event(
2866        handler: &mut ___H,
2867        mut message: ::fidl_next::Message<___T>,
2868    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2869        match *message.header().ordinal {
2870            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2871        }
2872    }
2873}
2874
2875#[diagnostic::on_unimplemented(
2876    note = "If {Self} implements the non-local CqhciServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
2877)]
2878
2879/// A server handler for the Cqhci protocol.
2880///
2881/// See [`Cqhci`] for more details.
2882pub trait CqhciLocalServerHandler<
2883    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
2884    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
2885>
2886{
2887    #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once.  The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts.  Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`.  The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n   The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt.  The CQHCI\n   driver will destroy the peer end upon shutdown, which should be handled by the server as a\n   signal to stop monitoring the virtual interrupt and return to monitoring the physical\n   interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
2888    fn initialize_command_queueing(
2889        &mut self,
2890
2891        request: ::fidl_next::Request<cqhci::InitializeCommandQueueing, ___T>,
2892
2893        responder: ::fidl_next::Responder<cqhci::InitializeCommandQueueing, ___T>,
2894    ) -> impl ::core::future::Future<Output = ()>;
2895
2896    #[doc = " Enables the Command Queueing Engine.  The CQHCI driver is expected to already have called\n [`InitializeCommandQueueing`] to handle interrupts.\n While CQHCI is enabled, it is the caller\'s responsibility to only submit regular requests\n (via [`Request`]) via DCMD, or after disabling CQHCI.\n"]
2897    fn enable_cqhci(
2898        &mut self,
2899
2900        responder: ::fidl_next::Responder<cqhci::EnableCqhci, ___T>,
2901    ) -> impl ::core::future::Future<Output = ()>;
2902
2903    #[doc = " Disables the Command Queueing Engine.  `EnableCqhci` must have previously been called.  From\n this point onwards, regular requests can be submitted (until `EnableCqhci` is called again).\n"]
2904    fn disable_cqhci(
2905        &mut self,
2906
2907        responder: ::fidl_next::Responder<cqhci::DisableCqhci, ___T>,
2908    ) -> impl ::core::future::Future<Output = ()>;
2909}
2910
2911impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Cqhci
2912where
2913    ___H: CqhciLocalServerHandler<___T>,
2914    ___T: ::fidl_next::Transport,
2915    for<'de> crate::wire::CqhciInitializeCommandQueueingRequest: ::fidl_next::Decode<
2916            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
2917            Constraint = (),
2918        >,
2919{
2920    async fn on_one_way(
2921        handler: &mut ___H,
2922        mut message: ::fidl_next::Message<___T>,
2923    ) -> ::core::result::Result<
2924        (),
2925        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2926    > {
2927        match *message.header().ordinal {
2928            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2929        }
2930    }
2931
2932    async fn on_two_way(
2933        handler: &mut ___H,
2934        mut message: ::fidl_next::Message<___T>,
2935        responder: ::fidl_next::protocol::Responder<___T>,
2936    ) -> ::core::result::Result<
2937        (),
2938        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2939    > {
2940        match *message.header().ordinal {
2941            359559202570093266 => {
2942                let responder = ::fidl_next::Responder::from_untyped(responder);
2943
2944                match ::fidl_next::AsDecoderExt::into_decoded(message) {
2945                    Ok(decoded) => {
2946                        handler
2947                            .initialize_command_queueing(
2948                                ::fidl_next::Request::from_decoded(decoded),
2949                                responder,
2950                            )
2951                            .await;
2952                        Ok(())
2953                    }
2954                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2955                        ordinal: 359559202570093266,
2956                        error,
2957                    }),
2958                }
2959            }
2960
2961            7267012061448928954 => {
2962                let responder = ::fidl_next::Responder::from_untyped(responder);
2963
2964                handler.enable_cqhci(responder).await;
2965                Ok(())
2966            }
2967
2968            4177196635683073751 => {
2969                let responder = ::fidl_next::Responder::from_untyped(responder);
2970
2971                handler.disable_cqhci(responder).await;
2972                Ok(())
2973            }
2974
2975            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2976        }
2977    }
2978}
2979
2980/// A client handler for the Cqhci protocol.
2981///
2982/// See [`Cqhci`] for more details.
2983pub trait CqhciClientHandler<
2984    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
2985    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
2986>
2987{
2988}
2989
2990impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Cqhci
2991where
2992    ___H: CqhciClientHandler<___T> + ::core::marker::Send,
2993    ___T: ::fidl_next::Transport,
2994{
2995    async fn on_event(
2996        handler: &mut ___H,
2997        mut message: ::fidl_next::Message<___T>,
2998    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2999        match *message.header().ordinal {
3000            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3001        }
3002    }
3003}
3004
3005/// A server handler for the Cqhci protocol.
3006///
3007/// See [`Cqhci`] for more details.
3008pub trait CqhciServerHandler<
3009    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
3010    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
3011>
3012{
3013    #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once.  The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts.  Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`.  The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n   The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt.  The CQHCI\n   driver will destroy the peer end upon shutdown, which should be handled by the server as a\n   signal to stop monitoring the virtual interrupt and return to monitoring the physical\n   interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
3014    fn initialize_command_queueing(
3015        &mut self,
3016
3017        request: ::fidl_next::Request<cqhci::InitializeCommandQueueing, ___T>,
3018
3019        responder: ::fidl_next::Responder<cqhci::InitializeCommandQueueing, ___T>,
3020    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3021
3022    #[doc = " Enables the Command Queueing Engine.  The CQHCI driver is expected to already have called\n [`InitializeCommandQueueing`] to handle interrupts.\n While CQHCI is enabled, it is the caller\'s responsibility to only submit regular requests\n (via [`Request`]) via DCMD, or after disabling CQHCI.\n"]
3023    fn enable_cqhci(
3024        &mut self,
3025
3026        responder: ::fidl_next::Responder<cqhci::EnableCqhci, ___T>,
3027    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3028
3029    #[doc = " Disables the Command Queueing Engine.  `EnableCqhci` must have previously been called.  From\n this point onwards, regular requests can be submitted (until `EnableCqhci` is called again).\n"]
3030    fn disable_cqhci(
3031        &mut self,
3032
3033        responder: ::fidl_next::Responder<cqhci::DisableCqhci, ___T>,
3034    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3035}
3036
3037impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Cqhci
3038where
3039    ___H: CqhciServerHandler<___T> + ::core::marker::Send,
3040    ___T: ::fidl_next::Transport,
3041    for<'de> crate::wire::CqhciInitializeCommandQueueingRequest: ::fidl_next::Decode<
3042            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
3043            Constraint = (),
3044        >,
3045{
3046    async fn on_one_way(
3047        handler: &mut ___H,
3048        mut message: ::fidl_next::Message<___T>,
3049    ) -> ::core::result::Result<
3050        (),
3051        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3052    > {
3053        match *message.header().ordinal {
3054            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3055        }
3056    }
3057
3058    async fn on_two_way(
3059        handler: &mut ___H,
3060        mut message: ::fidl_next::Message<___T>,
3061        responder: ::fidl_next::protocol::Responder<___T>,
3062    ) -> ::core::result::Result<
3063        (),
3064        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3065    > {
3066        match *message.header().ordinal {
3067            359559202570093266 => {
3068                let responder = ::fidl_next::Responder::from_untyped(responder);
3069
3070                match ::fidl_next::AsDecoderExt::into_decoded(message) {
3071                    Ok(decoded) => {
3072                        handler
3073                            .initialize_command_queueing(
3074                                ::fidl_next::Request::from_decoded(decoded),
3075                                responder,
3076                            )
3077                            .await;
3078                        Ok(())
3079                    }
3080                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3081                        ordinal: 359559202570093266,
3082                        error,
3083                    }),
3084                }
3085            }
3086
3087            7267012061448928954 => {
3088                let responder = ::fidl_next::Responder::from_untyped(responder);
3089
3090                handler.enable_cqhci(responder).await;
3091                Ok(())
3092            }
3093
3094            4177196635683073751 => {
3095                let responder = ::fidl_next::Responder::from_untyped(responder);
3096
3097                handler.disable_cqhci(responder).await;
3098                Ok(())
3099            }
3100
3101            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
3102        }
3103    }
3104}
3105
3106impl<___T> CqhciClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport {}
3107
3108impl<___H, ___T> CqhciLocalClientHandler<___T> for ::fidl_next::Local<___H>
3109where
3110    ___H: CqhciClientHandler<___T>,
3111    ___T: ::fidl_next::Transport,
3112{
3113}
3114
3115impl<___H, ___T> CqhciLocalServerHandler<___T> for ::fidl_next::Local<___H>
3116where
3117    ___H: CqhciServerHandler<___T>,
3118    ___T: ::fidl_next::Transport,
3119{
3120    async fn initialize_command_queueing(
3121        &mut self,
3122
3123        request: ::fidl_next::Request<cqhci::InitializeCommandQueueing, ___T>,
3124
3125        responder: ::fidl_next::Responder<cqhci::InitializeCommandQueueing, ___T>,
3126    ) {
3127        ___H::initialize_command_queueing(&mut self.0, request, responder).await
3128    }
3129
3130    async fn enable_cqhci(&mut self, responder: ::fidl_next::Responder<cqhci::EnableCqhci, ___T>) {
3131        ___H::enable_cqhci(&mut self.0, responder).await
3132    }
3133
3134    async fn disable_cqhci(
3135        &mut self,
3136
3137        responder: ::fidl_next::Responder<cqhci::DisableCqhci, ___T>,
3138    ) {
3139        ___H::disable_cqhci(&mut self.0, responder).await
3140    }
3141}
3142
3143/// The type corresponding to the Sdmmc protocol.
3144#[derive(PartialEq, Debug)]
3145pub struct Sdmmc;
3146
3147impl ::fidl_next::Discoverable for Sdmmc {
3148    const PROTOCOL_NAME: &'static str = "fuchsia.hardware.sdmmc.Sdmmc";
3149}
3150
3151#[cfg(feature = "driver")]
3152impl ::fidl_next::HasTransport for Sdmmc {
3153    type Transport = ::fdf_fidl::DriverChannel;
3154}
3155
3156pub mod sdmmc {
3157    pub mod prelude {
3158        pub use crate::{
3159            Sdmmc, SdmmcClientHandler, SdmmcLocalClientHandler, SdmmcLocalServerHandler,
3160            SdmmcServerHandler, sdmmc,
3161        };
3162
3163        pub use crate::natural::CqhciInitializeCommandQueueingRequest;
3164
3165        pub use crate::natural::CqhciDisableCqhciResponse;
3166
3167        pub use crate::natural::CqhciEnableCqhciResponse;
3168
3169        pub use crate::natural::CqhciInitializeCommandQueueingResponse;
3170
3171        pub use crate::natural::SdmmcPerformTuningRequest;
3172
3173        pub use crate::natural::SdmmcRegisterInBandInterruptRequest;
3174
3175        pub use crate::natural::SdmmcRegisterVmoRequest;
3176
3177        pub use crate::natural::SdmmcRequestRequest;
3178
3179        pub use crate::natural::SdmmcSetBusFreqRequest;
3180
3181        pub use crate::natural::SdmmcSetBusWidthRequest;
3182
3183        pub use crate::natural::SdmmcSetSignalVoltageRequest;
3184
3185        pub use crate::natural::SdmmcSetTimingRequest;
3186
3187        pub use crate::natural::SdmmcUnregisterVmoRequest;
3188
3189        pub use crate::natural::SdmmcHostInfoResponse;
3190
3191        pub use crate::natural::SdmmcHwResetResponse;
3192
3193        pub use crate::natural::SdmmcPerformTuningResponse;
3194
3195        pub use crate::natural::SdmmcRegisterInBandInterruptResponse;
3196
3197        pub use crate::natural::SdmmcRegisterVmoResponse;
3198
3199        pub use crate::natural::SdmmcRequestResponse;
3200
3201        pub use crate::natural::SdmmcSetBusFreqResponse;
3202
3203        pub use crate::natural::SdmmcSetBusWidthResponse;
3204
3205        pub use crate::natural::SdmmcSetSignalVoltageResponse;
3206
3207        pub use crate::natural::SdmmcSetTimingResponse;
3208
3209        pub use crate::natural::SdmmcUnregisterVmoResponse;
3210    }
3211
3212    pub struct InitializeCommandQueueing;
3213
3214    impl ::fidl_next::Method for InitializeCommandQueueing {
3215        const ORDINAL: u64 = 359559202570093266;
3216        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3217            ::fidl_next::protocol::Flexibility::Strict;
3218
3219        type Protocol = crate::Sdmmc;
3220
3221        type Request = crate::wire::CqhciInitializeCommandQueueingRequest;
3222    }
3223
3224    impl ::fidl_next::TwoWayMethod for InitializeCommandQueueing {
3225        type Response = ::fidl_next::wire::Result<
3226            'static,
3227            crate::wire::CqhciInitializeCommandQueueingResponse,
3228            ::fidl_next::wire::fuchsia::Status,
3229        >;
3230    }
3231
3232    impl<___R> ::fidl_next::Respond<___R> for InitializeCommandQueueing {
3233        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
3234
3235        fn respond(response: ___R) -> Self::Output {
3236            ::core::result::Result::Ok(response)
3237        }
3238    }
3239
3240    impl<___R> ::fidl_next::RespondErr<___R> for InitializeCommandQueueing {
3241        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3242
3243        fn respond_err(response: ___R) -> Self::Output {
3244            ::core::result::Result::Err(response)
3245        }
3246    }
3247
3248    pub struct EnableCqhci;
3249
3250    impl ::fidl_next::Method for EnableCqhci {
3251        const ORDINAL: u64 = 7267012061448928954;
3252        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3253            ::fidl_next::protocol::Flexibility::Strict;
3254
3255        type Protocol = crate::Sdmmc;
3256
3257        type Request = ::fidl_next::wire::EmptyMessageBody;
3258    }
3259
3260    impl ::fidl_next::TwoWayMethod for EnableCqhci {
3261        type Response = ::fidl_next::wire::Result<
3262            'static,
3263            crate::wire::CqhciEnableCqhciResponse,
3264            ::fidl_next::wire::fuchsia::Status,
3265        >;
3266    }
3267
3268    impl<___R> ::fidl_next::Respond<___R> for EnableCqhci {
3269        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
3270
3271        fn respond(response: ___R) -> Self::Output {
3272            ::core::result::Result::Ok(response)
3273        }
3274    }
3275
3276    impl<___R> ::fidl_next::RespondErr<___R> for EnableCqhci {
3277        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3278
3279        fn respond_err(response: ___R) -> Self::Output {
3280            ::core::result::Result::Err(response)
3281        }
3282    }
3283
3284    pub struct DisableCqhci;
3285
3286    impl ::fidl_next::Method for DisableCqhci {
3287        const ORDINAL: u64 = 4177196635683073751;
3288        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3289            ::fidl_next::protocol::Flexibility::Strict;
3290
3291        type Protocol = crate::Sdmmc;
3292
3293        type Request = ::fidl_next::wire::EmptyMessageBody;
3294    }
3295
3296    impl ::fidl_next::TwoWayMethod for DisableCqhci {
3297        type Response = ::fidl_next::wire::Result<
3298            'static,
3299            crate::wire::CqhciDisableCqhciResponse,
3300            ::fidl_next::wire::fuchsia::Status,
3301        >;
3302    }
3303
3304    impl<___R> ::fidl_next::Respond<___R> for DisableCqhci {
3305        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
3306
3307        fn respond(response: ___R) -> Self::Output {
3308            ::core::result::Result::Ok(response)
3309        }
3310    }
3311
3312    impl<___R> ::fidl_next::RespondErr<___R> for DisableCqhci {
3313        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3314
3315        fn respond_err(response: ___R) -> Self::Output {
3316            ::core::result::Result::Err(response)
3317        }
3318    }
3319
3320    pub struct HostInfo;
3321
3322    impl ::fidl_next::Method for HostInfo {
3323        const ORDINAL: u64 = 8475471856809867100;
3324        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3325            ::fidl_next::protocol::Flexibility::Strict;
3326
3327        type Protocol = crate::Sdmmc;
3328
3329        type Request = ::fidl_next::wire::EmptyMessageBody;
3330    }
3331
3332    impl ::fidl_next::TwoWayMethod for HostInfo {
3333        type Response = ::fidl_next::wire::Result<
3334            'static,
3335            crate::wire::SdmmcHostInfoResponse,
3336            ::fidl_next::wire::fuchsia::Status,
3337        >;
3338    }
3339
3340    impl<___R> ::fidl_next::Respond<___R> for HostInfo {
3341        type Output = ::core::result::Result<
3342            crate::generic::SdmmcHostInfoResponse<___R>,
3343            ::fidl_next::never::Never,
3344        >;
3345
3346        fn respond(response: ___R) -> Self::Output {
3347            ::core::result::Result::Ok(crate::generic::SdmmcHostInfoResponse { info: response })
3348        }
3349    }
3350
3351    impl<___R> ::fidl_next::RespondErr<___R> for HostInfo {
3352        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3353
3354        fn respond_err(response: ___R) -> Self::Output {
3355            ::core::result::Result::Err(response)
3356        }
3357    }
3358
3359    pub struct SetSignalVoltage;
3360
3361    impl ::fidl_next::Method for SetSignalVoltage {
3362        const ORDINAL: u64 = 5360485811549546918;
3363        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3364            ::fidl_next::protocol::Flexibility::Strict;
3365
3366        type Protocol = crate::Sdmmc;
3367
3368        type Request = crate::wire::SdmmcSetSignalVoltageRequest;
3369    }
3370
3371    impl ::fidl_next::TwoWayMethod for SetSignalVoltage {
3372        type Response = ::fidl_next::wire::Result<
3373            'static,
3374            crate::wire::SdmmcSetSignalVoltageResponse,
3375            ::fidl_next::wire::fuchsia::Status,
3376        >;
3377    }
3378
3379    impl<___R> ::fidl_next::Respond<___R> for SetSignalVoltage {
3380        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
3381
3382        fn respond(response: ___R) -> Self::Output {
3383            ::core::result::Result::Ok(response)
3384        }
3385    }
3386
3387    impl<___R> ::fidl_next::RespondErr<___R> for SetSignalVoltage {
3388        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3389
3390        fn respond_err(response: ___R) -> Self::Output {
3391            ::core::result::Result::Err(response)
3392        }
3393    }
3394
3395    pub struct SetBusWidth;
3396
3397    impl ::fidl_next::Method for SetBusWidth {
3398        const ORDINAL: u64 = 3438431046250338573;
3399        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3400            ::fidl_next::protocol::Flexibility::Strict;
3401
3402        type Protocol = crate::Sdmmc;
3403
3404        type Request = crate::wire::SdmmcSetBusWidthRequest;
3405    }
3406
3407    impl ::fidl_next::TwoWayMethod for SetBusWidth {
3408        type Response = ::fidl_next::wire::Result<
3409            'static,
3410            crate::wire::SdmmcSetBusWidthResponse,
3411            ::fidl_next::wire::fuchsia::Status,
3412        >;
3413    }
3414
3415    impl<___R> ::fidl_next::Respond<___R> for SetBusWidth {
3416        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
3417
3418        fn respond(response: ___R) -> Self::Output {
3419            ::core::result::Result::Ok(response)
3420        }
3421    }
3422
3423    impl<___R> ::fidl_next::RespondErr<___R> for SetBusWidth {
3424        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3425
3426        fn respond_err(response: ___R) -> Self::Output {
3427            ::core::result::Result::Err(response)
3428        }
3429    }
3430
3431    pub struct SetBusFreq;
3432
3433    impl ::fidl_next::Method for SetBusFreq {
3434        const ORDINAL: u64 = 6624771772063616636;
3435        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3436            ::fidl_next::protocol::Flexibility::Strict;
3437
3438        type Protocol = crate::Sdmmc;
3439
3440        type Request = crate::wire::SdmmcSetBusFreqRequest;
3441    }
3442
3443    impl ::fidl_next::TwoWayMethod for SetBusFreq {
3444        type Response = ::fidl_next::wire::Result<
3445            'static,
3446            crate::wire::SdmmcSetBusFreqResponse,
3447            ::fidl_next::wire::fuchsia::Status,
3448        >;
3449    }
3450
3451    impl<___R> ::fidl_next::Respond<___R> for SetBusFreq {
3452        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
3453
3454        fn respond(response: ___R) -> Self::Output {
3455            ::core::result::Result::Ok(response)
3456        }
3457    }
3458
3459    impl<___R> ::fidl_next::RespondErr<___R> for SetBusFreq {
3460        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3461
3462        fn respond_err(response: ___R) -> Self::Output {
3463            ::core::result::Result::Err(response)
3464        }
3465    }
3466
3467    pub struct SetTiming;
3468
3469    impl ::fidl_next::Method for SetTiming {
3470        const ORDINAL: u64 = 7991421876873192632;
3471        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3472            ::fidl_next::protocol::Flexibility::Strict;
3473
3474        type Protocol = crate::Sdmmc;
3475
3476        type Request = crate::wire::SdmmcSetTimingRequest;
3477    }
3478
3479    impl ::fidl_next::TwoWayMethod for SetTiming {
3480        type Response = ::fidl_next::wire::Result<
3481            'static,
3482            crate::wire::SdmmcSetTimingResponse,
3483            ::fidl_next::wire::fuchsia::Status,
3484        >;
3485    }
3486
3487    impl<___R> ::fidl_next::Respond<___R> for SetTiming {
3488        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
3489
3490        fn respond(response: ___R) -> Self::Output {
3491            ::core::result::Result::Ok(response)
3492        }
3493    }
3494
3495    impl<___R> ::fidl_next::RespondErr<___R> for SetTiming {
3496        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3497
3498        fn respond_err(response: ___R) -> Self::Output {
3499            ::core::result::Result::Err(response)
3500        }
3501    }
3502
3503    pub struct HwReset;
3504
3505    impl ::fidl_next::Method for HwReset {
3506        const ORDINAL: u64 = 3335326454881665312;
3507        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3508            ::fidl_next::protocol::Flexibility::Strict;
3509
3510        type Protocol = crate::Sdmmc;
3511
3512        type Request = ::fidl_next::wire::EmptyMessageBody;
3513    }
3514
3515    impl ::fidl_next::TwoWayMethod for HwReset {
3516        type Response = ::fidl_next::wire::Result<
3517            'static,
3518            crate::wire::SdmmcHwResetResponse,
3519            ::fidl_next::wire::fuchsia::Status,
3520        >;
3521    }
3522
3523    impl<___R> ::fidl_next::Respond<___R> for HwReset {
3524        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
3525
3526        fn respond(response: ___R) -> Self::Output {
3527            ::core::result::Result::Ok(response)
3528        }
3529    }
3530
3531    impl<___R> ::fidl_next::RespondErr<___R> for HwReset {
3532        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3533
3534        fn respond_err(response: ___R) -> Self::Output {
3535            ::core::result::Result::Err(response)
3536        }
3537    }
3538
3539    pub struct PerformTuning;
3540
3541    impl ::fidl_next::Method for PerformTuning {
3542        const ORDINAL: u64 = 5267400993243262226;
3543        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3544            ::fidl_next::protocol::Flexibility::Strict;
3545
3546        type Protocol = crate::Sdmmc;
3547
3548        type Request = crate::wire::SdmmcPerformTuningRequest;
3549    }
3550
3551    impl ::fidl_next::TwoWayMethod for PerformTuning {
3552        type Response = ::fidl_next::wire::Result<
3553            'static,
3554            crate::wire::SdmmcPerformTuningResponse,
3555            ::fidl_next::wire::fuchsia::Status,
3556        >;
3557    }
3558
3559    impl<___R> ::fidl_next::Respond<___R> for PerformTuning {
3560        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
3561
3562        fn respond(response: ___R) -> Self::Output {
3563            ::core::result::Result::Ok(response)
3564        }
3565    }
3566
3567    impl<___R> ::fidl_next::RespondErr<___R> for PerformTuning {
3568        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3569
3570        fn respond_err(response: ___R) -> Self::Output {
3571            ::core::result::Result::Err(response)
3572        }
3573    }
3574
3575    pub struct RegisterInBandInterrupt;
3576
3577    impl ::fidl_next::Method for RegisterInBandInterrupt {
3578        const ORDINAL: u64 = 7280830926204192948;
3579        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3580            ::fidl_next::protocol::Flexibility::Strict;
3581
3582        type Protocol = crate::Sdmmc;
3583
3584        type Request = crate::wire::SdmmcRegisterInBandInterruptRequest;
3585    }
3586
3587    impl ::fidl_next::TwoWayMethod for RegisterInBandInterrupt {
3588        type Response = ::fidl_next::wire::Result<
3589            'static,
3590            crate::wire::SdmmcRegisterInBandInterruptResponse,
3591            ::fidl_next::wire::fuchsia::Status,
3592        >;
3593    }
3594
3595    impl<___R> ::fidl_next::Respond<___R> for RegisterInBandInterrupt {
3596        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
3597
3598        fn respond(response: ___R) -> Self::Output {
3599            ::core::result::Result::Ok(response)
3600        }
3601    }
3602
3603    impl<___R> ::fidl_next::RespondErr<___R> for RegisterInBandInterrupt {
3604        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3605
3606        fn respond_err(response: ___R) -> Self::Output {
3607            ::core::result::Result::Err(response)
3608        }
3609    }
3610
3611    pub struct AckInBandInterrupt;
3612
3613    impl ::fidl_next::Method for AckInBandInterrupt {
3614        const ORDINAL: u64 = 6808342210488695055;
3615        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3616            ::fidl_next::protocol::Flexibility::Strict;
3617
3618        type Protocol = crate::Sdmmc;
3619
3620        type Request = ::fidl_next::wire::EmptyMessageBody;
3621    }
3622
3623    pub struct RegisterVmo;
3624
3625    impl ::fidl_next::Method for RegisterVmo {
3626        const ORDINAL: u64 = 1214620982318353152;
3627        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3628            ::fidl_next::protocol::Flexibility::Strict;
3629
3630        type Protocol = crate::Sdmmc;
3631
3632        type Request = crate::wire::SdmmcRegisterVmoRequest;
3633    }
3634
3635    impl ::fidl_next::TwoWayMethod for RegisterVmo {
3636        type Response = ::fidl_next::wire::Result<
3637            'static,
3638            crate::wire::SdmmcRegisterVmoResponse,
3639            ::fidl_next::wire::fuchsia::Status,
3640        >;
3641    }
3642
3643    impl<___R> ::fidl_next::Respond<___R> for RegisterVmo {
3644        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
3645
3646        fn respond(response: ___R) -> Self::Output {
3647            ::core::result::Result::Ok(response)
3648        }
3649    }
3650
3651    impl<___R> ::fidl_next::RespondErr<___R> for RegisterVmo {
3652        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3653
3654        fn respond_err(response: ___R) -> Self::Output {
3655            ::core::result::Result::Err(response)
3656        }
3657    }
3658
3659    pub struct UnregisterVmo;
3660
3661    impl ::fidl_next::Method for UnregisterVmo {
3662        const ORDINAL: u64 = 8712572721256898471;
3663        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3664            ::fidl_next::protocol::Flexibility::Strict;
3665
3666        type Protocol = crate::Sdmmc;
3667
3668        type Request = crate::wire::SdmmcUnregisterVmoRequest;
3669    }
3670
3671    impl ::fidl_next::TwoWayMethod for UnregisterVmo {
3672        type Response = ::fidl_next::wire::Result<
3673            'static,
3674            crate::wire::SdmmcUnregisterVmoResponse,
3675            ::fidl_next::wire::fuchsia::Status,
3676        >;
3677    }
3678
3679    impl<___R> ::fidl_next::Respond<___R> for UnregisterVmo {
3680        type Output = ::core::result::Result<
3681            crate::generic::SdmmcUnregisterVmoResponse<___R>,
3682            ::fidl_next::never::Never,
3683        >;
3684
3685        fn respond(response: ___R) -> Self::Output {
3686            ::core::result::Result::Ok(crate::generic::SdmmcUnregisterVmoResponse { vmo: response })
3687        }
3688    }
3689
3690    impl<___R> ::fidl_next::RespondErr<___R> for UnregisterVmo {
3691        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3692
3693        fn respond_err(response: ___R) -> Self::Output {
3694            ::core::result::Result::Err(response)
3695        }
3696    }
3697
3698    pub struct Request;
3699
3700    impl ::fidl_next::Method for Request {
3701        const ORDINAL: u64 = 2766657126441407958;
3702        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3703            ::fidl_next::protocol::Flexibility::Strict;
3704
3705        type Protocol = crate::Sdmmc;
3706
3707        type Request = crate::wire::SdmmcRequestRequest<'static>;
3708    }
3709
3710    impl ::fidl_next::TwoWayMethod for Request {
3711        type Response = ::fidl_next::wire::Result<
3712            'static,
3713            crate::wire::SdmmcRequestResponse,
3714            ::fidl_next::wire::fuchsia::Status,
3715        >;
3716    }
3717
3718    impl<___R> ::fidl_next::Respond<___R> for Request {
3719        type Output = ::core::result::Result<
3720            crate::generic::SdmmcRequestResponse<___R>,
3721            ::fidl_next::never::Never,
3722        >;
3723
3724        fn respond(response: ___R) -> Self::Output {
3725            ::core::result::Result::Ok(crate::generic::SdmmcRequestResponse { response: response })
3726        }
3727    }
3728
3729    impl<___R> ::fidl_next::RespondErr<___R> for Request {
3730        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
3731
3732        fn respond_err(response: ___R) -> Self::Output {
3733            ::core::result::Result::Err(response)
3734        }
3735    }
3736
3737    mod ___detail {
3738        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Sdmmc
3739        where
3740            ___T: ::fidl_next::Transport,
3741        {
3742            type Client = SdmmcClient<___T>;
3743            type Server = SdmmcServer<___T>;
3744        }
3745
3746        /// The client for the `Sdmmc` protocol.
3747        #[repr(transparent)]
3748        pub struct SdmmcClient<___T: ::fidl_next::Transport> {
3749            #[allow(dead_code)]
3750            client: ::fidl_next::protocol::Client<___T>,
3751        }
3752
3753        impl<___T> SdmmcClient<___T>
3754        where
3755            ___T: ::fidl_next::Transport,
3756        {
3757            #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once.  The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts.  Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`.  The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n   The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt.  The CQHCI\n   driver will destroy the peer end upon shutdown, which should be handled by the server as a\n   signal to stop monitoring the virtual interrupt and return to monitoring the physical\n   interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
3758            pub fn initialize_command_queueing(
3759                &self,
3760
3761                virtual_interrupt: impl ::fidl_next::Encode<
3762                    ::fidl_next::wire::fuchsia::Interrupt,
3763                    <___T as ::fidl_next::Transport>::SendBuffer,
3764                >,
3765
3766                virtual_interrupt_lifeline: impl ::fidl_next::Encode<
3767                    ::fidl_next::wire::fuchsia::EventPair,
3768                    <___T as ::fidl_next::Transport>::SendBuffer,
3769                >,
3770            ) -> ::fidl_next::TwoWayFuture<'_, super::InitializeCommandQueueing, ___T>
3771            where
3772                <___T as ::fidl_next::Transport>::SendBuffer:
3773                    ::fidl_next::encoder::InternalHandleEncoder,
3774                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3775            {
3776                self.initialize_command_queueing_with(
3777                    crate::generic::CqhciInitializeCommandQueueingRequest {
3778                        virtual_interrupt,
3779
3780                        virtual_interrupt_lifeline,
3781                    },
3782                )
3783            }
3784
3785            #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once.  The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts.  Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`.  The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n   The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt.  The CQHCI\n   driver will destroy the peer end upon shutdown, which should be handled by the server as a\n   signal to stop monitoring the virtual interrupt and return to monitoring the physical\n   interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
3786            pub fn initialize_command_queueing_with<___R>(
3787                &self,
3788                request: ___R,
3789            ) -> ::fidl_next::TwoWayFuture<'_, super::InitializeCommandQueueing, ___T>
3790            where
3791                ___R: ::fidl_next::Encode<
3792                        crate::wire::CqhciInitializeCommandQueueingRequest,
3793                        <___T as ::fidl_next::Transport>::SendBuffer,
3794                    >,
3795            {
3796                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3797                    359559202570093266,
3798                    <super::InitializeCommandQueueing as ::fidl_next::Method>::FLEXIBILITY,
3799                    request,
3800                ))
3801            }
3802
3803            #[doc = " Enables the Command Queueing Engine.  The CQHCI driver is expected to already have called\n [`InitializeCommandQueueing`] to handle interrupts.\n While CQHCI is enabled, it is the caller\'s responsibility to only submit regular requests\n (via [`Request`]) via DCMD, or after disabling CQHCI.\n"]
3804            pub fn enable_cqhci(&self) -> ::fidl_next::TwoWayFuture<'_, super::EnableCqhci, ___T> {
3805                ::fidl_next::TwoWayFuture::from_untyped(
3806                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
3807                        7267012061448928954,
3808                        <super::EnableCqhci as ::fidl_next::Method>::FLEXIBILITY,
3809                        (),
3810                    ),
3811                )
3812            }
3813
3814            #[doc = " Disables the Command Queueing Engine.  `EnableCqhci` must have previously been called.  From\n this point onwards, regular requests can be submitted (until `EnableCqhci` is called again).\n"]
3815            pub fn disable_cqhci(
3816                &self,
3817            ) -> ::fidl_next::TwoWayFuture<'_, super::DisableCqhci, ___T> {
3818                ::fidl_next::TwoWayFuture::from_untyped(
3819                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
3820                        4177196635683073751,
3821                        <super::DisableCqhci as ::fidl_next::Method>::FLEXIBILITY,
3822                        (),
3823                    ),
3824                )
3825            }
3826
3827            #[doc = " Get host info.\n"]
3828            pub fn host_info(&self) -> ::fidl_next::TwoWayFuture<'_, super::HostInfo, ___T> {
3829                ::fidl_next::TwoWayFuture::from_untyped(
3830                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
3831                        8475471856809867100,
3832                        <super::HostInfo as ::fidl_next::Method>::FLEXIBILITY,
3833                        (),
3834                    ),
3835                )
3836            }
3837
3838            #[doc = " Set signal voltage.\n"]
3839            pub fn set_signal_voltage(
3840                &self,
3841
3842                voltage: impl ::fidl_next::Encode<
3843                    crate::wire::SdmmcVoltage,
3844                    <___T as ::fidl_next::Transport>::SendBuffer,
3845                >,
3846            ) -> ::fidl_next::TwoWayFuture<'_, super::SetSignalVoltage, ___T>
3847            where
3848                <___T as ::fidl_next::Transport>::SendBuffer:
3849                    ::fidl_next::encoder::InternalHandleEncoder,
3850            {
3851                self.set_signal_voltage_with(crate::generic::SdmmcSetSignalVoltageRequest {
3852                    voltage,
3853                })
3854            }
3855
3856            #[doc = " Set signal voltage.\n"]
3857            pub fn set_signal_voltage_with<___R>(
3858                &self,
3859                request: ___R,
3860            ) -> ::fidl_next::TwoWayFuture<'_, super::SetSignalVoltage, ___T>
3861            where
3862                ___R: ::fidl_next::Encode<
3863                        crate::wire::SdmmcSetSignalVoltageRequest,
3864                        <___T as ::fidl_next::Transport>::SendBuffer,
3865                    >,
3866            {
3867                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3868                    5360485811549546918,
3869                    <super::SetSignalVoltage as ::fidl_next::Method>::FLEXIBILITY,
3870                    request,
3871                ))
3872            }
3873
3874            #[doc = " Set bus width.\n"]
3875            pub fn set_bus_width(
3876                &self,
3877
3878                bus_width: impl ::fidl_next::Encode<
3879                    crate::wire::SdmmcBusWidth,
3880                    <___T as ::fidl_next::Transport>::SendBuffer,
3881                >,
3882            ) -> ::fidl_next::TwoWayFuture<'_, super::SetBusWidth, ___T>
3883            where
3884                <___T as ::fidl_next::Transport>::SendBuffer:
3885                    ::fidl_next::encoder::InternalHandleEncoder,
3886            {
3887                self.set_bus_width_with(crate::generic::SdmmcSetBusWidthRequest { bus_width })
3888            }
3889
3890            #[doc = " Set bus width.\n"]
3891            pub fn set_bus_width_with<___R>(
3892                &self,
3893                request: ___R,
3894            ) -> ::fidl_next::TwoWayFuture<'_, super::SetBusWidth, ___T>
3895            where
3896                ___R: ::fidl_next::Encode<
3897                        crate::wire::SdmmcSetBusWidthRequest,
3898                        <___T as ::fidl_next::Transport>::SendBuffer,
3899                    >,
3900            {
3901                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3902                    3438431046250338573,
3903                    <super::SetBusWidth as ::fidl_next::Method>::FLEXIBILITY,
3904                    request,
3905                ))
3906            }
3907
3908            #[doc = " Set bus frequency, zero means disable the clock to the card.\n"]
3909            pub fn set_bus_freq(
3910                &self,
3911
3912                bus_freq: impl ::fidl_next::Encode<
3913                    ::fidl_next::wire::Uint32,
3914                    <___T as ::fidl_next::Transport>::SendBuffer,
3915                >,
3916            ) -> ::fidl_next::TwoWayFuture<'_, super::SetBusFreq, ___T>
3917            where
3918                <___T as ::fidl_next::Transport>::SendBuffer:
3919                    ::fidl_next::encoder::InternalHandleEncoder,
3920            {
3921                self.set_bus_freq_with(crate::generic::SdmmcSetBusFreqRequest { bus_freq })
3922            }
3923
3924            #[doc = " Set bus frequency, zero means disable the clock to the card.\n"]
3925            pub fn set_bus_freq_with<___R>(
3926                &self,
3927                request: ___R,
3928            ) -> ::fidl_next::TwoWayFuture<'_, super::SetBusFreq, ___T>
3929            where
3930                ___R: ::fidl_next::Encode<
3931                        crate::wire::SdmmcSetBusFreqRequest,
3932                        <___T as ::fidl_next::Transport>::SendBuffer,
3933                    >,
3934            {
3935                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3936                    6624771772063616636,
3937                    <super::SetBusFreq as ::fidl_next::Method>::FLEXIBILITY,
3938                    request,
3939                ))
3940            }
3941
3942            #[doc = " Set mmc timing.\n"]
3943            pub fn set_timing(
3944                &self,
3945
3946                timing: impl ::fidl_next::Encode<
3947                    crate::wire::SdmmcTiming,
3948                    <___T as ::fidl_next::Transport>::SendBuffer,
3949                >,
3950            ) -> ::fidl_next::TwoWayFuture<'_, super::SetTiming, ___T>
3951            where
3952                <___T as ::fidl_next::Transport>::SendBuffer:
3953                    ::fidl_next::encoder::InternalHandleEncoder,
3954            {
3955                self.set_timing_with(crate::generic::SdmmcSetTimingRequest { timing })
3956            }
3957
3958            #[doc = " Set mmc timing.\n"]
3959            pub fn set_timing_with<___R>(
3960                &self,
3961                request: ___R,
3962            ) -> ::fidl_next::TwoWayFuture<'_, super::SetTiming, ___T>
3963            where
3964                ___R: ::fidl_next::Encode<
3965                        crate::wire::SdmmcSetTimingRequest,
3966                        <___T as ::fidl_next::Transport>::SendBuffer,
3967                    >,
3968            {
3969                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3970                    7991421876873192632,
3971                    <super::SetTiming as ::fidl_next::Method>::FLEXIBILITY,
3972                    request,
3973                ))
3974            }
3975
3976            #[doc = " Issue a hw reset.\n"]
3977            pub fn hw_reset(&self) -> ::fidl_next::TwoWayFuture<'_, super::HwReset, ___T> {
3978                ::fidl_next::TwoWayFuture::from_untyped(
3979                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
3980                        3335326454881665312,
3981                        <super::HwReset as ::fidl_next::Method>::FLEXIBILITY,
3982                        (),
3983                    ),
3984                )
3985            }
3986
3987            #[doc = " Perform tuning.\n"]
3988            pub fn perform_tuning(
3989                &self,
3990
3991                cmd_idx: impl ::fidl_next::Encode<
3992                    ::fidl_next::wire::Uint32,
3993                    <___T as ::fidl_next::Transport>::SendBuffer,
3994                >,
3995            ) -> ::fidl_next::TwoWayFuture<'_, super::PerformTuning, ___T>
3996            where
3997                <___T as ::fidl_next::Transport>::SendBuffer:
3998                    ::fidl_next::encoder::InternalHandleEncoder,
3999            {
4000                self.perform_tuning_with(crate::generic::SdmmcPerformTuningRequest { cmd_idx })
4001            }
4002
4003            #[doc = " Perform tuning.\n"]
4004            pub fn perform_tuning_with<___R>(
4005                &self,
4006                request: ___R,
4007            ) -> ::fidl_next::TwoWayFuture<'_, super::PerformTuning, ___T>
4008            where
4009                ___R: ::fidl_next::Encode<
4010                        crate::wire::SdmmcPerformTuningRequest,
4011                        <___T as ::fidl_next::Transport>::SendBuffer,
4012                    >,
4013            {
4014                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4015                    5267400993243262226,
4016                    <super::PerformTuning as ::fidl_next::Method>::FLEXIBILITY,
4017                    request,
4018                ))
4019            }
4020
4021            #[doc = " Register the given callback to be called when an in-band interrupt is received from the\n card. Before calling the callback the protocol implementation will disable the in-band\n interrupt in the controller. In-band interrupts can be re-enabled by calling\n `AckInBandInterrupt()` once the previous interrupt has been handled by the client.\n"]
4022            pub fn register_in_band_interrupt(
4023                &self,
4024
4025                interrupt_cb: impl ::fidl_next::Encode<
4026                    ::fidl_next::ClientEnd<crate::InBandInterrupt, ::fdf_fidl::wire::DriverChannel>,
4027                    <___T as ::fidl_next::Transport>::SendBuffer,
4028                >,
4029            ) -> ::fidl_next::TwoWayFuture<'_, super::RegisterInBandInterrupt, ___T>
4030            where
4031                <___T as ::fidl_next::Transport>::SendBuffer:
4032                    ::fidl_next::encoder::InternalHandleEncoder,
4033                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4034            {
4035                self.register_in_band_interrupt_with(
4036                    crate::generic::SdmmcRegisterInBandInterruptRequest { interrupt_cb },
4037                )
4038            }
4039
4040            #[doc = " Register the given callback to be called when an in-band interrupt is received from the\n card. Before calling the callback the protocol implementation will disable the in-band\n interrupt in the controller. In-band interrupts can be re-enabled by calling\n `AckInBandInterrupt()` once the previous interrupt has been handled by the client.\n"]
4041            pub fn register_in_band_interrupt_with<___R>(
4042                &self,
4043                request: ___R,
4044            ) -> ::fidl_next::TwoWayFuture<'_, super::RegisterInBandInterrupt, ___T>
4045            where
4046                ___R: ::fidl_next::Encode<
4047                        crate::wire::SdmmcRegisterInBandInterruptRequest,
4048                        <___T as ::fidl_next::Transport>::SendBuffer,
4049                    >,
4050            {
4051                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4052                    7280830926204192948,
4053                    <super::RegisterInBandInterrupt as ::fidl_next::Method>::FLEXIBILITY,
4054                    request,
4055                ))
4056            }
4057
4058            pub fn ack_in_band_interrupt(&self) -> ::fidl_next::SendFuture<'_, ___T> {
4059                ::fidl_next::SendFuture::from_untyped(
4060                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
4061                        6808342210488695055,
4062                        <super::AckInBandInterrupt as ::fidl_next::Method>::FLEXIBILITY,
4063                        (),
4064                    ),
4065                )
4066            }
4067
4068            #[doc = " In the methods below, vmo_id is used to uniquely identify a VMO that will be passed to\n Request in an SdmmcBufferRegion. VMO IDs are chosen by the caller, and may be any uint32\n value.\n Registers a VMO and transfers ownership to the protocol implementation. vmo_rights is a bit\n field containing SdmmcVmoRight values, and determines the read/write permissions used by\n the implementation when pinning or mapping the VMO. The implementation may pin vmo during\n this call or any time it is used in a request, and may keep it pinned until the VMO is\n unregistered. client_id may be in [0, SDMMC_MAX_CLIENT_ID] and identifies the ID space for\n this VMO to be registered in (that is, two different VMOs may use the same ID if they are\n registered for different clients).\n"]
4069            pub fn register_vmo(
4070                &self,
4071
4072                vmo_id: impl ::fidl_next::Encode<
4073                    ::fidl_next::wire::Uint32,
4074                    <___T as ::fidl_next::Transport>::SendBuffer,
4075                >,
4076
4077                client_id: impl ::fidl_next::Encode<u8, <___T as ::fidl_next::Transport>::SendBuffer>,
4078
4079                vmo: impl ::fidl_next::Encode<
4080                    ::fidl_next::wire::fuchsia::Vmo,
4081                    <___T as ::fidl_next::Transport>::SendBuffer,
4082                >,
4083
4084                offset: impl ::fidl_next::Encode<
4085                    ::fidl_next::wire::Uint64,
4086                    <___T as ::fidl_next::Transport>::SendBuffer,
4087                >,
4088
4089                size: impl ::fidl_next::Encode<
4090                    ::fidl_next::wire::Uint64,
4091                    <___T as ::fidl_next::Transport>::SendBuffer,
4092                >,
4093
4094                vmo_rights: impl ::fidl_next::Encode<
4095                    crate::wire::SdmmcVmoRight,
4096                    <___T as ::fidl_next::Transport>::SendBuffer,
4097                >,
4098            ) -> ::fidl_next::TwoWayFuture<'_, super::RegisterVmo, ___T>
4099            where
4100                <___T as ::fidl_next::Transport>::SendBuffer:
4101                    ::fidl_next::encoder::InternalHandleEncoder,
4102                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4103            {
4104                self.register_vmo_with(crate::generic::SdmmcRegisterVmoRequest {
4105                    vmo_id,
4106
4107                    client_id,
4108
4109                    vmo,
4110
4111                    offset,
4112
4113                    size,
4114
4115                    vmo_rights,
4116                })
4117            }
4118
4119            #[doc = " In the methods below, vmo_id is used to uniquely identify a VMO that will be passed to\n Request in an SdmmcBufferRegion. VMO IDs are chosen by the caller, and may be any uint32\n value.\n Registers a VMO and transfers ownership to the protocol implementation. vmo_rights is a bit\n field containing SdmmcVmoRight values, and determines the read/write permissions used by\n the implementation when pinning or mapping the VMO. The implementation may pin vmo during\n this call or any time it is used in a request, and may keep it pinned until the VMO is\n unregistered. client_id may be in [0, SDMMC_MAX_CLIENT_ID] and identifies the ID space for\n this VMO to be registered in (that is, two different VMOs may use the same ID if they are\n registered for different clients).\n"]
4120            pub fn register_vmo_with<___R>(
4121                &self,
4122                request: ___R,
4123            ) -> ::fidl_next::TwoWayFuture<'_, super::RegisterVmo, ___T>
4124            where
4125                ___R: ::fidl_next::Encode<
4126                        crate::wire::SdmmcRegisterVmoRequest,
4127                        <___T as ::fidl_next::Transport>::SendBuffer,
4128                    >,
4129            {
4130                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4131                    1214620982318353152,
4132                    <super::RegisterVmo as ::fidl_next::Method>::FLEXIBILITY,
4133                    request,
4134                ))
4135            }
4136
4137            #[doc = " The callee unmaps/unpins the VMO and returns ownership to the caller.\n"]
4138            pub fn unregister_vmo(
4139                &self,
4140
4141                vmo_id: impl ::fidl_next::Encode<
4142                    ::fidl_next::wire::Uint32,
4143                    <___T as ::fidl_next::Transport>::SendBuffer,
4144                >,
4145
4146                client_id: impl ::fidl_next::Encode<u8, <___T as ::fidl_next::Transport>::SendBuffer>,
4147            ) -> ::fidl_next::TwoWayFuture<'_, super::UnregisterVmo, ___T>
4148            where
4149                <___T as ::fidl_next::Transport>::SendBuffer:
4150                    ::fidl_next::encoder::InternalHandleEncoder,
4151            {
4152                self.unregister_vmo_with(crate::generic::SdmmcUnregisterVmoRequest {
4153                    vmo_id,
4154
4155                    client_id,
4156                })
4157            }
4158
4159            #[doc = " The callee unmaps/unpins the VMO and returns ownership to the caller.\n"]
4160            pub fn unregister_vmo_with<___R>(
4161                &self,
4162                request: ___R,
4163            ) -> ::fidl_next::TwoWayFuture<'_, super::UnregisterVmo, ___T>
4164            where
4165                ___R: ::fidl_next::Encode<
4166                        crate::wire::SdmmcUnregisterVmoRequest,
4167                        <___T as ::fidl_next::Transport>::SendBuffer,
4168                    >,
4169            {
4170                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4171                    8712572721256898471,
4172                    <super::UnregisterVmo as ::fidl_next::Method>::FLEXIBILITY,
4173                    request,
4174                ))
4175            }
4176
4177            #[doc = " Perform the requests in order, atomically (i.e., no intervening requests). Furthermore,\n calls are replied to in the order they are received. If an error occurs, abort any remaining\n requests. Else, return the response of the last request.\n\n The protocol implementation chooses whether or not to use DMA\n depending on the properties of the request and the capabilities of the controller.\n\n Clients are responsible for performing the following cache operations:\n\n After read requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE on buffers that\n   have been mapped by the client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN_INVALIDATE on all other buffers.\n\n Note that writing to any portion of a buffer before Request has returned can corrupt the\n received data.\n\n Before write requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA on buffers that have been mapped by the\n   client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN on all other buffers.\n"]
4178            pub fn request(
4179                &self,
4180
4181                reqs: impl ::fidl_next::Encode<
4182                    ::fidl_next::wire::Vector<'static, crate::wire::SdmmcReq<'static>>,
4183                    <___T as ::fidl_next::Transport>::SendBuffer,
4184                >,
4185            ) -> ::fidl_next::TwoWayFuture<'_, super::Request, ___T>
4186            where
4187                <___T as ::fidl_next::Transport>::SendBuffer:
4188                    ::fidl_next::encoder::InternalHandleEncoder,
4189                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
4190                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4191            {
4192                self.request_with(crate::generic::SdmmcRequestRequest { reqs })
4193            }
4194
4195            #[doc = " Perform the requests in order, atomically (i.e., no intervening requests). Furthermore,\n calls are replied to in the order they are received. If an error occurs, abort any remaining\n requests. Else, return the response of the last request.\n\n The protocol implementation chooses whether or not to use DMA\n depending on the properties of the request and the capabilities of the controller.\n\n Clients are responsible for performing the following cache operations:\n\n After read requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE on buffers that\n   have been mapped by the client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN_INVALIDATE on all other buffers.\n\n Note that writing to any portion of a buffer before Request has returned can corrupt the\n received data.\n\n Before write requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA on buffers that have been mapped by the\n   client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN on all other buffers.\n"]
4196            pub fn request_with<___R>(
4197                &self,
4198                request: ___R,
4199            ) -> ::fidl_next::TwoWayFuture<'_, super::Request, ___T>
4200            where
4201                ___R: ::fidl_next::Encode<
4202                        crate::wire::SdmmcRequestRequest<'static>,
4203                        <___T as ::fidl_next::Transport>::SendBuffer,
4204                    >,
4205            {
4206                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4207                    2766657126441407958,
4208                    <super::Request as ::fidl_next::Method>::FLEXIBILITY,
4209                    request,
4210                ))
4211            }
4212        }
4213
4214        /// The server for the `Sdmmc` protocol.
4215        #[repr(transparent)]
4216        pub struct SdmmcServer<___T: ::fidl_next::Transport> {
4217            server: ::fidl_next::protocol::Server<___T>,
4218        }
4219
4220        impl<___T> SdmmcServer<___T> where ___T: ::fidl_next::Transport {}
4221    }
4222}
4223
4224#[diagnostic::on_unimplemented(
4225    note = "If {Self} implements the non-local SdmmcClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4226)]
4227
4228/// A client handler for the Sdmmc protocol.
4229///
4230/// See [`Sdmmc`] for more details.
4231pub trait SdmmcLocalClientHandler<
4232    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4233    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4234>
4235{
4236}
4237
4238impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Sdmmc
4239where
4240    ___H: SdmmcLocalClientHandler<___T>,
4241    ___T: ::fidl_next::Transport,
4242{
4243    async fn on_event(
4244        handler: &mut ___H,
4245        mut message: ::fidl_next::Message<___T>,
4246    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4247        match *message.header().ordinal {
4248            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4249        }
4250    }
4251}
4252
4253#[diagnostic::on_unimplemented(
4254    note = "If {Self} implements the non-local SdmmcServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4255)]
4256
4257/// A server handler for the Sdmmc protocol.
4258///
4259/// See [`Sdmmc`] for more details.
4260pub trait SdmmcLocalServerHandler<
4261    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4262    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4263>
4264{
4265    #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once.  The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts.  Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`.  The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n   The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt.  The CQHCI\n   driver will destroy the peer end upon shutdown, which should be handled by the server as a\n   signal to stop monitoring the virtual interrupt and return to monitoring the physical\n   interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
4266    fn initialize_command_queueing(
4267        &mut self,
4268
4269        request: ::fidl_next::Request<sdmmc::InitializeCommandQueueing, ___T>,
4270
4271        responder: ::fidl_next::Responder<sdmmc::InitializeCommandQueueing, ___T>,
4272    ) -> impl ::core::future::Future<Output = ()>;
4273
4274    #[doc = " Enables the Command Queueing Engine.  The CQHCI driver is expected to already have called\n [`InitializeCommandQueueing`] to handle interrupts.\n While CQHCI is enabled, it is the caller\'s responsibility to only submit regular requests\n (via [`Request`]) via DCMD, or after disabling CQHCI.\n"]
4275    fn enable_cqhci(
4276        &mut self,
4277
4278        responder: ::fidl_next::Responder<sdmmc::EnableCqhci, ___T>,
4279    ) -> impl ::core::future::Future<Output = ()>;
4280
4281    #[doc = " Disables the Command Queueing Engine.  `EnableCqhci` must have previously been called.  From\n this point onwards, regular requests can be submitted (until `EnableCqhci` is called again).\n"]
4282    fn disable_cqhci(
4283        &mut self,
4284
4285        responder: ::fidl_next::Responder<sdmmc::DisableCqhci, ___T>,
4286    ) -> impl ::core::future::Future<Output = ()>;
4287
4288    #[doc = " Get host info.\n"]
4289    fn host_info(
4290        &mut self,
4291
4292        responder: ::fidl_next::Responder<sdmmc::HostInfo, ___T>,
4293    ) -> impl ::core::future::Future<Output = ()>;
4294
4295    #[doc = " Set signal voltage.\n"]
4296    fn set_signal_voltage(
4297        &mut self,
4298
4299        request: ::fidl_next::Request<sdmmc::SetSignalVoltage, ___T>,
4300
4301        responder: ::fidl_next::Responder<sdmmc::SetSignalVoltage, ___T>,
4302    ) -> impl ::core::future::Future<Output = ()>;
4303
4304    #[doc = " Set bus width.\n"]
4305    fn set_bus_width(
4306        &mut self,
4307
4308        request: ::fidl_next::Request<sdmmc::SetBusWidth, ___T>,
4309
4310        responder: ::fidl_next::Responder<sdmmc::SetBusWidth, ___T>,
4311    ) -> impl ::core::future::Future<Output = ()>;
4312
4313    #[doc = " Set bus frequency, zero means disable the clock to the card.\n"]
4314    fn set_bus_freq(
4315        &mut self,
4316
4317        request: ::fidl_next::Request<sdmmc::SetBusFreq, ___T>,
4318
4319        responder: ::fidl_next::Responder<sdmmc::SetBusFreq, ___T>,
4320    ) -> impl ::core::future::Future<Output = ()>;
4321
4322    #[doc = " Set mmc timing.\n"]
4323    fn set_timing(
4324        &mut self,
4325
4326        request: ::fidl_next::Request<sdmmc::SetTiming, ___T>,
4327
4328        responder: ::fidl_next::Responder<sdmmc::SetTiming, ___T>,
4329    ) -> impl ::core::future::Future<Output = ()>;
4330
4331    #[doc = " Issue a hw reset.\n"]
4332    fn hw_reset(
4333        &mut self,
4334
4335        responder: ::fidl_next::Responder<sdmmc::HwReset, ___T>,
4336    ) -> impl ::core::future::Future<Output = ()>;
4337
4338    #[doc = " Perform tuning.\n"]
4339    fn perform_tuning(
4340        &mut self,
4341
4342        request: ::fidl_next::Request<sdmmc::PerformTuning, ___T>,
4343
4344        responder: ::fidl_next::Responder<sdmmc::PerformTuning, ___T>,
4345    ) -> impl ::core::future::Future<Output = ()>;
4346
4347    #[doc = " Register the given callback to be called when an in-band interrupt is received from the\n card. Before calling the callback the protocol implementation will disable the in-band\n interrupt in the controller. In-band interrupts can be re-enabled by calling\n `AckInBandInterrupt()` once the previous interrupt has been handled by the client.\n"]
4348    fn register_in_band_interrupt(
4349        &mut self,
4350
4351        request: ::fidl_next::Request<sdmmc::RegisterInBandInterrupt, ___T>,
4352
4353        responder: ::fidl_next::Responder<sdmmc::RegisterInBandInterrupt, ___T>,
4354    ) -> impl ::core::future::Future<Output = ()>;
4355
4356    fn ack_in_band_interrupt(&mut self) -> impl ::core::future::Future<Output = ()>;
4357
4358    #[doc = " In the methods below, vmo_id is used to uniquely identify a VMO that will be passed to\n Request in an SdmmcBufferRegion. VMO IDs are chosen by the caller, and may be any uint32\n value.\n Registers a VMO and transfers ownership to the protocol implementation. vmo_rights is a bit\n field containing SdmmcVmoRight values, and determines the read/write permissions used by\n the implementation when pinning or mapping the VMO. The implementation may pin vmo during\n this call or any time it is used in a request, and may keep it pinned until the VMO is\n unregistered. client_id may be in [0, SDMMC_MAX_CLIENT_ID] and identifies the ID space for\n this VMO to be registered in (that is, two different VMOs may use the same ID if they are\n registered for different clients).\n"]
4359    fn register_vmo(
4360        &mut self,
4361
4362        request: ::fidl_next::Request<sdmmc::RegisterVmo, ___T>,
4363
4364        responder: ::fidl_next::Responder<sdmmc::RegisterVmo, ___T>,
4365    ) -> impl ::core::future::Future<Output = ()>;
4366
4367    #[doc = " The callee unmaps/unpins the VMO and returns ownership to the caller.\n"]
4368    fn unregister_vmo(
4369        &mut self,
4370
4371        request: ::fidl_next::Request<sdmmc::UnregisterVmo, ___T>,
4372
4373        responder: ::fidl_next::Responder<sdmmc::UnregisterVmo, ___T>,
4374    ) -> impl ::core::future::Future<Output = ()>;
4375
4376    #[doc = " Perform the requests in order, atomically (i.e., no intervening requests). Furthermore,\n calls are replied to in the order they are received. If an error occurs, abort any remaining\n requests. Else, return the response of the last request.\n\n The protocol implementation chooses whether or not to use DMA\n depending on the properties of the request and the capabilities of the controller.\n\n Clients are responsible for performing the following cache operations:\n\n After read requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE on buffers that\n   have been mapped by the client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN_INVALIDATE on all other buffers.\n\n Note that writing to any portion of a buffer before Request has returned can corrupt the\n received data.\n\n Before write requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA on buffers that have been mapped by the\n   client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN on all other buffers.\n"]
4377    fn request(
4378        &mut self,
4379
4380        request: ::fidl_next::Request<sdmmc::Request, ___T>,
4381
4382        responder: ::fidl_next::Responder<sdmmc::Request, ___T>,
4383    ) -> impl ::core::future::Future<Output = ()>;
4384}
4385
4386impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Sdmmc
4387where
4388    ___H: SdmmcLocalServerHandler<___T>,
4389    ___T: ::fidl_next::Transport,
4390    for<'de> crate::wire::CqhciInitializeCommandQueueingRequest: ::fidl_next::Decode<
4391            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4392            Constraint = (),
4393        >,
4394    for<'de> crate::wire::SdmmcSetSignalVoltageRequest: ::fidl_next::Decode<
4395            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4396            Constraint = (),
4397        >,
4398    for<'de> crate::wire::SdmmcSetBusWidthRequest: ::fidl_next::Decode<
4399            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4400            Constraint = (),
4401        >,
4402    for<'de> crate::wire::SdmmcSetBusFreqRequest: ::fidl_next::Decode<
4403            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4404            Constraint = (),
4405        >,
4406    for<'de> crate::wire::SdmmcSetTimingRequest: ::fidl_next::Decode<
4407            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4408            Constraint = (),
4409        >,
4410    for<'de> crate::wire::SdmmcPerformTuningRequest: ::fidl_next::Decode<
4411            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4412            Constraint = (),
4413        >,
4414    for<'de> crate::wire::SdmmcRegisterInBandInterruptRequest: ::fidl_next::Decode<
4415            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4416            Constraint = (),
4417        >,
4418    for<'de> crate::wire::SdmmcRegisterVmoRequest: ::fidl_next::Decode<
4419            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4420            Constraint = (),
4421        >,
4422    for<'de> crate::wire::SdmmcUnregisterVmoRequest: ::fidl_next::Decode<
4423            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4424            Constraint = (),
4425        >,
4426    for<'de> crate::wire::SdmmcRequestRequest<'de>: ::fidl_next::Decode<
4427            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4428            Constraint = (),
4429        >,
4430{
4431    async fn on_one_way(
4432        handler: &mut ___H,
4433        mut message: ::fidl_next::Message<___T>,
4434    ) -> ::core::result::Result<
4435        (),
4436        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4437    > {
4438        match *message.header().ordinal {
4439            6808342210488695055 => {
4440                handler.ack_in_band_interrupt().await;
4441                Ok(())
4442            }
4443
4444            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4445        }
4446    }
4447
4448    async fn on_two_way(
4449        handler: &mut ___H,
4450        mut message: ::fidl_next::Message<___T>,
4451        responder: ::fidl_next::protocol::Responder<___T>,
4452    ) -> ::core::result::Result<
4453        (),
4454        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4455    > {
4456        match *message.header().ordinal {
4457            359559202570093266 => {
4458                let responder = ::fidl_next::Responder::from_untyped(responder);
4459
4460                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4461                    Ok(decoded) => {
4462                        handler
4463                            .initialize_command_queueing(
4464                                ::fidl_next::Request::from_decoded(decoded),
4465                                responder,
4466                            )
4467                            .await;
4468                        Ok(())
4469                    }
4470                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4471                        ordinal: 359559202570093266,
4472                        error,
4473                    }),
4474                }
4475            }
4476
4477            7267012061448928954 => {
4478                let responder = ::fidl_next::Responder::from_untyped(responder);
4479
4480                handler.enable_cqhci(responder).await;
4481                Ok(())
4482            }
4483
4484            4177196635683073751 => {
4485                let responder = ::fidl_next::Responder::from_untyped(responder);
4486
4487                handler.disable_cqhci(responder).await;
4488                Ok(())
4489            }
4490
4491            8475471856809867100 => {
4492                let responder = ::fidl_next::Responder::from_untyped(responder);
4493
4494                handler.host_info(responder).await;
4495                Ok(())
4496            }
4497
4498            5360485811549546918 => {
4499                let responder = ::fidl_next::Responder::from_untyped(responder);
4500
4501                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4502                    Ok(decoded) => {
4503                        handler
4504                            .set_signal_voltage(
4505                                ::fidl_next::Request::from_decoded(decoded),
4506                                responder,
4507                            )
4508                            .await;
4509                        Ok(())
4510                    }
4511                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4512                        ordinal: 5360485811549546918,
4513                        error,
4514                    }),
4515                }
4516            }
4517
4518            3438431046250338573 => {
4519                let responder = ::fidl_next::Responder::from_untyped(responder);
4520
4521                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4522                    Ok(decoded) => {
4523                        handler
4524                            .set_bus_width(::fidl_next::Request::from_decoded(decoded), responder)
4525                            .await;
4526                        Ok(())
4527                    }
4528                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4529                        ordinal: 3438431046250338573,
4530                        error,
4531                    }),
4532                }
4533            }
4534
4535            6624771772063616636 => {
4536                let responder = ::fidl_next::Responder::from_untyped(responder);
4537
4538                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4539                    Ok(decoded) => {
4540                        handler
4541                            .set_bus_freq(::fidl_next::Request::from_decoded(decoded), responder)
4542                            .await;
4543                        Ok(())
4544                    }
4545                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4546                        ordinal: 6624771772063616636,
4547                        error,
4548                    }),
4549                }
4550            }
4551
4552            7991421876873192632 => {
4553                let responder = ::fidl_next::Responder::from_untyped(responder);
4554
4555                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4556                    Ok(decoded) => {
4557                        handler
4558                            .set_timing(::fidl_next::Request::from_decoded(decoded), responder)
4559                            .await;
4560                        Ok(())
4561                    }
4562                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4563                        ordinal: 7991421876873192632,
4564                        error,
4565                    }),
4566                }
4567            }
4568
4569            3335326454881665312 => {
4570                let responder = ::fidl_next::Responder::from_untyped(responder);
4571
4572                handler.hw_reset(responder).await;
4573                Ok(())
4574            }
4575
4576            5267400993243262226 => {
4577                let responder = ::fidl_next::Responder::from_untyped(responder);
4578
4579                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4580                    Ok(decoded) => {
4581                        handler
4582                            .perform_tuning(::fidl_next::Request::from_decoded(decoded), responder)
4583                            .await;
4584                        Ok(())
4585                    }
4586                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4587                        ordinal: 5267400993243262226,
4588                        error,
4589                    }),
4590                }
4591            }
4592
4593            7280830926204192948 => {
4594                let responder = ::fidl_next::Responder::from_untyped(responder);
4595
4596                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4597                    Ok(decoded) => {
4598                        handler
4599                            .register_in_band_interrupt(
4600                                ::fidl_next::Request::from_decoded(decoded),
4601                                responder,
4602                            )
4603                            .await;
4604                        Ok(())
4605                    }
4606                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4607                        ordinal: 7280830926204192948,
4608                        error,
4609                    }),
4610                }
4611            }
4612
4613            1214620982318353152 => {
4614                let responder = ::fidl_next::Responder::from_untyped(responder);
4615
4616                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4617                    Ok(decoded) => {
4618                        handler
4619                            .register_vmo(::fidl_next::Request::from_decoded(decoded), responder)
4620                            .await;
4621                        Ok(())
4622                    }
4623                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4624                        ordinal: 1214620982318353152,
4625                        error,
4626                    }),
4627                }
4628            }
4629
4630            8712572721256898471 => {
4631                let responder = ::fidl_next::Responder::from_untyped(responder);
4632
4633                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4634                    Ok(decoded) => {
4635                        handler
4636                            .unregister_vmo(::fidl_next::Request::from_decoded(decoded), responder)
4637                            .await;
4638                        Ok(())
4639                    }
4640                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4641                        ordinal: 8712572721256898471,
4642                        error,
4643                    }),
4644                }
4645            }
4646
4647            2766657126441407958 => {
4648                let responder = ::fidl_next::Responder::from_untyped(responder);
4649
4650                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4651                    Ok(decoded) => {
4652                        handler
4653                            .request(::fidl_next::Request::from_decoded(decoded), responder)
4654                            .await;
4655                        Ok(())
4656                    }
4657                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4658                        ordinal: 2766657126441407958,
4659                        error,
4660                    }),
4661                }
4662            }
4663
4664            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4665        }
4666    }
4667}
4668
4669/// A client handler for the Sdmmc protocol.
4670///
4671/// See [`Sdmmc`] for more details.
4672pub trait SdmmcClientHandler<
4673    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4674    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4675>
4676{
4677}
4678
4679impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Sdmmc
4680where
4681    ___H: SdmmcClientHandler<___T> + ::core::marker::Send,
4682    ___T: ::fidl_next::Transport,
4683{
4684    async fn on_event(
4685        handler: &mut ___H,
4686        mut message: ::fidl_next::Message<___T>,
4687    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4688        match *message.header().ordinal {
4689            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4690        }
4691    }
4692}
4693
4694/// A server handler for the Sdmmc protocol.
4695///
4696/// See [`Sdmmc`] for more details.
4697pub trait SdmmcServerHandler<
4698    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4699    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4700>
4701{
4702    #[doc = " Initializes the CQHCI driver, providing it with all necessary resources.\n\n This call is expected to be made once.  The server should reject any additional calls\n until the peer end of `virtual_interrupt_lifeline` closes.\n\n # Interrupt Delegation\n\n While the CQHCI driver is running, it takes over the physical IRQ object from its underlying\n driver, and directly handles any CQHCI-specific interrupts.  Interrupts which it cannot\n service (e.g. SDHCI interrupts) are forwarded to the underlying driver via\n `virtual_interrupt`.  The server should service interrupts exactly as it normally would.\n The CQHCI driver will wait for the virtual IRQ to be acked before acking the physical IRQ.\n\n # Arguments\n\n * `virtual_interrupt` - A virtual interrupt to monitor instead of the physical IRQ.\n   The CQHCI driver will use this to forward interrupts which it cannot directly service.\n * `virtual_interrupt_lifeline` - A lifeline for the virtual interrupt.  The CQHCI\n   driver will destroy the peer end upon shutdown, which should be handled by the server as a\n   signal to stop monitoring the virtual interrupt and return to monitoring the physical\n   interrupt.\n\n # Returns\n\n * `cqhci_mmio` and `cqhci_mmio_offset` - An MMIO for the CQHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the CQHCI specification.\n * `sdhci_mmio` and `sdhci_mmio_offset` - An MMIO for the SDHCI register block.\n   MMIO size minus offset must be at least 512 bytes as per the SDHCI specification.\n * `bti` - The BTI to use for pinning pages for DMA.\n * `interrupt` - The physical interrupt to monitor.\n"]
4703    fn initialize_command_queueing(
4704        &mut self,
4705
4706        request: ::fidl_next::Request<sdmmc::InitializeCommandQueueing, ___T>,
4707
4708        responder: ::fidl_next::Responder<sdmmc::InitializeCommandQueueing, ___T>,
4709    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4710
4711    #[doc = " Enables the Command Queueing Engine.  The CQHCI driver is expected to already have called\n [`InitializeCommandQueueing`] to handle interrupts.\n While CQHCI is enabled, it is the caller\'s responsibility to only submit regular requests\n (via [`Request`]) via DCMD, or after disabling CQHCI.\n"]
4712    fn enable_cqhci(
4713        &mut self,
4714
4715        responder: ::fidl_next::Responder<sdmmc::EnableCqhci, ___T>,
4716    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4717
4718    #[doc = " Disables the Command Queueing Engine.  `EnableCqhci` must have previously been called.  From\n this point onwards, regular requests can be submitted (until `EnableCqhci` is called again).\n"]
4719    fn disable_cqhci(
4720        &mut self,
4721
4722        responder: ::fidl_next::Responder<sdmmc::DisableCqhci, ___T>,
4723    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4724
4725    #[doc = " Get host info.\n"]
4726    fn host_info(
4727        &mut self,
4728
4729        responder: ::fidl_next::Responder<sdmmc::HostInfo, ___T>,
4730    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4731
4732    #[doc = " Set signal voltage.\n"]
4733    fn set_signal_voltage(
4734        &mut self,
4735
4736        request: ::fidl_next::Request<sdmmc::SetSignalVoltage, ___T>,
4737
4738        responder: ::fidl_next::Responder<sdmmc::SetSignalVoltage, ___T>,
4739    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4740
4741    #[doc = " Set bus width.\n"]
4742    fn set_bus_width(
4743        &mut self,
4744
4745        request: ::fidl_next::Request<sdmmc::SetBusWidth, ___T>,
4746
4747        responder: ::fidl_next::Responder<sdmmc::SetBusWidth, ___T>,
4748    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4749
4750    #[doc = " Set bus frequency, zero means disable the clock to the card.\n"]
4751    fn set_bus_freq(
4752        &mut self,
4753
4754        request: ::fidl_next::Request<sdmmc::SetBusFreq, ___T>,
4755
4756        responder: ::fidl_next::Responder<sdmmc::SetBusFreq, ___T>,
4757    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4758
4759    #[doc = " Set mmc timing.\n"]
4760    fn set_timing(
4761        &mut self,
4762
4763        request: ::fidl_next::Request<sdmmc::SetTiming, ___T>,
4764
4765        responder: ::fidl_next::Responder<sdmmc::SetTiming, ___T>,
4766    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4767
4768    #[doc = " Issue a hw reset.\n"]
4769    fn hw_reset(
4770        &mut self,
4771
4772        responder: ::fidl_next::Responder<sdmmc::HwReset, ___T>,
4773    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4774
4775    #[doc = " Perform tuning.\n"]
4776    fn perform_tuning(
4777        &mut self,
4778
4779        request: ::fidl_next::Request<sdmmc::PerformTuning, ___T>,
4780
4781        responder: ::fidl_next::Responder<sdmmc::PerformTuning, ___T>,
4782    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4783
4784    #[doc = " Register the given callback to be called when an in-band interrupt is received from the\n card. Before calling the callback the protocol implementation will disable the in-band\n interrupt in the controller. In-band interrupts can be re-enabled by calling\n `AckInBandInterrupt()` once the previous interrupt has been handled by the client.\n"]
4785    fn register_in_band_interrupt(
4786        &mut self,
4787
4788        request: ::fidl_next::Request<sdmmc::RegisterInBandInterrupt, ___T>,
4789
4790        responder: ::fidl_next::Responder<sdmmc::RegisterInBandInterrupt, ___T>,
4791    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4792
4793    fn ack_in_band_interrupt(
4794        &mut self,
4795    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4796
4797    #[doc = " In the methods below, vmo_id is used to uniquely identify a VMO that will be passed to\n Request in an SdmmcBufferRegion. VMO IDs are chosen by the caller, and may be any uint32\n value.\n Registers a VMO and transfers ownership to the protocol implementation. vmo_rights is a bit\n field containing SdmmcVmoRight values, and determines the read/write permissions used by\n the implementation when pinning or mapping the VMO. The implementation may pin vmo during\n this call or any time it is used in a request, and may keep it pinned until the VMO is\n unregistered. client_id may be in [0, SDMMC_MAX_CLIENT_ID] and identifies the ID space for\n this VMO to be registered in (that is, two different VMOs may use the same ID if they are\n registered for different clients).\n"]
4798    fn register_vmo(
4799        &mut self,
4800
4801        request: ::fidl_next::Request<sdmmc::RegisterVmo, ___T>,
4802
4803        responder: ::fidl_next::Responder<sdmmc::RegisterVmo, ___T>,
4804    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4805
4806    #[doc = " The callee unmaps/unpins the VMO and returns ownership to the caller.\n"]
4807    fn unregister_vmo(
4808        &mut self,
4809
4810        request: ::fidl_next::Request<sdmmc::UnregisterVmo, ___T>,
4811
4812        responder: ::fidl_next::Responder<sdmmc::UnregisterVmo, ___T>,
4813    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4814
4815    #[doc = " Perform the requests in order, atomically (i.e., no intervening requests). Furthermore,\n calls are replied to in the order they are received. If an error occurs, abort any remaining\n requests. Else, return the response of the last request.\n\n The protocol implementation chooses whether or not to use DMA\n depending on the properties of the request and the capabilities of the controller.\n\n Clients are responsible for performing the following cache operations:\n\n After read requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA | ZX_CACHE_FLUSH_INVALIDATE on buffers that\n   have been mapped by the client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN_INVALIDATE on all other buffers.\n\n Note that writing to any portion of a buffer before Request has returned can corrupt the\n received data.\n\n Before write requests:\n - Call zx_cache_flush with ZX_CACHE_FLUSH_DATA on buffers that have been mapped by the\n   client.\n - Call zx_vmo_op_range with ZX_VMO_OP_CACHE_CLEAN on all other buffers.\n"]
4816    fn request(
4817        &mut self,
4818
4819        request: ::fidl_next::Request<sdmmc::Request, ___T>,
4820
4821        responder: ::fidl_next::Responder<sdmmc::Request, ___T>,
4822    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4823}
4824
4825impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Sdmmc
4826where
4827    ___H: SdmmcServerHandler<___T> + ::core::marker::Send,
4828    ___T: ::fidl_next::Transport,
4829    for<'de> crate::wire::CqhciInitializeCommandQueueingRequest: ::fidl_next::Decode<
4830            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4831            Constraint = (),
4832        >,
4833    for<'de> crate::wire::SdmmcSetSignalVoltageRequest: ::fidl_next::Decode<
4834            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4835            Constraint = (),
4836        >,
4837    for<'de> crate::wire::SdmmcSetBusWidthRequest: ::fidl_next::Decode<
4838            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4839            Constraint = (),
4840        >,
4841    for<'de> crate::wire::SdmmcSetBusFreqRequest: ::fidl_next::Decode<
4842            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4843            Constraint = (),
4844        >,
4845    for<'de> crate::wire::SdmmcSetTimingRequest: ::fidl_next::Decode<
4846            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4847            Constraint = (),
4848        >,
4849    for<'de> crate::wire::SdmmcPerformTuningRequest: ::fidl_next::Decode<
4850            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4851            Constraint = (),
4852        >,
4853    for<'de> crate::wire::SdmmcRegisterInBandInterruptRequest: ::fidl_next::Decode<
4854            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4855            Constraint = (),
4856        >,
4857    for<'de> crate::wire::SdmmcRegisterVmoRequest: ::fidl_next::Decode<
4858            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4859            Constraint = (),
4860        >,
4861    for<'de> crate::wire::SdmmcUnregisterVmoRequest: ::fidl_next::Decode<
4862            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4863            Constraint = (),
4864        >,
4865    for<'de> crate::wire::SdmmcRequestRequest<'de>: ::fidl_next::Decode<
4866            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4867            Constraint = (),
4868        >,
4869{
4870    async fn on_one_way(
4871        handler: &mut ___H,
4872        mut message: ::fidl_next::Message<___T>,
4873    ) -> ::core::result::Result<
4874        (),
4875        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4876    > {
4877        match *message.header().ordinal {
4878            6808342210488695055 => {
4879                handler.ack_in_band_interrupt().await;
4880                Ok(())
4881            }
4882
4883            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4884        }
4885    }
4886
4887    async fn on_two_way(
4888        handler: &mut ___H,
4889        mut message: ::fidl_next::Message<___T>,
4890        responder: ::fidl_next::protocol::Responder<___T>,
4891    ) -> ::core::result::Result<
4892        (),
4893        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4894    > {
4895        match *message.header().ordinal {
4896            359559202570093266 => {
4897                let responder = ::fidl_next::Responder::from_untyped(responder);
4898
4899                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4900                    Ok(decoded) => {
4901                        handler
4902                            .initialize_command_queueing(
4903                                ::fidl_next::Request::from_decoded(decoded),
4904                                responder,
4905                            )
4906                            .await;
4907                        Ok(())
4908                    }
4909                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4910                        ordinal: 359559202570093266,
4911                        error,
4912                    }),
4913                }
4914            }
4915
4916            7267012061448928954 => {
4917                let responder = ::fidl_next::Responder::from_untyped(responder);
4918
4919                handler.enable_cqhci(responder).await;
4920                Ok(())
4921            }
4922
4923            4177196635683073751 => {
4924                let responder = ::fidl_next::Responder::from_untyped(responder);
4925
4926                handler.disable_cqhci(responder).await;
4927                Ok(())
4928            }
4929
4930            8475471856809867100 => {
4931                let responder = ::fidl_next::Responder::from_untyped(responder);
4932
4933                handler.host_info(responder).await;
4934                Ok(())
4935            }
4936
4937            5360485811549546918 => {
4938                let responder = ::fidl_next::Responder::from_untyped(responder);
4939
4940                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4941                    Ok(decoded) => {
4942                        handler
4943                            .set_signal_voltage(
4944                                ::fidl_next::Request::from_decoded(decoded),
4945                                responder,
4946                            )
4947                            .await;
4948                        Ok(())
4949                    }
4950                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4951                        ordinal: 5360485811549546918,
4952                        error,
4953                    }),
4954                }
4955            }
4956
4957            3438431046250338573 => {
4958                let responder = ::fidl_next::Responder::from_untyped(responder);
4959
4960                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4961                    Ok(decoded) => {
4962                        handler
4963                            .set_bus_width(::fidl_next::Request::from_decoded(decoded), responder)
4964                            .await;
4965                        Ok(())
4966                    }
4967                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4968                        ordinal: 3438431046250338573,
4969                        error,
4970                    }),
4971                }
4972            }
4973
4974            6624771772063616636 => {
4975                let responder = ::fidl_next::Responder::from_untyped(responder);
4976
4977                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4978                    Ok(decoded) => {
4979                        handler
4980                            .set_bus_freq(::fidl_next::Request::from_decoded(decoded), responder)
4981                            .await;
4982                        Ok(())
4983                    }
4984                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4985                        ordinal: 6624771772063616636,
4986                        error,
4987                    }),
4988                }
4989            }
4990
4991            7991421876873192632 => {
4992                let responder = ::fidl_next::Responder::from_untyped(responder);
4993
4994                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4995                    Ok(decoded) => {
4996                        handler
4997                            .set_timing(::fidl_next::Request::from_decoded(decoded), responder)
4998                            .await;
4999                        Ok(())
5000                    }
5001                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5002                        ordinal: 7991421876873192632,
5003                        error,
5004                    }),
5005                }
5006            }
5007
5008            3335326454881665312 => {
5009                let responder = ::fidl_next::Responder::from_untyped(responder);
5010
5011                handler.hw_reset(responder).await;
5012                Ok(())
5013            }
5014
5015            5267400993243262226 => {
5016                let responder = ::fidl_next::Responder::from_untyped(responder);
5017
5018                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5019                    Ok(decoded) => {
5020                        handler
5021                            .perform_tuning(::fidl_next::Request::from_decoded(decoded), responder)
5022                            .await;
5023                        Ok(())
5024                    }
5025                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5026                        ordinal: 5267400993243262226,
5027                        error,
5028                    }),
5029                }
5030            }
5031
5032            7280830926204192948 => {
5033                let responder = ::fidl_next::Responder::from_untyped(responder);
5034
5035                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5036                    Ok(decoded) => {
5037                        handler
5038                            .register_in_band_interrupt(
5039                                ::fidl_next::Request::from_decoded(decoded),
5040                                responder,
5041                            )
5042                            .await;
5043                        Ok(())
5044                    }
5045                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5046                        ordinal: 7280830926204192948,
5047                        error,
5048                    }),
5049                }
5050            }
5051
5052            1214620982318353152 => {
5053                let responder = ::fidl_next::Responder::from_untyped(responder);
5054
5055                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5056                    Ok(decoded) => {
5057                        handler
5058                            .register_vmo(::fidl_next::Request::from_decoded(decoded), responder)
5059                            .await;
5060                        Ok(())
5061                    }
5062                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5063                        ordinal: 1214620982318353152,
5064                        error,
5065                    }),
5066                }
5067            }
5068
5069            8712572721256898471 => {
5070                let responder = ::fidl_next::Responder::from_untyped(responder);
5071
5072                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5073                    Ok(decoded) => {
5074                        handler
5075                            .unregister_vmo(::fidl_next::Request::from_decoded(decoded), responder)
5076                            .await;
5077                        Ok(())
5078                    }
5079                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5080                        ordinal: 8712572721256898471,
5081                        error,
5082                    }),
5083                }
5084            }
5085
5086            2766657126441407958 => {
5087                let responder = ::fidl_next::Responder::from_untyped(responder);
5088
5089                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5090                    Ok(decoded) => {
5091                        handler
5092                            .request(::fidl_next::Request::from_decoded(decoded), responder)
5093                            .await;
5094                        Ok(())
5095                    }
5096                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5097                        ordinal: 2766657126441407958,
5098                        error,
5099                    }),
5100                }
5101            }
5102
5103            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
5104        }
5105    }
5106}
5107
5108impl<___T> SdmmcClientHandler<___T> for ::fidl_next::IgnoreEvents where ___T: ::fidl_next::Transport {}
5109
5110impl<___H, ___T> SdmmcLocalClientHandler<___T> for ::fidl_next::Local<___H>
5111where
5112    ___H: SdmmcClientHandler<___T>,
5113    ___T: ::fidl_next::Transport,
5114{
5115}
5116
5117impl<___H, ___T> SdmmcLocalServerHandler<___T> for ::fidl_next::Local<___H>
5118where
5119    ___H: SdmmcServerHandler<___T>,
5120    ___T: ::fidl_next::Transport,
5121{
5122    async fn initialize_command_queueing(
5123        &mut self,
5124
5125        request: ::fidl_next::Request<sdmmc::InitializeCommandQueueing, ___T>,
5126
5127        responder: ::fidl_next::Responder<sdmmc::InitializeCommandQueueing, ___T>,
5128    ) {
5129        ___H::initialize_command_queueing(&mut self.0, request, responder).await
5130    }
5131
5132    async fn enable_cqhci(&mut self, responder: ::fidl_next::Responder<sdmmc::EnableCqhci, ___T>) {
5133        ___H::enable_cqhci(&mut self.0, responder).await
5134    }
5135
5136    async fn disable_cqhci(
5137        &mut self,
5138
5139        responder: ::fidl_next::Responder<sdmmc::DisableCqhci, ___T>,
5140    ) {
5141        ___H::disable_cqhci(&mut self.0, responder).await
5142    }
5143
5144    async fn host_info(&mut self, responder: ::fidl_next::Responder<sdmmc::HostInfo, ___T>) {
5145        ___H::host_info(&mut self.0, responder).await
5146    }
5147
5148    async fn set_signal_voltage(
5149        &mut self,
5150
5151        request: ::fidl_next::Request<sdmmc::SetSignalVoltage, ___T>,
5152
5153        responder: ::fidl_next::Responder<sdmmc::SetSignalVoltage, ___T>,
5154    ) {
5155        ___H::set_signal_voltage(&mut self.0, request, responder).await
5156    }
5157
5158    async fn set_bus_width(
5159        &mut self,
5160
5161        request: ::fidl_next::Request<sdmmc::SetBusWidth, ___T>,
5162
5163        responder: ::fidl_next::Responder<sdmmc::SetBusWidth, ___T>,
5164    ) {
5165        ___H::set_bus_width(&mut self.0, request, responder).await
5166    }
5167
5168    async fn set_bus_freq(
5169        &mut self,
5170
5171        request: ::fidl_next::Request<sdmmc::SetBusFreq, ___T>,
5172
5173        responder: ::fidl_next::Responder<sdmmc::SetBusFreq, ___T>,
5174    ) {
5175        ___H::set_bus_freq(&mut self.0, request, responder).await
5176    }
5177
5178    async fn set_timing(
5179        &mut self,
5180
5181        request: ::fidl_next::Request<sdmmc::SetTiming, ___T>,
5182
5183        responder: ::fidl_next::Responder<sdmmc::SetTiming, ___T>,
5184    ) {
5185        ___H::set_timing(&mut self.0, request, responder).await
5186    }
5187
5188    async fn hw_reset(&mut self, responder: ::fidl_next::Responder<sdmmc::HwReset, ___T>) {
5189        ___H::hw_reset(&mut self.0, responder).await
5190    }
5191
5192    async fn perform_tuning(
5193        &mut self,
5194
5195        request: ::fidl_next::Request<sdmmc::PerformTuning, ___T>,
5196
5197        responder: ::fidl_next::Responder<sdmmc::PerformTuning, ___T>,
5198    ) {
5199        ___H::perform_tuning(&mut self.0, request, responder).await
5200    }
5201
5202    async fn register_in_band_interrupt(
5203        &mut self,
5204
5205        request: ::fidl_next::Request<sdmmc::RegisterInBandInterrupt, ___T>,
5206
5207        responder: ::fidl_next::Responder<sdmmc::RegisterInBandInterrupt, ___T>,
5208    ) {
5209        ___H::register_in_band_interrupt(&mut self.0, request, responder).await
5210    }
5211
5212    async fn ack_in_band_interrupt(&mut self) {
5213        ___H::ack_in_band_interrupt(&mut self.0).await
5214    }
5215
5216    async fn register_vmo(
5217        &mut self,
5218
5219        request: ::fidl_next::Request<sdmmc::RegisterVmo, ___T>,
5220
5221        responder: ::fidl_next::Responder<sdmmc::RegisterVmo, ___T>,
5222    ) {
5223        ___H::register_vmo(&mut self.0, request, responder).await
5224    }
5225
5226    async fn unregister_vmo(
5227        &mut self,
5228
5229        request: ::fidl_next::Request<sdmmc::UnregisterVmo, ___T>,
5230
5231        responder: ::fidl_next::Responder<sdmmc::UnregisterVmo, ___T>,
5232    ) {
5233        ___H::unregister_vmo(&mut self.0, request, responder).await
5234    }
5235
5236    async fn request(
5237        &mut self,
5238
5239        request: ::fidl_next::Request<sdmmc::Request, ___T>,
5240
5241        responder: ::fidl_next::Responder<sdmmc::Request, ___T>,
5242    ) {
5243        ___H::request(&mut self.0, request, responder).await
5244    }
5245}
5246
5247/// The type corresponding to the SdmmcService service.
5248#[derive(Debug)]
5249pub struct SdmmcService;
5250
5251impl ::fidl_next::DiscoverableService for SdmmcService {
5252    const SERVICE_NAME: &'static str = "fuchsia.hardware.sdmmc.SdmmcService";
5253    const MEMBER_NAMES: &'static [&'static str] = &["sdmmc", "inline_crypto"];
5254}
5255
5256impl ::fidl_next::HasServiceRequest<::fdf_fidl::DriverChannel> for SdmmcService {}
5257
5258impl<___C> ::fidl_next::Service<___C> for SdmmcService
5259where
5260    ___C: ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>,
5261    ___C: ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>,
5262{
5263    type Connector = SdmmcServiceConnector<___C>;
5264}
5265
5266/// A strongly-typed service connector for the `SdmmcService` service.
5267#[repr(transparent)]
5268pub struct SdmmcServiceConnector<___C> {
5269    #[allow(dead_code)]
5270    connector: ___C,
5271}
5272
5273impl<___C> SdmmcServiceConnector<___C>
5274where
5275    ___C: ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>,
5276    ___C: ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>,
5277{
5278    /// Attempts to connect to the `sdmmc` service member.
5279    pub fn sdmmc(
5280        &self,
5281        server_end: ::fidl_next::ServerEnd<crate::Sdmmc, ::fdf_fidl::DriverChannel>,
5282    ) -> ::core::result::Result<
5283        (),
5284        <___C as ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>>::Error,
5285    > {
5286        ::fidl_next::protocol::ServiceConnector::<::fdf_fidl::DriverChannel>::connect_to_member(
5287            &self.connector,
5288            "sdmmc",
5289            server_end.into_untyped(),
5290        )
5291    }
5292
5293    /// Attempts to connect to the `inline_crypto` service member.
5294    pub fn inline_crypto(
5295        &self,
5296        server_end: ::fidl_next::ServerEnd<
5297            ::fidl_next_fuchsia_hardware_inlineencryption::DriverDevice,
5298            ::fdf_fidl::DriverChannel,
5299        >,
5300    ) -> ::core::result::Result<
5301        (),
5302        <___C as ::fidl_next::protocol::ServiceConnector<::fdf_fidl::DriverChannel>>::Error,
5303    > {
5304        ::fidl_next::protocol::ServiceConnector::<::fdf_fidl::DriverChannel>::connect_to_member(
5305            &self.connector,
5306            "inline_crypto",
5307            server_end.into_untyped(),
5308        )
5309    }
5310}
5311
5312/// A service handler for the `SdmmcService` service.
5313pub trait SdmmcServiceHandler {
5314    /// Handles an attempt to connect to the `sdmmc` member.
5315    fn sdmmc(&self, server_end: ::fidl_next::ServerEnd<crate::Sdmmc, ::fdf_fidl::DriverChannel>);
5316
5317    /// Handles an attempt to connect to the `inline_crypto` member.
5318    fn inline_crypto(
5319        &self,
5320        server_end: ::fidl_next::ServerEnd<
5321            ::fidl_next_fuchsia_hardware_inlineencryption::DriverDevice,
5322            ::fdf_fidl::DriverChannel,
5323        >,
5324    );
5325}
5326
5327impl<___H, ___T> ::fidl_next::DispatchServiceHandler<___H, ___T> for SdmmcService
5328where
5329    ___H: SdmmcServiceHandler,
5330    ::fdf_fidl::DriverChannel: ::fidl_next::InstanceFromServiceTransport<___T>,
5331    ::fdf_fidl::DriverChannel: ::fidl_next::InstanceFromServiceTransport<___T>,
5332{
5333    fn on_connection(handler: &___H, member: &str, server_end: ___T) {
5334        use ::fidl_next::InstanceFromServiceTransport;
5335        match member {
5336            "sdmmc" => handler.sdmmc(::fidl_next::ServerEnd::from_untyped(
5337                ::fdf_fidl::DriverChannel::from_service_transport(server_end),
5338            )),
5339
5340            "inline_crypto" => handler.inline_crypto(::fidl_next::ServerEnd::from_untyped(
5341                ::fdf_fidl::DriverChannel::from_service_transport(server_end),
5342            )),
5343
5344            _ => unreachable!(),
5345        }
5346    }
5347}
5348
5349pub use fidl_next_common_fuchsia_hardware_sdmmc::*;