Skip to main content

fidl_next_common_fuchsia_hardware_sdmmc/
fidl_next_common_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 type CqhciEnableCqhciResponse = ();
8
9    pub type CqhciDisableCqhciResponse = ();
10
11    ::fidl_next::bitflags::bitflags! {
12        #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct SdmmcHostCap: u64 {
13            const BUS_WIDTH_8 = 1;
14            const DMA = 2;
15            const VOLTAGE_330 = 4;
16            const AUTO_CMD12 = 8;
17            const SDR104 = 16;
18            const SDR50 = 32;
19            const DDR50 = 64;
20            #[doc = " The host does not require tuning for SDR50.\n"]const NO_TUNING_SDR50 = 128;
21            const HS400_ENHANCED_STROBE = 256;
22            const COMMAND_QUEUEING = 512;
23
24        }
25    }
26
27    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcHostCap, ___E> for SdmmcHostCap
28    where
29        ___E: ?Sized,
30    {
31        #[inline]
32        fn encode(
33            self,
34            encoder: &mut ___E,
35            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcHostCap>,
36            _: (),
37        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
38            ::fidl_next::Encode::encode(&self, encoder, out, ())
39        }
40    }
41
42    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcHostCap, ___E> for &'a SdmmcHostCap
43    where
44        ___E: ?Sized,
45    {
46        #[inline]
47        fn encode(
48            self,
49            _: &mut ___E,
50            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcHostCap>,
51            _: (),
52        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
53            ::fidl_next::munge!(let crate::wire::SdmmcHostCap { value } = out);
54
55            if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
56                return Err(::fidl_next::EncodeError::InvalidStrictBits);
57            }
58
59            let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
60            Ok(())
61        }
62    }
63
64    impl ::core::convert::From<crate::wire::SdmmcHostCap> for SdmmcHostCap {
65        fn from(wire: crate::wire::SdmmcHostCap) -> Self {
66            Self::from_bits_retain(u64::from(wire.value))
67        }
68    }
69
70    impl ::fidl_next::FromWire<crate::wire::SdmmcHostCap> for SdmmcHostCap {
71        #[inline]
72        fn from_wire(wire: crate::wire::SdmmcHostCap) -> Self {
73            Self::from(wire)
74        }
75    }
76
77    impl ::fidl_next::FromWireRef<crate::wire::SdmmcHostCap> for SdmmcHostCap {
78        #[inline]
79        fn from_wire_ref(wire: &crate::wire::SdmmcHostCap) -> Self {
80            Self::from(*wire)
81        }
82    }
83
84    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
85    pub struct SdmmcHostInfo {
86        pub caps: crate::natural::SdmmcHostCap,
87
88        pub max_transfer_size: u32,
89
90        pub max_buffer_regions: u64,
91    }
92
93    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcHostInfo, ___E> for SdmmcHostInfo
94    where
95        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
96    {
97        #[inline]
98        fn encode(
99            self,
100            encoder_: &mut ___E,
101            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcHostInfo>,
102            _: (),
103        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
104            ::fidl_next::munge! {
105                let crate::wire::SdmmcHostInfo {
106                    caps,
107                    max_transfer_size,
108                    max_buffer_regions,
109
110                } = out_;
111            }
112
113            ::fidl_next::Encode::encode(self.caps, encoder_, caps, ())?;
114
115            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(caps.as_mut_ptr()) };
116
117            ::fidl_next::Encode::encode(self.max_transfer_size, encoder_, max_transfer_size, ())?;
118
119            let mut _field =
120                unsafe { ::fidl_next::Slot::new_unchecked(max_transfer_size.as_mut_ptr()) };
121
122            ::fidl_next::Encode::encode(self.max_buffer_regions, encoder_, max_buffer_regions, ())?;
123
124            let mut _field =
125                unsafe { ::fidl_next::Slot::new_unchecked(max_buffer_regions.as_mut_ptr()) };
126
127            Ok(())
128        }
129    }
130
131    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcHostInfo, ___E> for &'a SdmmcHostInfo
132    where
133        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
134    {
135        #[inline]
136        fn encode(
137            self,
138            encoder_: &mut ___E,
139            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcHostInfo>,
140            _: (),
141        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
142            ::fidl_next::munge! {
143                let crate::wire::SdmmcHostInfo {
144                    caps,
145                    max_transfer_size,
146                    max_buffer_regions,
147
148                } = out_;
149            }
150
151            ::fidl_next::Encode::encode(&self.caps, encoder_, caps, ())?;
152
153            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(caps.as_mut_ptr()) };
154
155            ::fidl_next::Encode::encode(&self.max_transfer_size, encoder_, max_transfer_size, ())?;
156
157            let mut _field =
158                unsafe { ::fidl_next::Slot::new_unchecked(max_transfer_size.as_mut_ptr()) };
159
160            ::fidl_next::Encode::encode(
161                &self.max_buffer_regions,
162                encoder_,
163                max_buffer_regions,
164                (),
165            )?;
166
167            let mut _field =
168                unsafe { ::fidl_next::Slot::new_unchecked(max_buffer_regions.as_mut_ptr()) };
169
170            Ok(())
171        }
172    }
173
174    unsafe impl<___E>
175        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::SdmmcHostInfo>, ___E>
176        for SdmmcHostInfo
177    where
178        ___E: ::fidl_next::Encoder + ?Sized,
179        SdmmcHostInfo: ::fidl_next::Encode<crate::wire::SdmmcHostInfo, ___E>,
180    {
181        #[inline]
182        fn encode_option(
183            this: ::core::option::Option<Self>,
184            encoder: &mut ___E,
185            out: &mut ::core::mem::MaybeUninit<
186                ::fidl_next::wire::Box<'static, crate::wire::SdmmcHostInfo>,
187            >,
188            _: (),
189        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
190            if let Some(inner) = this {
191                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
192                ::fidl_next::wire::Box::encode_present(out);
193            } else {
194                ::fidl_next::wire::Box::encode_absent(out);
195            }
196
197            Ok(())
198        }
199    }
200
201    unsafe impl<'a, ___E>
202        ::fidl_next::EncodeOption<::fidl_next::wire::Box<'static, crate::wire::SdmmcHostInfo>, ___E>
203        for &'a SdmmcHostInfo
204    where
205        ___E: ::fidl_next::Encoder + ?Sized,
206        &'a SdmmcHostInfo: ::fidl_next::Encode<crate::wire::SdmmcHostInfo, ___E>,
207    {
208        #[inline]
209        fn encode_option(
210            this: ::core::option::Option<Self>,
211            encoder: &mut ___E,
212            out: &mut ::core::mem::MaybeUninit<
213                ::fidl_next::wire::Box<'static, crate::wire::SdmmcHostInfo>,
214            >,
215            _: (),
216        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
217            if let Some(inner) = this {
218                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
219                ::fidl_next::wire::Box::encode_present(out);
220            } else {
221                ::fidl_next::wire::Box::encode_absent(out);
222            }
223
224            Ok(())
225        }
226    }
227
228    impl ::fidl_next::FromWire<crate::wire::SdmmcHostInfo> for SdmmcHostInfo {
229        #[inline]
230        fn from_wire(wire: crate::wire::SdmmcHostInfo) -> Self {
231            Self {
232                caps: ::fidl_next::FromWire::from_wire(wire.caps),
233
234                max_transfer_size: ::fidl_next::FromWire::from_wire(wire.max_transfer_size),
235
236                max_buffer_regions: ::fidl_next::FromWire::from_wire(wire.max_buffer_regions),
237            }
238        }
239    }
240
241    impl ::fidl_next::FromWireRef<crate::wire::SdmmcHostInfo> for SdmmcHostInfo {
242        #[inline]
243        fn from_wire_ref(wire: &crate::wire::SdmmcHostInfo) -> Self {
244            Self {
245                caps: ::fidl_next::FromWireRef::from_wire_ref(&wire.caps),
246
247                max_transfer_size: ::fidl_next::FromWireRef::from_wire_ref(&wire.max_transfer_size),
248
249                max_buffer_regions: ::fidl_next::FromWireRef::from_wire_ref(
250                    &wire.max_buffer_regions,
251                ),
252            }
253        }
254    }
255
256    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
257    pub struct SdmmcHostInfoResponse {
258        pub info: crate::natural::SdmmcHostInfo,
259    }
260
261    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcHostInfoResponse, ___E>
262        for SdmmcHostInfoResponse
263    where
264        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
265    {
266        #[inline]
267        fn encode(
268            self,
269            encoder_: &mut ___E,
270            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcHostInfoResponse>,
271            _: (),
272        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
273            ::fidl_next::munge! {
274                let crate::wire::SdmmcHostInfoResponse {
275                    info,
276
277                } = out_;
278            }
279
280            ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
281
282            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
283
284            Ok(())
285        }
286    }
287
288    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcHostInfoResponse, ___E>
289        for &'a SdmmcHostInfoResponse
290    where
291        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
292    {
293        #[inline]
294        fn encode(
295            self,
296            encoder_: &mut ___E,
297            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcHostInfoResponse>,
298            _: (),
299        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
300            ::fidl_next::munge! {
301                let crate::wire::SdmmcHostInfoResponse {
302                    info,
303
304                } = out_;
305            }
306
307            ::fidl_next::Encode::encode(&self.info, encoder_, info, ())?;
308
309            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(info.as_mut_ptr()) };
310
311            Ok(())
312        }
313    }
314
315    unsafe impl<___E>
316        ::fidl_next::EncodeOption<
317            ::fidl_next::wire::Box<'static, crate::wire::SdmmcHostInfoResponse>,
318            ___E,
319        > for SdmmcHostInfoResponse
320    where
321        ___E: ::fidl_next::Encoder + ?Sized,
322        SdmmcHostInfoResponse: ::fidl_next::Encode<crate::wire::SdmmcHostInfoResponse, ___E>,
323    {
324        #[inline]
325        fn encode_option(
326            this: ::core::option::Option<Self>,
327            encoder: &mut ___E,
328            out: &mut ::core::mem::MaybeUninit<
329                ::fidl_next::wire::Box<'static, crate::wire::SdmmcHostInfoResponse>,
330            >,
331            _: (),
332        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
333            if let Some(inner) = this {
334                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
335                ::fidl_next::wire::Box::encode_present(out);
336            } else {
337                ::fidl_next::wire::Box::encode_absent(out);
338            }
339
340            Ok(())
341        }
342    }
343
344    unsafe impl<'a, ___E>
345        ::fidl_next::EncodeOption<
346            ::fidl_next::wire::Box<'static, crate::wire::SdmmcHostInfoResponse>,
347            ___E,
348        > for &'a SdmmcHostInfoResponse
349    where
350        ___E: ::fidl_next::Encoder + ?Sized,
351        &'a SdmmcHostInfoResponse: ::fidl_next::Encode<crate::wire::SdmmcHostInfoResponse, ___E>,
352    {
353        #[inline]
354        fn encode_option(
355            this: ::core::option::Option<Self>,
356            encoder: &mut ___E,
357            out: &mut ::core::mem::MaybeUninit<
358                ::fidl_next::wire::Box<'static, crate::wire::SdmmcHostInfoResponse>,
359            >,
360            _: (),
361        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
362            if let Some(inner) = this {
363                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
364                ::fidl_next::wire::Box::encode_present(out);
365            } else {
366                ::fidl_next::wire::Box::encode_absent(out);
367            }
368
369            Ok(())
370        }
371    }
372
373    impl ::fidl_next::FromWire<crate::wire::SdmmcHostInfoResponse> for SdmmcHostInfoResponse {
374        #[inline]
375        fn from_wire(wire: crate::wire::SdmmcHostInfoResponse) -> Self {
376            Self { info: ::fidl_next::FromWire::from_wire(wire.info) }
377        }
378    }
379
380    impl ::fidl_next::FromWireRef<crate::wire::SdmmcHostInfoResponse> for SdmmcHostInfoResponse {
381        #[inline]
382        fn from_wire_ref(wire: &crate::wire::SdmmcHostInfoResponse) -> Self {
383            Self { info: ::fidl_next::FromWireRef::from_wire_ref(&wire.info) }
384        }
385    }
386
387    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
388    #[repr(u8)]
389    pub enum SdmmcVoltage {
390        V330 = 0,
391        V180 = 1,
392        Max = 2,
393    }
394    impl ::core::convert::TryFrom<u8> for SdmmcVoltage {
395        type Error = ::fidl_next::UnknownStrictEnumMemberError;
396        fn try_from(
397            value: u8,
398        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
399            match value {
400                0 => Ok(Self::V330),
401                1 => Ok(Self::V180),
402                2 => Ok(Self::Max),
403
404                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
405            }
406        }
407    }
408
409    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcVoltage, ___E> for SdmmcVoltage
410    where
411        ___E: ?Sized,
412    {
413        #[inline]
414        fn encode(
415            self,
416            encoder: &mut ___E,
417            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcVoltage>,
418            _: (),
419        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
420            ::fidl_next::Encode::encode(&self, encoder, out, ())
421        }
422    }
423
424    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcVoltage, ___E> for &'a SdmmcVoltage
425    where
426        ___E: ?Sized,
427    {
428        #[inline]
429        fn encode(
430            self,
431            encoder: &mut ___E,
432            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcVoltage>,
433            _: (),
434        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
435            ::fidl_next::munge!(let crate::wire::SdmmcVoltage { value } = out);
436            let _ = value.write(u8::from(match *self {
437                SdmmcVoltage::V330 => 0,
438
439                SdmmcVoltage::V180 => 1,
440
441                SdmmcVoltage::Max => 2,
442            }));
443
444            Ok(())
445        }
446    }
447
448    impl ::core::convert::From<crate::wire::SdmmcVoltage> for SdmmcVoltage {
449        fn from(wire: crate::wire::SdmmcVoltage) -> Self {
450            match u8::from(wire.value) {
451                0 => Self::V330,
452
453                1 => Self::V180,
454
455                2 => Self::Max,
456
457                _ => unsafe { ::core::hint::unreachable_unchecked() },
458            }
459        }
460    }
461
462    impl ::fidl_next::FromWire<crate::wire::SdmmcVoltage> for SdmmcVoltage {
463        #[inline]
464        fn from_wire(wire: crate::wire::SdmmcVoltage) -> Self {
465            Self::from(wire)
466        }
467    }
468
469    impl ::fidl_next::FromWireRef<crate::wire::SdmmcVoltage> for SdmmcVoltage {
470        #[inline]
471        fn from_wire_ref(wire: &crate::wire::SdmmcVoltage) -> Self {
472            Self::from(*wire)
473        }
474    }
475
476    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
477    #[repr(C)]
478    pub struct SdmmcSetSignalVoltageRequest {
479        pub voltage: crate::natural::SdmmcVoltage,
480    }
481
482    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcSetSignalVoltageRequest, ___E>
483        for SdmmcSetSignalVoltageRequest
484    where
485        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
486    {
487        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
488            Self,
489            crate::wire::SdmmcSetSignalVoltageRequest,
490        > = unsafe {
491            ::fidl_next::CopyOptimization::enable_if(
492                true && <crate::natural::SdmmcVoltage as ::fidl_next::Encode<
493                    crate::wire::SdmmcVoltage,
494                    ___E,
495                >>::COPY_OPTIMIZATION
496                    .is_enabled(),
497            )
498        };
499
500        #[inline]
501        fn encode(
502            self,
503            encoder_: &mut ___E,
504            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcSetSignalVoltageRequest>,
505            _: (),
506        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
507            ::fidl_next::munge! {
508                let crate::wire::SdmmcSetSignalVoltageRequest {
509                    voltage,
510
511                } = out_;
512            }
513
514            ::fidl_next::Encode::encode(self.voltage, encoder_, voltage, ())?;
515
516            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(voltage.as_mut_ptr()) };
517
518            Ok(())
519        }
520    }
521
522    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcSetSignalVoltageRequest, ___E>
523        for &'a SdmmcSetSignalVoltageRequest
524    where
525        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
526    {
527        #[inline]
528        fn encode(
529            self,
530            encoder_: &mut ___E,
531            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcSetSignalVoltageRequest>,
532            _: (),
533        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
534            ::fidl_next::munge! {
535                let crate::wire::SdmmcSetSignalVoltageRequest {
536                    voltage,
537
538                } = out_;
539            }
540
541            ::fidl_next::Encode::encode(&self.voltage, encoder_, voltage, ())?;
542
543            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(voltage.as_mut_ptr()) };
544
545            Ok(())
546        }
547    }
548
549    unsafe impl<___E>
550        ::fidl_next::EncodeOption<
551            ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetSignalVoltageRequest>,
552            ___E,
553        > for SdmmcSetSignalVoltageRequest
554    where
555        ___E: ::fidl_next::Encoder + ?Sized,
556        SdmmcSetSignalVoltageRequest:
557            ::fidl_next::Encode<crate::wire::SdmmcSetSignalVoltageRequest, ___E>,
558    {
559        #[inline]
560        fn encode_option(
561            this: ::core::option::Option<Self>,
562            encoder: &mut ___E,
563            out: &mut ::core::mem::MaybeUninit<
564                ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetSignalVoltageRequest>,
565            >,
566            _: (),
567        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
568            if let Some(inner) = this {
569                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
570                ::fidl_next::wire::Box::encode_present(out);
571            } else {
572                ::fidl_next::wire::Box::encode_absent(out);
573            }
574
575            Ok(())
576        }
577    }
578
579    unsafe impl<'a, ___E>
580        ::fidl_next::EncodeOption<
581            ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetSignalVoltageRequest>,
582            ___E,
583        > for &'a SdmmcSetSignalVoltageRequest
584    where
585        ___E: ::fidl_next::Encoder + ?Sized,
586        &'a SdmmcSetSignalVoltageRequest:
587            ::fidl_next::Encode<crate::wire::SdmmcSetSignalVoltageRequest, ___E>,
588    {
589        #[inline]
590        fn encode_option(
591            this: ::core::option::Option<Self>,
592            encoder: &mut ___E,
593            out: &mut ::core::mem::MaybeUninit<
594                ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetSignalVoltageRequest>,
595            >,
596            _: (),
597        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
598            if let Some(inner) = this {
599                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
600                ::fidl_next::wire::Box::encode_present(out);
601            } else {
602                ::fidl_next::wire::Box::encode_absent(out);
603            }
604
605            Ok(())
606        }
607    }
608
609    impl ::fidl_next::FromWire<crate::wire::SdmmcSetSignalVoltageRequest>
610        for SdmmcSetSignalVoltageRequest
611    {
612        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
613            crate::wire::SdmmcSetSignalVoltageRequest,
614            Self,
615        > = unsafe {
616            ::fidl_next::CopyOptimization::enable_if(
617                true && <crate::natural::SdmmcVoltage as ::fidl_next::FromWire<
618                    crate::wire::SdmmcVoltage,
619                >>::COPY_OPTIMIZATION
620                    .is_enabled(),
621            )
622        };
623
624        #[inline]
625        fn from_wire(wire: crate::wire::SdmmcSetSignalVoltageRequest) -> Self {
626            Self { voltage: ::fidl_next::FromWire::from_wire(wire.voltage) }
627        }
628    }
629
630    impl ::fidl_next::FromWireRef<crate::wire::SdmmcSetSignalVoltageRequest>
631        for SdmmcSetSignalVoltageRequest
632    {
633        #[inline]
634        fn from_wire_ref(wire: &crate::wire::SdmmcSetSignalVoltageRequest) -> Self {
635            Self { voltage: ::fidl_next::FromWireRef::from_wire_ref(&wire.voltage) }
636        }
637    }
638
639    pub type SdmmcSetSignalVoltageResponse = ();
640
641    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
642    #[repr(u8)]
643    pub enum SdmmcBusWidth {
644        One = 0,
645        Four = 1,
646        Eight = 2,
647        Max = 3,
648    }
649    impl ::core::convert::TryFrom<u8> for SdmmcBusWidth {
650        type Error = ::fidl_next::UnknownStrictEnumMemberError;
651        fn try_from(
652            value: u8,
653        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
654            match value {
655                0 => Ok(Self::One),
656                1 => Ok(Self::Four),
657                2 => Ok(Self::Eight),
658                3 => Ok(Self::Max),
659
660                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
661            }
662        }
663    }
664
665    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcBusWidth, ___E> for SdmmcBusWidth
666    where
667        ___E: ?Sized,
668    {
669        #[inline]
670        fn encode(
671            self,
672            encoder: &mut ___E,
673            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcBusWidth>,
674            _: (),
675        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
676            ::fidl_next::Encode::encode(&self, encoder, out, ())
677        }
678    }
679
680    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcBusWidth, ___E> for &'a SdmmcBusWidth
681    where
682        ___E: ?Sized,
683    {
684        #[inline]
685        fn encode(
686            self,
687            encoder: &mut ___E,
688            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcBusWidth>,
689            _: (),
690        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
691            ::fidl_next::munge!(let crate::wire::SdmmcBusWidth { value } = out);
692            let _ = value.write(u8::from(match *self {
693                SdmmcBusWidth::One => 0,
694
695                SdmmcBusWidth::Four => 1,
696
697                SdmmcBusWidth::Eight => 2,
698
699                SdmmcBusWidth::Max => 3,
700            }));
701
702            Ok(())
703        }
704    }
705
706    impl ::core::convert::From<crate::wire::SdmmcBusWidth> for SdmmcBusWidth {
707        fn from(wire: crate::wire::SdmmcBusWidth) -> Self {
708            match u8::from(wire.value) {
709                0 => Self::One,
710
711                1 => Self::Four,
712
713                2 => Self::Eight,
714
715                3 => Self::Max,
716
717                _ => unsafe { ::core::hint::unreachable_unchecked() },
718            }
719        }
720    }
721
722    impl ::fidl_next::FromWire<crate::wire::SdmmcBusWidth> for SdmmcBusWidth {
723        #[inline]
724        fn from_wire(wire: crate::wire::SdmmcBusWidth) -> Self {
725            Self::from(wire)
726        }
727    }
728
729    impl ::fidl_next::FromWireRef<crate::wire::SdmmcBusWidth> for SdmmcBusWidth {
730        #[inline]
731        fn from_wire_ref(wire: &crate::wire::SdmmcBusWidth) -> Self {
732            Self::from(*wire)
733        }
734    }
735
736    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
737    #[repr(C)]
738    pub struct SdmmcSetBusWidthRequest {
739        pub bus_width: crate::natural::SdmmcBusWidth,
740    }
741
742    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcSetBusWidthRequest, ___E>
743        for SdmmcSetBusWidthRequest
744    where
745        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
746    {
747        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
748            Self,
749            crate::wire::SdmmcSetBusWidthRequest,
750        > = unsafe {
751            ::fidl_next::CopyOptimization::enable_if(
752                true && <crate::natural::SdmmcBusWidth as ::fidl_next::Encode<
753                    crate::wire::SdmmcBusWidth,
754                    ___E,
755                >>::COPY_OPTIMIZATION
756                    .is_enabled(),
757            )
758        };
759
760        #[inline]
761        fn encode(
762            self,
763            encoder_: &mut ___E,
764            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcSetBusWidthRequest>,
765            _: (),
766        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
767            ::fidl_next::munge! {
768                let crate::wire::SdmmcSetBusWidthRequest {
769                    bus_width,
770
771                } = out_;
772            }
773
774            ::fidl_next::Encode::encode(self.bus_width, encoder_, bus_width, ())?;
775
776            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bus_width.as_mut_ptr()) };
777
778            Ok(())
779        }
780    }
781
782    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcSetBusWidthRequest, ___E>
783        for &'a SdmmcSetBusWidthRequest
784    where
785        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
786    {
787        #[inline]
788        fn encode(
789            self,
790            encoder_: &mut ___E,
791            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcSetBusWidthRequest>,
792            _: (),
793        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
794            ::fidl_next::munge! {
795                let crate::wire::SdmmcSetBusWidthRequest {
796                    bus_width,
797
798                } = out_;
799            }
800
801            ::fidl_next::Encode::encode(&self.bus_width, encoder_, bus_width, ())?;
802
803            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bus_width.as_mut_ptr()) };
804
805            Ok(())
806        }
807    }
808
809    unsafe impl<___E>
810        ::fidl_next::EncodeOption<
811            ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetBusWidthRequest>,
812            ___E,
813        > for SdmmcSetBusWidthRequest
814    where
815        ___E: ::fidl_next::Encoder + ?Sized,
816        SdmmcSetBusWidthRequest: ::fidl_next::Encode<crate::wire::SdmmcSetBusWidthRequest, ___E>,
817    {
818        #[inline]
819        fn encode_option(
820            this: ::core::option::Option<Self>,
821            encoder: &mut ___E,
822            out: &mut ::core::mem::MaybeUninit<
823                ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetBusWidthRequest>,
824            >,
825            _: (),
826        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
827            if let Some(inner) = this {
828                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
829                ::fidl_next::wire::Box::encode_present(out);
830            } else {
831                ::fidl_next::wire::Box::encode_absent(out);
832            }
833
834            Ok(())
835        }
836    }
837
838    unsafe impl<'a, ___E>
839        ::fidl_next::EncodeOption<
840            ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetBusWidthRequest>,
841            ___E,
842        > for &'a SdmmcSetBusWidthRequest
843    where
844        ___E: ::fidl_next::Encoder + ?Sized,
845        &'a SdmmcSetBusWidthRequest:
846            ::fidl_next::Encode<crate::wire::SdmmcSetBusWidthRequest, ___E>,
847    {
848        #[inline]
849        fn encode_option(
850            this: ::core::option::Option<Self>,
851            encoder: &mut ___E,
852            out: &mut ::core::mem::MaybeUninit<
853                ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetBusWidthRequest>,
854            >,
855            _: (),
856        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
857            if let Some(inner) = this {
858                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
859                ::fidl_next::wire::Box::encode_present(out);
860            } else {
861                ::fidl_next::wire::Box::encode_absent(out);
862            }
863
864            Ok(())
865        }
866    }
867
868    impl ::fidl_next::FromWire<crate::wire::SdmmcSetBusWidthRequest> for SdmmcSetBusWidthRequest {
869        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
870            crate::wire::SdmmcSetBusWidthRequest,
871            Self,
872        > = unsafe {
873            ::fidl_next::CopyOptimization::enable_if(
874                true && <crate::natural::SdmmcBusWidth as ::fidl_next::FromWire<
875                    crate::wire::SdmmcBusWidth,
876                >>::COPY_OPTIMIZATION
877                    .is_enabled(),
878            )
879        };
880
881        #[inline]
882        fn from_wire(wire: crate::wire::SdmmcSetBusWidthRequest) -> Self {
883            Self { bus_width: ::fidl_next::FromWire::from_wire(wire.bus_width) }
884        }
885    }
886
887    impl ::fidl_next::FromWireRef<crate::wire::SdmmcSetBusWidthRequest> for SdmmcSetBusWidthRequest {
888        #[inline]
889        fn from_wire_ref(wire: &crate::wire::SdmmcSetBusWidthRequest) -> Self {
890            Self { bus_width: ::fidl_next::FromWireRef::from_wire_ref(&wire.bus_width) }
891        }
892    }
893
894    pub type SdmmcSetBusWidthResponse = ();
895
896    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
897    #[repr(C)]
898    pub struct SdmmcSetBusFreqRequest {
899        pub bus_freq: u32,
900    }
901
902    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcSetBusFreqRequest, ___E>
903        for SdmmcSetBusFreqRequest
904    where
905        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
906    {
907        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
908            Self,
909            crate::wire::SdmmcSetBusFreqRequest,
910        > = unsafe {
911            ::fidl_next::CopyOptimization::enable_if(
912            true
913
914                && <
915                    u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
916                >::COPY_OPTIMIZATION.is_enabled()
917
918        )
919        };
920
921        #[inline]
922        fn encode(
923            self,
924            encoder_: &mut ___E,
925            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcSetBusFreqRequest>,
926            _: (),
927        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
928            ::fidl_next::munge! {
929                let crate::wire::SdmmcSetBusFreqRequest {
930                    bus_freq,
931
932                } = out_;
933            }
934
935            ::fidl_next::Encode::encode(self.bus_freq, encoder_, bus_freq, ())?;
936
937            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bus_freq.as_mut_ptr()) };
938
939            Ok(())
940        }
941    }
942
943    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcSetBusFreqRequest, ___E>
944        for &'a SdmmcSetBusFreqRequest
945    where
946        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
947    {
948        #[inline]
949        fn encode(
950            self,
951            encoder_: &mut ___E,
952            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcSetBusFreqRequest>,
953            _: (),
954        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
955            ::fidl_next::munge! {
956                let crate::wire::SdmmcSetBusFreqRequest {
957                    bus_freq,
958
959                } = out_;
960            }
961
962            ::fidl_next::Encode::encode(&self.bus_freq, encoder_, bus_freq, ())?;
963
964            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(bus_freq.as_mut_ptr()) };
965
966            Ok(())
967        }
968    }
969
970    unsafe impl<___E>
971        ::fidl_next::EncodeOption<
972            ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetBusFreqRequest>,
973            ___E,
974        > for SdmmcSetBusFreqRequest
975    where
976        ___E: ::fidl_next::Encoder + ?Sized,
977        SdmmcSetBusFreqRequest: ::fidl_next::Encode<crate::wire::SdmmcSetBusFreqRequest, ___E>,
978    {
979        #[inline]
980        fn encode_option(
981            this: ::core::option::Option<Self>,
982            encoder: &mut ___E,
983            out: &mut ::core::mem::MaybeUninit<
984                ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetBusFreqRequest>,
985            >,
986            _: (),
987        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
988            if let Some(inner) = this {
989                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
990                ::fidl_next::wire::Box::encode_present(out);
991            } else {
992                ::fidl_next::wire::Box::encode_absent(out);
993            }
994
995            Ok(())
996        }
997    }
998
999    unsafe impl<'a, ___E>
1000        ::fidl_next::EncodeOption<
1001            ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetBusFreqRequest>,
1002            ___E,
1003        > for &'a SdmmcSetBusFreqRequest
1004    where
1005        ___E: ::fidl_next::Encoder + ?Sized,
1006        &'a SdmmcSetBusFreqRequest: ::fidl_next::Encode<crate::wire::SdmmcSetBusFreqRequest, ___E>,
1007    {
1008        #[inline]
1009        fn encode_option(
1010            this: ::core::option::Option<Self>,
1011            encoder: &mut ___E,
1012            out: &mut ::core::mem::MaybeUninit<
1013                ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetBusFreqRequest>,
1014            >,
1015            _: (),
1016        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1017            if let Some(inner) = this {
1018                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1019                ::fidl_next::wire::Box::encode_present(out);
1020            } else {
1021                ::fidl_next::wire::Box::encode_absent(out);
1022            }
1023
1024            Ok(())
1025        }
1026    }
1027
1028    impl ::fidl_next::FromWire<crate::wire::SdmmcSetBusFreqRequest> for SdmmcSetBusFreqRequest {
1029        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1030            crate::wire::SdmmcSetBusFreqRequest,
1031            Self,
1032        > = unsafe {
1033            ::fidl_next::CopyOptimization::enable_if(
1034                true
1035                    && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
1036                        .is_enabled(),
1037            )
1038        };
1039
1040        #[inline]
1041        fn from_wire(wire: crate::wire::SdmmcSetBusFreqRequest) -> Self {
1042            Self { bus_freq: ::fidl_next::FromWire::from_wire(wire.bus_freq) }
1043        }
1044    }
1045
1046    impl ::fidl_next::FromWireRef<crate::wire::SdmmcSetBusFreqRequest> for SdmmcSetBusFreqRequest {
1047        #[inline]
1048        fn from_wire_ref(wire: &crate::wire::SdmmcSetBusFreqRequest) -> Self {
1049            Self { bus_freq: ::fidl_next::FromWireRef::from_wire_ref(&wire.bus_freq) }
1050        }
1051    }
1052
1053    pub type SdmmcSetBusFreqResponse = ();
1054
1055    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1056    #[repr(u8)]
1057    pub enum SdmmcTiming {
1058        Legacy = 0,
1059        Hs = 1,
1060        Hsddr = 2,
1061        Hs200 = 3,
1062        Hs400 = 4,
1063        Sdr12 = 5,
1064        Sdr25 = 6,
1065        Sdr50 = 7,
1066        Sdr104 = 8,
1067        Ddr50 = 9,
1068        Hs400EnhancedStrobe = 10,
1069        Max = 11,
1070    }
1071    impl ::core::convert::TryFrom<u8> for SdmmcTiming {
1072        type Error = ::fidl_next::UnknownStrictEnumMemberError;
1073        fn try_from(
1074            value: u8,
1075        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
1076            match value {
1077                0 => Ok(Self::Legacy),
1078                1 => Ok(Self::Hs),
1079                2 => Ok(Self::Hsddr),
1080                3 => Ok(Self::Hs200),
1081                4 => Ok(Self::Hs400),
1082                5 => Ok(Self::Sdr12),
1083                6 => Ok(Self::Sdr25),
1084                7 => Ok(Self::Sdr50),
1085                8 => Ok(Self::Sdr104),
1086                9 => Ok(Self::Ddr50),
1087                10 => Ok(Self::Hs400EnhancedStrobe),
1088                11 => Ok(Self::Max),
1089
1090                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
1091            }
1092        }
1093    }
1094
1095    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcTiming, ___E> for SdmmcTiming
1096    where
1097        ___E: ?Sized,
1098    {
1099        #[inline]
1100        fn encode(
1101            self,
1102            encoder: &mut ___E,
1103            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcTiming>,
1104            _: (),
1105        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1106            ::fidl_next::Encode::encode(&self, encoder, out, ())
1107        }
1108    }
1109
1110    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcTiming, ___E> for &'a SdmmcTiming
1111    where
1112        ___E: ?Sized,
1113    {
1114        #[inline]
1115        fn encode(
1116            self,
1117            encoder: &mut ___E,
1118            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcTiming>,
1119            _: (),
1120        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1121            ::fidl_next::munge!(let crate::wire::SdmmcTiming { value } = out);
1122            let _ = value.write(u8::from(match *self {
1123                SdmmcTiming::Legacy => 0,
1124
1125                SdmmcTiming::Hs => 1,
1126
1127                SdmmcTiming::Hsddr => 2,
1128
1129                SdmmcTiming::Hs200 => 3,
1130
1131                SdmmcTiming::Hs400 => 4,
1132
1133                SdmmcTiming::Sdr12 => 5,
1134
1135                SdmmcTiming::Sdr25 => 6,
1136
1137                SdmmcTiming::Sdr50 => 7,
1138
1139                SdmmcTiming::Sdr104 => 8,
1140
1141                SdmmcTiming::Ddr50 => 9,
1142
1143                SdmmcTiming::Hs400EnhancedStrobe => 10,
1144
1145                SdmmcTiming::Max => 11,
1146            }));
1147
1148            Ok(())
1149        }
1150    }
1151
1152    impl ::core::convert::From<crate::wire::SdmmcTiming> for SdmmcTiming {
1153        fn from(wire: crate::wire::SdmmcTiming) -> Self {
1154            match u8::from(wire.value) {
1155                0 => Self::Legacy,
1156
1157                1 => Self::Hs,
1158
1159                2 => Self::Hsddr,
1160
1161                3 => Self::Hs200,
1162
1163                4 => Self::Hs400,
1164
1165                5 => Self::Sdr12,
1166
1167                6 => Self::Sdr25,
1168
1169                7 => Self::Sdr50,
1170
1171                8 => Self::Sdr104,
1172
1173                9 => Self::Ddr50,
1174
1175                10 => Self::Hs400EnhancedStrobe,
1176
1177                11 => Self::Max,
1178
1179                _ => unsafe { ::core::hint::unreachable_unchecked() },
1180            }
1181        }
1182    }
1183
1184    impl ::fidl_next::FromWire<crate::wire::SdmmcTiming> for SdmmcTiming {
1185        #[inline]
1186        fn from_wire(wire: crate::wire::SdmmcTiming) -> Self {
1187            Self::from(wire)
1188        }
1189    }
1190
1191    impl ::fidl_next::FromWireRef<crate::wire::SdmmcTiming> for SdmmcTiming {
1192        #[inline]
1193        fn from_wire_ref(wire: &crate::wire::SdmmcTiming) -> Self {
1194            Self::from(*wire)
1195        }
1196    }
1197
1198    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1199    #[repr(C)]
1200    pub struct SdmmcSetTimingRequest {
1201        pub timing: crate::natural::SdmmcTiming,
1202    }
1203
1204    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcSetTimingRequest, ___E>
1205        for SdmmcSetTimingRequest
1206    where
1207        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1208    {
1209        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1210            Self,
1211            crate::wire::SdmmcSetTimingRequest,
1212        > = unsafe {
1213            ::fidl_next::CopyOptimization::enable_if(
1214                true && <crate::natural::SdmmcTiming as ::fidl_next::Encode<
1215                    crate::wire::SdmmcTiming,
1216                    ___E,
1217                >>::COPY_OPTIMIZATION
1218                    .is_enabled(),
1219            )
1220        };
1221
1222        #[inline]
1223        fn encode(
1224            self,
1225            encoder_: &mut ___E,
1226            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcSetTimingRequest>,
1227            _: (),
1228        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1229            ::fidl_next::munge! {
1230                let crate::wire::SdmmcSetTimingRequest {
1231                    timing,
1232
1233                } = out_;
1234            }
1235
1236            ::fidl_next::Encode::encode(self.timing, encoder_, timing, ())?;
1237
1238            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(timing.as_mut_ptr()) };
1239
1240            Ok(())
1241        }
1242    }
1243
1244    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcSetTimingRequest, ___E>
1245        for &'a SdmmcSetTimingRequest
1246    where
1247        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1248    {
1249        #[inline]
1250        fn encode(
1251            self,
1252            encoder_: &mut ___E,
1253            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcSetTimingRequest>,
1254            _: (),
1255        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1256            ::fidl_next::munge! {
1257                let crate::wire::SdmmcSetTimingRequest {
1258                    timing,
1259
1260                } = out_;
1261            }
1262
1263            ::fidl_next::Encode::encode(&self.timing, encoder_, timing, ())?;
1264
1265            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(timing.as_mut_ptr()) };
1266
1267            Ok(())
1268        }
1269    }
1270
1271    unsafe impl<___E>
1272        ::fidl_next::EncodeOption<
1273            ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetTimingRequest>,
1274            ___E,
1275        > for SdmmcSetTimingRequest
1276    where
1277        ___E: ::fidl_next::Encoder + ?Sized,
1278        SdmmcSetTimingRequest: ::fidl_next::Encode<crate::wire::SdmmcSetTimingRequest, ___E>,
1279    {
1280        #[inline]
1281        fn encode_option(
1282            this: ::core::option::Option<Self>,
1283            encoder: &mut ___E,
1284            out: &mut ::core::mem::MaybeUninit<
1285                ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetTimingRequest>,
1286            >,
1287            _: (),
1288        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1289            if let Some(inner) = this {
1290                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1291                ::fidl_next::wire::Box::encode_present(out);
1292            } else {
1293                ::fidl_next::wire::Box::encode_absent(out);
1294            }
1295
1296            Ok(())
1297        }
1298    }
1299
1300    unsafe impl<'a, ___E>
1301        ::fidl_next::EncodeOption<
1302            ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetTimingRequest>,
1303            ___E,
1304        > for &'a SdmmcSetTimingRequest
1305    where
1306        ___E: ::fidl_next::Encoder + ?Sized,
1307        &'a SdmmcSetTimingRequest: ::fidl_next::Encode<crate::wire::SdmmcSetTimingRequest, ___E>,
1308    {
1309        #[inline]
1310        fn encode_option(
1311            this: ::core::option::Option<Self>,
1312            encoder: &mut ___E,
1313            out: &mut ::core::mem::MaybeUninit<
1314                ::fidl_next::wire::Box<'static, crate::wire::SdmmcSetTimingRequest>,
1315            >,
1316            _: (),
1317        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1318            if let Some(inner) = this {
1319                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1320                ::fidl_next::wire::Box::encode_present(out);
1321            } else {
1322                ::fidl_next::wire::Box::encode_absent(out);
1323            }
1324
1325            Ok(())
1326        }
1327    }
1328
1329    impl ::fidl_next::FromWire<crate::wire::SdmmcSetTimingRequest> for SdmmcSetTimingRequest {
1330        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1331            crate::wire::SdmmcSetTimingRequest,
1332            Self,
1333        > = unsafe {
1334            ::fidl_next::CopyOptimization::enable_if(
1335                true && <crate::natural::SdmmcTiming as ::fidl_next::FromWire<
1336                    crate::wire::SdmmcTiming,
1337                >>::COPY_OPTIMIZATION
1338                    .is_enabled(),
1339            )
1340        };
1341
1342        #[inline]
1343        fn from_wire(wire: crate::wire::SdmmcSetTimingRequest) -> Self {
1344            Self { timing: ::fidl_next::FromWire::from_wire(wire.timing) }
1345        }
1346    }
1347
1348    impl ::fidl_next::FromWireRef<crate::wire::SdmmcSetTimingRequest> for SdmmcSetTimingRequest {
1349        #[inline]
1350        fn from_wire_ref(wire: &crate::wire::SdmmcSetTimingRequest) -> Self {
1351            Self { timing: ::fidl_next::FromWireRef::from_wire_ref(&wire.timing) }
1352        }
1353    }
1354
1355    pub type SdmmcSetTimingResponse = ();
1356
1357    pub type SdmmcHwResetResponse = ();
1358
1359    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1360    #[repr(C)]
1361    pub struct SdmmcPerformTuningRequest {
1362        pub cmd_idx: u32,
1363    }
1364
1365    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcPerformTuningRequest, ___E>
1366        for SdmmcPerformTuningRequest
1367    where
1368        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1369    {
1370        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1371            Self,
1372            crate::wire::SdmmcPerformTuningRequest,
1373        > = unsafe {
1374            ::fidl_next::CopyOptimization::enable_if(
1375            true
1376
1377                && <
1378                    u32 as ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>
1379                >::COPY_OPTIMIZATION.is_enabled()
1380
1381        )
1382        };
1383
1384        #[inline]
1385        fn encode(
1386            self,
1387            encoder_: &mut ___E,
1388            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcPerformTuningRequest>,
1389            _: (),
1390        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1391            ::fidl_next::munge! {
1392                let crate::wire::SdmmcPerformTuningRequest {
1393                    cmd_idx,
1394
1395                } = out_;
1396            }
1397
1398            ::fidl_next::Encode::encode(self.cmd_idx, encoder_, cmd_idx, ())?;
1399
1400            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(cmd_idx.as_mut_ptr()) };
1401
1402            Ok(())
1403        }
1404    }
1405
1406    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcPerformTuningRequest, ___E>
1407        for &'a SdmmcPerformTuningRequest
1408    where
1409        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1410    {
1411        #[inline]
1412        fn encode(
1413            self,
1414            encoder_: &mut ___E,
1415            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcPerformTuningRequest>,
1416            _: (),
1417        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1418            ::fidl_next::munge! {
1419                let crate::wire::SdmmcPerformTuningRequest {
1420                    cmd_idx,
1421
1422                } = out_;
1423            }
1424
1425            ::fidl_next::Encode::encode(&self.cmd_idx, encoder_, cmd_idx, ())?;
1426
1427            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(cmd_idx.as_mut_ptr()) };
1428
1429            Ok(())
1430        }
1431    }
1432
1433    unsafe impl<___E>
1434        ::fidl_next::EncodeOption<
1435            ::fidl_next::wire::Box<'static, crate::wire::SdmmcPerformTuningRequest>,
1436            ___E,
1437        > for SdmmcPerformTuningRequest
1438    where
1439        ___E: ::fidl_next::Encoder + ?Sized,
1440        SdmmcPerformTuningRequest:
1441            ::fidl_next::Encode<crate::wire::SdmmcPerformTuningRequest, ___E>,
1442    {
1443        #[inline]
1444        fn encode_option(
1445            this: ::core::option::Option<Self>,
1446            encoder: &mut ___E,
1447            out: &mut ::core::mem::MaybeUninit<
1448                ::fidl_next::wire::Box<'static, crate::wire::SdmmcPerformTuningRequest>,
1449            >,
1450            _: (),
1451        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1452            if let Some(inner) = this {
1453                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1454                ::fidl_next::wire::Box::encode_present(out);
1455            } else {
1456                ::fidl_next::wire::Box::encode_absent(out);
1457            }
1458
1459            Ok(())
1460        }
1461    }
1462
1463    unsafe impl<'a, ___E>
1464        ::fidl_next::EncodeOption<
1465            ::fidl_next::wire::Box<'static, crate::wire::SdmmcPerformTuningRequest>,
1466            ___E,
1467        > for &'a SdmmcPerformTuningRequest
1468    where
1469        ___E: ::fidl_next::Encoder + ?Sized,
1470        &'a SdmmcPerformTuningRequest:
1471            ::fidl_next::Encode<crate::wire::SdmmcPerformTuningRequest, ___E>,
1472    {
1473        #[inline]
1474        fn encode_option(
1475            this: ::core::option::Option<Self>,
1476            encoder: &mut ___E,
1477            out: &mut ::core::mem::MaybeUninit<
1478                ::fidl_next::wire::Box<'static, crate::wire::SdmmcPerformTuningRequest>,
1479            >,
1480            _: (),
1481        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1482            if let Some(inner) = this {
1483                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1484                ::fidl_next::wire::Box::encode_present(out);
1485            } else {
1486                ::fidl_next::wire::Box::encode_absent(out);
1487            }
1488
1489            Ok(())
1490        }
1491    }
1492
1493    impl ::fidl_next::FromWire<crate::wire::SdmmcPerformTuningRequest> for SdmmcPerformTuningRequest {
1494        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1495            crate::wire::SdmmcPerformTuningRequest,
1496            Self,
1497        > = unsafe {
1498            ::fidl_next::CopyOptimization::enable_if(
1499                true
1500                    && <u32 as ::fidl_next::FromWire<::fidl_next::wire::Uint32>>::COPY_OPTIMIZATION
1501                        .is_enabled(),
1502            )
1503        };
1504
1505        #[inline]
1506        fn from_wire(wire: crate::wire::SdmmcPerformTuningRequest) -> Self {
1507            Self { cmd_idx: ::fidl_next::FromWire::from_wire(wire.cmd_idx) }
1508        }
1509    }
1510
1511    impl ::fidl_next::FromWireRef<crate::wire::SdmmcPerformTuningRequest>
1512        for SdmmcPerformTuningRequest
1513    {
1514        #[inline]
1515        fn from_wire_ref(wire: &crate::wire::SdmmcPerformTuningRequest) -> Self {
1516            Self { cmd_idx: ::fidl_next::FromWireRef::from_wire_ref(&wire.cmd_idx) }
1517        }
1518    }
1519
1520    pub type SdmmcPerformTuningResponse = ();
1521
1522    pub type SdmmcRegisterInBandInterruptResponse = ();
1523
1524    ::fidl_next::bitflags::bitflags! {
1525        #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct SdmmcVmoRight: u32 {
1526            const READ = 1;
1527            const WRITE = 2;
1528
1529        }
1530    }
1531
1532    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcVmoRight, ___E> for SdmmcVmoRight
1533    where
1534        ___E: ?Sized,
1535    {
1536        #[inline]
1537        fn encode(
1538            self,
1539            encoder: &mut ___E,
1540            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcVmoRight>,
1541            _: (),
1542        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1543            ::fidl_next::Encode::encode(&self, encoder, out, ())
1544        }
1545    }
1546
1547    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcVmoRight, ___E> for &'a SdmmcVmoRight
1548    where
1549        ___E: ?Sized,
1550    {
1551        #[inline]
1552        fn encode(
1553            self,
1554            _: &mut ___E,
1555            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcVmoRight>,
1556            _: (),
1557        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1558            ::fidl_next::munge!(let crate::wire::SdmmcVmoRight { value } = out);
1559
1560            if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
1561                return Err(::fidl_next::EncodeError::InvalidStrictBits);
1562            }
1563
1564            let _ = value.write(::fidl_next::wire::Uint32::from(self.bits()));
1565            Ok(())
1566        }
1567    }
1568
1569    impl ::core::convert::From<crate::wire::SdmmcVmoRight> for SdmmcVmoRight {
1570        fn from(wire: crate::wire::SdmmcVmoRight) -> Self {
1571            Self::from_bits_retain(u32::from(wire.value))
1572        }
1573    }
1574
1575    impl ::fidl_next::FromWire<crate::wire::SdmmcVmoRight> for SdmmcVmoRight {
1576        #[inline]
1577        fn from_wire(wire: crate::wire::SdmmcVmoRight) -> Self {
1578            Self::from(wire)
1579        }
1580    }
1581
1582    impl ::fidl_next::FromWireRef<crate::wire::SdmmcVmoRight> for SdmmcVmoRight {
1583        #[inline]
1584        fn from_wire_ref(wire: &crate::wire::SdmmcVmoRight) -> Self {
1585            Self::from(*wire)
1586        }
1587    }
1588
1589    pub type SdmmcRegisterVmoResponse = ();
1590
1591    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1592    pub struct SdmmcUnregisterVmoRequest {
1593        pub vmo_id: u32,
1594
1595        pub client_id: u8,
1596    }
1597
1598    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcUnregisterVmoRequest, ___E>
1599        for SdmmcUnregisterVmoRequest
1600    where
1601        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1602    {
1603        #[inline]
1604        fn encode(
1605            self,
1606            encoder_: &mut ___E,
1607            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcUnregisterVmoRequest>,
1608            _: (),
1609        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1610            ::fidl_next::munge! {
1611                let crate::wire::SdmmcUnregisterVmoRequest {
1612                    vmo_id,
1613                    client_id,
1614
1615                } = out_;
1616            }
1617
1618            ::fidl_next::Encode::encode(self.vmo_id, encoder_, vmo_id, ())?;
1619
1620            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo_id.as_mut_ptr()) };
1621
1622            ::fidl_next::Encode::encode(self.client_id, encoder_, client_id, ())?;
1623
1624            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client_id.as_mut_ptr()) };
1625
1626            Ok(())
1627        }
1628    }
1629
1630    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcUnregisterVmoRequest, ___E>
1631        for &'a SdmmcUnregisterVmoRequest
1632    where
1633        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1634    {
1635        #[inline]
1636        fn encode(
1637            self,
1638            encoder_: &mut ___E,
1639            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcUnregisterVmoRequest>,
1640            _: (),
1641        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1642            ::fidl_next::munge! {
1643                let crate::wire::SdmmcUnregisterVmoRequest {
1644                    vmo_id,
1645                    client_id,
1646
1647                } = out_;
1648            }
1649
1650            ::fidl_next::Encode::encode(&self.vmo_id, encoder_, vmo_id, ())?;
1651
1652            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(vmo_id.as_mut_ptr()) };
1653
1654            ::fidl_next::Encode::encode(&self.client_id, encoder_, client_id, ())?;
1655
1656            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(client_id.as_mut_ptr()) };
1657
1658            Ok(())
1659        }
1660    }
1661
1662    unsafe impl<___E>
1663        ::fidl_next::EncodeOption<
1664            ::fidl_next::wire::Box<'static, crate::wire::SdmmcUnregisterVmoRequest>,
1665            ___E,
1666        > for SdmmcUnregisterVmoRequest
1667    where
1668        ___E: ::fidl_next::Encoder + ?Sized,
1669        SdmmcUnregisterVmoRequest:
1670            ::fidl_next::Encode<crate::wire::SdmmcUnregisterVmoRequest, ___E>,
1671    {
1672        #[inline]
1673        fn encode_option(
1674            this: ::core::option::Option<Self>,
1675            encoder: &mut ___E,
1676            out: &mut ::core::mem::MaybeUninit<
1677                ::fidl_next::wire::Box<'static, crate::wire::SdmmcUnregisterVmoRequest>,
1678            >,
1679            _: (),
1680        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1681            if let Some(inner) = this {
1682                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1683                ::fidl_next::wire::Box::encode_present(out);
1684            } else {
1685                ::fidl_next::wire::Box::encode_absent(out);
1686            }
1687
1688            Ok(())
1689        }
1690    }
1691
1692    unsafe impl<'a, ___E>
1693        ::fidl_next::EncodeOption<
1694            ::fidl_next::wire::Box<'static, crate::wire::SdmmcUnregisterVmoRequest>,
1695            ___E,
1696        > for &'a SdmmcUnregisterVmoRequest
1697    where
1698        ___E: ::fidl_next::Encoder + ?Sized,
1699        &'a SdmmcUnregisterVmoRequest:
1700            ::fidl_next::Encode<crate::wire::SdmmcUnregisterVmoRequest, ___E>,
1701    {
1702        #[inline]
1703        fn encode_option(
1704            this: ::core::option::Option<Self>,
1705            encoder: &mut ___E,
1706            out: &mut ::core::mem::MaybeUninit<
1707                ::fidl_next::wire::Box<'static, crate::wire::SdmmcUnregisterVmoRequest>,
1708            >,
1709            _: (),
1710        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1711            if let Some(inner) = this {
1712                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1713                ::fidl_next::wire::Box::encode_present(out);
1714            } else {
1715                ::fidl_next::wire::Box::encode_absent(out);
1716            }
1717
1718            Ok(())
1719        }
1720    }
1721
1722    impl ::fidl_next::FromWire<crate::wire::SdmmcUnregisterVmoRequest> for SdmmcUnregisterVmoRequest {
1723        #[inline]
1724        fn from_wire(wire: crate::wire::SdmmcUnregisterVmoRequest) -> Self {
1725            Self {
1726                vmo_id: ::fidl_next::FromWire::from_wire(wire.vmo_id),
1727
1728                client_id: ::fidl_next::FromWire::from_wire(wire.client_id),
1729            }
1730        }
1731    }
1732
1733    impl ::fidl_next::FromWireRef<crate::wire::SdmmcUnregisterVmoRequest>
1734        for SdmmcUnregisterVmoRequest
1735    {
1736        #[inline]
1737        fn from_wire_ref(wire: &crate::wire::SdmmcUnregisterVmoRequest) -> Self {
1738            Self {
1739                vmo_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.vmo_id),
1740
1741                client_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.client_id),
1742            }
1743        }
1744    }
1745
1746    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1747    #[repr(C)]
1748    pub struct SdmmcRequestResponse {
1749        pub response: [u32; 4],
1750    }
1751
1752    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcRequestResponse, ___E>
1753        for SdmmcRequestResponse
1754    where
1755        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1756    {
1757        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1758            Self,
1759            crate::wire::SdmmcRequestResponse,
1760        > = unsafe {
1761            ::fidl_next::CopyOptimization::enable_if(
1762            true
1763
1764                && <
1765                    [u32; 4] as ::fidl_next::Encode<[::fidl_next::wire::Uint32; 4], ___E>
1766                >::COPY_OPTIMIZATION.is_enabled()
1767
1768        )
1769        };
1770
1771        #[inline]
1772        fn encode(
1773            self,
1774            encoder_: &mut ___E,
1775            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRequestResponse>,
1776            _: (),
1777        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1778            ::fidl_next::munge! {
1779                let crate::wire::SdmmcRequestResponse {
1780                    response,
1781
1782                } = out_;
1783            }
1784
1785            ::fidl_next::Encode::encode(self.response, encoder_, response, ())?;
1786
1787            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(response.as_mut_ptr()) };
1788
1789            Ok(())
1790        }
1791    }
1792
1793    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcRequestResponse, ___E>
1794        for &'a SdmmcRequestResponse
1795    where
1796        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1797    {
1798        #[inline]
1799        fn encode(
1800            self,
1801            encoder_: &mut ___E,
1802            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRequestResponse>,
1803            _: (),
1804        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1805            ::fidl_next::munge! {
1806                let crate::wire::SdmmcRequestResponse {
1807                    response,
1808
1809                } = out_;
1810            }
1811
1812            ::fidl_next::Encode::encode(&self.response, encoder_, response, ())?;
1813
1814            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(response.as_mut_ptr()) };
1815
1816            Ok(())
1817        }
1818    }
1819
1820    unsafe impl<___E>
1821        ::fidl_next::EncodeOption<
1822            ::fidl_next::wire::Box<'static, crate::wire::SdmmcRequestResponse>,
1823            ___E,
1824        > for SdmmcRequestResponse
1825    where
1826        ___E: ::fidl_next::Encoder + ?Sized,
1827        SdmmcRequestResponse: ::fidl_next::Encode<crate::wire::SdmmcRequestResponse, ___E>,
1828    {
1829        #[inline]
1830        fn encode_option(
1831            this: ::core::option::Option<Self>,
1832            encoder: &mut ___E,
1833            out: &mut ::core::mem::MaybeUninit<
1834                ::fidl_next::wire::Box<'static, crate::wire::SdmmcRequestResponse>,
1835            >,
1836            _: (),
1837        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1838            if let Some(inner) = this {
1839                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1840                ::fidl_next::wire::Box::encode_present(out);
1841            } else {
1842                ::fidl_next::wire::Box::encode_absent(out);
1843            }
1844
1845            Ok(())
1846        }
1847    }
1848
1849    unsafe impl<'a, ___E>
1850        ::fidl_next::EncodeOption<
1851            ::fidl_next::wire::Box<'static, crate::wire::SdmmcRequestResponse>,
1852            ___E,
1853        > for &'a SdmmcRequestResponse
1854    where
1855        ___E: ::fidl_next::Encoder + ?Sized,
1856        &'a SdmmcRequestResponse: ::fidl_next::Encode<crate::wire::SdmmcRequestResponse, ___E>,
1857    {
1858        #[inline]
1859        fn encode_option(
1860            this: ::core::option::Option<Self>,
1861            encoder: &mut ___E,
1862            out: &mut ::core::mem::MaybeUninit<
1863                ::fidl_next::wire::Box<'static, crate::wire::SdmmcRequestResponse>,
1864            >,
1865            _: (),
1866        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1867            if let Some(inner) = this {
1868                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1869                ::fidl_next::wire::Box::encode_present(out);
1870            } else {
1871                ::fidl_next::wire::Box::encode_absent(out);
1872            }
1873
1874            Ok(())
1875        }
1876    }
1877
1878    impl ::fidl_next::FromWire<crate::wire::SdmmcRequestResponse> for SdmmcRequestResponse {
1879        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1880            crate::wire::SdmmcRequestResponse,
1881            Self,
1882        > = unsafe {
1883            ::fidl_next::CopyOptimization::enable_if(
1884            true
1885
1886                && <
1887                    [u32; 4] as ::fidl_next::FromWire<[::fidl_next::wire::Uint32; 4]>
1888                >::COPY_OPTIMIZATION.is_enabled()
1889
1890        )
1891        };
1892
1893        #[inline]
1894        fn from_wire(wire: crate::wire::SdmmcRequestResponse) -> Self {
1895            Self { response: ::fidl_next::FromWire::from_wire(wire.response) }
1896        }
1897    }
1898
1899    impl ::fidl_next::FromWireRef<crate::wire::SdmmcRequestResponse> for SdmmcRequestResponse {
1900        #[inline]
1901        fn from_wire_ref(wire: &crate::wire::SdmmcRequestResponse) -> Self {
1902            Self { response: ::fidl_next::FromWireRef::from_wire_ref(&wire.response) }
1903        }
1904    }
1905
1906    ::fidl_next::bitflags::bitflags! {
1907        #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, )]pub struct SdmmcHostPrefs: u64 {
1908            const DISABLE_HS400 = 1;
1909            const DISABLE_HS200 = 2;
1910            const DISABLE_HSDDR = 4;
1911
1912        }
1913    }
1914
1915    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcHostPrefs, ___E> for SdmmcHostPrefs
1916    where
1917        ___E: ?Sized,
1918    {
1919        #[inline]
1920        fn encode(
1921            self,
1922            encoder: &mut ___E,
1923            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcHostPrefs>,
1924            _: (),
1925        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1926            ::fidl_next::Encode::encode(&self, encoder, out, ())
1927        }
1928    }
1929
1930    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcHostPrefs, ___E> for &'a SdmmcHostPrefs
1931    where
1932        ___E: ?Sized,
1933    {
1934        #[inline]
1935        fn encode(
1936            self,
1937            _: &mut ___E,
1938            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcHostPrefs>,
1939            _: (),
1940        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1941            ::fidl_next::munge!(let crate::wire::SdmmcHostPrefs { value } = out);
1942
1943            if ::fidl_next::bitflags::Flags::contains_unknown_bits(self) {
1944                return Err(::fidl_next::EncodeError::InvalidStrictBits);
1945            }
1946
1947            let _ = value.write(::fidl_next::wire::Uint64::from(self.bits()));
1948            Ok(())
1949        }
1950    }
1951
1952    impl ::core::convert::From<crate::wire::SdmmcHostPrefs> for SdmmcHostPrefs {
1953        fn from(wire: crate::wire::SdmmcHostPrefs) -> Self {
1954            Self::from_bits_retain(u64::from(wire.value))
1955        }
1956    }
1957
1958    impl ::fidl_next::FromWire<crate::wire::SdmmcHostPrefs> for SdmmcHostPrefs {
1959        #[inline]
1960        fn from_wire(wire: crate::wire::SdmmcHostPrefs) -> Self {
1961            Self::from(wire)
1962        }
1963    }
1964
1965    impl ::fidl_next::FromWireRef<crate::wire::SdmmcHostPrefs> for SdmmcHostPrefs {
1966        #[inline]
1967        fn from_wire_ref(wire: &crate::wire::SdmmcHostPrefs) -> Self {
1968            Self::from(*wire)
1969        }
1970    }
1971
1972    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1973    pub struct SdmmcMetadata {
1974        pub max_frequency: ::core::option::Option<u32>,
1975
1976        pub speed_capabilities: ::core::option::Option<crate::natural::SdmmcHostPrefs>,
1977
1978        pub enable_cache: ::core::option::Option<bool>,
1979
1980        pub removable: ::core::option::Option<bool>,
1981
1982        pub max_command_packing: ::core::option::Option<u32>,
1983
1984        pub use_fidl: ::core::option::Option<bool>,
1985
1986        pub instance_identifier: ::core::option::Option<::std::string::String>,
1987
1988        pub vccq_off_with_controller_off: ::core::option::Option<bool>,
1989    }
1990
1991    impl SdmmcMetadata {
1992        fn __max_ordinal(&self) -> usize {
1993            if self.vccq_off_with_controller_off.is_some() {
1994                return 8;
1995            }
1996
1997            if self.instance_identifier.is_some() {
1998                return 7;
1999            }
2000
2001            if self.use_fidl.is_some() {
2002                return 6;
2003            }
2004
2005            if self.max_command_packing.is_some() {
2006                return 5;
2007            }
2008
2009            if self.removable.is_some() {
2010                return 4;
2011            }
2012
2013            if self.enable_cache.is_some() {
2014                return 3;
2015            }
2016
2017            if self.speed_capabilities.is_some() {
2018                return 2;
2019            }
2020
2021            if self.max_frequency.is_some() {
2022                return 1;
2023            }
2024
2025            0
2026        }
2027    }
2028
2029    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SdmmcMetadata<'static>, ___E> for SdmmcMetadata
2030    where
2031        ___E: ::fidl_next::Encoder + ?Sized,
2032    {
2033        #[inline]
2034        fn encode(
2035            mut self,
2036            encoder: &mut ___E,
2037            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcMetadata<'static>>,
2038            _: (),
2039        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2040            ::fidl_next::munge!(let crate::wire::SdmmcMetadata { table } = out);
2041
2042            let max_ord = self.__max_ordinal();
2043
2044            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2045            ::fidl_next::Wire::zero_padding(&mut out);
2046
2047            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2048                ::fidl_next::wire::Envelope,
2049            >(encoder, max_ord);
2050
2051            for i in 1..=max_ord {
2052                match i {
2053                    8 => {
2054                        if let Some(value) = self.vccq_off_with_controller_off.take() {
2055                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2056                                value,
2057                                preallocated.encoder,
2058                                &mut out,
2059                                (),
2060                            )?;
2061                        } else {
2062                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2063                        }
2064                    }
2065
2066                    7 => {
2067                        if let Some(value) = self.instance_identifier.take() {
2068                            ::fidl_next::wire::Envelope::encode_value::<
2069                                ::fidl_next::wire::String<'static>,
2070                                ___E,
2071                            >(
2072                                value, preallocated.encoder, &mut out, 64
2073                            )?;
2074                        } else {
2075                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2076                        }
2077                    }
2078
2079                    6 => {
2080                        if let Some(value) = self.use_fidl.take() {
2081                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2082                                value,
2083                                preallocated.encoder,
2084                                &mut out,
2085                                (),
2086                            )?;
2087                        } else {
2088                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2089                        }
2090                    }
2091
2092                    5 => {
2093                        if let Some(value) = self.max_command_packing.take() {
2094                            ::fidl_next::wire::Envelope::encode_value::<
2095                                ::fidl_next::wire::Uint32,
2096                                ___E,
2097                            >(
2098                                value, preallocated.encoder, &mut out, ()
2099                            )?;
2100                        } else {
2101                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2102                        }
2103                    }
2104
2105                    4 => {
2106                        if let Some(value) = self.removable.take() {
2107                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2108                                value,
2109                                preallocated.encoder,
2110                                &mut out,
2111                                (),
2112                            )?;
2113                        } else {
2114                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2115                        }
2116                    }
2117
2118                    3 => {
2119                        if let Some(value) = self.enable_cache.take() {
2120                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2121                                value,
2122                                preallocated.encoder,
2123                                &mut out,
2124                                (),
2125                            )?;
2126                        } else {
2127                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2128                        }
2129                    }
2130
2131                    2 => {
2132                        if let Some(value) = self.speed_capabilities.take() {
2133                            ::fidl_next::wire::Envelope::encode_value::<
2134                                crate::wire::SdmmcHostPrefs,
2135                                ___E,
2136                            >(
2137                                value, preallocated.encoder, &mut out, ()
2138                            )?;
2139                        } else {
2140                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2141                        }
2142                    }
2143
2144                    1 => {
2145                        if let Some(value) = self.max_frequency.take() {
2146                            ::fidl_next::wire::Envelope::encode_value::<
2147                                ::fidl_next::wire::Uint32,
2148                                ___E,
2149                            >(
2150                                value, preallocated.encoder, &mut out, ()
2151                            )?;
2152                        } else {
2153                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2154                        }
2155                    }
2156
2157                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2158                }
2159                unsafe {
2160                    preallocated.write_next(out.assume_init_ref());
2161                }
2162            }
2163
2164            ::fidl_next::wire::Table::encode_len(table, max_ord);
2165
2166            Ok(())
2167        }
2168    }
2169
2170    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SdmmcMetadata<'static>, ___E>
2171        for &'a SdmmcMetadata
2172    where
2173        ___E: ::fidl_next::Encoder + ?Sized,
2174    {
2175        #[inline]
2176        fn encode(
2177            self,
2178            encoder: &mut ___E,
2179            out: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcMetadata<'static>>,
2180            _: (),
2181        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2182            ::fidl_next::munge!(let crate::wire::SdmmcMetadata { table } = out);
2183
2184            let max_ord = self.__max_ordinal();
2185
2186            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2187            ::fidl_next::Wire::zero_padding(&mut out);
2188
2189            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2190                ::fidl_next::wire::Envelope,
2191            >(encoder, max_ord);
2192
2193            for i in 1..=max_ord {
2194                match i {
2195                    8 => {
2196                        if let Some(value) = &self.vccq_off_with_controller_off {
2197                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2198                                value,
2199                                preallocated.encoder,
2200                                &mut out,
2201                                (),
2202                            )?;
2203                        } else {
2204                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2205                        }
2206                    }
2207
2208                    7 => {
2209                        if let Some(value) = &self.instance_identifier {
2210                            ::fidl_next::wire::Envelope::encode_value::<
2211                                ::fidl_next::wire::String<'static>,
2212                                ___E,
2213                            >(
2214                                value, preallocated.encoder, &mut out, 64
2215                            )?;
2216                        } else {
2217                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2218                        }
2219                    }
2220
2221                    6 => {
2222                        if let Some(value) = &self.use_fidl {
2223                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2224                                value,
2225                                preallocated.encoder,
2226                                &mut out,
2227                                (),
2228                            )?;
2229                        } else {
2230                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2231                        }
2232                    }
2233
2234                    5 => {
2235                        if let Some(value) = &self.max_command_packing {
2236                            ::fidl_next::wire::Envelope::encode_value::<
2237                                ::fidl_next::wire::Uint32,
2238                                ___E,
2239                            >(
2240                                value, preallocated.encoder, &mut out, ()
2241                            )?;
2242                        } else {
2243                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2244                        }
2245                    }
2246
2247                    4 => {
2248                        if let Some(value) = &self.removable {
2249                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2250                                value,
2251                                preallocated.encoder,
2252                                &mut out,
2253                                (),
2254                            )?;
2255                        } else {
2256                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2257                        }
2258                    }
2259
2260                    3 => {
2261                        if let Some(value) = &self.enable_cache {
2262                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2263                                value,
2264                                preallocated.encoder,
2265                                &mut out,
2266                                (),
2267                            )?;
2268                        } else {
2269                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2270                        }
2271                    }
2272
2273                    2 => {
2274                        if let Some(value) = &self.speed_capabilities {
2275                            ::fidl_next::wire::Envelope::encode_value::<
2276                                crate::wire::SdmmcHostPrefs,
2277                                ___E,
2278                            >(
2279                                value, preallocated.encoder, &mut out, ()
2280                            )?;
2281                        } else {
2282                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2283                        }
2284                    }
2285
2286                    1 => {
2287                        if let Some(value) = &self.max_frequency {
2288                            ::fidl_next::wire::Envelope::encode_value::<
2289                                ::fidl_next::wire::Uint32,
2290                                ___E,
2291                            >(
2292                                value, preallocated.encoder, &mut out, ()
2293                            )?;
2294                        } else {
2295                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2296                        }
2297                    }
2298
2299                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2300                }
2301                unsafe {
2302                    preallocated.write_next(out.assume_init_ref());
2303                }
2304            }
2305
2306            ::fidl_next::wire::Table::encode_len(table, max_ord);
2307
2308            Ok(())
2309        }
2310    }
2311
2312    impl<'de> ::fidl_next::FromWire<crate::wire::SdmmcMetadata<'de>> for SdmmcMetadata {
2313        #[inline]
2314        fn from_wire(wire_: crate::wire::SdmmcMetadata<'de>) -> Self {
2315            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2316
2317            let max_frequency = wire_.table.get(1);
2318
2319            let speed_capabilities = wire_.table.get(2);
2320
2321            let enable_cache = wire_.table.get(3);
2322
2323            let removable = wire_.table.get(4);
2324
2325            let max_command_packing = wire_.table.get(5);
2326
2327            let use_fidl = wire_.table.get(6);
2328
2329            let instance_identifier = wire_.table.get(7);
2330
2331            let vccq_off_with_controller_off = wire_.table.get(8);
2332
2333            Self {
2334                max_frequency: max_frequency.map(|envelope| {
2335                    ::fidl_next::FromWire::from_wire(unsafe {
2336                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
2337                    })
2338                }),
2339
2340                speed_capabilities: speed_capabilities.map(|envelope| {
2341                    ::fidl_next::FromWire::from_wire(unsafe {
2342                        envelope.read_unchecked::<crate::wire::SdmmcHostPrefs>()
2343                    })
2344                }),
2345
2346                enable_cache: enable_cache.map(|envelope| {
2347                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
2348                }),
2349
2350                removable: removable.map(|envelope| {
2351                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
2352                }),
2353
2354                max_command_packing: max_command_packing.map(|envelope| {
2355                    ::fidl_next::FromWire::from_wire(unsafe {
2356                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
2357                    })
2358                }),
2359
2360                use_fidl: use_fidl.map(|envelope| {
2361                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
2362                }),
2363
2364                instance_identifier: instance_identifier.map(|envelope| {
2365                    ::fidl_next::FromWire::from_wire(unsafe {
2366                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2367                    })
2368                }),
2369
2370                vccq_off_with_controller_off: vccq_off_with_controller_off.map(|envelope| {
2371                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
2372                }),
2373            }
2374        }
2375    }
2376
2377    impl<'de> ::fidl_next::FromWireRef<crate::wire::SdmmcMetadata<'de>> for SdmmcMetadata {
2378        #[inline]
2379        fn from_wire_ref(wire: &crate::wire::SdmmcMetadata<'de>) -> Self {
2380            Self {
2381                max_frequency: wire.table.get(1).map(|envelope| {
2382                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2383                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
2384                    })
2385                }),
2386
2387                speed_capabilities: wire.table.get(2).map(|envelope| {
2388                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2389                        envelope.deref_unchecked::<crate::wire::SdmmcHostPrefs>()
2390                    })
2391                }),
2392
2393                enable_cache: wire.table.get(3).map(|envelope| {
2394                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2395                        envelope.deref_unchecked::<bool>()
2396                    })
2397                }),
2398
2399                removable: wire.table.get(4).map(|envelope| {
2400                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2401                        envelope.deref_unchecked::<bool>()
2402                    })
2403                }),
2404
2405                max_command_packing: wire.table.get(5).map(|envelope| {
2406                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2407                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
2408                    })
2409                }),
2410
2411                use_fidl: wire.table.get(6).map(|envelope| {
2412                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2413                        envelope.deref_unchecked::<bool>()
2414                    })
2415                }),
2416
2417                instance_identifier: wire.table.get(7).map(|envelope| {
2418                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2419                        envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
2420                    })
2421                }),
2422
2423                vccq_off_with_controller_off: wire.table.get(8).map(|envelope| {
2424                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2425                        envelope.deref_unchecked::<bool>()
2426                    })
2427                }),
2428            }
2429        }
2430    }
2431}
2432
2433pub mod wire {
2434
2435    /// The wire type corresponding to [`CqhciEnableCqhciResponse`].
2436    pub type CqhciEnableCqhciResponse = ::fidl_next::wire::Unit;
2437
2438    /// The wire type corresponding to [`CqhciDisableCqhciResponse`].
2439    pub type CqhciDisableCqhciResponse = ::fidl_next::wire::Unit;
2440
2441    /// The wire type corresponding to [`SdmmcHostCap`](crate::natural::SdmmcHostCap).
2442    #[derive(Clone, Copy, Debug)]
2443    #[repr(transparent)]
2444    pub struct SdmmcHostCap {
2445        pub(crate) value: ::fidl_next::wire::Uint64,
2446    }
2447
2448    impl ::fidl_next::Constrained for SdmmcHostCap {
2449        type Constraint = ();
2450
2451        fn validate(
2452            _: ::fidl_next::Slot<'_, Self>,
2453            _: Self::Constraint,
2454        ) -> Result<(), ::fidl_next::ValidationError> {
2455            Ok(())
2456        }
2457    }
2458
2459    unsafe impl ::fidl_next::Wire for SdmmcHostCap {
2460        type Narrowed<'de> = Self;
2461
2462        #[inline]
2463        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2464            // Wire bits have no padding
2465        }
2466    }
2467
2468    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcHostCap
2469    where
2470        ___D: ?Sized,
2471    {
2472        fn decode(
2473            slot: ::fidl_next::Slot<'_, Self>,
2474            _: &mut ___D,
2475            _: (),
2476        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2477            ::fidl_next::munge!(let Self { value } = slot);
2478            let set = u64::from(*value);
2479            if set & !crate::natural::SdmmcHostCap::all().bits() != 0 {
2480                return Err(::fidl_next::DecodeError::InvalidBits {
2481                    expected: crate::natural::SdmmcHostCap::all().bits() as usize,
2482                    actual: set as usize,
2483                });
2484            }
2485
2486            Ok(())
2487        }
2488    }
2489
2490    impl ::core::convert::From<crate::natural::SdmmcHostCap> for SdmmcHostCap {
2491        fn from(natural: crate::natural::SdmmcHostCap) -> Self {
2492            Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
2493        }
2494    }
2495
2496    impl ::fidl_next::IntoNatural for SdmmcHostCap {
2497        type Natural = crate::natural::SdmmcHostCap;
2498    }
2499
2500    /// The wire type corresponding to [`SdmmcHostInfo`].
2501    #[derive(Clone, Debug)]
2502    #[repr(C)]
2503    pub struct SdmmcHostInfo {
2504        pub caps: crate::wire::SdmmcHostCap,
2505
2506        pub max_transfer_size: ::fidl_next::wire::Uint32,
2507
2508        pub max_buffer_regions: ::fidl_next::wire::Uint64,
2509    }
2510
2511    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcHostInfo>(), 24);
2512    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcHostInfo>(), 8);
2513
2514    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcHostInfo, caps), 0);
2515
2516    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcHostInfo, max_transfer_size), 8);
2517
2518    static_assertions::const_assert_eq!(
2519        std::mem::offset_of!(SdmmcHostInfo, max_buffer_regions),
2520        16
2521    );
2522
2523    impl ::fidl_next::Constrained for SdmmcHostInfo {
2524        type Constraint = ();
2525
2526        fn validate(
2527            _: ::fidl_next::Slot<'_, Self>,
2528            _: Self::Constraint,
2529        ) -> Result<(), ::fidl_next::ValidationError> {
2530            Ok(())
2531        }
2532    }
2533
2534    unsafe impl ::fidl_next::Wire for SdmmcHostInfo {
2535        type Narrowed<'de> = SdmmcHostInfo;
2536
2537        #[inline]
2538        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2539            ::fidl_next::munge! {
2540                let Self {
2541                    caps,
2542                    max_transfer_size,
2543                    max_buffer_regions,
2544
2545                } = &mut *out_;
2546            }
2547
2548            ::fidl_next::Wire::zero_padding(caps);
2549
2550            ::fidl_next::Wire::zero_padding(max_transfer_size);
2551
2552            ::fidl_next::Wire::zero_padding(max_buffer_regions);
2553
2554            unsafe {
2555                out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
2556            }
2557        }
2558    }
2559
2560    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcHostInfo
2561    where
2562        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2563    {
2564        fn decode(
2565            slot_: ::fidl_next::Slot<'_, Self>,
2566            decoder_: &mut ___D,
2567            _: (),
2568        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2569            if slot_.as_bytes()[12..16] != [0u8; 4] {
2570                return Err(::fidl_next::DecodeError::InvalidPadding);
2571            }
2572
2573            ::fidl_next::munge! {
2574                let Self {
2575                    mut caps,
2576                    mut max_transfer_size,
2577                    mut max_buffer_regions,
2578
2579                } = slot_;
2580            }
2581
2582            let _field = caps.as_mut();
2583
2584            ::fidl_next::Decode::decode(caps.as_mut(), decoder_, ())?;
2585
2586            let _field = max_transfer_size.as_mut();
2587
2588            ::fidl_next::Decode::decode(max_transfer_size.as_mut(), decoder_, ())?;
2589
2590            let _field = max_buffer_regions.as_mut();
2591
2592            ::fidl_next::Decode::decode(max_buffer_regions.as_mut(), decoder_, ())?;
2593
2594            Ok(())
2595        }
2596    }
2597
2598    impl ::fidl_next::IntoNatural for SdmmcHostInfo {
2599        type Natural = crate::natural::SdmmcHostInfo;
2600    }
2601
2602    /// The wire type corresponding to [`SdmmcHostInfoResponse`].
2603    #[derive(Clone, Debug)]
2604    #[repr(C)]
2605    pub struct SdmmcHostInfoResponse {
2606        pub info: crate::wire::SdmmcHostInfo,
2607    }
2608
2609    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcHostInfoResponse>(), 24);
2610    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcHostInfoResponse>(), 8);
2611
2612    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcHostInfoResponse, info), 0);
2613
2614    impl ::fidl_next::Constrained for SdmmcHostInfoResponse {
2615        type Constraint = ();
2616
2617        fn validate(
2618            _: ::fidl_next::Slot<'_, Self>,
2619            _: Self::Constraint,
2620        ) -> Result<(), ::fidl_next::ValidationError> {
2621            Ok(())
2622        }
2623    }
2624
2625    unsafe impl ::fidl_next::Wire for SdmmcHostInfoResponse {
2626        type Narrowed<'de> = SdmmcHostInfoResponse;
2627
2628        #[inline]
2629        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2630            ::fidl_next::munge! {
2631                let Self {
2632                    info,
2633
2634                } = &mut *out_;
2635            }
2636
2637            ::fidl_next::Wire::zero_padding(info);
2638        }
2639    }
2640
2641    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcHostInfoResponse
2642    where
2643        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2644    {
2645        fn decode(
2646            slot_: ::fidl_next::Slot<'_, Self>,
2647            decoder_: &mut ___D,
2648            _: (),
2649        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2650            ::fidl_next::munge! {
2651                let Self {
2652                    mut info,
2653
2654                } = slot_;
2655            }
2656
2657            let _field = info.as_mut();
2658
2659            ::fidl_next::Decode::decode(info.as_mut(), decoder_, ())?;
2660
2661            Ok(())
2662        }
2663    }
2664
2665    impl ::fidl_next::IntoNatural for SdmmcHostInfoResponse {
2666        type Natural = crate::natural::SdmmcHostInfoResponse;
2667    }
2668
2669    /// The wire type corresponding to [`SdmmcVoltage`].
2670    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2671    #[repr(transparent)]
2672    pub struct SdmmcVoltage {
2673        pub(crate) value: u8,
2674    }
2675
2676    impl ::fidl_next::Constrained for SdmmcVoltage {
2677        type Constraint = ();
2678
2679        fn validate(
2680            _: ::fidl_next::Slot<'_, Self>,
2681            _: Self::Constraint,
2682        ) -> Result<(), ::fidl_next::ValidationError> {
2683            Ok(())
2684        }
2685    }
2686
2687    unsafe impl ::fidl_next::Wire for SdmmcVoltage {
2688        type Narrowed<'de> = Self;
2689
2690        #[inline]
2691        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2692            // Wire enums have no padding
2693        }
2694    }
2695
2696    impl SdmmcVoltage {
2697        pub const V330: SdmmcVoltage = SdmmcVoltage { value: 0 };
2698
2699        pub const V180: SdmmcVoltage = SdmmcVoltage { value: 1 };
2700
2701        pub const MAX: SdmmcVoltage = SdmmcVoltage { value: 2 };
2702    }
2703
2704    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcVoltage
2705    where
2706        ___D: ?Sized,
2707    {
2708        fn decode(
2709            slot: ::fidl_next::Slot<'_, Self>,
2710            _: &mut ___D,
2711            _: (),
2712        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2713            ::fidl_next::munge!(let Self { value } = slot);
2714
2715            match u8::from(*value) {
2716                0 | 1 | 2 => (),
2717                unknown => {
2718                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
2719                }
2720            }
2721
2722            Ok(())
2723        }
2724    }
2725
2726    impl ::core::convert::From<crate::natural::SdmmcVoltage> for SdmmcVoltage {
2727        fn from(natural: crate::natural::SdmmcVoltage) -> Self {
2728            match natural {
2729                crate::natural::SdmmcVoltage::V330 => SdmmcVoltage::V330,
2730
2731                crate::natural::SdmmcVoltage::V180 => SdmmcVoltage::V180,
2732
2733                crate::natural::SdmmcVoltage::Max => SdmmcVoltage::MAX,
2734            }
2735        }
2736    }
2737
2738    impl ::fidl_next::IntoNatural for SdmmcVoltage {
2739        type Natural = crate::natural::SdmmcVoltage;
2740    }
2741
2742    /// The wire type corresponding to [`SdmmcSetSignalVoltageRequest`].
2743    #[derive(Clone, Debug)]
2744    #[repr(C)]
2745    pub struct SdmmcSetSignalVoltageRequest {
2746        pub voltage: crate::wire::SdmmcVoltage,
2747    }
2748
2749    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcSetSignalVoltageRequest>(), 1);
2750    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcSetSignalVoltageRequest>(), 1);
2751
2752    static_assertions::const_assert_eq!(
2753        std::mem::offset_of!(SdmmcSetSignalVoltageRequest, voltage),
2754        0
2755    );
2756
2757    impl ::fidl_next::Constrained for SdmmcSetSignalVoltageRequest {
2758        type Constraint = ();
2759
2760        fn validate(
2761            _: ::fidl_next::Slot<'_, Self>,
2762            _: Self::Constraint,
2763        ) -> Result<(), ::fidl_next::ValidationError> {
2764            Ok(())
2765        }
2766    }
2767
2768    unsafe impl ::fidl_next::Wire for SdmmcSetSignalVoltageRequest {
2769        type Narrowed<'de> = SdmmcSetSignalVoltageRequest;
2770
2771        #[inline]
2772        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2773            ::fidl_next::munge! {
2774                let Self {
2775                    voltage,
2776
2777                } = &mut *out_;
2778            }
2779
2780            ::fidl_next::Wire::zero_padding(voltage);
2781        }
2782    }
2783
2784    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcSetSignalVoltageRequest
2785    where
2786        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2787    {
2788        fn decode(
2789            slot_: ::fidl_next::Slot<'_, Self>,
2790            decoder_: &mut ___D,
2791            _: (),
2792        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2793            ::fidl_next::munge! {
2794                let Self {
2795                    mut voltage,
2796
2797                } = slot_;
2798            }
2799
2800            let _field = voltage.as_mut();
2801
2802            ::fidl_next::Decode::decode(voltage.as_mut(), decoder_, ())?;
2803
2804            Ok(())
2805        }
2806    }
2807
2808    impl ::fidl_next::IntoNatural for SdmmcSetSignalVoltageRequest {
2809        type Natural = crate::natural::SdmmcSetSignalVoltageRequest;
2810    }
2811
2812    /// The wire type corresponding to [`SdmmcSetSignalVoltageResponse`].
2813    pub type SdmmcSetSignalVoltageResponse = ::fidl_next::wire::Unit;
2814
2815    /// The wire type corresponding to [`SdmmcBusWidth`].
2816    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2817    #[repr(transparent)]
2818    pub struct SdmmcBusWidth {
2819        pub(crate) value: u8,
2820    }
2821
2822    impl ::fidl_next::Constrained for SdmmcBusWidth {
2823        type Constraint = ();
2824
2825        fn validate(
2826            _: ::fidl_next::Slot<'_, Self>,
2827            _: Self::Constraint,
2828        ) -> Result<(), ::fidl_next::ValidationError> {
2829            Ok(())
2830        }
2831    }
2832
2833    unsafe impl ::fidl_next::Wire for SdmmcBusWidth {
2834        type Narrowed<'de> = Self;
2835
2836        #[inline]
2837        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2838            // Wire enums have no padding
2839        }
2840    }
2841
2842    impl SdmmcBusWidth {
2843        pub const ONE: SdmmcBusWidth = SdmmcBusWidth { value: 0 };
2844
2845        pub const FOUR: SdmmcBusWidth = SdmmcBusWidth { value: 1 };
2846
2847        pub const EIGHT: SdmmcBusWidth = SdmmcBusWidth { value: 2 };
2848
2849        pub const MAX: SdmmcBusWidth = SdmmcBusWidth { value: 3 };
2850    }
2851
2852    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcBusWidth
2853    where
2854        ___D: ?Sized,
2855    {
2856        fn decode(
2857            slot: ::fidl_next::Slot<'_, Self>,
2858            _: &mut ___D,
2859            _: (),
2860        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2861            ::fidl_next::munge!(let Self { value } = slot);
2862
2863            match u8::from(*value) {
2864                0 | 1 | 2 | 3 => (),
2865                unknown => {
2866                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
2867                }
2868            }
2869
2870            Ok(())
2871        }
2872    }
2873
2874    impl ::core::convert::From<crate::natural::SdmmcBusWidth> for SdmmcBusWidth {
2875        fn from(natural: crate::natural::SdmmcBusWidth) -> Self {
2876            match natural {
2877                crate::natural::SdmmcBusWidth::One => SdmmcBusWidth::ONE,
2878
2879                crate::natural::SdmmcBusWidth::Four => SdmmcBusWidth::FOUR,
2880
2881                crate::natural::SdmmcBusWidth::Eight => SdmmcBusWidth::EIGHT,
2882
2883                crate::natural::SdmmcBusWidth::Max => SdmmcBusWidth::MAX,
2884            }
2885        }
2886    }
2887
2888    impl ::fidl_next::IntoNatural for SdmmcBusWidth {
2889        type Natural = crate::natural::SdmmcBusWidth;
2890    }
2891
2892    /// The wire type corresponding to [`SdmmcSetBusWidthRequest`].
2893    #[derive(Clone, Debug)]
2894    #[repr(C)]
2895    pub struct SdmmcSetBusWidthRequest {
2896        pub bus_width: crate::wire::SdmmcBusWidth,
2897    }
2898
2899    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcSetBusWidthRequest>(), 1);
2900    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcSetBusWidthRequest>(), 1);
2901
2902    static_assertions::const_assert_eq!(
2903        std::mem::offset_of!(SdmmcSetBusWidthRequest, bus_width),
2904        0
2905    );
2906
2907    impl ::fidl_next::Constrained for SdmmcSetBusWidthRequest {
2908        type Constraint = ();
2909
2910        fn validate(
2911            _: ::fidl_next::Slot<'_, Self>,
2912            _: Self::Constraint,
2913        ) -> Result<(), ::fidl_next::ValidationError> {
2914            Ok(())
2915        }
2916    }
2917
2918    unsafe impl ::fidl_next::Wire for SdmmcSetBusWidthRequest {
2919        type Narrowed<'de> = SdmmcSetBusWidthRequest;
2920
2921        #[inline]
2922        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2923            ::fidl_next::munge! {
2924                let Self {
2925                    bus_width,
2926
2927                } = &mut *out_;
2928            }
2929
2930            ::fidl_next::Wire::zero_padding(bus_width);
2931        }
2932    }
2933
2934    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcSetBusWidthRequest
2935    where
2936        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2937    {
2938        fn decode(
2939            slot_: ::fidl_next::Slot<'_, Self>,
2940            decoder_: &mut ___D,
2941            _: (),
2942        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2943            ::fidl_next::munge! {
2944                let Self {
2945                    mut bus_width,
2946
2947                } = slot_;
2948            }
2949
2950            let _field = bus_width.as_mut();
2951
2952            ::fidl_next::Decode::decode(bus_width.as_mut(), decoder_, ())?;
2953
2954            Ok(())
2955        }
2956    }
2957
2958    impl ::fidl_next::IntoNatural for SdmmcSetBusWidthRequest {
2959        type Natural = crate::natural::SdmmcSetBusWidthRequest;
2960    }
2961
2962    /// The wire type corresponding to [`SdmmcSetBusWidthResponse`].
2963    pub type SdmmcSetBusWidthResponse = ::fidl_next::wire::Unit;
2964
2965    /// The wire type corresponding to [`SdmmcSetBusFreqRequest`].
2966    #[derive(Clone, Debug)]
2967    #[repr(C)]
2968    pub struct SdmmcSetBusFreqRequest {
2969        pub bus_freq: ::fidl_next::wire::Uint32,
2970    }
2971
2972    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcSetBusFreqRequest>(), 4);
2973    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcSetBusFreqRequest>(), 4);
2974
2975    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcSetBusFreqRequest, bus_freq), 0);
2976
2977    impl ::fidl_next::Constrained for SdmmcSetBusFreqRequest {
2978        type Constraint = ();
2979
2980        fn validate(
2981            _: ::fidl_next::Slot<'_, Self>,
2982            _: Self::Constraint,
2983        ) -> Result<(), ::fidl_next::ValidationError> {
2984            Ok(())
2985        }
2986    }
2987
2988    unsafe impl ::fidl_next::Wire for SdmmcSetBusFreqRequest {
2989        type Narrowed<'de> = SdmmcSetBusFreqRequest;
2990
2991        #[inline]
2992        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2993            ::fidl_next::munge! {
2994                let Self {
2995                    bus_freq,
2996
2997                } = &mut *out_;
2998            }
2999
3000            ::fidl_next::Wire::zero_padding(bus_freq);
3001        }
3002    }
3003
3004    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcSetBusFreqRequest
3005    where
3006        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3007    {
3008        fn decode(
3009            slot_: ::fidl_next::Slot<'_, Self>,
3010            decoder_: &mut ___D,
3011            _: (),
3012        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3013            ::fidl_next::munge! {
3014                let Self {
3015                    mut bus_freq,
3016
3017                } = slot_;
3018            }
3019
3020            let _field = bus_freq.as_mut();
3021
3022            ::fidl_next::Decode::decode(bus_freq.as_mut(), decoder_, ())?;
3023
3024            Ok(())
3025        }
3026    }
3027
3028    impl ::fidl_next::IntoNatural for SdmmcSetBusFreqRequest {
3029        type Natural = crate::natural::SdmmcSetBusFreqRequest;
3030    }
3031
3032    /// The wire type corresponding to [`SdmmcSetBusFreqResponse`].
3033    pub type SdmmcSetBusFreqResponse = ::fidl_next::wire::Unit;
3034
3035    /// The wire type corresponding to [`SdmmcTiming`].
3036    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
3037    #[repr(transparent)]
3038    pub struct SdmmcTiming {
3039        pub(crate) value: u8,
3040    }
3041
3042    impl ::fidl_next::Constrained for SdmmcTiming {
3043        type Constraint = ();
3044
3045        fn validate(
3046            _: ::fidl_next::Slot<'_, Self>,
3047            _: Self::Constraint,
3048        ) -> Result<(), ::fidl_next::ValidationError> {
3049            Ok(())
3050        }
3051    }
3052
3053    unsafe impl ::fidl_next::Wire for SdmmcTiming {
3054        type Narrowed<'de> = Self;
3055
3056        #[inline]
3057        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3058            // Wire enums have no padding
3059        }
3060    }
3061
3062    impl SdmmcTiming {
3063        pub const LEGACY: SdmmcTiming = SdmmcTiming { value: 0 };
3064
3065        pub const HS: SdmmcTiming = SdmmcTiming { value: 1 };
3066
3067        pub const HSDDR: SdmmcTiming = SdmmcTiming { value: 2 };
3068
3069        pub const HS200: SdmmcTiming = SdmmcTiming { value: 3 };
3070
3071        pub const HS400: SdmmcTiming = SdmmcTiming { value: 4 };
3072
3073        pub const SDR12: SdmmcTiming = SdmmcTiming { value: 5 };
3074
3075        pub const SDR25: SdmmcTiming = SdmmcTiming { value: 6 };
3076
3077        pub const SDR50: SdmmcTiming = SdmmcTiming { value: 7 };
3078
3079        pub const SDR104: SdmmcTiming = SdmmcTiming { value: 8 };
3080
3081        pub const DDR50: SdmmcTiming = SdmmcTiming { value: 9 };
3082
3083        pub const HS400_ENHANCED_STROBE: SdmmcTiming = SdmmcTiming { value: 10 };
3084
3085        pub const MAX: SdmmcTiming = SdmmcTiming { value: 11 };
3086    }
3087
3088    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcTiming
3089    where
3090        ___D: ?Sized,
3091    {
3092        fn decode(
3093            slot: ::fidl_next::Slot<'_, Self>,
3094            _: &mut ___D,
3095            _: (),
3096        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3097            ::fidl_next::munge!(let Self { value } = slot);
3098
3099            match u8::from(*value) {
3100                0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 => (),
3101                unknown => {
3102                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
3103                }
3104            }
3105
3106            Ok(())
3107        }
3108    }
3109
3110    impl ::core::convert::From<crate::natural::SdmmcTiming> for SdmmcTiming {
3111        fn from(natural: crate::natural::SdmmcTiming) -> Self {
3112            match natural {
3113                crate::natural::SdmmcTiming::Legacy => SdmmcTiming::LEGACY,
3114
3115                crate::natural::SdmmcTiming::Hs => SdmmcTiming::HS,
3116
3117                crate::natural::SdmmcTiming::Hsddr => SdmmcTiming::HSDDR,
3118
3119                crate::natural::SdmmcTiming::Hs200 => SdmmcTiming::HS200,
3120
3121                crate::natural::SdmmcTiming::Hs400 => SdmmcTiming::HS400,
3122
3123                crate::natural::SdmmcTiming::Sdr12 => SdmmcTiming::SDR12,
3124
3125                crate::natural::SdmmcTiming::Sdr25 => SdmmcTiming::SDR25,
3126
3127                crate::natural::SdmmcTiming::Sdr50 => SdmmcTiming::SDR50,
3128
3129                crate::natural::SdmmcTiming::Sdr104 => SdmmcTiming::SDR104,
3130
3131                crate::natural::SdmmcTiming::Ddr50 => SdmmcTiming::DDR50,
3132
3133                crate::natural::SdmmcTiming::Hs400EnhancedStrobe => {
3134                    SdmmcTiming::HS400_ENHANCED_STROBE
3135                }
3136
3137                crate::natural::SdmmcTiming::Max => SdmmcTiming::MAX,
3138            }
3139        }
3140    }
3141
3142    impl ::fidl_next::IntoNatural for SdmmcTiming {
3143        type Natural = crate::natural::SdmmcTiming;
3144    }
3145
3146    /// The wire type corresponding to [`SdmmcSetTimingRequest`].
3147    #[derive(Clone, Debug)]
3148    #[repr(C)]
3149    pub struct SdmmcSetTimingRequest {
3150        pub timing: crate::wire::SdmmcTiming,
3151    }
3152
3153    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcSetTimingRequest>(), 1);
3154    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcSetTimingRequest>(), 1);
3155
3156    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcSetTimingRequest, timing), 0);
3157
3158    impl ::fidl_next::Constrained for SdmmcSetTimingRequest {
3159        type Constraint = ();
3160
3161        fn validate(
3162            _: ::fidl_next::Slot<'_, Self>,
3163            _: Self::Constraint,
3164        ) -> Result<(), ::fidl_next::ValidationError> {
3165            Ok(())
3166        }
3167    }
3168
3169    unsafe impl ::fidl_next::Wire for SdmmcSetTimingRequest {
3170        type Narrowed<'de> = SdmmcSetTimingRequest;
3171
3172        #[inline]
3173        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3174            ::fidl_next::munge! {
3175                let Self {
3176                    timing,
3177
3178                } = &mut *out_;
3179            }
3180
3181            ::fidl_next::Wire::zero_padding(timing);
3182        }
3183    }
3184
3185    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcSetTimingRequest
3186    where
3187        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3188    {
3189        fn decode(
3190            slot_: ::fidl_next::Slot<'_, Self>,
3191            decoder_: &mut ___D,
3192            _: (),
3193        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3194            ::fidl_next::munge! {
3195                let Self {
3196                    mut timing,
3197
3198                } = slot_;
3199            }
3200
3201            let _field = timing.as_mut();
3202
3203            ::fidl_next::Decode::decode(timing.as_mut(), decoder_, ())?;
3204
3205            Ok(())
3206        }
3207    }
3208
3209    impl ::fidl_next::IntoNatural for SdmmcSetTimingRequest {
3210        type Natural = crate::natural::SdmmcSetTimingRequest;
3211    }
3212
3213    /// The wire type corresponding to [`SdmmcSetTimingResponse`].
3214    pub type SdmmcSetTimingResponse = ::fidl_next::wire::Unit;
3215
3216    /// The wire type corresponding to [`SdmmcHwResetResponse`].
3217    pub type SdmmcHwResetResponse = ::fidl_next::wire::Unit;
3218
3219    /// The wire type corresponding to [`SdmmcPerformTuningRequest`].
3220    #[derive(Clone, Debug)]
3221    #[repr(C)]
3222    pub struct SdmmcPerformTuningRequest {
3223        pub cmd_idx: ::fidl_next::wire::Uint32,
3224    }
3225
3226    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcPerformTuningRequest>(), 4);
3227    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcPerformTuningRequest>(), 4);
3228
3229    static_assertions::const_assert_eq!(
3230        std::mem::offset_of!(SdmmcPerformTuningRequest, cmd_idx),
3231        0
3232    );
3233
3234    impl ::fidl_next::Constrained for SdmmcPerformTuningRequest {
3235        type Constraint = ();
3236
3237        fn validate(
3238            _: ::fidl_next::Slot<'_, Self>,
3239            _: Self::Constraint,
3240        ) -> Result<(), ::fidl_next::ValidationError> {
3241            Ok(())
3242        }
3243    }
3244
3245    unsafe impl ::fidl_next::Wire for SdmmcPerformTuningRequest {
3246        type Narrowed<'de> = SdmmcPerformTuningRequest;
3247
3248        #[inline]
3249        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3250            ::fidl_next::munge! {
3251                let Self {
3252                    cmd_idx,
3253
3254                } = &mut *out_;
3255            }
3256
3257            ::fidl_next::Wire::zero_padding(cmd_idx);
3258        }
3259    }
3260
3261    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcPerformTuningRequest
3262    where
3263        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3264    {
3265        fn decode(
3266            slot_: ::fidl_next::Slot<'_, Self>,
3267            decoder_: &mut ___D,
3268            _: (),
3269        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3270            ::fidl_next::munge! {
3271                let Self {
3272                    mut cmd_idx,
3273
3274                } = slot_;
3275            }
3276
3277            let _field = cmd_idx.as_mut();
3278
3279            ::fidl_next::Decode::decode(cmd_idx.as_mut(), decoder_, ())?;
3280
3281            Ok(())
3282        }
3283    }
3284
3285    impl ::fidl_next::IntoNatural for SdmmcPerformTuningRequest {
3286        type Natural = crate::natural::SdmmcPerformTuningRequest;
3287    }
3288
3289    /// The wire type corresponding to [`SdmmcPerformTuningResponse`].
3290    pub type SdmmcPerformTuningResponse = ::fidl_next::wire::Unit;
3291
3292    /// The wire type corresponding to [`SdmmcRegisterInBandInterruptResponse`].
3293    pub type SdmmcRegisterInBandInterruptResponse = ::fidl_next::wire::Unit;
3294
3295    /// The wire type corresponding to [`SdmmcVmoRight`](crate::natural::SdmmcVmoRight).
3296    #[derive(Clone, Copy, Debug)]
3297    #[repr(transparent)]
3298    pub struct SdmmcVmoRight {
3299        pub(crate) value: ::fidl_next::wire::Uint32,
3300    }
3301
3302    impl ::fidl_next::Constrained for SdmmcVmoRight {
3303        type Constraint = ();
3304
3305        fn validate(
3306            _: ::fidl_next::Slot<'_, Self>,
3307            _: Self::Constraint,
3308        ) -> Result<(), ::fidl_next::ValidationError> {
3309            Ok(())
3310        }
3311    }
3312
3313    unsafe impl ::fidl_next::Wire for SdmmcVmoRight {
3314        type Narrowed<'de> = Self;
3315
3316        #[inline]
3317        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3318            // Wire bits have no padding
3319        }
3320    }
3321
3322    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcVmoRight
3323    where
3324        ___D: ?Sized,
3325    {
3326        fn decode(
3327            slot: ::fidl_next::Slot<'_, Self>,
3328            _: &mut ___D,
3329            _: (),
3330        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3331            ::fidl_next::munge!(let Self { value } = slot);
3332            let set = u32::from(*value);
3333            if set & !crate::natural::SdmmcVmoRight::all().bits() != 0 {
3334                return Err(::fidl_next::DecodeError::InvalidBits {
3335                    expected: crate::natural::SdmmcVmoRight::all().bits() as usize,
3336                    actual: set as usize,
3337                });
3338            }
3339
3340            Ok(())
3341        }
3342    }
3343
3344    impl ::core::convert::From<crate::natural::SdmmcVmoRight> for SdmmcVmoRight {
3345        fn from(natural: crate::natural::SdmmcVmoRight) -> Self {
3346            Self { value: ::fidl_next::wire::Uint32::from(natural.bits()) }
3347        }
3348    }
3349
3350    impl ::fidl_next::IntoNatural for SdmmcVmoRight {
3351        type Natural = crate::natural::SdmmcVmoRight;
3352    }
3353
3354    /// The wire type corresponding to [`SdmmcRegisterVmoResponse`].
3355    pub type SdmmcRegisterVmoResponse = ::fidl_next::wire::Unit;
3356
3357    /// The wire type corresponding to [`SdmmcUnregisterVmoRequest`].
3358    #[derive(Clone, Debug)]
3359    #[repr(C)]
3360    pub struct SdmmcUnregisterVmoRequest {
3361        pub vmo_id: ::fidl_next::wire::Uint32,
3362
3363        pub client_id: u8,
3364    }
3365
3366    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcUnregisterVmoRequest>(), 8);
3367    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcUnregisterVmoRequest>(), 4);
3368
3369    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcUnregisterVmoRequest, vmo_id), 0);
3370
3371    static_assertions::const_assert_eq!(
3372        std::mem::offset_of!(SdmmcUnregisterVmoRequest, client_id),
3373        4
3374    );
3375
3376    impl ::fidl_next::Constrained for SdmmcUnregisterVmoRequest {
3377        type Constraint = ();
3378
3379        fn validate(
3380            _: ::fidl_next::Slot<'_, Self>,
3381            _: Self::Constraint,
3382        ) -> Result<(), ::fidl_next::ValidationError> {
3383            Ok(())
3384        }
3385    }
3386
3387    unsafe impl ::fidl_next::Wire for SdmmcUnregisterVmoRequest {
3388        type Narrowed<'de> = SdmmcUnregisterVmoRequest;
3389
3390        #[inline]
3391        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3392            ::fidl_next::munge! {
3393                let Self {
3394                    vmo_id,
3395                    client_id,
3396
3397                } = &mut *out_;
3398            }
3399
3400            ::fidl_next::Wire::zero_padding(vmo_id);
3401
3402            ::fidl_next::Wire::zero_padding(client_id);
3403
3404            unsafe {
3405                out_.as_mut_ptr().cast::<u8>().add(5).write_bytes(0, 3);
3406            }
3407        }
3408    }
3409
3410    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcUnregisterVmoRequest
3411    where
3412        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3413    {
3414        fn decode(
3415            slot_: ::fidl_next::Slot<'_, Self>,
3416            decoder_: &mut ___D,
3417            _: (),
3418        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3419            if slot_.as_bytes()[5..8] != [0u8; 3] {
3420                return Err(::fidl_next::DecodeError::InvalidPadding);
3421            }
3422
3423            ::fidl_next::munge! {
3424                let Self {
3425                    mut vmo_id,
3426                    mut client_id,
3427
3428                } = slot_;
3429            }
3430
3431            let _field = vmo_id.as_mut();
3432
3433            ::fidl_next::Decode::decode(vmo_id.as_mut(), decoder_, ())?;
3434
3435            let _field = client_id.as_mut();
3436
3437            ::fidl_next::Decode::decode(client_id.as_mut(), decoder_, ())?;
3438
3439            Ok(())
3440        }
3441    }
3442
3443    impl ::fidl_next::IntoNatural for SdmmcUnregisterVmoRequest {
3444        type Natural = crate::natural::SdmmcUnregisterVmoRequest;
3445    }
3446
3447    /// The wire type corresponding to [`SdmmcRequestResponse`].
3448    #[derive(Clone, Debug)]
3449    #[repr(C)]
3450    pub struct SdmmcRequestResponse {
3451        pub response: [::fidl_next::wire::Uint32; 4],
3452    }
3453
3454    static_assertions::const_assert_eq!(std::mem::size_of::<SdmmcRequestResponse>(), 16);
3455    static_assertions::const_assert_eq!(std::mem::align_of::<SdmmcRequestResponse>(), 4);
3456
3457    static_assertions::const_assert_eq!(std::mem::offset_of!(SdmmcRequestResponse, response), 0);
3458
3459    impl ::fidl_next::Constrained for SdmmcRequestResponse {
3460        type Constraint = ();
3461
3462        fn validate(
3463            _: ::fidl_next::Slot<'_, Self>,
3464            _: Self::Constraint,
3465        ) -> Result<(), ::fidl_next::ValidationError> {
3466            Ok(())
3467        }
3468    }
3469
3470    unsafe impl ::fidl_next::Wire for SdmmcRequestResponse {
3471        type Narrowed<'de> = SdmmcRequestResponse;
3472
3473        #[inline]
3474        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3475            ::fidl_next::munge! {
3476                let Self {
3477                    response,
3478
3479                } = &mut *out_;
3480            }
3481
3482            ::fidl_next::Wire::zero_padding(response);
3483        }
3484    }
3485
3486    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcRequestResponse
3487    where
3488        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3489    {
3490        fn decode(
3491            slot_: ::fidl_next::Slot<'_, Self>,
3492            decoder_: &mut ___D,
3493            _: (),
3494        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3495            ::fidl_next::munge! {
3496                let Self {
3497                    mut response,
3498
3499                } = slot_;
3500            }
3501
3502            let _field = response.as_mut();
3503
3504            ::fidl_next::Decode::decode(response.as_mut(), decoder_, ())?;
3505
3506            Ok(())
3507        }
3508    }
3509
3510    impl ::fidl_next::IntoNatural for SdmmcRequestResponse {
3511        type Natural = crate::natural::SdmmcRequestResponse;
3512    }
3513
3514    /// The wire type corresponding to [`SdmmcHostPrefs`](crate::natural::SdmmcHostPrefs).
3515    #[derive(Clone, Copy, Debug)]
3516    #[repr(transparent)]
3517    pub struct SdmmcHostPrefs {
3518        pub(crate) value: ::fidl_next::wire::Uint64,
3519    }
3520
3521    impl ::fidl_next::Constrained for SdmmcHostPrefs {
3522        type Constraint = ();
3523
3524        fn validate(
3525            _: ::fidl_next::Slot<'_, Self>,
3526            _: Self::Constraint,
3527        ) -> Result<(), ::fidl_next::ValidationError> {
3528            Ok(())
3529        }
3530    }
3531
3532    unsafe impl ::fidl_next::Wire for SdmmcHostPrefs {
3533        type Narrowed<'de> = Self;
3534
3535        #[inline]
3536        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3537            // Wire bits have no padding
3538        }
3539    }
3540
3541    unsafe impl<___D> ::fidl_next::Decode<___D> for SdmmcHostPrefs
3542    where
3543        ___D: ?Sized,
3544    {
3545        fn decode(
3546            slot: ::fidl_next::Slot<'_, Self>,
3547            _: &mut ___D,
3548            _: (),
3549        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3550            ::fidl_next::munge!(let Self { value } = slot);
3551            let set = u64::from(*value);
3552            if set & !crate::natural::SdmmcHostPrefs::all().bits() != 0 {
3553                return Err(::fidl_next::DecodeError::InvalidBits {
3554                    expected: crate::natural::SdmmcHostPrefs::all().bits() as usize,
3555                    actual: set as usize,
3556                });
3557            }
3558
3559            Ok(())
3560        }
3561    }
3562
3563    impl ::core::convert::From<crate::natural::SdmmcHostPrefs> for SdmmcHostPrefs {
3564        fn from(natural: crate::natural::SdmmcHostPrefs) -> Self {
3565            Self { value: ::fidl_next::wire::Uint64::from(natural.bits()) }
3566        }
3567    }
3568
3569    impl ::fidl_next::IntoNatural for SdmmcHostPrefs {
3570        type Natural = crate::natural::SdmmcHostPrefs;
3571    }
3572
3573    /// The wire type corresponding to [`SdmmcMetadata`].
3574    #[repr(C)]
3575    pub struct SdmmcMetadata<'de> {
3576        pub(crate) table: ::fidl_next::wire::Table<'de>,
3577    }
3578
3579    impl<'de> Drop for SdmmcMetadata<'de> {
3580        fn drop(&mut self) {
3581            let _ = self
3582                .table
3583                .get(1)
3584                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
3585
3586            let _ = self.table.get(2).map(|envelope| unsafe {
3587                envelope.read_unchecked::<crate::wire::SdmmcHostPrefs>()
3588            });
3589
3590            let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
3591
3592            let _ = self.table.get(4).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
3593
3594            let _ = self
3595                .table
3596                .get(5)
3597                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
3598
3599            let _ = self.table.get(6).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
3600
3601            let _ = self.table.get(7).map(|envelope| unsafe {
3602                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3603            });
3604
3605            let _ = self.table.get(8).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
3606        }
3607    }
3608
3609    impl ::fidl_next::Constrained for SdmmcMetadata<'_> {
3610        type Constraint = ();
3611
3612        fn validate(
3613            _: ::fidl_next::Slot<'_, Self>,
3614            _: Self::Constraint,
3615        ) -> Result<(), ::fidl_next::ValidationError> {
3616            Ok(())
3617        }
3618    }
3619
3620    unsafe impl ::fidl_next::Wire for SdmmcMetadata<'static> {
3621        type Narrowed<'de> = SdmmcMetadata<'de>;
3622
3623        #[inline]
3624        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3625            ::fidl_next::munge!(let Self { table } = out);
3626            ::fidl_next::wire::Table::zero_padding(table);
3627        }
3628    }
3629
3630    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SdmmcMetadata<'de>
3631    where
3632        ___D: ::fidl_next::Decoder<'de> + ?Sized,
3633    {
3634        fn decode(
3635            slot: ::fidl_next::Slot<'_, Self>,
3636            decoder: &mut ___D,
3637            _: (),
3638        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3639            ::fidl_next::munge!(let Self { table } = slot);
3640
3641            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3642                match ordinal {
3643                    0 => unsafe { ::core::hint::unreachable_unchecked() },
3644
3645                    1 => {
3646                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
3647                            slot.as_mut(),
3648                            decoder,
3649                            (),
3650                        )?;
3651
3652                        Ok(())
3653                    }
3654
3655                    2 => {
3656                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::SdmmcHostPrefs>(
3657                            slot.as_mut(),
3658                            decoder,
3659                            (),
3660                        )?;
3661
3662                        Ok(())
3663                    }
3664
3665                    3 => {
3666                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
3667                            slot.as_mut(),
3668                            decoder,
3669                            (),
3670                        )?;
3671
3672                        Ok(())
3673                    }
3674
3675                    4 => {
3676                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
3677                            slot.as_mut(),
3678                            decoder,
3679                            (),
3680                        )?;
3681
3682                        Ok(())
3683                    }
3684
3685                    5 => {
3686                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
3687                            slot.as_mut(),
3688                            decoder,
3689                            (),
3690                        )?;
3691
3692                        Ok(())
3693                    }
3694
3695                    6 => {
3696                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
3697                            slot.as_mut(),
3698                            decoder,
3699                            (),
3700                        )?;
3701
3702                        Ok(())
3703                    }
3704
3705                    7 => {
3706                        ::fidl_next::wire::Envelope::decode_as::<
3707                            ___D,
3708                            ::fidl_next::wire::String<'de>,
3709                        >(slot.as_mut(), decoder, 64)?;
3710
3711                        let value = unsafe {
3712                            slot.deref_unchecked()
3713                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
3714                        };
3715
3716                        if value.len() > 64 {
3717                            return Err(::fidl_next::DecodeError::VectorTooLong {
3718                                size: value.len() as u64,
3719                                limit: 64,
3720                            });
3721                        }
3722
3723                        Ok(())
3724                    }
3725
3726                    8 => {
3727                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
3728                            slot.as_mut(),
3729                            decoder,
3730                            (),
3731                        )?;
3732
3733                        Ok(())
3734                    }
3735
3736                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3737                }
3738            })
3739        }
3740    }
3741
3742    impl<'de> SdmmcMetadata<'de> {
3743        pub fn max_frequency(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
3744            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3745        }
3746
3747        pub fn speed_capabilities(&self) -> ::core::option::Option<&crate::wire::SdmmcHostPrefs> {
3748            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3749        }
3750
3751        pub fn enable_cache(&self) -> ::core::option::Option<&bool> {
3752            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3753        }
3754
3755        pub fn removable(&self) -> ::core::option::Option<&bool> {
3756            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3757        }
3758
3759        pub fn max_command_packing(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
3760            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
3761        }
3762
3763        pub fn use_fidl(&self) -> ::core::option::Option<&bool> {
3764            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
3765        }
3766
3767        pub fn instance_identifier(
3768            &self,
3769        ) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3770            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
3771        }
3772
3773        pub fn vccq_off_with_controller_off(&self) -> ::core::option::Option<&bool> {
3774            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
3775        }
3776    }
3777
3778    impl<'de> ::core::fmt::Debug for SdmmcMetadata<'de> {
3779        fn fmt(
3780            &self,
3781            f: &mut ::core::fmt::Formatter<'_>,
3782        ) -> ::core::result::Result<(), ::core::fmt::Error> {
3783            f.debug_struct("SdmmcMetadata")
3784                .field("max_frequency", &self.max_frequency())
3785                .field("speed_capabilities", &self.speed_capabilities())
3786                .field("enable_cache", &self.enable_cache())
3787                .field("removable", &self.removable())
3788                .field("max_command_packing", &self.max_command_packing())
3789                .field("use_fidl", &self.use_fidl())
3790                .field("instance_identifier", &self.instance_identifier())
3791                .field("vccq_off_with_controller_off", &self.vccq_off_with_controller_off())
3792                .finish()
3793        }
3794    }
3795
3796    impl<'de> ::fidl_next::IntoNatural for SdmmcMetadata<'de> {
3797        type Natural = crate::natural::SdmmcMetadata;
3798    }
3799}
3800
3801pub mod wire_optional {}
3802
3803pub mod generic {
3804
3805    /// The generic type corresponding to [`CqhciEnableCqhciResponse`].
3806    pub type CqhciEnableCqhciResponse = ();
3807
3808    /// The generic type corresponding to [`CqhciDisableCqhciResponse`].
3809    pub type CqhciDisableCqhciResponse = ();
3810
3811    /// The generic type corresponding to [`SdmmcHostInfo`].
3812    pub struct SdmmcHostInfo<T0, T1, T2> {
3813        pub caps: T0,
3814
3815        pub max_transfer_size: T1,
3816
3817        pub max_buffer_regions: T2,
3818    }
3819
3820    unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<crate::wire::SdmmcHostInfo, ___E>
3821        for SdmmcHostInfo<T0, T1, T2>
3822    where
3823        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3824        T0: ::fidl_next::Encode<crate::wire::SdmmcHostCap, ___E>,
3825        T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3826        T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
3827    {
3828        #[inline]
3829        fn encode(
3830            self,
3831            encoder_: &mut ___E,
3832            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcHostInfo>,
3833            _: (),
3834        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3835            ::fidl_next::munge! {
3836                let crate::wire::SdmmcHostInfo {
3837                    caps,
3838                    max_transfer_size,
3839                    max_buffer_regions,
3840
3841                } = out_;
3842            }
3843
3844            ::fidl_next::Encode::encode(self.caps, encoder_, caps, ())?;
3845
3846            ::fidl_next::Encode::encode(self.max_transfer_size, encoder_, max_transfer_size, ())?;
3847
3848            ::fidl_next::Encode::encode(self.max_buffer_regions, encoder_, max_buffer_regions, ())?;
3849
3850            Ok(())
3851        }
3852    }
3853
3854    /// The generic type corresponding to [`SdmmcHostInfoResponse`].
3855    pub struct SdmmcHostInfoResponse<T0> {
3856        pub info: T0,
3857    }
3858
3859    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SdmmcHostInfoResponse, ___E>
3860        for SdmmcHostInfoResponse<T0>
3861    where
3862        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3863        T0: ::fidl_next::Encode<crate::wire::SdmmcHostInfo, ___E>,
3864    {
3865        #[inline]
3866        fn encode(
3867            self,
3868            encoder_: &mut ___E,
3869            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcHostInfoResponse>,
3870            _: (),
3871        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3872            ::fidl_next::munge! {
3873                let crate::wire::SdmmcHostInfoResponse {
3874                    info,
3875
3876                } = out_;
3877            }
3878
3879            ::fidl_next::Encode::encode(self.info, encoder_, info, ())?;
3880
3881            Ok(())
3882        }
3883    }
3884
3885    /// The generic type corresponding to [`SdmmcSetSignalVoltageRequest`].
3886    pub struct SdmmcSetSignalVoltageRequest<T0> {
3887        pub voltage: T0,
3888    }
3889
3890    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SdmmcSetSignalVoltageRequest, ___E>
3891        for SdmmcSetSignalVoltageRequest<T0>
3892    where
3893        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3894        T0: ::fidl_next::Encode<crate::wire::SdmmcVoltage, ___E>,
3895    {
3896        #[inline]
3897        fn encode(
3898            self,
3899            encoder_: &mut ___E,
3900            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcSetSignalVoltageRequest>,
3901            _: (),
3902        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3903            ::fidl_next::munge! {
3904                let crate::wire::SdmmcSetSignalVoltageRequest {
3905                    voltage,
3906
3907                } = out_;
3908            }
3909
3910            ::fidl_next::Encode::encode(self.voltage, encoder_, voltage, ())?;
3911
3912            Ok(())
3913        }
3914    }
3915
3916    /// The generic type corresponding to [`SdmmcSetSignalVoltageResponse`].
3917    pub type SdmmcSetSignalVoltageResponse = ();
3918
3919    /// The generic type corresponding to [`SdmmcSetBusWidthRequest`].
3920    pub struct SdmmcSetBusWidthRequest<T0> {
3921        pub bus_width: T0,
3922    }
3923
3924    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SdmmcSetBusWidthRequest, ___E>
3925        for SdmmcSetBusWidthRequest<T0>
3926    where
3927        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3928        T0: ::fidl_next::Encode<crate::wire::SdmmcBusWidth, ___E>,
3929    {
3930        #[inline]
3931        fn encode(
3932            self,
3933            encoder_: &mut ___E,
3934            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcSetBusWidthRequest>,
3935            _: (),
3936        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3937            ::fidl_next::munge! {
3938                let crate::wire::SdmmcSetBusWidthRequest {
3939                    bus_width,
3940
3941                } = out_;
3942            }
3943
3944            ::fidl_next::Encode::encode(self.bus_width, encoder_, bus_width, ())?;
3945
3946            Ok(())
3947        }
3948    }
3949
3950    /// The generic type corresponding to [`SdmmcSetBusWidthResponse`].
3951    pub type SdmmcSetBusWidthResponse = ();
3952
3953    /// The generic type corresponding to [`SdmmcSetBusFreqRequest`].
3954    pub struct SdmmcSetBusFreqRequest<T0> {
3955        pub bus_freq: T0,
3956    }
3957
3958    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SdmmcSetBusFreqRequest, ___E>
3959        for SdmmcSetBusFreqRequest<T0>
3960    where
3961        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3962        T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
3963    {
3964        #[inline]
3965        fn encode(
3966            self,
3967            encoder_: &mut ___E,
3968            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcSetBusFreqRequest>,
3969            _: (),
3970        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3971            ::fidl_next::munge! {
3972                let crate::wire::SdmmcSetBusFreqRequest {
3973                    bus_freq,
3974
3975                } = out_;
3976            }
3977
3978            ::fidl_next::Encode::encode(self.bus_freq, encoder_, bus_freq, ())?;
3979
3980            Ok(())
3981        }
3982    }
3983
3984    /// The generic type corresponding to [`SdmmcSetBusFreqResponse`].
3985    pub type SdmmcSetBusFreqResponse = ();
3986
3987    /// The generic type corresponding to [`SdmmcSetTimingRequest`].
3988    pub struct SdmmcSetTimingRequest<T0> {
3989        pub timing: T0,
3990    }
3991
3992    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SdmmcSetTimingRequest, ___E>
3993        for SdmmcSetTimingRequest<T0>
3994    where
3995        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3996        T0: ::fidl_next::Encode<crate::wire::SdmmcTiming, ___E>,
3997    {
3998        #[inline]
3999        fn encode(
4000            self,
4001            encoder_: &mut ___E,
4002            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcSetTimingRequest>,
4003            _: (),
4004        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4005            ::fidl_next::munge! {
4006                let crate::wire::SdmmcSetTimingRequest {
4007                    timing,
4008
4009                } = out_;
4010            }
4011
4012            ::fidl_next::Encode::encode(self.timing, encoder_, timing, ())?;
4013
4014            Ok(())
4015        }
4016    }
4017
4018    /// The generic type corresponding to [`SdmmcSetTimingResponse`].
4019    pub type SdmmcSetTimingResponse = ();
4020
4021    /// The generic type corresponding to [`SdmmcHwResetResponse`].
4022    pub type SdmmcHwResetResponse = ();
4023
4024    /// The generic type corresponding to [`SdmmcPerformTuningRequest`].
4025    pub struct SdmmcPerformTuningRequest<T0> {
4026        pub cmd_idx: T0,
4027    }
4028
4029    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SdmmcPerformTuningRequest, ___E>
4030        for SdmmcPerformTuningRequest<T0>
4031    where
4032        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4033        T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
4034    {
4035        #[inline]
4036        fn encode(
4037            self,
4038            encoder_: &mut ___E,
4039            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcPerformTuningRequest>,
4040            _: (),
4041        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4042            ::fidl_next::munge! {
4043                let crate::wire::SdmmcPerformTuningRequest {
4044                    cmd_idx,
4045
4046                } = out_;
4047            }
4048
4049            ::fidl_next::Encode::encode(self.cmd_idx, encoder_, cmd_idx, ())?;
4050
4051            Ok(())
4052        }
4053    }
4054
4055    /// The generic type corresponding to [`SdmmcPerformTuningResponse`].
4056    pub type SdmmcPerformTuningResponse = ();
4057
4058    /// The generic type corresponding to [`SdmmcRegisterInBandInterruptResponse`].
4059    pub type SdmmcRegisterInBandInterruptResponse = ();
4060
4061    /// The generic type corresponding to [`SdmmcRegisterVmoResponse`].
4062    pub type SdmmcRegisterVmoResponse = ();
4063
4064    /// The generic type corresponding to [`SdmmcUnregisterVmoRequest`].
4065    pub struct SdmmcUnregisterVmoRequest<T0, T1> {
4066        pub vmo_id: T0,
4067
4068        pub client_id: T1,
4069    }
4070
4071    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::SdmmcUnregisterVmoRequest, ___E>
4072        for SdmmcUnregisterVmoRequest<T0, T1>
4073    where
4074        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4075        T0: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
4076        T1: ::fidl_next::Encode<u8, ___E>,
4077    {
4078        #[inline]
4079        fn encode(
4080            self,
4081            encoder_: &mut ___E,
4082            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcUnregisterVmoRequest>,
4083            _: (),
4084        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4085            ::fidl_next::munge! {
4086                let crate::wire::SdmmcUnregisterVmoRequest {
4087                    vmo_id,
4088                    client_id,
4089
4090                } = out_;
4091            }
4092
4093            ::fidl_next::Encode::encode(self.vmo_id, encoder_, vmo_id, ())?;
4094
4095            ::fidl_next::Encode::encode(self.client_id, encoder_, client_id, ())?;
4096
4097            Ok(())
4098        }
4099    }
4100
4101    /// The generic type corresponding to [`SdmmcRequestResponse`].
4102    pub struct SdmmcRequestResponse<T0> {
4103        pub response: T0,
4104    }
4105
4106    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::SdmmcRequestResponse, ___E>
4107        for SdmmcRequestResponse<T0>
4108    where
4109        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4110        T0: ::fidl_next::Encode<[::fidl_next::wire::Uint32; 4], ___E>,
4111    {
4112        #[inline]
4113        fn encode(
4114            self,
4115            encoder_: &mut ___E,
4116            out_: &mut ::core::mem::MaybeUninit<crate::wire::SdmmcRequestResponse>,
4117            _: (),
4118        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4119            ::fidl_next::munge! {
4120                let crate::wire::SdmmcRequestResponse {
4121                    response,
4122
4123                } = out_;
4124            }
4125
4126            ::fidl_next::Encode::encode(self.response, encoder_, response, ())?;
4127
4128            Ok(())
4129        }
4130    }
4131}
4132
4133pub use self::natural::*;
4134
4135/// The type corresponding to the InBandInterrupt protocol.
4136#[derive(PartialEq, Debug)]
4137pub struct InBandInterrupt;
4138
4139impl ::fidl_next::Discoverable for InBandInterrupt {
4140    const PROTOCOL_NAME: &'static str = "fuchsia.hardware.sdmmc.InBandInterrupt";
4141}
4142
4143#[cfg(feature = "driver")]
4144impl ::fidl_next::HasTransport for InBandInterrupt {
4145    type Transport = ::fdf_fidl::DriverChannel;
4146}
4147
4148pub mod in_band_interrupt {
4149    pub mod prelude {
4150        pub use crate::{
4151            InBandInterrupt, InBandInterruptClientHandler, InBandInterruptLocalClientHandler,
4152            InBandInterruptLocalServerHandler, InBandInterruptServerHandler, in_band_interrupt,
4153        };
4154    }
4155
4156    pub struct Callback;
4157
4158    impl ::fidl_next::Method for Callback {
4159        const ORDINAL: u64 = 1424660355215079669;
4160        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4161            ::fidl_next::protocol::Flexibility::Strict;
4162
4163        type Protocol = crate::InBandInterrupt;
4164
4165        type Request = ::fidl_next::wire::EmptyMessageBody;
4166    }
4167
4168    impl ::fidl_next::TwoWayMethod for Callback {
4169        type Response = ::fidl_next::wire::EmptyMessageBody;
4170    }
4171
4172    impl<___R> ::fidl_next::Respond<___R> for Callback {
4173        type Output = ___R;
4174
4175        fn respond(response: ___R) -> Self::Output {
4176            response
4177        }
4178    }
4179
4180    mod ___detail {
4181        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::InBandInterrupt
4182        where
4183            ___T: ::fidl_next::Transport,
4184        {
4185            type Client = InBandInterruptClient<___T>;
4186            type Server = InBandInterruptServer<___T>;
4187        }
4188
4189        /// The client for the `InBandInterrupt` protocol.
4190        #[repr(transparent)]
4191        pub struct InBandInterruptClient<___T: ::fidl_next::Transport> {
4192            #[allow(dead_code)]
4193            client: ::fidl_next::protocol::Client<___T>,
4194        }
4195
4196        impl<___T> InBandInterruptClient<___T>
4197        where
4198            ___T: ::fidl_next::Transport,
4199        {
4200            pub fn callback(&self) -> ::fidl_next::TwoWayFuture<'_, super::Callback, ___T> {
4201                ::fidl_next::TwoWayFuture::from_untyped(
4202                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
4203                        1424660355215079669,
4204                        <super::Callback as ::fidl_next::Method>::FLEXIBILITY,
4205                        (),
4206                    ),
4207                )
4208            }
4209        }
4210
4211        /// The server for the `InBandInterrupt` protocol.
4212        #[repr(transparent)]
4213        pub struct InBandInterruptServer<___T: ::fidl_next::Transport> {
4214            server: ::fidl_next::protocol::Server<___T>,
4215        }
4216
4217        impl<___T> InBandInterruptServer<___T> where ___T: ::fidl_next::Transport {}
4218    }
4219}
4220
4221#[diagnostic::on_unimplemented(
4222    note = "If {Self} implements the non-local InBandInterruptClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4223)]
4224
4225/// A client handler for the InBandInterrupt protocol.
4226///
4227/// See [`InBandInterrupt`] for more details.
4228pub trait InBandInterruptLocalClientHandler<
4229    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4230    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4231>
4232{
4233}
4234
4235impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for InBandInterrupt
4236where
4237    ___H: InBandInterruptLocalClientHandler<___T>,
4238    ___T: ::fidl_next::Transport,
4239{
4240    async fn on_event(
4241        handler: &mut ___H,
4242        ordinal: u64,
4243        flexibility: ::fidl_next::protocol::Flexibility,
4244        body: ::fidl_next::Body<___T>,
4245    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4246        match ordinal {
4247            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4248        }
4249    }
4250}
4251
4252#[diagnostic::on_unimplemented(
4253    note = "If {Self} implements the non-local InBandInterruptServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4254)]
4255
4256/// A server handler for the InBandInterrupt protocol.
4257///
4258/// See [`InBandInterrupt`] for more details.
4259pub trait InBandInterruptLocalServerHandler<
4260    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4261    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4262>
4263{
4264    fn callback(
4265        &mut self,
4266
4267        responder: ::fidl_next::Responder<in_band_interrupt::Callback, ___T>,
4268    ) -> impl ::core::future::Future<Output = ()>;
4269}
4270
4271impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for InBandInterrupt
4272where
4273    ___H: InBandInterruptLocalServerHandler<___T>,
4274    ___T: ::fidl_next::Transport,
4275{
4276    async fn on_one_way(
4277        handler: &mut ___H,
4278        ordinal: u64,
4279        flexibility: ::fidl_next::protocol::Flexibility,
4280        body: ::fidl_next::Body<___T>,
4281    ) -> ::core::result::Result<
4282        (),
4283        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4284    > {
4285        match ordinal {
4286            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4287        }
4288    }
4289
4290    async fn on_two_way(
4291        handler: &mut ___H,
4292        ordinal: u64,
4293        flexibility: ::fidl_next::protocol::Flexibility,
4294        body: ::fidl_next::Body<___T>,
4295        responder: ::fidl_next::protocol::Responder<___T>,
4296    ) -> ::core::result::Result<
4297        (),
4298        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4299    > {
4300        match ordinal {
4301            1424660355215079669 => {
4302                let responder = ::fidl_next::Responder::from_untyped(responder);
4303
4304                handler.callback(responder).await;
4305                Ok(())
4306            }
4307
4308            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4309        }
4310    }
4311}
4312
4313/// A client handler for the InBandInterrupt protocol.
4314///
4315/// See [`InBandInterrupt`] for more details.
4316pub trait InBandInterruptClientHandler<
4317    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4318    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4319>
4320{
4321}
4322
4323impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for InBandInterrupt
4324where
4325    ___H: InBandInterruptClientHandler<___T> + ::core::marker::Send,
4326    ___T: ::fidl_next::Transport,
4327{
4328    async fn on_event(
4329        handler: &mut ___H,
4330        ordinal: u64,
4331        flexibility: ::fidl_next::protocol::Flexibility,
4332        body: ::fidl_next::Body<___T>,
4333    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4334        match ordinal {
4335            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4336        }
4337    }
4338}
4339
4340/// A server handler for the InBandInterrupt protocol.
4341///
4342/// See [`InBandInterrupt`] for more details.
4343pub trait InBandInterruptServerHandler<
4344    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4345    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4346>
4347{
4348    fn callback(
4349        &mut self,
4350
4351        responder: ::fidl_next::Responder<in_band_interrupt::Callback, ___T>,
4352    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4353}
4354
4355impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for InBandInterrupt
4356where
4357    ___H: InBandInterruptServerHandler<___T> + ::core::marker::Send,
4358    ___T: ::fidl_next::Transport,
4359{
4360    async fn on_one_way(
4361        handler: &mut ___H,
4362        ordinal: u64,
4363        flexibility: ::fidl_next::protocol::Flexibility,
4364        body: ::fidl_next::Body<___T>,
4365    ) -> ::core::result::Result<
4366        (),
4367        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4368    > {
4369        match ordinal {
4370            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4371        }
4372    }
4373
4374    async fn on_two_way(
4375        handler: &mut ___H,
4376        ordinal: u64,
4377        flexibility: ::fidl_next::protocol::Flexibility,
4378        body: ::fidl_next::Body<___T>,
4379        responder: ::fidl_next::protocol::Responder<___T>,
4380    ) -> ::core::result::Result<
4381        (),
4382        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4383    > {
4384        match ordinal {
4385            1424660355215079669 => {
4386                let responder = ::fidl_next::Responder::from_untyped(responder);
4387
4388                handler.callback(responder).await;
4389                Ok(())
4390            }
4391
4392            ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
4393        }
4394    }
4395}
4396
4397impl<___T> InBandInterruptClientHandler<___T> for ::fidl_next::IgnoreEvents where
4398    ___T: ::fidl_next::Transport
4399{
4400}
4401
4402impl<___H, ___T> InBandInterruptLocalClientHandler<___T> for ::fidl_next::Local<___H>
4403where
4404    ___H: InBandInterruptClientHandler<___T>,
4405    ___T: ::fidl_next::Transport,
4406{
4407}
4408
4409impl<___H, ___T> InBandInterruptLocalServerHandler<___T> for ::fidl_next::Local<___H>
4410where
4411    ___H: InBandInterruptServerHandler<___T>,
4412    ___T: ::fidl_next::Transport,
4413{
4414    async fn callback(
4415        &mut self,
4416
4417        responder: ::fidl_next::Responder<in_band_interrupt::Callback, ___T>,
4418    ) {
4419        ___H::callback(&mut self.0, responder).await
4420    }
4421}
4422
4423pub const MAX_NAME_LENGTH: u8 = 64 as u8;
4424
4425#[doc = " The maximum value for a transfer size, identifying that there\n effectively exists no maximum for a single operation.\n"]
4426pub const MAX_TRANSFER_UNBOUNDED: u32 = 4294967295 as u32;
4427
4428#[doc = " The max value of client_id fields below. There is no known need for more than eight clients at\n the moment, however if that changes later this value will be increased.\n"]
4429pub const SDMMC_MAX_CLIENT_ID: u8 = 7 as u8;
4430
4431#[doc = " number of pages per request - 2M per request\n matches DMA_DESC_COUNT in dev/block/sdhci\n (PAGE_SIZE / sizeof(zx_paddr_t))\n"]
4432pub const SDMMC_PAGES_COUNT: u64 = 512 as u64;