Skip to main content

fidl_next_common_fuchsia_sysmem2/
fidl_next_common_fuchsia_sysmem2.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    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8    pub struct AllocatorValidateBufferCollectionTokenRequest {
9        pub token_server_koid: ::core::option::Option<u64>,
10    }
11
12    impl AllocatorValidateBufferCollectionTokenRequest {
13        fn __max_ordinal(&self) -> usize {
14            if self.token_server_koid.is_some() {
15                return 1;
16            }
17
18            0
19        }
20    }
21
22    unsafe impl<___E>
23        ::fidl_next::Encode<
24            crate::wire::AllocatorValidateBufferCollectionTokenRequest<'static>,
25            ___E,
26        > for AllocatorValidateBufferCollectionTokenRequest
27    where
28        ___E: ::fidl_next::Encoder + ?Sized,
29    {
30        #[inline]
31        fn encode(
32            mut self,
33            encoder: &mut ___E,
34            out: &mut ::core::mem::MaybeUninit<
35                crate::wire::AllocatorValidateBufferCollectionTokenRequest<'static>,
36            >,
37            _: (),
38        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
39            ::fidl_next::munge!(let crate::wire::AllocatorValidateBufferCollectionTokenRequest { table } = out);
40
41            let max_ord = self.__max_ordinal();
42
43            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
44            ::fidl_next::Wire::zero_padding(&mut out);
45
46            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
47                ::fidl_next::wire::Envelope,
48            >(encoder, max_ord);
49
50            for i in 1..=max_ord {
51                match i {
52                    1 => {
53                        if let Some(value) = self.token_server_koid.take() {
54                            ::fidl_next::wire::Envelope::encode_value::<
55                                ::fidl_next::wire::Uint64,
56                                ___E,
57                            >(
58                                value, preallocated.encoder, &mut out, ()
59                            )?;
60                        } else {
61                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
62                        }
63                    }
64
65                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
66                }
67                unsafe {
68                    preallocated.write_next(out.assume_init_ref());
69                }
70            }
71
72            ::fidl_next::wire::Table::encode_len(table, max_ord);
73
74            Ok(())
75        }
76    }
77
78    unsafe impl<'a, ___E>
79        ::fidl_next::Encode<
80            crate::wire::AllocatorValidateBufferCollectionTokenRequest<'static>,
81            ___E,
82        > for &'a AllocatorValidateBufferCollectionTokenRequest
83    where
84        ___E: ::fidl_next::Encoder + ?Sized,
85    {
86        #[inline]
87        fn encode(
88            self,
89            encoder: &mut ___E,
90            out: &mut ::core::mem::MaybeUninit<
91                crate::wire::AllocatorValidateBufferCollectionTokenRequest<'static>,
92            >,
93            _: (),
94        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
95            ::fidl_next::munge!(let crate::wire::AllocatorValidateBufferCollectionTokenRequest { table } = out);
96
97            let max_ord = self.__max_ordinal();
98
99            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
100            ::fidl_next::Wire::zero_padding(&mut out);
101
102            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
103                ::fidl_next::wire::Envelope,
104            >(encoder, max_ord);
105
106            for i in 1..=max_ord {
107                match i {
108                    1 => {
109                        if let Some(value) = &self.token_server_koid {
110                            ::fidl_next::wire::Envelope::encode_value::<
111                                ::fidl_next::wire::Uint64,
112                                ___E,
113                            >(
114                                value, preallocated.encoder, &mut out, ()
115                            )?;
116                        } else {
117                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
118                        }
119                    }
120
121                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
122                }
123                unsafe {
124                    preallocated.write_next(out.assume_init_ref());
125                }
126            }
127
128            ::fidl_next::wire::Table::encode_len(table, max_ord);
129
130            Ok(())
131        }
132    }
133
134    impl<'de> ::fidl_next::FromWire<crate::wire::AllocatorValidateBufferCollectionTokenRequest<'de>>
135        for AllocatorValidateBufferCollectionTokenRequest
136    {
137        #[inline]
138        fn from_wire(
139            wire_: crate::wire::AllocatorValidateBufferCollectionTokenRequest<'de>,
140        ) -> Self {
141            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
142
143            let token_server_koid = wire_.table.get(1);
144
145            Self {
146                token_server_koid: token_server_koid.map(|envelope| {
147                    ::fidl_next::FromWire::from_wire(unsafe {
148                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
149                    })
150                }),
151            }
152        }
153    }
154
155    impl<'de>
156        ::fidl_next::FromWireRef<crate::wire::AllocatorValidateBufferCollectionTokenRequest<'de>>
157        for AllocatorValidateBufferCollectionTokenRequest
158    {
159        #[inline]
160        fn from_wire_ref(
161            wire: &crate::wire::AllocatorValidateBufferCollectionTokenRequest<'de>,
162        ) -> Self {
163            Self {
164                token_server_koid: wire.table.get(1).map(|envelope| {
165                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
166                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
167                    })
168                }),
169            }
170        }
171    }
172
173    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
174    pub struct AllocatorValidateBufferCollectionTokenResponse {
175        pub is_known: ::core::option::Option<bool>,
176    }
177
178    impl AllocatorValidateBufferCollectionTokenResponse {
179        fn __max_ordinal(&self) -> usize {
180            if self.is_known.is_some() {
181                return 1;
182            }
183
184            0
185        }
186    }
187
188    unsafe impl<___E>
189        ::fidl_next::Encode<
190            crate::wire::AllocatorValidateBufferCollectionTokenResponse<'static>,
191            ___E,
192        > for AllocatorValidateBufferCollectionTokenResponse
193    where
194        ___E: ::fidl_next::Encoder + ?Sized,
195    {
196        #[inline]
197        fn encode(
198            mut self,
199            encoder: &mut ___E,
200            out: &mut ::core::mem::MaybeUninit<
201                crate::wire::AllocatorValidateBufferCollectionTokenResponse<'static>,
202            >,
203            _: (),
204        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
205            ::fidl_next::munge!(let crate::wire::AllocatorValidateBufferCollectionTokenResponse { table } = out);
206
207            let max_ord = self.__max_ordinal();
208
209            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
210            ::fidl_next::Wire::zero_padding(&mut out);
211
212            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
213                ::fidl_next::wire::Envelope,
214            >(encoder, max_ord);
215
216            for i in 1..=max_ord {
217                match i {
218                    1 => {
219                        if let Some(value) = self.is_known.take() {
220                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
221                                value,
222                                preallocated.encoder,
223                                &mut out,
224                                (),
225                            )?;
226                        } else {
227                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
228                        }
229                    }
230
231                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
232                }
233                unsafe {
234                    preallocated.write_next(out.assume_init_ref());
235                }
236            }
237
238            ::fidl_next::wire::Table::encode_len(table, max_ord);
239
240            Ok(())
241        }
242    }
243
244    unsafe impl<'a, ___E>
245        ::fidl_next::Encode<
246            crate::wire::AllocatorValidateBufferCollectionTokenResponse<'static>,
247            ___E,
248        > for &'a AllocatorValidateBufferCollectionTokenResponse
249    where
250        ___E: ::fidl_next::Encoder + ?Sized,
251    {
252        #[inline]
253        fn encode(
254            self,
255            encoder: &mut ___E,
256            out: &mut ::core::mem::MaybeUninit<
257                crate::wire::AllocatorValidateBufferCollectionTokenResponse<'static>,
258            >,
259            _: (),
260        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
261            ::fidl_next::munge!(let crate::wire::AllocatorValidateBufferCollectionTokenResponse { table } = out);
262
263            let max_ord = self.__max_ordinal();
264
265            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
266            ::fidl_next::Wire::zero_padding(&mut out);
267
268            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
269                ::fidl_next::wire::Envelope,
270            >(encoder, max_ord);
271
272            for i in 1..=max_ord {
273                match i {
274                    1 => {
275                        if let Some(value) = &self.is_known {
276                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
277                                value,
278                                preallocated.encoder,
279                                &mut out,
280                                (),
281                            )?;
282                        } else {
283                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
284                        }
285                    }
286
287                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
288                }
289                unsafe {
290                    preallocated.write_next(out.assume_init_ref());
291                }
292            }
293
294            ::fidl_next::wire::Table::encode_len(table, max_ord);
295
296            Ok(())
297        }
298    }
299
300    impl<'de>
301        ::fidl_next::FromWire<crate::wire::AllocatorValidateBufferCollectionTokenResponse<'de>>
302        for AllocatorValidateBufferCollectionTokenResponse
303    {
304        #[inline]
305        fn from_wire(
306            wire_: crate::wire::AllocatorValidateBufferCollectionTokenResponse<'de>,
307        ) -> Self {
308            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
309
310            let is_known = wire_.table.get(1);
311
312            Self {
313                is_known: is_known.map(|envelope| {
314                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
315                }),
316            }
317        }
318    }
319
320    impl<'de>
321        ::fidl_next::FromWireRef<crate::wire::AllocatorValidateBufferCollectionTokenResponse<'de>>
322        for AllocatorValidateBufferCollectionTokenResponse
323    {
324        #[inline]
325        fn from_wire_ref(
326            wire: &crate::wire::AllocatorValidateBufferCollectionTokenResponse<'de>,
327        ) -> Self {
328            Self {
329                is_known: wire.table.get(1).map(|envelope| {
330                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
331                        envelope.deref_unchecked::<bool>()
332                    })
333                }),
334            }
335        }
336    }
337
338    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
339    pub struct AllocatorSetDebugClientInfoRequest {
340        pub name: ::core::option::Option<::std::string::String>,
341
342        pub id: ::core::option::Option<u64>,
343    }
344
345    impl AllocatorSetDebugClientInfoRequest {
346        fn __max_ordinal(&self) -> usize {
347            if self.id.is_some() {
348                return 2;
349            }
350
351            if self.name.is_some() {
352                return 1;
353            }
354
355            0
356        }
357    }
358
359    unsafe impl<___E>
360        ::fidl_next::Encode<crate::wire::AllocatorSetDebugClientInfoRequest<'static>, ___E>
361        for AllocatorSetDebugClientInfoRequest
362    where
363        ___E: ::fidl_next::Encoder + ?Sized,
364    {
365        #[inline]
366        fn encode(
367            mut self,
368            encoder: &mut ___E,
369            out: &mut ::core::mem::MaybeUninit<
370                crate::wire::AllocatorSetDebugClientInfoRequest<'static>,
371            >,
372            _: (),
373        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
374            ::fidl_next::munge!(let crate::wire::AllocatorSetDebugClientInfoRequest { table } = out);
375
376            let max_ord = self.__max_ordinal();
377
378            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
379            ::fidl_next::Wire::zero_padding(&mut out);
380
381            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
382                ::fidl_next::wire::Envelope,
383            >(encoder, max_ord);
384
385            for i in 1..=max_ord {
386                match i {
387                    2 => {
388                        if let Some(value) = self.id.take() {
389                            ::fidl_next::wire::Envelope::encode_value::<
390                                ::fidl_next::wire::Uint64,
391                                ___E,
392                            >(
393                                value, preallocated.encoder, &mut out, ()
394                            )?;
395                        } else {
396                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
397                        }
398                    }
399
400                    1 => {
401                        if let Some(value) = self.name.take() {
402                            ::fidl_next::wire::Envelope::encode_value::<
403                                ::fidl_next::wire::String<'static>,
404                                ___E,
405                            >(
406                                value, preallocated.encoder, &mut out, 256
407                            )?;
408                        } else {
409                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
410                        }
411                    }
412
413                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
414                }
415                unsafe {
416                    preallocated.write_next(out.assume_init_ref());
417                }
418            }
419
420            ::fidl_next::wire::Table::encode_len(table, max_ord);
421
422            Ok(())
423        }
424    }
425
426    unsafe impl<'a, ___E>
427        ::fidl_next::Encode<crate::wire::AllocatorSetDebugClientInfoRequest<'static>, ___E>
428        for &'a AllocatorSetDebugClientInfoRequest
429    where
430        ___E: ::fidl_next::Encoder + ?Sized,
431    {
432        #[inline]
433        fn encode(
434            self,
435            encoder: &mut ___E,
436            out: &mut ::core::mem::MaybeUninit<
437                crate::wire::AllocatorSetDebugClientInfoRequest<'static>,
438            >,
439            _: (),
440        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
441            ::fidl_next::munge!(let crate::wire::AllocatorSetDebugClientInfoRequest { table } = out);
442
443            let max_ord = self.__max_ordinal();
444
445            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
446            ::fidl_next::Wire::zero_padding(&mut out);
447
448            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
449                ::fidl_next::wire::Envelope,
450            >(encoder, max_ord);
451
452            for i in 1..=max_ord {
453                match i {
454                    2 => {
455                        if let Some(value) = &self.id {
456                            ::fidl_next::wire::Envelope::encode_value::<
457                                ::fidl_next::wire::Uint64,
458                                ___E,
459                            >(
460                                value, preallocated.encoder, &mut out, ()
461                            )?;
462                        } else {
463                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
464                        }
465                    }
466
467                    1 => {
468                        if let Some(value) = &self.name {
469                            ::fidl_next::wire::Envelope::encode_value::<
470                                ::fidl_next::wire::String<'static>,
471                                ___E,
472                            >(
473                                value, preallocated.encoder, &mut out, 256
474                            )?;
475                        } else {
476                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
477                        }
478                    }
479
480                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
481                }
482                unsafe {
483                    preallocated.write_next(out.assume_init_ref());
484                }
485            }
486
487            ::fidl_next::wire::Table::encode_len(table, max_ord);
488
489            Ok(())
490        }
491    }
492
493    impl<'de> ::fidl_next::FromWire<crate::wire::AllocatorSetDebugClientInfoRequest<'de>>
494        for AllocatorSetDebugClientInfoRequest
495    {
496        #[inline]
497        fn from_wire(wire_: crate::wire::AllocatorSetDebugClientInfoRequest<'de>) -> Self {
498            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
499
500            let name = wire_.table.get(1);
501
502            let id = wire_.table.get(2);
503
504            Self {
505                name: name.map(|envelope| {
506                    ::fidl_next::FromWire::from_wire(unsafe {
507                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
508                    })
509                }),
510
511                id: id.map(|envelope| {
512                    ::fidl_next::FromWire::from_wire(unsafe {
513                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
514                    })
515                }),
516            }
517        }
518    }
519
520    impl<'de> ::fidl_next::FromWireRef<crate::wire::AllocatorSetDebugClientInfoRequest<'de>>
521        for AllocatorSetDebugClientInfoRequest
522    {
523        #[inline]
524        fn from_wire_ref(wire: &crate::wire::AllocatorSetDebugClientInfoRequest<'de>) -> Self {
525            Self {
526                name: wire.table.get(1).map(|envelope| {
527                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
528                        envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
529                    })
530                }),
531
532                id: wire.table.get(2).map(|envelope| {
533                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
534                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
535                    })
536                }),
537            }
538        }
539    }
540
541    #[doc = " Describes how a client will access the contents of a buffer.\n"]
542    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
543    pub struct BufferUsage {
544        pub none: ::core::option::Option<u32>,
545
546        pub cpu: ::core::option::Option<u32>,
547
548        pub vulkan: ::core::option::Option<u32>,
549
550        pub display: ::core::option::Option<u32>,
551
552        pub video: ::core::option::Option<u32>,
553    }
554
555    impl BufferUsage {
556        fn __max_ordinal(&self) -> usize {
557            if self.video.is_some() {
558                return 5;
559            }
560
561            if self.display.is_some() {
562                return 4;
563            }
564
565            if self.vulkan.is_some() {
566                return 3;
567            }
568
569            if self.cpu.is_some() {
570                return 2;
571            }
572
573            if self.none.is_some() {
574                return 1;
575            }
576
577            0
578        }
579    }
580
581    unsafe impl<___E> ::fidl_next::Encode<crate::wire::BufferUsage<'static>, ___E> for BufferUsage
582    where
583        ___E: ::fidl_next::Encoder + ?Sized,
584    {
585        #[inline]
586        fn encode(
587            mut self,
588            encoder: &mut ___E,
589            out: &mut ::core::mem::MaybeUninit<crate::wire::BufferUsage<'static>>,
590            _: (),
591        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
592            ::fidl_next::munge!(let crate::wire::BufferUsage { table } = out);
593
594            let max_ord = self.__max_ordinal();
595
596            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
597            ::fidl_next::Wire::zero_padding(&mut out);
598
599            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
600                ::fidl_next::wire::Envelope,
601            >(encoder, max_ord);
602
603            for i in 1..=max_ord {
604                match i {
605                    5 => {
606                        if let Some(value) = self.video.take() {
607                            ::fidl_next::wire::Envelope::encode_value::<
608                                ::fidl_next::wire::Uint32,
609                                ___E,
610                            >(
611                                value, preallocated.encoder, &mut out, ()
612                            )?;
613                        } else {
614                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
615                        }
616                    }
617
618                    4 => {
619                        if let Some(value) = self.display.take() {
620                            ::fidl_next::wire::Envelope::encode_value::<
621                                ::fidl_next::wire::Uint32,
622                                ___E,
623                            >(
624                                value, preallocated.encoder, &mut out, ()
625                            )?;
626                        } else {
627                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
628                        }
629                    }
630
631                    3 => {
632                        if let Some(value) = self.vulkan.take() {
633                            ::fidl_next::wire::Envelope::encode_value::<
634                                ::fidl_next::wire::Uint32,
635                                ___E,
636                            >(
637                                value, preallocated.encoder, &mut out, ()
638                            )?;
639                        } else {
640                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
641                        }
642                    }
643
644                    2 => {
645                        if let Some(value) = self.cpu.take() {
646                            ::fidl_next::wire::Envelope::encode_value::<
647                                ::fidl_next::wire::Uint32,
648                                ___E,
649                            >(
650                                value, preallocated.encoder, &mut out, ()
651                            )?;
652                        } else {
653                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
654                        }
655                    }
656
657                    1 => {
658                        if let Some(value) = self.none.take() {
659                            ::fidl_next::wire::Envelope::encode_value::<
660                                ::fidl_next::wire::Uint32,
661                                ___E,
662                            >(
663                                value, preallocated.encoder, &mut out, ()
664                            )?;
665                        } else {
666                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
667                        }
668                    }
669
670                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
671                }
672                unsafe {
673                    preallocated.write_next(out.assume_init_ref());
674                }
675            }
676
677            ::fidl_next::wire::Table::encode_len(table, max_ord);
678
679            Ok(())
680        }
681    }
682
683    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::BufferUsage<'static>, ___E>
684        for &'a BufferUsage
685    where
686        ___E: ::fidl_next::Encoder + ?Sized,
687    {
688        #[inline]
689        fn encode(
690            self,
691            encoder: &mut ___E,
692            out: &mut ::core::mem::MaybeUninit<crate::wire::BufferUsage<'static>>,
693            _: (),
694        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
695            ::fidl_next::munge!(let crate::wire::BufferUsage { table } = out);
696
697            let max_ord = self.__max_ordinal();
698
699            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
700            ::fidl_next::Wire::zero_padding(&mut out);
701
702            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
703                ::fidl_next::wire::Envelope,
704            >(encoder, max_ord);
705
706            for i in 1..=max_ord {
707                match i {
708                    5 => {
709                        if let Some(value) = &self.video {
710                            ::fidl_next::wire::Envelope::encode_value::<
711                                ::fidl_next::wire::Uint32,
712                                ___E,
713                            >(
714                                value, preallocated.encoder, &mut out, ()
715                            )?;
716                        } else {
717                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
718                        }
719                    }
720
721                    4 => {
722                        if let Some(value) = &self.display {
723                            ::fidl_next::wire::Envelope::encode_value::<
724                                ::fidl_next::wire::Uint32,
725                                ___E,
726                            >(
727                                value, preallocated.encoder, &mut out, ()
728                            )?;
729                        } else {
730                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
731                        }
732                    }
733
734                    3 => {
735                        if let Some(value) = &self.vulkan {
736                            ::fidl_next::wire::Envelope::encode_value::<
737                                ::fidl_next::wire::Uint32,
738                                ___E,
739                            >(
740                                value, preallocated.encoder, &mut out, ()
741                            )?;
742                        } else {
743                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
744                        }
745                    }
746
747                    2 => {
748                        if let Some(value) = &self.cpu {
749                            ::fidl_next::wire::Envelope::encode_value::<
750                                ::fidl_next::wire::Uint32,
751                                ___E,
752                            >(
753                                value, preallocated.encoder, &mut out, ()
754                            )?;
755                        } else {
756                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
757                        }
758                    }
759
760                    1 => {
761                        if let Some(value) = &self.none {
762                            ::fidl_next::wire::Envelope::encode_value::<
763                                ::fidl_next::wire::Uint32,
764                                ___E,
765                            >(
766                                value, preallocated.encoder, &mut out, ()
767                            )?;
768                        } else {
769                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
770                        }
771                    }
772
773                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
774                }
775                unsafe {
776                    preallocated.write_next(out.assume_init_ref());
777                }
778            }
779
780            ::fidl_next::wire::Table::encode_len(table, max_ord);
781
782            Ok(())
783        }
784    }
785
786    impl<'de> ::fidl_next::FromWire<crate::wire::BufferUsage<'de>> for BufferUsage {
787        #[inline]
788        fn from_wire(wire_: crate::wire::BufferUsage<'de>) -> Self {
789            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
790
791            let none = wire_.table.get(1);
792
793            let cpu = wire_.table.get(2);
794
795            let vulkan = wire_.table.get(3);
796
797            let display = wire_.table.get(4);
798
799            let video = wire_.table.get(5);
800
801            Self {
802                none: none.map(|envelope| {
803                    ::fidl_next::FromWire::from_wire(unsafe {
804                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
805                    })
806                }),
807
808                cpu: cpu.map(|envelope| {
809                    ::fidl_next::FromWire::from_wire(unsafe {
810                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
811                    })
812                }),
813
814                vulkan: vulkan.map(|envelope| {
815                    ::fidl_next::FromWire::from_wire(unsafe {
816                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
817                    })
818                }),
819
820                display: display.map(|envelope| {
821                    ::fidl_next::FromWire::from_wire(unsafe {
822                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
823                    })
824                }),
825
826                video: video.map(|envelope| {
827                    ::fidl_next::FromWire::from_wire(unsafe {
828                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
829                    })
830                }),
831            }
832        }
833    }
834
835    impl<'de> ::fidl_next::FromWireRef<crate::wire::BufferUsage<'de>> for BufferUsage {
836        #[inline]
837        fn from_wire_ref(wire: &crate::wire::BufferUsage<'de>) -> Self {
838            Self {
839                none: wire.table.get(1).map(|envelope| {
840                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
841                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
842                    })
843                }),
844
845                cpu: wire.table.get(2).map(|envelope| {
846                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
847                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
848                    })
849                }),
850
851                vulkan: wire.table.get(3).map(|envelope| {
852                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
853                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
854                    })
855                }),
856
857                display: wire.table.get(4).map(|envelope| {
858                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
859                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
860                    })
861                }),
862
863                video: wire.table.get(5).map(|envelope| {
864                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
865                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
866                    })
867                }),
868            }
869        }
870    }
871
872    #[doc = " A reference to a heap instance.\n\n A given heap instance can have more than one `Heap` which can be used to\n refer to the heap instance. Comparing `Heap` tables without knowledge of\n these `Heap` aliases is not a reliable way to determine if two `Heap` tables\n refer to the same heap (matching means yes, but not matching means maybe).\n Allowing heap aliases makes renaming `Heap.type`(s) easier.\n"]
873    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
874    pub struct Heap {
875        pub heap_type: ::core::option::Option<::std::string::String>,
876
877        pub id: ::core::option::Option<u64>,
878    }
879
880    impl Heap {
881        fn __max_ordinal(&self) -> usize {
882            if self.id.is_some() {
883                return 2;
884            }
885
886            if self.heap_type.is_some() {
887                return 1;
888            }
889
890            0
891        }
892    }
893
894    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Heap<'static>, ___E> for Heap
895    where
896        ___E: ::fidl_next::Encoder + ?Sized,
897    {
898        #[inline]
899        fn encode(
900            mut self,
901            encoder: &mut ___E,
902            out: &mut ::core::mem::MaybeUninit<crate::wire::Heap<'static>>,
903            _: (),
904        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
905            ::fidl_next::munge!(let crate::wire::Heap { table } = out);
906
907            let max_ord = self.__max_ordinal();
908
909            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
910            ::fidl_next::Wire::zero_padding(&mut out);
911
912            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
913                ::fidl_next::wire::Envelope,
914            >(encoder, max_ord);
915
916            for i in 1..=max_ord {
917                match i {
918                    2 => {
919                        if let Some(value) = self.id.take() {
920                            ::fidl_next::wire::Envelope::encode_value::<
921                                ::fidl_next::wire::Uint64,
922                                ___E,
923                            >(
924                                value, preallocated.encoder, &mut out, ()
925                            )?;
926                        } else {
927                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
928                        }
929                    }
930
931                    1 => {
932                        if let Some(value) = self.heap_type.take() {
933                            ::fidl_next::wire::Envelope::encode_value::<
934                                ::fidl_next::wire::String<'static>,
935                                ___E,
936                            >(
937                                value, preallocated.encoder, &mut out, 128
938                            )?;
939                        } else {
940                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
941                        }
942                    }
943
944                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
945                }
946                unsafe {
947                    preallocated.write_next(out.assume_init_ref());
948                }
949            }
950
951            ::fidl_next::wire::Table::encode_len(table, max_ord);
952
953            Ok(())
954        }
955    }
956
957    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Heap<'static>, ___E> for &'a Heap
958    where
959        ___E: ::fidl_next::Encoder + ?Sized,
960    {
961        #[inline]
962        fn encode(
963            self,
964            encoder: &mut ___E,
965            out: &mut ::core::mem::MaybeUninit<crate::wire::Heap<'static>>,
966            _: (),
967        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
968            ::fidl_next::munge!(let crate::wire::Heap { table } = out);
969
970            let max_ord = self.__max_ordinal();
971
972            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
973            ::fidl_next::Wire::zero_padding(&mut out);
974
975            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
976                ::fidl_next::wire::Envelope,
977            >(encoder, max_ord);
978
979            for i in 1..=max_ord {
980                match i {
981                    2 => {
982                        if let Some(value) = &self.id {
983                            ::fidl_next::wire::Envelope::encode_value::<
984                                ::fidl_next::wire::Uint64,
985                                ___E,
986                            >(
987                                value, preallocated.encoder, &mut out, ()
988                            )?;
989                        } else {
990                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
991                        }
992                    }
993
994                    1 => {
995                        if let Some(value) = &self.heap_type {
996                            ::fidl_next::wire::Envelope::encode_value::<
997                                ::fidl_next::wire::String<'static>,
998                                ___E,
999                            >(
1000                                value, preallocated.encoder, &mut out, 128
1001                            )?;
1002                        } else {
1003                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1004                        }
1005                    }
1006
1007                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1008                }
1009                unsafe {
1010                    preallocated.write_next(out.assume_init_ref());
1011                }
1012            }
1013
1014            ::fidl_next::wire::Table::encode_len(table, max_ord);
1015
1016            Ok(())
1017        }
1018    }
1019
1020    impl<'de> ::fidl_next::FromWire<crate::wire::Heap<'de>> for Heap {
1021        #[inline]
1022        fn from_wire(wire_: crate::wire::Heap<'de>) -> Self {
1023            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1024
1025            let heap_type = wire_.table.get(1);
1026
1027            let id = wire_.table.get(2);
1028
1029            Self {
1030                heap_type: heap_type.map(|envelope| {
1031                    ::fidl_next::FromWire::from_wire(unsafe {
1032                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
1033                    })
1034                }),
1035
1036                id: id.map(|envelope| {
1037                    ::fidl_next::FromWire::from_wire(unsafe {
1038                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
1039                    })
1040                }),
1041            }
1042        }
1043    }
1044
1045    impl<'de> ::fidl_next::FromWireRef<crate::wire::Heap<'de>> for Heap {
1046        #[inline]
1047        fn from_wire_ref(wire: &crate::wire::Heap<'de>) -> Self {
1048            Self {
1049                heap_type: wire.table.get(1).map(|envelope| {
1050                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1051                        envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
1052                    })
1053                }),
1054
1055                id: wire.table.get(2).map(|envelope| {
1056                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1057                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
1058                    })
1059                }),
1060            }
1061        }
1062    }
1063
1064    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1065    pub struct BufferMemoryConstraints {
1066        pub min_size_bytes: ::core::option::Option<u64>,
1067
1068        pub max_size_bytes: ::core::option::Option<u64>,
1069
1070        pub physically_contiguous_required: ::core::option::Option<bool>,
1071
1072        pub secure_required: ::core::option::Option<bool>,
1073
1074        pub cpu_domain_supported: ::core::option::Option<bool>,
1075
1076        pub ram_domain_supported: ::core::option::Option<bool>,
1077
1078        pub inaccessible_domain_supported: ::core::option::Option<bool>,
1079
1080        pub permitted_heaps: ::core::option::Option<::std::vec::Vec<crate::natural::Heap>>,
1081
1082        pub min_physical_base_alignment: ::core::option::Option<u64>,
1083    }
1084
1085    impl BufferMemoryConstraints {
1086        fn __max_ordinal(&self) -> usize {
1087            if self.min_physical_base_alignment.is_some() {
1088                return 9;
1089            }
1090
1091            if self.permitted_heaps.is_some() {
1092                return 8;
1093            }
1094
1095            if self.inaccessible_domain_supported.is_some() {
1096                return 7;
1097            }
1098
1099            if self.ram_domain_supported.is_some() {
1100                return 6;
1101            }
1102
1103            if self.cpu_domain_supported.is_some() {
1104                return 5;
1105            }
1106
1107            if self.secure_required.is_some() {
1108                return 4;
1109            }
1110
1111            if self.physically_contiguous_required.is_some() {
1112                return 3;
1113            }
1114
1115            if self.max_size_bytes.is_some() {
1116                return 2;
1117            }
1118
1119            if self.min_size_bytes.is_some() {
1120                return 1;
1121            }
1122
1123            0
1124        }
1125    }
1126
1127    unsafe impl<___E> ::fidl_next::Encode<crate::wire::BufferMemoryConstraints<'static>, ___E>
1128        for BufferMemoryConstraints
1129    where
1130        ___E: ::fidl_next::Encoder + ?Sized,
1131    {
1132        #[inline]
1133        fn encode(
1134            mut self,
1135            encoder: &mut ___E,
1136            out: &mut ::core::mem::MaybeUninit<crate::wire::BufferMemoryConstraints<'static>>,
1137            _: (),
1138        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1139            ::fidl_next::munge!(let crate::wire::BufferMemoryConstraints { table } = out);
1140
1141            let max_ord = self.__max_ordinal();
1142
1143            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1144            ::fidl_next::Wire::zero_padding(&mut out);
1145
1146            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1147                ::fidl_next::wire::Envelope,
1148            >(encoder, max_ord);
1149
1150            for i in 1..=max_ord {
1151                match i {
1152                    9 => {
1153                        if let Some(value) = self.min_physical_base_alignment.take() {
1154                            ::fidl_next::wire::Envelope::encode_value::<
1155                                ::fidl_next::wire::Uint64,
1156                                ___E,
1157                            >(
1158                                value, preallocated.encoder, &mut out, ()
1159                            )?;
1160                        } else {
1161                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1162                        }
1163                    }
1164
1165                    8 => {
1166                        if let Some(value) = self.permitted_heaps.take() {
1167                            ::fidl_next::wire::Envelope::encode_value::<
1168                                ::fidl_next::wire::Vector<'static, crate::wire::Heap<'static>>,
1169                                ___E,
1170                            >(
1171                                value, preallocated.encoder, &mut out, (64, ())
1172                            )?;
1173                        } else {
1174                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1175                        }
1176                    }
1177
1178                    7 => {
1179                        if let Some(value) = self.inaccessible_domain_supported.take() {
1180                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1181                                value,
1182                                preallocated.encoder,
1183                                &mut out,
1184                                (),
1185                            )?;
1186                        } else {
1187                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1188                        }
1189                    }
1190
1191                    6 => {
1192                        if let Some(value) = self.ram_domain_supported.take() {
1193                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1194                                value,
1195                                preallocated.encoder,
1196                                &mut out,
1197                                (),
1198                            )?;
1199                        } else {
1200                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1201                        }
1202                    }
1203
1204                    5 => {
1205                        if let Some(value) = self.cpu_domain_supported.take() {
1206                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1207                                value,
1208                                preallocated.encoder,
1209                                &mut out,
1210                                (),
1211                            )?;
1212                        } else {
1213                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1214                        }
1215                    }
1216
1217                    4 => {
1218                        if let Some(value) = self.secure_required.take() {
1219                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1220                                value,
1221                                preallocated.encoder,
1222                                &mut out,
1223                                (),
1224                            )?;
1225                        } else {
1226                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1227                        }
1228                    }
1229
1230                    3 => {
1231                        if let Some(value) = self.physically_contiguous_required.take() {
1232                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1233                                value,
1234                                preallocated.encoder,
1235                                &mut out,
1236                                (),
1237                            )?;
1238                        } else {
1239                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1240                        }
1241                    }
1242
1243                    2 => {
1244                        if let Some(value) = self.max_size_bytes.take() {
1245                            ::fidl_next::wire::Envelope::encode_value::<
1246                                ::fidl_next::wire::Uint64,
1247                                ___E,
1248                            >(
1249                                value, preallocated.encoder, &mut out, ()
1250                            )?;
1251                        } else {
1252                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1253                        }
1254                    }
1255
1256                    1 => {
1257                        if let Some(value) = self.min_size_bytes.take() {
1258                            ::fidl_next::wire::Envelope::encode_value::<
1259                                ::fidl_next::wire::Uint64,
1260                                ___E,
1261                            >(
1262                                value, preallocated.encoder, &mut out, ()
1263                            )?;
1264                        } else {
1265                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1266                        }
1267                    }
1268
1269                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1270                }
1271                unsafe {
1272                    preallocated.write_next(out.assume_init_ref());
1273                }
1274            }
1275
1276            ::fidl_next::wire::Table::encode_len(table, max_ord);
1277
1278            Ok(())
1279        }
1280    }
1281
1282    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::BufferMemoryConstraints<'static>, ___E>
1283        for &'a BufferMemoryConstraints
1284    where
1285        ___E: ::fidl_next::Encoder + ?Sized,
1286    {
1287        #[inline]
1288        fn encode(
1289            self,
1290            encoder: &mut ___E,
1291            out: &mut ::core::mem::MaybeUninit<crate::wire::BufferMemoryConstraints<'static>>,
1292            _: (),
1293        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1294            ::fidl_next::munge!(let crate::wire::BufferMemoryConstraints { table } = out);
1295
1296            let max_ord = self.__max_ordinal();
1297
1298            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1299            ::fidl_next::Wire::zero_padding(&mut out);
1300
1301            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1302                ::fidl_next::wire::Envelope,
1303            >(encoder, max_ord);
1304
1305            for i in 1..=max_ord {
1306                match i {
1307                    9 => {
1308                        if let Some(value) = &self.min_physical_base_alignment {
1309                            ::fidl_next::wire::Envelope::encode_value::<
1310                                ::fidl_next::wire::Uint64,
1311                                ___E,
1312                            >(
1313                                value, preallocated.encoder, &mut out, ()
1314                            )?;
1315                        } else {
1316                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1317                        }
1318                    }
1319
1320                    8 => {
1321                        if let Some(value) = &self.permitted_heaps {
1322                            ::fidl_next::wire::Envelope::encode_value::<
1323                                ::fidl_next::wire::Vector<'static, crate::wire::Heap<'static>>,
1324                                ___E,
1325                            >(
1326                                value, preallocated.encoder, &mut out, (64, ())
1327                            )?;
1328                        } else {
1329                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1330                        }
1331                    }
1332
1333                    7 => {
1334                        if let Some(value) = &self.inaccessible_domain_supported {
1335                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1336                                value,
1337                                preallocated.encoder,
1338                                &mut out,
1339                                (),
1340                            )?;
1341                        } else {
1342                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1343                        }
1344                    }
1345
1346                    6 => {
1347                        if let Some(value) = &self.ram_domain_supported {
1348                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1349                                value,
1350                                preallocated.encoder,
1351                                &mut out,
1352                                (),
1353                            )?;
1354                        } else {
1355                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1356                        }
1357                    }
1358
1359                    5 => {
1360                        if let Some(value) = &self.cpu_domain_supported {
1361                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1362                                value,
1363                                preallocated.encoder,
1364                                &mut out,
1365                                (),
1366                            )?;
1367                        } else {
1368                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1369                        }
1370                    }
1371
1372                    4 => {
1373                        if let Some(value) = &self.secure_required {
1374                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1375                                value,
1376                                preallocated.encoder,
1377                                &mut out,
1378                                (),
1379                            )?;
1380                        } else {
1381                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1382                        }
1383                    }
1384
1385                    3 => {
1386                        if let Some(value) = &self.physically_contiguous_required {
1387                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1388                                value,
1389                                preallocated.encoder,
1390                                &mut out,
1391                                (),
1392                            )?;
1393                        } else {
1394                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1395                        }
1396                    }
1397
1398                    2 => {
1399                        if let Some(value) = &self.max_size_bytes {
1400                            ::fidl_next::wire::Envelope::encode_value::<
1401                                ::fidl_next::wire::Uint64,
1402                                ___E,
1403                            >(
1404                                value, preallocated.encoder, &mut out, ()
1405                            )?;
1406                        } else {
1407                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1408                        }
1409                    }
1410
1411                    1 => {
1412                        if let Some(value) = &self.min_size_bytes {
1413                            ::fidl_next::wire::Envelope::encode_value::<
1414                                ::fidl_next::wire::Uint64,
1415                                ___E,
1416                            >(
1417                                value, preallocated.encoder, &mut out, ()
1418                            )?;
1419                        } else {
1420                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1421                        }
1422                    }
1423
1424                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1425                }
1426                unsafe {
1427                    preallocated.write_next(out.assume_init_ref());
1428                }
1429            }
1430
1431            ::fidl_next::wire::Table::encode_len(table, max_ord);
1432
1433            Ok(())
1434        }
1435    }
1436
1437    impl<'de> ::fidl_next::FromWire<crate::wire::BufferMemoryConstraints<'de>>
1438        for BufferMemoryConstraints
1439    {
1440        #[inline]
1441        fn from_wire(wire_: crate::wire::BufferMemoryConstraints<'de>) -> Self {
1442            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1443
1444            let min_size_bytes = wire_.table.get(1);
1445
1446            let max_size_bytes = wire_.table.get(2);
1447
1448            let physically_contiguous_required = wire_.table.get(3);
1449
1450            let secure_required = wire_.table.get(4);
1451
1452            let cpu_domain_supported = wire_.table.get(5);
1453
1454            let ram_domain_supported = wire_.table.get(6);
1455
1456            let inaccessible_domain_supported = wire_.table.get(7);
1457
1458            let permitted_heaps = wire_.table.get(8);
1459
1460            let min_physical_base_alignment = wire_.table.get(9);
1461
1462            Self {
1463
1464
1465                min_size_bytes: min_size_bytes.map(|envelope| ::fidl_next::FromWire::from_wire(
1466                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() }
1467                )),
1468
1469
1470                max_size_bytes: max_size_bytes.map(|envelope| ::fidl_next::FromWire::from_wire(
1471                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() }
1472                )),
1473
1474
1475                physically_contiguous_required: physically_contiguous_required.map(|envelope| ::fidl_next::FromWire::from_wire(
1476                    unsafe { envelope.read_unchecked::<bool>() }
1477                )),
1478
1479
1480                secure_required: secure_required.map(|envelope| ::fidl_next::FromWire::from_wire(
1481                    unsafe { envelope.read_unchecked::<bool>() }
1482                )),
1483
1484
1485                cpu_domain_supported: cpu_domain_supported.map(|envelope| ::fidl_next::FromWire::from_wire(
1486                    unsafe { envelope.read_unchecked::<bool>() }
1487                )),
1488
1489
1490                ram_domain_supported: ram_domain_supported.map(|envelope| ::fidl_next::FromWire::from_wire(
1491                    unsafe { envelope.read_unchecked::<bool>() }
1492                )),
1493
1494
1495                inaccessible_domain_supported: inaccessible_domain_supported.map(|envelope| ::fidl_next::FromWire::from_wire(
1496                    unsafe { envelope.read_unchecked::<bool>() }
1497                )),
1498
1499
1500                permitted_heaps: permitted_heaps.map(|envelope| ::fidl_next::FromWire::from_wire(
1501                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Heap<'de>>>() }
1502                )),
1503
1504
1505                min_physical_base_alignment: min_physical_base_alignment.map(|envelope| ::fidl_next::FromWire::from_wire(
1506                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() }
1507                )),
1508
1509        }
1510        }
1511    }
1512
1513    impl<'de> ::fidl_next::FromWireRef<crate::wire::BufferMemoryConstraints<'de>>
1514        for BufferMemoryConstraints
1515    {
1516        #[inline]
1517        fn from_wire_ref(wire: &crate::wire::BufferMemoryConstraints<'de>) -> Self {
1518            Self {
1519
1520
1521                min_size_bytes: wire.table.get(1)
1522                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
1523                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint64>() }
1524                    )),
1525
1526
1527                max_size_bytes: wire.table.get(2)
1528                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
1529                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint64>() }
1530                    )),
1531
1532
1533                physically_contiguous_required: wire.table.get(3)
1534                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
1535                        unsafe { envelope.deref_unchecked::<bool>() }
1536                    )),
1537
1538
1539                secure_required: wire.table.get(4)
1540                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
1541                        unsafe { envelope.deref_unchecked::<bool>() }
1542                    )),
1543
1544
1545                cpu_domain_supported: wire.table.get(5)
1546                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
1547                        unsafe { envelope.deref_unchecked::<bool>() }
1548                    )),
1549
1550
1551                ram_domain_supported: wire.table.get(6)
1552                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
1553                        unsafe { envelope.deref_unchecked::<bool>() }
1554                    )),
1555
1556
1557                inaccessible_domain_supported: wire.table.get(7)
1558                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
1559                        unsafe { envelope.deref_unchecked::<bool>() }
1560                    )),
1561
1562
1563                permitted_heaps: wire.table.get(8)
1564                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
1565                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Heap<'de>>>() }
1566                    )),
1567
1568
1569                min_physical_base_alignment: wire.table.get(9)
1570                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
1571                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint64>() }
1572                    )),
1573
1574        }
1575        }
1576    }
1577
1578    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1579    pub struct PixelFormatAndModifier {
1580        pub pixel_format: ::fidl_next_common_fuchsia_images2::natural::PixelFormat,
1581
1582        pub pixel_format_modifier: ::fidl_next_common_fuchsia_images2::natural::PixelFormatModifier,
1583    }
1584
1585    unsafe impl<___E> ::fidl_next::Encode<crate::wire::PixelFormatAndModifier, ___E>
1586        for PixelFormatAndModifier
1587    where
1588        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1589    {
1590        #[inline]
1591        fn encode(
1592            self,
1593            encoder_: &mut ___E,
1594            out_: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormatAndModifier>,
1595            _: (),
1596        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1597            ::fidl_next::munge! {
1598                let crate::wire::PixelFormatAndModifier {
1599                    pixel_format,
1600                    pixel_format_modifier,
1601
1602                } = out_;
1603            }
1604
1605            ::fidl_next::Encode::encode(self.pixel_format, encoder_, pixel_format, ())?;
1606
1607            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pixel_format.as_mut_ptr()) };
1608
1609            ::fidl_next::Encode::encode(
1610                self.pixel_format_modifier,
1611                encoder_,
1612                pixel_format_modifier,
1613                (),
1614            )?;
1615
1616            let mut _field =
1617                unsafe { ::fidl_next::Slot::new_unchecked(pixel_format_modifier.as_mut_ptr()) };
1618
1619            Ok(())
1620        }
1621    }
1622
1623    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PixelFormatAndModifier, ___E>
1624        for &'a PixelFormatAndModifier
1625    where
1626        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1627    {
1628        #[inline]
1629        fn encode(
1630            self,
1631            encoder_: &mut ___E,
1632            out_: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormatAndModifier>,
1633            _: (),
1634        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1635            ::fidl_next::munge! {
1636                let crate::wire::PixelFormatAndModifier {
1637                    pixel_format,
1638                    pixel_format_modifier,
1639
1640                } = out_;
1641            }
1642
1643            ::fidl_next::Encode::encode(&self.pixel_format, encoder_, pixel_format, ())?;
1644
1645            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pixel_format.as_mut_ptr()) };
1646
1647            ::fidl_next::Encode::encode(
1648                &self.pixel_format_modifier,
1649                encoder_,
1650                pixel_format_modifier,
1651                (),
1652            )?;
1653
1654            let mut _field =
1655                unsafe { ::fidl_next::Slot::new_unchecked(pixel_format_modifier.as_mut_ptr()) };
1656
1657            Ok(())
1658        }
1659    }
1660
1661    unsafe impl<___E>
1662        ::fidl_next::EncodeOption<
1663            ::fidl_next::wire::Box<'static, crate::wire::PixelFormatAndModifier>,
1664            ___E,
1665        > for PixelFormatAndModifier
1666    where
1667        ___E: ::fidl_next::Encoder + ?Sized,
1668        PixelFormatAndModifier: ::fidl_next::Encode<crate::wire::PixelFormatAndModifier, ___E>,
1669    {
1670        #[inline]
1671        fn encode_option(
1672            this: ::core::option::Option<Self>,
1673            encoder: &mut ___E,
1674            out: &mut ::core::mem::MaybeUninit<
1675                ::fidl_next::wire::Box<'static, crate::wire::PixelFormatAndModifier>,
1676            >,
1677            _: (),
1678        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1679            if let Some(inner) = this {
1680                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1681                ::fidl_next::wire::Box::encode_present(out);
1682            } else {
1683                ::fidl_next::wire::Box::encode_absent(out);
1684            }
1685
1686            Ok(())
1687        }
1688    }
1689
1690    unsafe impl<'a, ___E>
1691        ::fidl_next::EncodeOption<
1692            ::fidl_next::wire::Box<'static, crate::wire::PixelFormatAndModifier>,
1693            ___E,
1694        > for &'a PixelFormatAndModifier
1695    where
1696        ___E: ::fidl_next::Encoder + ?Sized,
1697        &'a PixelFormatAndModifier: ::fidl_next::Encode<crate::wire::PixelFormatAndModifier, ___E>,
1698    {
1699        #[inline]
1700        fn encode_option(
1701            this: ::core::option::Option<Self>,
1702            encoder: &mut ___E,
1703            out: &mut ::core::mem::MaybeUninit<
1704                ::fidl_next::wire::Box<'static, crate::wire::PixelFormatAndModifier>,
1705            >,
1706            _: (),
1707        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1708            if let Some(inner) = this {
1709                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1710                ::fidl_next::wire::Box::encode_present(out);
1711            } else {
1712                ::fidl_next::wire::Box::encode_absent(out);
1713            }
1714
1715            Ok(())
1716        }
1717    }
1718
1719    impl ::fidl_next::FromWire<crate::wire::PixelFormatAndModifier> for PixelFormatAndModifier {
1720        #[inline]
1721        fn from_wire(wire: crate::wire::PixelFormatAndModifier) -> Self {
1722            Self {
1723                pixel_format: ::fidl_next::FromWire::from_wire(wire.pixel_format),
1724
1725                pixel_format_modifier: ::fidl_next::FromWire::from_wire(wire.pixel_format_modifier),
1726            }
1727        }
1728    }
1729
1730    impl ::fidl_next::FromWireRef<crate::wire::PixelFormatAndModifier> for PixelFormatAndModifier {
1731        #[inline]
1732        fn from_wire_ref(wire: &crate::wire::PixelFormatAndModifier) -> Self {
1733            Self {
1734                pixel_format: ::fidl_next::FromWireRef::from_wire_ref(&wire.pixel_format),
1735
1736                pixel_format_modifier: ::fidl_next::FromWireRef::from_wire_ref(
1737                    &wire.pixel_format_modifier,
1738                ),
1739            }
1740        }
1741    }
1742
1743    #[doc = " Describes constraints on layout of image data in buffers.\n"]
1744    #[derive(Debug, Default, Clone, PartialEq)]
1745    pub struct ImageFormatConstraints {
1746        pub pixel_format:
1747            ::core::option::Option<::fidl_next_common_fuchsia_images2::natural::PixelFormat>,
1748
1749        pub pixel_format_modifier: ::core::option::Option<
1750            ::fidl_next_common_fuchsia_images2::natural::PixelFormatModifier,
1751        >,
1752
1753        pub color_spaces: ::core::option::Option<
1754            ::std::vec::Vec<::fidl_next_common_fuchsia_images2::natural::ColorSpace>,
1755        >,
1756
1757        pub min_size: ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
1758
1759        pub max_size: ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
1760
1761        pub min_bytes_per_row: ::core::option::Option<u32>,
1762
1763        pub max_bytes_per_row: ::core::option::Option<u32>,
1764
1765        pub max_width_times_height: ::core::option::Option<u64>,
1766
1767        pub size_alignment: ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
1768
1769        pub display_rect_alignment:
1770            ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
1771
1772        pub required_min_size:
1773            ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
1774
1775        pub required_max_size:
1776            ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
1777
1778        pub bytes_per_row_divisor: ::core::option::Option<u32>,
1779
1780        pub start_offset_divisor: ::core::option::Option<u32>,
1781
1782        pub pixel_format_and_modifiers:
1783            ::core::option::Option<::std::vec::Vec<crate::natural::PixelFormatAndModifier>>,
1784
1785        pub require_bytes_per_row_at_pixel_boundary: ::core::option::Option<bool>,
1786
1787        pub is_alpha_present: ::core::option::Option<bool>,
1788
1789        pub required_max_size_list: ::core::option::Option<
1790            ::std::vec::Vec<::fidl_next_common_fuchsia_math::natural::SizeU>,
1791        >,
1792
1793        pub pad_for_block_size:
1794            ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
1795
1796        pub pad_beyond_image_size_bytes: ::core::option::Option<u64>,
1797    }
1798
1799    impl ImageFormatConstraints {
1800        fn __max_ordinal(&self) -> usize {
1801            if self.pad_beyond_image_size_bytes.is_some() {
1802                return 20;
1803            }
1804
1805            if self.pad_for_block_size.is_some() {
1806                return 19;
1807            }
1808
1809            if self.required_max_size_list.is_some() {
1810                return 18;
1811            }
1812
1813            if self.is_alpha_present.is_some() {
1814                return 17;
1815            }
1816
1817            if self.require_bytes_per_row_at_pixel_boundary.is_some() {
1818                return 16;
1819            }
1820
1821            if self.pixel_format_and_modifiers.is_some() {
1822                return 15;
1823            }
1824
1825            if self.start_offset_divisor.is_some() {
1826                return 14;
1827            }
1828
1829            if self.bytes_per_row_divisor.is_some() {
1830                return 13;
1831            }
1832
1833            if self.required_max_size.is_some() {
1834                return 12;
1835            }
1836
1837            if self.required_min_size.is_some() {
1838                return 11;
1839            }
1840
1841            if self.display_rect_alignment.is_some() {
1842                return 10;
1843            }
1844
1845            if self.size_alignment.is_some() {
1846                return 9;
1847            }
1848
1849            if self.max_width_times_height.is_some() {
1850                return 8;
1851            }
1852
1853            if self.max_bytes_per_row.is_some() {
1854                return 7;
1855            }
1856
1857            if self.min_bytes_per_row.is_some() {
1858                return 6;
1859            }
1860
1861            if self.max_size.is_some() {
1862                return 5;
1863            }
1864
1865            if self.min_size.is_some() {
1866                return 4;
1867            }
1868
1869            if self.color_spaces.is_some() {
1870                return 3;
1871            }
1872
1873            if self.pixel_format_modifier.is_some() {
1874                return 2;
1875            }
1876
1877            if self.pixel_format.is_some() {
1878                return 1;
1879            }
1880
1881            0
1882        }
1883    }
1884
1885    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ImageFormatConstraints<'static>, ___E>
1886        for ImageFormatConstraints
1887    where
1888        ___E: ::fidl_next::Encoder + ?Sized,
1889    {
1890        #[inline]
1891        fn encode(
1892            mut self,
1893            encoder: &mut ___E,
1894            out: &mut ::core::mem::MaybeUninit<crate::wire::ImageFormatConstraints<'static>>,
1895            _: (),
1896        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1897            ::fidl_next::munge!(let crate::wire::ImageFormatConstraints { table } = out);
1898
1899            let max_ord = self.__max_ordinal();
1900
1901            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1902            ::fidl_next::Wire::zero_padding(&mut out);
1903
1904            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1905                ::fidl_next::wire::Envelope,
1906            >(encoder, max_ord);
1907
1908            for i in 1..=max_ord {
1909                match i {
1910                    20 => {
1911                        if let Some(value) = self.pad_beyond_image_size_bytes.take() {
1912                            ::fidl_next::wire::Envelope::encode_value::<
1913                                ::fidl_next::wire::Uint64,
1914                                ___E,
1915                            >(
1916                                value, preallocated.encoder, &mut out, ()
1917                            )?;
1918                        } else {
1919                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1920                        }
1921                    }
1922
1923                    19 => {
1924                        if let Some(value) = self.pad_for_block_size.take() {
1925                            ::fidl_next::wire::Envelope::encode_value::<
1926                                ::fidl_next_common_fuchsia_math::wire::SizeU,
1927                                ___E,
1928                            >(
1929                                value, preallocated.encoder, &mut out, ()
1930                            )?;
1931                        } else {
1932                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1933                        }
1934                    }
1935
1936                    18 => {
1937                        if let Some(value) = self.required_max_size_list.take() {
1938                            ::fidl_next::wire::Envelope::encode_value::<
1939                                ::fidl_next::wire::Vector<
1940                                    'static,
1941                                    ::fidl_next_common_fuchsia_math::wire::SizeU,
1942                                >,
1943                                ___E,
1944                            >(
1945                                value, preallocated.encoder, &mut out, (64, ())
1946                            )?;
1947                        } else {
1948                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1949                        }
1950                    }
1951
1952                    17 => {
1953                        if let Some(value) = self.is_alpha_present.take() {
1954                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1955                                value,
1956                                preallocated.encoder,
1957                                &mut out,
1958                                (),
1959                            )?;
1960                        } else {
1961                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1962                        }
1963                    }
1964
1965                    16 => {
1966                        if let Some(value) = self.require_bytes_per_row_at_pixel_boundary.take() {
1967                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1968                                value,
1969                                preallocated.encoder,
1970                                &mut out,
1971                                (),
1972                            )?;
1973                        } else {
1974                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1975                        }
1976                    }
1977
1978                    15 => {
1979                        if let Some(value) = self.pixel_format_and_modifiers.take() {
1980                            ::fidl_next::wire::Envelope::encode_value::<
1981                                ::fidl_next::wire::Vector<
1982                                    'static,
1983                                    crate::wire::PixelFormatAndModifier,
1984                                >,
1985                                ___E,
1986                            >(
1987                                value, preallocated.encoder, &mut out, (64, ())
1988                            )?;
1989                        } else {
1990                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1991                        }
1992                    }
1993
1994                    14 => {
1995                        if let Some(value) = self.start_offset_divisor.take() {
1996                            ::fidl_next::wire::Envelope::encode_value::<
1997                                ::fidl_next::wire::Uint32,
1998                                ___E,
1999                            >(
2000                                value, preallocated.encoder, &mut out, ()
2001                            )?;
2002                        } else {
2003                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2004                        }
2005                    }
2006
2007                    13 => {
2008                        if let Some(value) = self.bytes_per_row_divisor.take() {
2009                            ::fidl_next::wire::Envelope::encode_value::<
2010                                ::fidl_next::wire::Uint32,
2011                                ___E,
2012                            >(
2013                                value, preallocated.encoder, &mut out, ()
2014                            )?;
2015                        } else {
2016                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2017                        }
2018                    }
2019
2020                    12 => {
2021                        if let Some(value) = self.required_max_size.take() {
2022                            ::fidl_next::wire::Envelope::encode_value::<
2023                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2024                                ___E,
2025                            >(
2026                                value, preallocated.encoder, &mut out, ()
2027                            )?;
2028                        } else {
2029                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2030                        }
2031                    }
2032
2033                    11 => {
2034                        if let Some(value) = self.required_min_size.take() {
2035                            ::fidl_next::wire::Envelope::encode_value::<
2036                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2037                                ___E,
2038                            >(
2039                                value, preallocated.encoder, &mut out, ()
2040                            )?;
2041                        } else {
2042                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2043                        }
2044                    }
2045
2046                    10 => {
2047                        if let Some(value) = self.display_rect_alignment.take() {
2048                            ::fidl_next::wire::Envelope::encode_value::<
2049                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2050                                ___E,
2051                            >(
2052                                value, preallocated.encoder, &mut out, ()
2053                            )?;
2054                        } else {
2055                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2056                        }
2057                    }
2058
2059                    9 => {
2060                        if let Some(value) = self.size_alignment.take() {
2061                            ::fidl_next::wire::Envelope::encode_value::<
2062                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2063                                ___E,
2064                            >(
2065                                value, preallocated.encoder, &mut out, ()
2066                            )?;
2067                        } else {
2068                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2069                        }
2070                    }
2071
2072                    8 => {
2073                        if let Some(value) = self.max_width_times_height.take() {
2074                            ::fidl_next::wire::Envelope::encode_value::<
2075                                ::fidl_next::wire::Uint64,
2076                                ___E,
2077                            >(
2078                                value, preallocated.encoder, &mut out, ()
2079                            )?;
2080                        } else {
2081                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2082                        }
2083                    }
2084
2085                    7 => {
2086                        if let Some(value) = self.max_bytes_per_row.take() {
2087                            ::fidl_next::wire::Envelope::encode_value::<
2088                                ::fidl_next::wire::Uint32,
2089                                ___E,
2090                            >(
2091                                value, preallocated.encoder, &mut out, ()
2092                            )?;
2093                        } else {
2094                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2095                        }
2096                    }
2097
2098                    6 => {
2099                        if let Some(value) = self.min_bytes_per_row.take() {
2100                            ::fidl_next::wire::Envelope::encode_value::<
2101                                ::fidl_next::wire::Uint32,
2102                                ___E,
2103                            >(
2104                                value, preallocated.encoder, &mut out, ()
2105                            )?;
2106                        } else {
2107                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2108                        }
2109                    }
2110
2111                    5 => {
2112                        if let Some(value) = self.max_size.take() {
2113                            ::fidl_next::wire::Envelope::encode_value::<
2114                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2115                                ___E,
2116                            >(
2117                                value, preallocated.encoder, &mut out, ()
2118                            )?;
2119                        } else {
2120                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2121                        }
2122                    }
2123
2124                    4 => {
2125                        if let Some(value) = self.min_size.take() {
2126                            ::fidl_next::wire::Envelope::encode_value::<
2127                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2128                                ___E,
2129                            >(
2130                                value, preallocated.encoder, &mut out, ()
2131                            )?;
2132                        } else {
2133                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2134                        }
2135                    }
2136
2137                    3 => {
2138                        if let Some(value) = self.color_spaces.take() {
2139                            ::fidl_next::wire::Envelope::encode_value::<
2140                                ::fidl_next::wire::Vector<
2141                                    'static,
2142                                    ::fidl_next_common_fuchsia_images2::wire::ColorSpace,
2143                                >,
2144                                ___E,
2145                            >(
2146                                value, preallocated.encoder, &mut out, (32, ())
2147                            )?;
2148                        } else {
2149                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2150                        }
2151                    }
2152
2153                    2 => {
2154                        if let Some(value) = self.pixel_format_modifier.take() {
2155                            ::fidl_next::wire::Envelope::encode_value::<
2156                                ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
2157                                ___E,
2158                            >(
2159                                value, preallocated.encoder, &mut out, ()
2160                            )?;
2161                        } else {
2162                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2163                        }
2164                    }
2165
2166                    1 => {
2167                        if let Some(value) = self.pixel_format.take() {
2168                            ::fidl_next::wire::Envelope::encode_value::<
2169                                ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
2170                                ___E,
2171                            >(
2172                                value, preallocated.encoder, &mut out, ()
2173                            )?;
2174                        } else {
2175                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2176                        }
2177                    }
2178
2179                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2180                }
2181                unsafe {
2182                    preallocated.write_next(out.assume_init_ref());
2183                }
2184            }
2185
2186            ::fidl_next::wire::Table::encode_len(table, max_ord);
2187
2188            Ok(())
2189        }
2190    }
2191
2192    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ImageFormatConstraints<'static>, ___E>
2193        for &'a ImageFormatConstraints
2194    where
2195        ___E: ::fidl_next::Encoder + ?Sized,
2196    {
2197        #[inline]
2198        fn encode(
2199            self,
2200            encoder: &mut ___E,
2201            out: &mut ::core::mem::MaybeUninit<crate::wire::ImageFormatConstraints<'static>>,
2202            _: (),
2203        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2204            ::fidl_next::munge!(let crate::wire::ImageFormatConstraints { table } = out);
2205
2206            let max_ord = self.__max_ordinal();
2207
2208            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2209            ::fidl_next::Wire::zero_padding(&mut out);
2210
2211            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2212                ::fidl_next::wire::Envelope,
2213            >(encoder, max_ord);
2214
2215            for i in 1..=max_ord {
2216                match i {
2217                    20 => {
2218                        if let Some(value) = &self.pad_beyond_image_size_bytes {
2219                            ::fidl_next::wire::Envelope::encode_value::<
2220                                ::fidl_next::wire::Uint64,
2221                                ___E,
2222                            >(
2223                                value, preallocated.encoder, &mut out, ()
2224                            )?;
2225                        } else {
2226                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2227                        }
2228                    }
2229
2230                    19 => {
2231                        if let Some(value) = &self.pad_for_block_size {
2232                            ::fidl_next::wire::Envelope::encode_value::<
2233                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2234                                ___E,
2235                            >(
2236                                value, preallocated.encoder, &mut out, ()
2237                            )?;
2238                        } else {
2239                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2240                        }
2241                    }
2242
2243                    18 => {
2244                        if let Some(value) = &self.required_max_size_list {
2245                            ::fidl_next::wire::Envelope::encode_value::<
2246                                ::fidl_next::wire::Vector<
2247                                    'static,
2248                                    ::fidl_next_common_fuchsia_math::wire::SizeU,
2249                                >,
2250                                ___E,
2251                            >(
2252                                value, preallocated.encoder, &mut out, (64, ())
2253                            )?;
2254                        } else {
2255                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2256                        }
2257                    }
2258
2259                    17 => {
2260                        if let Some(value) = &self.is_alpha_present {
2261                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2262                                value,
2263                                preallocated.encoder,
2264                                &mut out,
2265                                (),
2266                            )?;
2267                        } else {
2268                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2269                        }
2270                    }
2271
2272                    16 => {
2273                        if let Some(value) = &self.require_bytes_per_row_at_pixel_boundary {
2274                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2275                                value,
2276                                preallocated.encoder,
2277                                &mut out,
2278                                (),
2279                            )?;
2280                        } else {
2281                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2282                        }
2283                    }
2284
2285                    15 => {
2286                        if let Some(value) = &self.pixel_format_and_modifiers {
2287                            ::fidl_next::wire::Envelope::encode_value::<
2288                                ::fidl_next::wire::Vector<
2289                                    'static,
2290                                    crate::wire::PixelFormatAndModifier,
2291                                >,
2292                                ___E,
2293                            >(
2294                                value, preallocated.encoder, &mut out, (64, ())
2295                            )?;
2296                        } else {
2297                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2298                        }
2299                    }
2300
2301                    14 => {
2302                        if let Some(value) = &self.start_offset_divisor {
2303                            ::fidl_next::wire::Envelope::encode_value::<
2304                                ::fidl_next::wire::Uint32,
2305                                ___E,
2306                            >(
2307                                value, preallocated.encoder, &mut out, ()
2308                            )?;
2309                        } else {
2310                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2311                        }
2312                    }
2313
2314                    13 => {
2315                        if let Some(value) = &self.bytes_per_row_divisor {
2316                            ::fidl_next::wire::Envelope::encode_value::<
2317                                ::fidl_next::wire::Uint32,
2318                                ___E,
2319                            >(
2320                                value, preallocated.encoder, &mut out, ()
2321                            )?;
2322                        } else {
2323                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2324                        }
2325                    }
2326
2327                    12 => {
2328                        if let Some(value) = &self.required_max_size {
2329                            ::fidl_next::wire::Envelope::encode_value::<
2330                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2331                                ___E,
2332                            >(
2333                                value, preallocated.encoder, &mut out, ()
2334                            )?;
2335                        } else {
2336                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2337                        }
2338                    }
2339
2340                    11 => {
2341                        if let Some(value) = &self.required_min_size {
2342                            ::fidl_next::wire::Envelope::encode_value::<
2343                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2344                                ___E,
2345                            >(
2346                                value, preallocated.encoder, &mut out, ()
2347                            )?;
2348                        } else {
2349                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2350                        }
2351                    }
2352
2353                    10 => {
2354                        if let Some(value) = &self.display_rect_alignment {
2355                            ::fidl_next::wire::Envelope::encode_value::<
2356                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2357                                ___E,
2358                            >(
2359                                value, preallocated.encoder, &mut out, ()
2360                            )?;
2361                        } else {
2362                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2363                        }
2364                    }
2365
2366                    9 => {
2367                        if let Some(value) = &self.size_alignment {
2368                            ::fidl_next::wire::Envelope::encode_value::<
2369                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2370                                ___E,
2371                            >(
2372                                value, preallocated.encoder, &mut out, ()
2373                            )?;
2374                        } else {
2375                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2376                        }
2377                    }
2378
2379                    8 => {
2380                        if let Some(value) = &self.max_width_times_height {
2381                            ::fidl_next::wire::Envelope::encode_value::<
2382                                ::fidl_next::wire::Uint64,
2383                                ___E,
2384                            >(
2385                                value, preallocated.encoder, &mut out, ()
2386                            )?;
2387                        } else {
2388                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2389                        }
2390                    }
2391
2392                    7 => {
2393                        if let Some(value) = &self.max_bytes_per_row {
2394                            ::fidl_next::wire::Envelope::encode_value::<
2395                                ::fidl_next::wire::Uint32,
2396                                ___E,
2397                            >(
2398                                value, preallocated.encoder, &mut out, ()
2399                            )?;
2400                        } else {
2401                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2402                        }
2403                    }
2404
2405                    6 => {
2406                        if let Some(value) = &self.min_bytes_per_row {
2407                            ::fidl_next::wire::Envelope::encode_value::<
2408                                ::fidl_next::wire::Uint32,
2409                                ___E,
2410                            >(
2411                                value, preallocated.encoder, &mut out, ()
2412                            )?;
2413                        } else {
2414                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2415                        }
2416                    }
2417
2418                    5 => {
2419                        if let Some(value) = &self.max_size {
2420                            ::fidl_next::wire::Envelope::encode_value::<
2421                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2422                                ___E,
2423                            >(
2424                                value, preallocated.encoder, &mut out, ()
2425                            )?;
2426                        } else {
2427                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2428                        }
2429                    }
2430
2431                    4 => {
2432                        if let Some(value) = &self.min_size {
2433                            ::fidl_next::wire::Envelope::encode_value::<
2434                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2435                                ___E,
2436                            >(
2437                                value, preallocated.encoder, &mut out, ()
2438                            )?;
2439                        } else {
2440                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2441                        }
2442                    }
2443
2444                    3 => {
2445                        if let Some(value) = &self.color_spaces {
2446                            ::fidl_next::wire::Envelope::encode_value::<
2447                                ::fidl_next::wire::Vector<
2448                                    'static,
2449                                    ::fidl_next_common_fuchsia_images2::wire::ColorSpace,
2450                                >,
2451                                ___E,
2452                            >(
2453                                value, preallocated.encoder, &mut out, (32, ())
2454                            )?;
2455                        } else {
2456                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2457                        }
2458                    }
2459
2460                    2 => {
2461                        if let Some(value) = &self.pixel_format_modifier {
2462                            ::fidl_next::wire::Envelope::encode_value::<
2463                                ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
2464                                ___E,
2465                            >(
2466                                value, preallocated.encoder, &mut out, ()
2467                            )?;
2468                        } else {
2469                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2470                        }
2471                    }
2472
2473                    1 => {
2474                        if let Some(value) = &self.pixel_format {
2475                            ::fidl_next::wire::Envelope::encode_value::<
2476                                ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
2477                                ___E,
2478                            >(
2479                                value, preallocated.encoder, &mut out, ()
2480                            )?;
2481                        } else {
2482                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2483                        }
2484                    }
2485
2486                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2487                }
2488                unsafe {
2489                    preallocated.write_next(out.assume_init_ref());
2490                }
2491            }
2492
2493            ::fidl_next::wire::Table::encode_len(table, max_ord);
2494
2495            Ok(())
2496        }
2497    }
2498
2499    impl<'de> ::fidl_next::FromWire<crate::wire::ImageFormatConstraints<'de>>
2500        for ImageFormatConstraints
2501    {
2502        #[inline]
2503        fn from_wire(wire_: crate::wire::ImageFormatConstraints<'de>) -> Self {
2504            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2505
2506            let pixel_format = wire_.table.get(1);
2507
2508            let pixel_format_modifier = wire_.table.get(2);
2509
2510            let color_spaces = wire_.table.get(3);
2511
2512            let min_size = wire_.table.get(4);
2513
2514            let max_size = wire_.table.get(5);
2515
2516            let min_bytes_per_row = wire_.table.get(6);
2517
2518            let max_bytes_per_row = wire_.table.get(7);
2519
2520            let max_width_times_height = wire_.table.get(8);
2521
2522            let size_alignment = wire_.table.get(9);
2523
2524            let display_rect_alignment = wire_.table.get(10);
2525
2526            let required_min_size = wire_.table.get(11);
2527
2528            let required_max_size = wire_.table.get(12);
2529
2530            let bytes_per_row_divisor = wire_.table.get(13);
2531
2532            let start_offset_divisor = wire_.table.get(14);
2533
2534            let pixel_format_and_modifiers = wire_.table.get(15);
2535
2536            let require_bytes_per_row_at_pixel_boundary = wire_.table.get(16);
2537
2538            let is_alpha_present = wire_.table.get(17);
2539
2540            let required_max_size_list = wire_.table.get(18);
2541
2542            let pad_for_block_size = wire_.table.get(19);
2543
2544            let pad_beyond_image_size_bytes = wire_.table.get(20);
2545
2546            Self {
2547
2548
2549                pixel_format: pixel_format.map(|envelope| ::fidl_next::FromWire::from_wire(
2550                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormat>() }
2551                )),
2552
2553
2554                pixel_format_modifier: pixel_format_modifier.map(|envelope| ::fidl_next::FromWire::from_wire(
2555                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>() }
2556                )),
2557
2558
2559                color_spaces: color_spaces.map(|envelope| ::fidl_next::FromWire::from_wire(
2560                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_images2::wire::ColorSpace>>() }
2561                )),
2562
2563
2564                min_size: min_size.map(|envelope| ::fidl_next::FromWire::from_wire(
2565                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2566                )),
2567
2568
2569                max_size: max_size.map(|envelope| ::fidl_next::FromWire::from_wire(
2570                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2571                )),
2572
2573
2574                min_bytes_per_row: min_bytes_per_row.map(|envelope| ::fidl_next::FromWire::from_wire(
2575                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() }
2576                )),
2577
2578
2579                max_bytes_per_row: max_bytes_per_row.map(|envelope| ::fidl_next::FromWire::from_wire(
2580                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() }
2581                )),
2582
2583
2584                max_width_times_height: max_width_times_height.map(|envelope| ::fidl_next::FromWire::from_wire(
2585                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() }
2586                )),
2587
2588
2589                size_alignment: size_alignment.map(|envelope| ::fidl_next::FromWire::from_wire(
2590                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2591                )),
2592
2593
2594                display_rect_alignment: display_rect_alignment.map(|envelope| ::fidl_next::FromWire::from_wire(
2595                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2596                )),
2597
2598
2599                required_min_size: required_min_size.map(|envelope| ::fidl_next::FromWire::from_wire(
2600                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2601                )),
2602
2603
2604                required_max_size: required_max_size.map(|envelope| ::fidl_next::FromWire::from_wire(
2605                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2606                )),
2607
2608
2609                bytes_per_row_divisor: bytes_per_row_divisor.map(|envelope| ::fidl_next::FromWire::from_wire(
2610                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() }
2611                )),
2612
2613
2614                start_offset_divisor: start_offset_divisor.map(|envelope| ::fidl_next::FromWire::from_wire(
2615                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() }
2616                )),
2617
2618
2619                pixel_format_and_modifiers: pixel_format_and_modifiers.map(|envelope| ::fidl_next::FromWire::from_wire(
2620                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::PixelFormatAndModifier>>() }
2621                )),
2622
2623
2624                require_bytes_per_row_at_pixel_boundary: require_bytes_per_row_at_pixel_boundary.map(|envelope| ::fidl_next::FromWire::from_wire(
2625                    unsafe { envelope.read_unchecked::<bool>() }
2626                )),
2627
2628
2629                is_alpha_present: is_alpha_present.map(|envelope| ::fidl_next::FromWire::from_wire(
2630                    unsafe { envelope.read_unchecked::<bool>() }
2631                )),
2632
2633
2634                required_max_size_list: required_max_size_list.map(|envelope| ::fidl_next::FromWire::from_wire(
2635                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_math::wire::SizeU>>() }
2636                )),
2637
2638
2639                pad_for_block_size: pad_for_block_size.map(|envelope| ::fidl_next::FromWire::from_wire(
2640                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2641                )),
2642
2643
2644                pad_beyond_image_size_bytes: pad_beyond_image_size_bytes.map(|envelope| ::fidl_next::FromWire::from_wire(
2645                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() }
2646                )),
2647
2648        }
2649        }
2650    }
2651
2652    impl<'de> ::fidl_next::FromWireRef<crate::wire::ImageFormatConstraints<'de>>
2653        for ImageFormatConstraints
2654    {
2655        #[inline]
2656        fn from_wire_ref(wire: &crate::wire::ImageFormatConstraints<'de>) -> Self {
2657            Self {
2658
2659
2660                pixel_format: wire.table.get(1)
2661                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2662                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormat>() }
2663                    )),
2664
2665
2666                pixel_format_modifier: wire.table.get(2)
2667                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2668                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>() }
2669                    )),
2670
2671
2672                color_spaces: wire.table.get(3)
2673                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2674                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_images2::wire::ColorSpace>>() }
2675                    )),
2676
2677
2678                min_size: wire.table.get(4)
2679                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2680                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2681                    )),
2682
2683
2684                max_size: wire.table.get(5)
2685                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2686                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2687                    )),
2688
2689
2690                min_bytes_per_row: wire.table.get(6)
2691                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2692                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint32>() }
2693                    )),
2694
2695
2696                max_bytes_per_row: wire.table.get(7)
2697                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2698                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint32>() }
2699                    )),
2700
2701
2702                max_width_times_height: wire.table.get(8)
2703                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2704                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint64>() }
2705                    )),
2706
2707
2708                size_alignment: wire.table.get(9)
2709                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2710                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2711                    )),
2712
2713
2714                display_rect_alignment: wire.table.get(10)
2715                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2716                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2717                    )),
2718
2719
2720                required_min_size: wire.table.get(11)
2721                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2722                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2723                    )),
2724
2725
2726                required_max_size: wire.table.get(12)
2727                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2728                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2729                    )),
2730
2731
2732                bytes_per_row_divisor: wire.table.get(13)
2733                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2734                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint32>() }
2735                    )),
2736
2737
2738                start_offset_divisor: wire.table.get(14)
2739                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2740                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint32>() }
2741                    )),
2742
2743
2744                pixel_format_and_modifiers: wire.table.get(15)
2745                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2746                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::PixelFormatAndModifier>>() }
2747                    )),
2748
2749
2750                require_bytes_per_row_at_pixel_boundary: wire.table.get(16)
2751                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2752                        unsafe { envelope.deref_unchecked::<bool>() }
2753                    )),
2754
2755
2756                is_alpha_present: wire.table.get(17)
2757                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2758                        unsafe { envelope.deref_unchecked::<bool>() }
2759                    )),
2760
2761
2762                required_max_size_list: wire.table.get(18)
2763                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2764                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_math::wire::SizeU>>() }
2765                    )),
2766
2767
2768                pad_for_block_size: wire.table.get(19)
2769                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2770                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
2771                    )),
2772
2773
2774                pad_beyond_image_size_bytes: wire.table.get(20)
2775                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
2776                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint64>() }
2777                    )),
2778
2779        }
2780        }
2781    }
2782
2783    #[doc = " Constraints on allocated buffers and, optionally, constraints on images\n stored in the buffers. These constraints can be specified per-participant.\n The sysmem service implements aggregation of constraints from multiple\n participants.\n"]
2784    #[derive(Debug, Default, Clone, PartialEq)]
2785    pub struct BufferCollectionConstraints {
2786        pub usage: ::core::option::Option<crate::natural::BufferUsage>,
2787
2788        pub min_buffer_count_for_camping: ::core::option::Option<u32>,
2789
2790        pub min_buffer_count_for_dedicated_slack: ::core::option::Option<u32>,
2791
2792        pub min_buffer_count_for_shared_slack: ::core::option::Option<u32>,
2793
2794        pub min_buffer_count: ::core::option::Option<u32>,
2795
2796        pub max_buffer_count: ::core::option::Option<u32>,
2797
2798        pub buffer_memory_constraints:
2799            ::core::option::Option<crate::natural::BufferMemoryConstraints>,
2800
2801        pub image_format_constraints:
2802            ::core::option::Option<::std::vec::Vec<crate::natural::ImageFormatConstraints>>,
2803    }
2804
2805    impl BufferCollectionConstraints {
2806        fn __max_ordinal(&self) -> usize {
2807            if self.image_format_constraints.is_some() {
2808                return 8;
2809            }
2810
2811            if self.buffer_memory_constraints.is_some() {
2812                return 7;
2813            }
2814
2815            if self.max_buffer_count.is_some() {
2816                return 6;
2817            }
2818
2819            if self.min_buffer_count.is_some() {
2820                return 5;
2821            }
2822
2823            if self.min_buffer_count_for_shared_slack.is_some() {
2824                return 4;
2825            }
2826
2827            if self.min_buffer_count_for_dedicated_slack.is_some() {
2828                return 3;
2829            }
2830
2831            if self.min_buffer_count_for_camping.is_some() {
2832                return 2;
2833            }
2834
2835            if self.usage.is_some() {
2836                return 1;
2837            }
2838
2839            0
2840        }
2841    }
2842
2843    unsafe impl<___E> ::fidl_next::Encode<crate::wire::BufferCollectionConstraints<'static>, ___E>
2844        for BufferCollectionConstraints
2845    where
2846        ___E: ::fidl_next::Encoder + ?Sized,
2847    {
2848        #[inline]
2849        fn encode(
2850            mut self,
2851            encoder: &mut ___E,
2852            out: &mut ::core::mem::MaybeUninit<crate::wire::BufferCollectionConstraints<'static>>,
2853            _: (),
2854        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2855            ::fidl_next::munge!(let crate::wire::BufferCollectionConstraints { table } = out);
2856
2857            let max_ord = self.__max_ordinal();
2858
2859            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2860            ::fidl_next::Wire::zero_padding(&mut out);
2861
2862            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2863                ::fidl_next::wire::Envelope,
2864            >(encoder, max_ord);
2865
2866            for i in 1..=max_ord {
2867                match i {
2868                    8 => {
2869                        if let Some(value) = self.image_format_constraints.take() {
2870                            ::fidl_next::wire::Envelope::encode_value::<
2871                                ::fidl_next::wire::Vector<
2872                                    'static,
2873                                    crate::wire::ImageFormatConstraints<'static>,
2874                                >,
2875                                ___E,
2876                            >(
2877                                value, preallocated.encoder, &mut out, (64, ())
2878                            )?;
2879                        } else {
2880                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2881                        }
2882                    }
2883
2884                    7 => {
2885                        if let Some(value) = self.buffer_memory_constraints.take() {
2886                            ::fidl_next::wire::Envelope::encode_value::<
2887                                crate::wire::BufferMemoryConstraints<'static>,
2888                                ___E,
2889                            >(
2890                                value, preallocated.encoder, &mut out, ()
2891                            )?;
2892                        } else {
2893                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2894                        }
2895                    }
2896
2897                    6 => {
2898                        if let Some(value) = self.max_buffer_count.take() {
2899                            ::fidl_next::wire::Envelope::encode_value::<
2900                                ::fidl_next::wire::Uint32,
2901                                ___E,
2902                            >(
2903                                value, preallocated.encoder, &mut out, ()
2904                            )?;
2905                        } else {
2906                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2907                        }
2908                    }
2909
2910                    5 => {
2911                        if let Some(value) = self.min_buffer_count.take() {
2912                            ::fidl_next::wire::Envelope::encode_value::<
2913                                ::fidl_next::wire::Uint32,
2914                                ___E,
2915                            >(
2916                                value, preallocated.encoder, &mut out, ()
2917                            )?;
2918                        } else {
2919                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2920                        }
2921                    }
2922
2923                    4 => {
2924                        if let Some(value) = self.min_buffer_count_for_shared_slack.take() {
2925                            ::fidl_next::wire::Envelope::encode_value::<
2926                                ::fidl_next::wire::Uint32,
2927                                ___E,
2928                            >(
2929                                value, preallocated.encoder, &mut out, ()
2930                            )?;
2931                        } else {
2932                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2933                        }
2934                    }
2935
2936                    3 => {
2937                        if let Some(value) = self.min_buffer_count_for_dedicated_slack.take() {
2938                            ::fidl_next::wire::Envelope::encode_value::<
2939                                ::fidl_next::wire::Uint32,
2940                                ___E,
2941                            >(
2942                                value, preallocated.encoder, &mut out, ()
2943                            )?;
2944                        } else {
2945                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2946                        }
2947                    }
2948
2949                    2 => {
2950                        if let Some(value) = self.min_buffer_count_for_camping.take() {
2951                            ::fidl_next::wire::Envelope::encode_value::<
2952                                ::fidl_next::wire::Uint32,
2953                                ___E,
2954                            >(
2955                                value, preallocated.encoder, &mut out, ()
2956                            )?;
2957                        } else {
2958                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2959                        }
2960                    }
2961
2962                    1 => {
2963                        if let Some(value) = self.usage.take() {
2964                            ::fidl_next::wire::Envelope::encode_value::<
2965                                crate::wire::BufferUsage<'static>,
2966                                ___E,
2967                            >(
2968                                value, preallocated.encoder, &mut out, ()
2969                            )?;
2970                        } else {
2971                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2972                        }
2973                    }
2974
2975                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2976                }
2977                unsafe {
2978                    preallocated.write_next(out.assume_init_ref());
2979                }
2980            }
2981
2982            ::fidl_next::wire::Table::encode_len(table, max_ord);
2983
2984            Ok(())
2985        }
2986    }
2987
2988    unsafe impl<'a, ___E>
2989        ::fidl_next::Encode<crate::wire::BufferCollectionConstraints<'static>, ___E>
2990        for &'a BufferCollectionConstraints
2991    where
2992        ___E: ::fidl_next::Encoder + ?Sized,
2993    {
2994        #[inline]
2995        fn encode(
2996            self,
2997            encoder: &mut ___E,
2998            out: &mut ::core::mem::MaybeUninit<crate::wire::BufferCollectionConstraints<'static>>,
2999            _: (),
3000        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3001            ::fidl_next::munge!(let crate::wire::BufferCollectionConstraints { table } = out);
3002
3003            let max_ord = self.__max_ordinal();
3004
3005            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3006            ::fidl_next::Wire::zero_padding(&mut out);
3007
3008            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3009                ::fidl_next::wire::Envelope,
3010            >(encoder, max_ord);
3011
3012            for i in 1..=max_ord {
3013                match i {
3014                    8 => {
3015                        if let Some(value) = &self.image_format_constraints {
3016                            ::fidl_next::wire::Envelope::encode_value::<
3017                                ::fidl_next::wire::Vector<
3018                                    'static,
3019                                    crate::wire::ImageFormatConstraints<'static>,
3020                                >,
3021                                ___E,
3022                            >(
3023                                value, preallocated.encoder, &mut out, (64, ())
3024                            )?;
3025                        } else {
3026                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3027                        }
3028                    }
3029
3030                    7 => {
3031                        if let Some(value) = &self.buffer_memory_constraints {
3032                            ::fidl_next::wire::Envelope::encode_value::<
3033                                crate::wire::BufferMemoryConstraints<'static>,
3034                                ___E,
3035                            >(
3036                                value, preallocated.encoder, &mut out, ()
3037                            )?;
3038                        } else {
3039                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3040                        }
3041                    }
3042
3043                    6 => {
3044                        if let Some(value) = &self.max_buffer_count {
3045                            ::fidl_next::wire::Envelope::encode_value::<
3046                                ::fidl_next::wire::Uint32,
3047                                ___E,
3048                            >(
3049                                value, preallocated.encoder, &mut out, ()
3050                            )?;
3051                        } else {
3052                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3053                        }
3054                    }
3055
3056                    5 => {
3057                        if let Some(value) = &self.min_buffer_count {
3058                            ::fidl_next::wire::Envelope::encode_value::<
3059                                ::fidl_next::wire::Uint32,
3060                                ___E,
3061                            >(
3062                                value, preallocated.encoder, &mut out, ()
3063                            )?;
3064                        } else {
3065                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3066                        }
3067                    }
3068
3069                    4 => {
3070                        if let Some(value) = &self.min_buffer_count_for_shared_slack {
3071                            ::fidl_next::wire::Envelope::encode_value::<
3072                                ::fidl_next::wire::Uint32,
3073                                ___E,
3074                            >(
3075                                value, preallocated.encoder, &mut out, ()
3076                            )?;
3077                        } else {
3078                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3079                        }
3080                    }
3081
3082                    3 => {
3083                        if let Some(value) = &self.min_buffer_count_for_dedicated_slack {
3084                            ::fidl_next::wire::Envelope::encode_value::<
3085                                ::fidl_next::wire::Uint32,
3086                                ___E,
3087                            >(
3088                                value, preallocated.encoder, &mut out, ()
3089                            )?;
3090                        } else {
3091                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3092                        }
3093                    }
3094
3095                    2 => {
3096                        if let Some(value) = &self.min_buffer_count_for_camping {
3097                            ::fidl_next::wire::Envelope::encode_value::<
3098                                ::fidl_next::wire::Uint32,
3099                                ___E,
3100                            >(
3101                                value, preallocated.encoder, &mut out, ()
3102                            )?;
3103                        } else {
3104                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3105                        }
3106                    }
3107
3108                    1 => {
3109                        if let Some(value) = &self.usage {
3110                            ::fidl_next::wire::Envelope::encode_value::<
3111                                crate::wire::BufferUsage<'static>,
3112                                ___E,
3113                            >(
3114                                value, preallocated.encoder, &mut out, ()
3115                            )?;
3116                        } else {
3117                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3118                        }
3119                    }
3120
3121                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3122                }
3123                unsafe {
3124                    preallocated.write_next(out.assume_init_ref());
3125                }
3126            }
3127
3128            ::fidl_next::wire::Table::encode_len(table, max_ord);
3129
3130            Ok(())
3131        }
3132    }
3133
3134    impl<'de> ::fidl_next::FromWire<crate::wire::BufferCollectionConstraints<'de>>
3135        for BufferCollectionConstraints
3136    {
3137        #[inline]
3138        fn from_wire(wire_: crate::wire::BufferCollectionConstraints<'de>) -> Self {
3139            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3140
3141            let usage = wire_.table.get(1);
3142
3143            let min_buffer_count_for_camping = wire_.table.get(2);
3144
3145            let min_buffer_count_for_dedicated_slack = wire_.table.get(3);
3146
3147            let min_buffer_count_for_shared_slack = wire_.table.get(4);
3148
3149            let min_buffer_count = wire_.table.get(5);
3150
3151            let max_buffer_count = wire_.table.get(6);
3152
3153            let buffer_memory_constraints = wire_.table.get(7);
3154
3155            let image_format_constraints = wire_.table.get(8);
3156
3157            Self {
3158                usage: usage.map(|envelope| {
3159                    ::fidl_next::FromWire::from_wire(unsafe {
3160                        envelope.read_unchecked::<crate::wire::BufferUsage<'de>>()
3161                    })
3162                }),
3163
3164                min_buffer_count_for_camping: min_buffer_count_for_camping.map(|envelope| {
3165                    ::fidl_next::FromWire::from_wire(unsafe {
3166                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3167                    })
3168                }),
3169
3170                min_buffer_count_for_dedicated_slack: min_buffer_count_for_dedicated_slack.map(
3171                    |envelope| {
3172                        ::fidl_next::FromWire::from_wire(unsafe {
3173                            envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3174                        })
3175                    },
3176                ),
3177
3178                min_buffer_count_for_shared_slack: min_buffer_count_for_shared_slack.map(
3179                    |envelope| {
3180                        ::fidl_next::FromWire::from_wire(unsafe {
3181                            envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3182                        })
3183                    },
3184                ),
3185
3186                min_buffer_count: min_buffer_count.map(|envelope| {
3187                    ::fidl_next::FromWire::from_wire(unsafe {
3188                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3189                    })
3190                }),
3191
3192                max_buffer_count: max_buffer_count.map(|envelope| {
3193                    ::fidl_next::FromWire::from_wire(unsafe {
3194                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3195                    })
3196                }),
3197
3198                buffer_memory_constraints: buffer_memory_constraints.map(|envelope| {
3199                    ::fidl_next::FromWire::from_wire(unsafe {
3200                        envelope.read_unchecked::<crate::wire::BufferMemoryConstraints<'de>>()
3201                    })
3202                }),
3203
3204                image_format_constraints:
3205                    image_format_constraints.map(|envelope| {
3206                        ::fidl_next::FromWire::from_wire(unsafe {
3207                            envelope.read_unchecked::<::fidl_next::wire::Vector<
3208                                'de,
3209                                crate::wire::ImageFormatConstraints<'de>,
3210                            >>()
3211                        })
3212                    }),
3213            }
3214        }
3215    }
3216
3217    impl<'de> ::fidl_next::FromWireRef<crate::wire::BufferCollectionConstraints<'de>>
3218        for BufferCollectionConstraints
3219    {
3220        #[inline]
3221        fn from_wire_ref(wire: &crate::wire::BufferCollectionConstraints<'de>) -> Self {
3222            Self {
3223                usage: wire.table.get(1).map(|envelope| {
3224                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3225                        envelope.deref_unchecked::<crate::wire::BufferUsage<'de>>()
3226                    })
3227                }),
3228
3229                min_buffer_count_for_camping: wire.table.get(2).map(|envelope| {
3230                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3231                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3232                    })
3233                }),
3234
3235                min_buffer_count_for_dedicated_slack: wire.table.get(3).map(|envelope| {
3236                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3237                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3238                    })
3239                }),
3240
3241                min_buffer_count_for_shared_slack: wire.table.get(4).map(|envelope| {
3242                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3243                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3244                    })
3245                }),
3246
3247                min_buffer_count: wire.table.get(5).map(|envelope| {
3248                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3249                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3250                    })
3251                }),
3252
3253                max_buffer_count: wire.table.get(6).map(|envelope| {
3254                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3255                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3256                    })
3257                }),
3258
3259                buffer_memory_constraints: wire.table.get(7).map(|envelope| {
3260                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3261                        envelope.deref_unchecked::<crate::wire::BufferMemoryConstraints<'de>>()
3262                    })
3263                }),
3264
3265                image_format_constraints:
3266                    wire.table.get(8).map(|envelope| {
3267                        ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3268                            envelope.deref_unchecked::<::fidl_next::wire::Vector<
3269                                'de,
3270                                crate::wire::ImageFormatConstraints<'de>,
3271                            >>()
3272                        })
3273                    }),
3274            }
3275        }
3276    }
3277
3278    #[doc = " `INACCESSIBLE` is only for cases where there is no CPU access to the\n buffers.\n\n Device-local memory that isn\'t reachable from the CPU is `CoherencyDomain`\n `INACCESSIBLE`, even if it\'s possible to cause a device (physical or\n virtual) to copy the data from the `INACCESSIBLE` buffers to buffers that\n are visible to the CPU. In other words, INACCESSIBLE does not imply secure,\n but secure implies INACCESSIBLE.\n\n `CPU` means producers must ensure that a consumer can read the produced data\n with the CPU without the consumer needing to do additional cache ops not\n already performed (as needed) by the producer.\n\n `RAM` means producers must ensure that the produced data is entirely present\n in RAM, without any dirty CPU cache lines, and a consumer must invalidate\n (or flush and invalidate, typically) the CPU cache before reading data with\n the CPU. The `RAM` domain can be faster than the `CPU` domain when all\n access is via HW DMA, since in that case no CPU cache ops are required,\n since no participant is actually reading/writing using the CPU.\n"]
3279    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3280    #[repr(u32)]
3281    pub enum CoherencyDomain {
3282        Cpu = 0,
3283        Ram = 1,
3284        Inaccessible = 2,
3285        UnknownOrdinal_(u32) = 3,
3286    }
3287    impl ::std::convert::From<u32> for CoherencyDomain {
3288        fn from(value: u32) -> Self {
3289            match value {
3290                0 => Self::Cpu,
3291                1 => Self::Ram,
3292                2 => Self::Inaccessible,
3293
3294                _ => Self::UnknownOrdinal_(value),
3295            }
3296        }
3297    }
3298
3299    impl ::std::convert::From<CoherencyDomain> for u32 {
3300        fn from(value: CoherencyDomain) -> Self {
3301            match value {
3302                CoherencyDomain::Cpu => 0,
3303                CoherencyDomain::Ram => 1,
3304                CoherencyDomain::Inaccessible => 2,
3305
3306                CoherencyDomain::UnknownOrdinal_(value) => value,
3307            }
3308        }
3309    }
3310
3311    unsafe impl<___E> ::fidl_next::Encode<crate::wire::CoherencyDomain, ___E> for CoherencyDomain
3312    where
3313        ___E: ?Sized,
3314    {
3315        #[inline]
3316        fn encode(
3317            self,
3318            encoder: &mut ___E,
3319            out: &mut ::core::mem::MaybeUninit<crate::wire::CoherencyDomain>,
3320            _: (),
3321        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3322            ::fidl_next::Encode::encode(&self, encoder, out, ())
3323        }
3324    }
3325
3326    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::CoherencyDomain, ___E>
3327        for &'a CoherencyDomain
3328    where
3329        ___E: ?Sized,
3330    {
3331        #[inline]
3332        fn encode(
3333            self,
3334            encoder: &mut ___E,
3335            out: &mut ::core::mem::MaybeUninit<crate::wire::CoherencyDomain>,
3336            _: (),
3337        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3338            ::fidl_next::munge!(let crate::wire::CoherencyDomain { value } = out);
3339            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
3340                CoherencyDomain::Cpu => 0,
3341
3342                CoherencyDomain::Ram => 1,
3343
3344                CoherencyDomain::Inaccessible => 2,
3345
3346                CoherencyDomain::UnknownOrdinal_(value) => value,
3347            }));
3348
3349            Ok(())
3350        }
3351    }
3352
3353    impl ::core::convert::From<crate::wire::CoherencyDomain> for CoherencyDomain {
3354        fn from(wire: crate::wire::CoherencyDomain) -> Self {
3355            match u32::from(wire.value) {
3356                0 => Self::Cpu,
3357
3358                1 => Self::Ram,
3359
3360                2 => Self::Inaccessible,
3361
3362                value => Self::UnknownOrdinal_(value),
3363            }
3364        }
3365    }
3366
3367    impl ::fidl_next::FromWire<crate::wire::CoherencyDomain> for CoherencyDomain {
3368        #[inline]
3369        fn from_wire(wire: crate::wire::CoherencyDomain) -> Self {
3370            Self::from(wire)
3371        }
3372    }
3373
3374    impl ::fidl_next::FromWireRef<crate::wire::CoherencyDomain> for CoherencyDomain {
3375        #[inline]
3376        fn from_wire_ref(wire: &crate::wire::CoherencyDomain) -> Self {
3377            Self::from(*wire)
3378        }
3379    }
3380
3381    #[doc = " These are memory-related settings for all buffers of a buffer collection.\n"]
3382    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3383    pub struct BufferMemorySettings {
3384        pub size_bytes: ::core::option::Option<u64>,
3385
3386        pub is_physically_contiguous: ::core::option::Option<bool>,
3387
3388        pub is_secure: ::core::option::Option<bool>,
3389
3390        pub coherency_domain: ::core::option::Option<crate::natural::CoherencyDomain>,
3391
3392        pub heap: ::core::option::Option<crate::natural::Heap>,
3393
3394        pub raw_vmo_size: ::core::option::Option<u64>,
3395    }
3396
3397    impl BufferMemorySettings {
3398        fn __max_ordinal(&self) -> usize {
3399            if self.raw_vmo_size.is_some() {
3400                return 6;
3401            }
3402
3403            if self.heap.is_some() {
3404                return 5;
3405            }
3406
3407            if self.coherency_domain.is_some() {
3408                return 4;
3409            }
3410
3411            if self.is_secure.is_some() {
3412                return 3;
3413            }
3414
3415            if self.is_physically_contiguous.is_some() {
3416                return 2;
3417            }
3418
3419            if self.size_bytes.is_some() {
3420                return 1;
3421            }
3422
3423            0
3424        }
3425    }
3426
3427    unsafe impl<___E> ::fidl_next::Encode<crate::wire::BufferMemorySettings<'static>, ___E>
3428        for BufferMemorySettings
3429    where
3430        ___E: ::fidl_next::Encoder + ?Sized,
3431    {
3432        #[inline]
3433        fn encode(
3434            mut self,
3435            encoder: &mut ___E,
3436            out: &mut ::core::mem::MaybeUninit<crate::wire::BufferMemorySettings<'static>>,
3437            _: (),
3438        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3439            ::fidl_next::munge!(let crate::wire::BufferMemorySettings { table } = out);
3440
3441            let max_ord = self.__max_ordinal();
3442
3443            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3444            ::fidl_next::Wire::zero_padding(&mut out);
3445
3446            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3447                ::fidl_next::wire::Envelope,
3448            >(encoder, max_ord);
3449
3450            for i in 1..=max_ord {
3451                match i {
3452                    6 => {
3453                        if let Some(value) = self.raw_vmo_size.take() {
3454                            ::fidl_next::wire::Envelope::encode_value::<
3455                                ::fidl_next::wire::Uint64,
3456                                ___E,
3457                            >(
3458                                value, preallocated.encoder, &mut out, ()
3459                            )?;
3460                        } else {
3461                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3462                        }
3463                    }
3464
3465                    5 => {
3466                        if let Some(value) = self.heap.take() {
3467                            ::fidl_next::wire::Envelope::encode_value::<
3468                                crate::wire::Heap<'static>,
3469                                ___E,
3470                            >(
3471                                value, preallocated.encoder, &mut out, ()
3472                            )?;
3473                        } else {
3474                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3475                        }
3476                    }
3477
3478                    4 => {
3479                        if let Some(value) = self.coherency_domain.take() {
3480                            ::fidl_next::wire::Envelope::encode_value::<
3481                                crate::wire::CoherencyDomain,
3482                                ___E,
3483                            >(
3484                                value, preallocated.encoder, &mut out, ()
3485                            )?;
3486                        } else {
3487                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3488                        }
3489                    }
3490
3491                    3 => {
3492                        if let Some(value) = self.is_secure.take() {
3493                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3494                                value,
3495                                preallocated.encoder,
3496                                &mut out,
3497                                (),
3498                            )?;
3499                        } else {
3500                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3501                        }
3502                    }
3503
3504                    2 => {
3505                        if let Some(value) = self.is_physically_contiguous.take() {
3506                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3507                                value,
3508                                preallocated.encoder,
3509                                &mut out,
3510                                (),
3511                            )?;
3512                        } else {
3513                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3514                        }
3515                    }
3516
3517                    1 => {
3518                        if let Some(value) = self.size_bytes.take() {
3519                            ::fidl_next::wire::Envelope::encode_value::<
3520                                ::fidl_next::wire::Uint64,
3521                                ___E,
3522                            >(
3523                                value, preallocated.encoder, &mut out, ()
3524                            )?;
3525                        } else {
3526                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3527                        }
3528                    }
3529
3530                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3531                }
3532                unsafe {
3533                    preallocated.write_next(out.assume_init_ref());
3534                }
3535            }
3536
3537            ::fidl_next::wire::Table::encode_len(table, max_ord);
3538
3539            Ok(())
3540        }
3541    }
3542
3543    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::BufferMemorySettings<'static>, ___E>
3544        for &'a BufferMemorySettings
3545    where
3546        ___E: ::fidl_next::Encoder + ?Sized,
3547    {
3548        #[inline]
3549        fn encode(
3550            self,
3551            encoder: &mut ___E,
3552            out: &mut ::core::mem::MaybeUninit<crate::wire::BufferMemorySettings<'static>>,
3553            _: (),
3554        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3555            ::fidl_next::munge!(let crate::wire::BufferMemorySettings { table } = out);
3556
3557            let max_ord = self.__max_ordinal();
3558
3559            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3560            ::fidl_next::Wire::zero_padding(&mut out);
3561
3562            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3563                ::fidl_next::wire::Envelope,
3564            >(encoder, max_ord);
3565
3566            for i in 1..=max_ord {
3567                match i {
3568                    6 => {
3569                        if let Some(value) = &self.raw_vmo_size {
3570                            ::fidl_next::wire::Envelope::encode_value::<
3571                                ::fidl_next::wire::Uint64,
3572                                ___E,
3573                            >(
3574                                value, preallocated.encoder, &mut out, ()
3575                            )?;
3576                        } else {
3577                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3578                        }
3579                    }
3580
3581                    5 => {
3582                        if let Some(value) = &self.heap {
3583                            ::fidl_next::wire::Envelope::encode_value::<
3584                                crate::wire::Heap<'static>,
3585                                ___E,
3586                            >(
3587                                value, preallocated.encoder, &mut out, ()
3588                            )?;
3589                        } else {
3590                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3591                        }
3592                    }
3593
3594                    4 => {
3595                        if let Some(value) = &self.coherency_domain {
3596                            ::fidl_next::wire::Envelope::encode_value::<
3597                                crate::wire::CoherencyDomain,
3598                                ___E,
3599                            >(
3600                                value, preallocated.encoder, &mut out, ()
3601                            )?;
3602                        } else {
3603                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3604                        }
3605                    }
3606
3607                    3 => {
3608                        if let Some(value) = &self.is_secure {
3609                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3610                                value,
3611                                preallocated.encoder,
3612                                &mut out,
3613                                (),
3614                            )?;
3615                        } else {
3616                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3617                        }
3618                    }
3619
3620                    2 => {
3621                        if let Some(value) = &self.is_physically_contiguous {
3622                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
3623                                value,
3624                                preallocated.encoder,
3625                                &mut out,
3626                                (),
3627                            )?;
3628                        } else {
3629                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3630                        }
3631                    }
3632
3633                    1 => {
3634                        if let Some(value) = &self.size_bytes {
3635                            ::fidl_next::wire::Envelope::encode_value::<
3636                                ::fidl_next::wire::Uint64,
3637                                ___E,
3638                            >(
3639                                value, preallocated.encoder, &mut out, ()
3640                            )?;
3641                        } else {
3642                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3643                        }
3644                    }
3645
3646                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3647                }
3648                unsafe {
3649                    preallocated.write_next(out.assume_init_ref());
3650                }
3651            }
3652
3653            ::fidl_next::wire::Table::encode_len(table, max_ord);
3654
3655            Ok(())
3656        }
3657    }
3658
3659    impl<'de> ::fidl_next::FromWire<crate::wire::BufferMemorySettings<'de>> for BufferMemorySettings {
3660        #[inline]
3661        fn from_wire(wire_: crate::wire::BufferMemorySettings<'de>) -> Self {
3662            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3663
3664            let size_bytes = wire_.table.get(1);
3665
3666            let is_physically_contiguous = wire_.table.get(2);
3667
3668            let is_secure = wire_.table.get(3);
3669
3670            let coherency_domain = wire_.table.get(4);
3671
3672            let heap = wire_.table.get(5);
3673
3674            let raw_vmo_size = wire_.table.get(6);
3675
3676            Self {
3677                size_bytes: size_bytes.map(|envelope| {
3678                    ::fidl_next::FromWire::from_wire(unsafe {
3679                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
3680                    })
3681                }),
3682
3683                is_physically_contiguous: is_physically_contiguous.map(|envelope| {
3684                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3685                }),
3686
3687                is_secure: is_secure.map(|envelope| {
3688                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
3689                }),
3690
3691                coherency_domain: coherency_domain.map(|envelope| {
3692                    ::fidl_next::FromWire::from_wire(unsafe {
3693                        envelope.read_unchecked::<crate::wire::CoherencyDomain>()
3694                    })
3695                }),
3696
3697                heap: heap.map(|envelope| {
3698                    ::fidl_next::FromWire::from_wire(unsafe {
3699                        envelope.read_unchecked::<crate::wire::Heap<'de>>()
3700                    })
3701                }),
3702
3703                raw_vmo_size: raw_vmo_size.map(|envelope| {
3704                    ::fidl_next::FromWire::from_wire(unsafe {
3705                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
3706                    })
3707                }),
3708            }
3709        }
3710    }
3711
3712    impl<'de> ::fidl_next::FromWireRef<crate::wire::BufferMemorySettings<'de>>
3713        for BufferMemorySettings
3714    {
3715        #[inline]
3716        fn from_wire_ref(wire: &crate::wire::BufferMemorySettings<'de>) -> Self {
3717            Self {
3718                size_bytes: wire.table.get(1).map(|envelope| {
3719                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3720                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
3721                    })
3722                }),
3723
3724                is_physically_contiguous: wire.table.get(2).map(|envelope| {
3725                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3726                        envelope.deref_unchecked::<bool>()
3727                    })
3728                }),
3729
3730                is_secure: wire.table.get(3).map(|envelope| {
3731                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3732                        envelope.deref_unchecked::<bool>()
3733                    })
3734                }),
3735
3736                coherency_domain: wire.table.get(4).map(|envelope| {
3737                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3738                        envelope.deref_unchecked::<crate::wire::CoherencyDomain>()
3739                    })
3740                }),
3741
3742                heap: wire.table.get(5).map(|envelope| {
3743                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3744                        envelope.deref_unchecked::<crate::wire::Heap<'de>>()
3745                    })
3746                }),
3747
3748                raw_vmo_size: wire.table.get(6).map(|envelope| {
3749                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3750                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
3751                    })
3752                }),
3753            }
3754        }
3755    }
3756
3757    #[doc = " These settings and constraints apply to all the buffers in the collection.\n"]
3758    #[derive(Debug, Default, Clone, PartialEq)]
3759    pub struct SingleBufferSettings {
3760        pub buffer_settings: ::core::option::Option<crate::natural::BufferMemorySettings>,
3761
3762        pub image_format_constraints:
3763            ::core::option::Option<crate::natural::ImageFormatConstraints>,
3764    }
3765
3766    impl SingleBufferSettings {
3767        fn __max_ordinal(&self) -> usize {
3768            if self.image_format_constraints.is_some() {
3769                return 2;
3770            }
3771
3772            if self.buffer_settings.is_some() {
3773                return 1;
3774            }
3775
3776            0
3777        }
3778    }
3779
3780    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SingleBufferSettings<'static>, ___E>
3781        for SingleBufferSettings
3782    where
3783        ___E: ::fidl_next::Encoder + ?Sized,
3784    {
3785        #[inline]
3786        fn encode(
3787            mut self,
3788            encoder: &mut ___E,
3789            out: &mut ::core::mem::MaybeUninit<crate::wire::SingleBufferSettings<'static>>,
3790            _: (),
3791        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3792            ::fidl_next::munge!(let crate::wire::SingleBufferSettings { table } = out);
3793
3794            let max_ord = self.__max_ordinal();
3795
3796            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3797            ::fidl_next::Wire::zero_padding(&mut out);
3798
3799            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3800                ::fidl_next::wire::Envelope,
3801            >(encoder, max_ord);
3802
3803            for i in 1..=max_ord {
3804                match i {
3805                    2 => {
3806                        if let Some(value) = self.image_format_constraints.take() {
3807                            ::fidl_next::wire::Envelope::encode_value::<
3808                                crate::wire::ImageFormatConstraints<'static>,
3809                                ___E,
3810                            >(
3811                                value, preallocated.encoder, &mut out, ()
3812                            )?;
3813                        } else {
3814                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3815                        }
3816                    }
3817
3818                    1 => {
3819                        if let Some(value) = self.buffer_settings.take() {
3820                            ::fidl_next::wire::Envelope::encode_value::<
3821                                crate::wire::BufferMemorySettings<'static>,
3822                                ___E,
3823                            >(
3824                                value, preallocated.encoder, &mut out, ()
3825                            )?;
3826                        } else {
3827                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3828                        }
3829                    }
3830
3831                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3832                }
3833                unsafe {
3834                    preallocated.write_next(out.assume_init_ref());
3835                }
3836            }
3837
3838            ::fidl_next::wire::Table::encode_len(table, max_ord);
3839
3840            Ok(())
3841        }
3842    }
3843
3844    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SingleBufferSettings<'static>, ___E>
3845        for &'a SingleBufferSettings
3846    where
3847        ___E: ::fidl_next::Encoder + ?Sized,
3848    {
3849        #[inline]
3850        fn encode(
3851            self,
3852            encoder: &mut ___E,
3853            out: &mut ::core::mem::MaybeUninit<crate::wire::SingleBufferSettings<'static>>,
3854            _: (),
3855        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3856            ::fidl_next::munge!(let crate::wire::SingleBufferSettings { table } = out);
3857
3858            let max_ord = self.__max_ordinal();
3859
3860            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3861            ::fidl_next::Wire::zero_padding(&mut out);
3862
3863            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3864                ::fidl_next::wire::Envelope,
3865            >(encoder, max_ord);
3866
3867            for i in 1..=max_ord {
3868                match i {
3869                    2 => {
3870                        if let Some(value) = &self.image_format_constraints {
3871                            ::fidl_next::wire::Envelope::encode_value::<
3872                                crate::wire::ImageFormatConstraints<'static>,
3873                                ___E,
3874                            >(
3875                                value, preallocated.encoder, &mut out, ()
3876                            )?;
3877                        } else {
3878                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3879                        }
3880                    }
3881
3882                    1 => {
3883                        if let Some(value) = &self.buffer_settings {
3884                            ::fidl_next::wire::Envelope::encode_value::<
3885                                crate::wire::BufferMemorySettings<'static>,
3886                                ___E,
3887                            >(
3888                                value, preallocated.encoder, &mut out, ()
3889                            )?;
3890                        } else {
3891                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3892                        }
3893                    }
3894
3895                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3896                }
3897                unsafe {
3898                    preallocated.write_next(out.assume_init_ref());
3899                }
3900            }
3901
3902            ::fidl_next::wire::Table::encode_len(table, max_ord);
3903
3904            Ok(())
3905        }
3906    }
3907
3908    impl<'de> ::fidl_next::FromWire<crate::wire::SingleBufferSettings<'de>> for SingleBufferSettings {
3909        #[inline]
3910        fn from_wire(wire_: crate::wire::SingleBufferSettings<'de>) -> Self {
3911            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3912
3913            let buffer_settings = wire_.table.get(1);
3914
3915            let image_format_constraints = wire_.table.get(2);
3916
3917            Self {
3918                buffer_settings: buffer_settings.map(|envelope| {
3919                    ::fidl_next::FromWire::from_wire(unsafe {
3920                        envelope.read_unchecked::<crate::wire::BufferMemorySettings<'de>>()
3921                    })
3922                }),
3923
3924                image_format_constraints: image_format_constraints.map(|envelope| {
3925                    ::fidl_next::FromWire::from_wire(unsafe {
3926                        envelope.read_unchecked::<crate::wire::ImageFormatConstraints<'de>>()
3927                    })
3928                }),
3929            }
3930        }
3931    }
3932
3933    impl<'de> ::fidl_next::FromWireRef<crate::wire::SingleBufferSettings<'de>>
3934        for SingleBufferSettings
3935    {
3936        #[inline]
3937        fn from_wire_ref(wire: &crate::wire::SingleBufferSettings<'de>) -> Self {
3938            Self {
3939                buffer_settings: wire.table.get(1).map(|envelope| {
3940                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3941                        envelope.deref_unchecked::<crate::wire::BufferMemorySettings<'de>>()
3942                    })
3943                }),
3944
3945                image_format_constraints: wire.table.get(2).map(|envelope| {
3946                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3947                        envelope.deref_unchecked::<crate::wire::ImageFormatConstraints<'de>>()
3948                    })
3949                }),
3950            }
3951        }
3952    }
3953
3954    #[doc = " Regardless of which error code, any client retries should be very limited in\n number, if any.\n\n A Error value should never be stored in a zx_status_t, since positive values\n in zx_status_t are deprecated.\n"]
3955    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
3956    #[repr(u32)]
3957    pub enum Error {
3958        Invalid = 0,
3959        Unspecified = 1,
3960        ProtocolDeviation = 2,
3961        NotFound = 3,
3962        HandleAccessDenied = 4,
3963        NoMemory = 5,
3964        ConstraintsIntersectionEmpty = 6,
3965        Pending = 7,
3966        TooManyGroupChildCombinations = 8,
3967        NoMoreStrongVmoHandles = 9,
3968        UnknownOrdinal_(u32) = 10,
3969    }
3970    impl ::std::convert::From<u32> for Error {
3971        fn from(value: u32) -> Self {
3972            match value {
3973                0 => Self::Invalid,
3974                1 => Self::Unspecified,
3975                2 => Self::ProtocolDeviation,
3976                3 => Self::NotFound,
3977                4 => Self::HandleAccessDenied,
3978                5 => Self::NoMemory,
3979                6 => Self::ConstraintsIntersectionEmpty,
3980                7 => Self::Pending,
3981                8 => Self::TooManyGroupChildCombinations,
3982                9 => Self::NoMoreStrongVmoHandles,
3983
3984                _ => Self::UnknownOrdinal_(value),
3985            }
3986        }
3987    }
3988
3989    impl ::std::convert::From<Error> for u32 {
3990        fn from(value: Error) -> Self {
3991            match value {
3992                Error::Invalid => 0,
3993                Error::Unspecified => 1,
3994                Error::ProtocolDeviation => 2,
3995                Error::NotFound => 3,
3996                Error::HandleAccessDenied => 4,
3997                Error::NoMemory => 5,
3998                Error::ConstraintsIntersectionEmpty => 6,
3999                Error::Pending => 7,
4000                Error::TooManyGroupChildCombinations => 8,
4001                Error::NoMoreStrongVmoHandles => 9,
4002
4003                Error::UnknownOrdinal_(value) => value,
4004            }
4005        }
4006    }
4007
4008    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Error, ___E> for Error
4009    where
4010        ___E: ?Sized,
4011    {
4012        #[inline]
4013        fn encode(
4014            self,
4015            encoder: &mut ___E,
4016            out: &mut ::core::mem::MaybeUninit<crate::wire::Error>,
4017            _: (),
4018        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4019            ::fidl_next::Encode::encode(&self, encoder, out, ())
4020        }
4021    }
4022
4023    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Error, ___E> for &'a Error
4024    where
4025        ___E: ?Sized,
4026    {
4027        #[inline]
4028        fn encode(
4029            self,
4030            encoder: &mut ___E,
4031            out: &mut ::core::mem::MaybeUninit<crate::wire::Error>,
4032            _: (),
4033        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4034            ::fidl_next::munge!(let crate::wire::Error { value } = out);
4035            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
4036                Error::Invalid => 0,
4037
4038                Error::Unspecified => 1,
4039
4040                Error::ProtocolDeviation => 2,
4041
4042                Error::NotFound => 3,
4043
4044                Error::HandleAccessDenied => 4,
4045
4046                Error::NoMemory => 5,
4047
4048                Error::ConstraintsIntersectionEmpty => 6,
4049
4050                Error::Pending => 7,
4051
4052                Error::TooManyGroupChildCombinations => 8,
4053
4054                Error::NoMoreStrongVmoHandles => 9,
4055
4056                Error::UnknownOrdinal_(value) => value,
4057            }));
4058
4059            Ok(())
4060        }
4061    }
4062
4063    impl ::core::convert::From<crate::wire::Error> for Error {
4064        fn from(wire: crate::wire::Error) -> Self {
4065            match u32::from(wire.value) {
4066                0 => Self::Invalid,
4067
4068                1 => Self::Unspecified,
4069
4070                2 => Self::ProtocolDeviation,
4071
4072                3 => Self::NotFound,
4073
4074                4 => Self::HandleAccessDenied,
4075
4076                5 => Self::NoMemory,
4077
4078                6 => Self::ConstraintsIntersectionEmpty,
4079
4080                7 => Self::Pending,
4081
4082                8 => Self::TooManyGroupChildCombinations,
4083
4084                9 => Self::NoMoreStrongVmoHandles,
4085
4086                value => Self::UnknownOrdinal_(value),
4087            }
4088        }
4089    }
4090
4091    impl ::fidl_next::FromWire<crate::wire::Error> for Error {
4092        #[inline]
4093        fn from_wire(wire: crate::wire::Error) -> Self {
4094            Self::from(wire)
4095        }
4096    }
4097
4098    impl ::fidl_next::FromWireRef<crate::wire::Error> for Error {
4099        #[inline]
4100        fn from_wire_ref(wire: &crate::wire::Error) -> Self {
4101            Self::from(*wire)
4102        }
4103    }
4104
4105    pub type NodeSyncResponse = ();
4106
4107    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4108    pub struct NodeSetNameRequest {
4109        pub priority: ::core::option::Option<u32>,
4110
4111        pub name: ::core::option::Option<::std::string::String>,
4112    }
4113
4114    impl NodeSetNameRequest {
4115        fn __max_ordinal(&self) -> usize {
4116            if self.name.is_some() {
4117                return 2;
4118            }
4119
4120            if self.priority.is_some() {
4121                return 1;
4122            }
4123
4124            0
4125        }
4126    }
4127
4128    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetNameRequest<'static>, ___E>
4129        for NodeSetNameRequest
4130    where
4131        ___E: ::fidl_next::Encoder + ?Sized,
4132    {
4133        #[inline]
4134        fn encode(
4135            mut self,
4136            encoder: &mut ___E,
4137            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetNameRequest<'static>>,
4138            _: (),
4139        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4140            ::fidl_next::munge!(let crate::wire::NodeSetNameRequest { table } = out);
4141
4142            let max_ord = self.__max_ordinal();
4143
4144            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4145            ::fidl_next::Wire::zero_padding(&mut out);
4146
4147            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4148                ::fidl_next::wire::Envelope,
4149            >(encoder, max_ord);
4150
4151            for i in 1..=max_ord {
4152                match i {
4153                    2 => {
4154                        if let Some(value) = self.name.take() {
4155                            ::fidl_next::wire::Envelope::encode_value::<
4156                                ::fidl_next::wire::String<'static>,
4157                                ___E,
4158                            >(
4159                                value, preallocated.encoder, &mut out, 64
4160                            )?;
4161                        } else {
4162                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4163                        }
4164                    }
4165
4166                    1 => {
4167                        if let Some(value) = self.priority.take() {
4168                            ::fidl_next::wire::Envelope::encode_value::<
4169                                ::fidl_next::wire::Uint32,
4170                                ___E,
4171                            >(
4172                                value, preallocated.encoder, &mut out, ()
4173                            )?;
4174                        } else {
4175                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4176                        }
4177                    }
4178
4179                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4180                }
4181                unsafe {
4182                    preallocated.write_next(out.assume_init_ref());
4183                }
4184            }
4185
4186            ::fidl_next::wire::Table::encode_len(table, max_ord);
4187
4188            Ok(())
4189        }
4190    }
4191
4192    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSetNameRequest<'static>, ___E>
4193        for &'a NodeSetNameRequest
4194    where
4195        ___E: ::fidl_next::Encoder + ?Sized,
4196    {
4197        #[inline]
4198        fn encode(
4199            self,
4200            encoder: &mut ___E,
4201            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetNameRequest<'static>>,
4202            _: (),
4203        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4204            ::fidl_next::munge!(let crate::wire::NodeSetNameRequest { table } = out);
4205
4206            let max_ord = self.__max_ordinal();
4207
4208            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4209            ::fidl_next::Wire::zero_padding(&mut out);
4210
4211            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4212                ::fidl_next::wire::Envelope,
4213            >(encoder, max_ord);
4214
4215            for i in 1..=max_ord {
4216                match i {
4217                    2 => {
4218                        if let Some(value) = &self.name {
4219                            ::fidl_next::wire::Envelope::encode_value::<
4220                                ::fidl_next::wire::String<'static>,
4221                                ___E,
4222                            >(
4223                                value, preallocated.encoder, &mut out, 64
4224                            )?;
4225                        } else {
4226                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4227                        }
4228                    }
4229
4230                    1 => {
4231                        if let Some(value) = &self.priority {
4232                            ::fidl_next::wire::Envelope::encode_value::<
4233                                ::fidl_next::wire::Uint32,
4234                                ___E,
4235                            >(
4236                                value, preallocated.encoder, &mut out, ()
4237                            )?;
4238                        } else {
4239                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4240                        }
4241                    }
4242
4243                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4244                }
4245                unsafe {
4246                    preallocated.write_next(out.assume_init_ref());
4247                }
4248            }
4249
4250            ::fidl_next::wire::Table::encode_len(table, max_ord);
4251
4252            Ok(())
4253        }
4254    }
4255
4256    impl<'de> ::fidl_next::FromWire<crate::wire::NodeSetNameRequest<'de>> for NodeSetNameRequest {
4257        #[inline]
4258        fn from_wire(wire_: crate::wire::NodeSetNameRequest<'de>) -> Self {
4259            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4260
4261            let priority = wire_.table.get(1);
4262
4263            let name = wire_.table.get(2);
4264
4265            Self {
4266                priority: priority.map(|envelope| {
4267                    ::fidl_next::FromWire::from_wire(unsafe {
4268                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
4269                    })
4270                }),
4271
4272                name: name.map(|envelope| {
4273                    ::fidl_next::FromWire::from_wire(unsafe {
4274                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
4275                    })
4276                }),
4277            }
4278        }
4279    }
4280
4281    impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeSetNameRequest<'de>> for NodeSetNameRequest {
4282        #[inline]
4283        fn from_wire_ref(wire: &crate::wire::NodeSetNameRequest<'de>) -> Self {
4284            Self {
4285                priority: wire.table.get(1).map(|envelope| {
4286                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4287                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
4288                    })
4289                }),
4290
4291                name: wire.table.get(2).map(|envelope| {
4292                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4293                        envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
4294                    })
4295                }),
4296            }
4297        }
4298    }
4299
4300    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4301    pub struct NodeSetDebugClientInfoRequest {
4302        pub name: ::core::option::Option<::std::string::String>,
4303
4304        pub id: ::core::option::Option<u64>,
4305    }
4306
4307    impl NodeSetDebugClientInfoRequest {
4308        fn __max_ordinal(&self) -> usize {
4309            if self.id.is_some() {
4310                return 2;
4311            }
4312
4313            if self.name.is_some() {
4314                return 1;
4315            }
4316
4317            0
4318        }
4319    }
4320
4321    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetDebugClientInfoRequest<'static>, ___E>
4322        for NodeSetDebugClientInfoRequest
4323    where
4324        ___E: ::fidl_next::Encoder + ?Sized,
4325    {
4326        #[inline]
4327        fn encode(
4328            mut self,
4329            encoder: &mut ___E,
4330            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetDebugClientInfoRequest<'static>>,
4331            _: (),
4332        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4333            ::fidl_next::munge!(let crate::wire::NodeSetDebugClientInfoRequest { table } = out);
4334
4335            let max_ord = self.__max_ordinal();
4336
4337            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4338            ::fidl_next::Wire::zero_padding(&mut out);
4339
4340            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4341                ::fidl_next::wire::Envelope,
4342            >(encoder, max_ord);
4343
4344            for i in 1..=max_ord {
4345                match i {
4346                    2 => {
4347                        if let Some(value) = self.id.take() {
4348                            ::fidl_next::wire::Envelope::encode_value::<
4349                                ::fidl_next::wire::Uint64,
4350                                ___E,
4351                            >(
4352                                value, preallocated.encoder, &mut out, ()
4353                            )?;
4354                        } else {
4355                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4356                        }
4357                    }
4358
4359                    1 => {
4360                        if let Some(value) = self.name.take() {
4361                            ::fidl_next::wire::Envelope::encode_value::<
4362                                ::fidl_next::wire::String<'static>,
4363                                ___E,
4364                            >(
4365                                value, preallocated.encoder, &mut out, 256
4366                            )?;
4367                        } else {
4368                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4369                        }
4370                    }
4371
4372                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4373                }
4374                unsafe {
4375                    preallocated.write_next(out.assume_init_ref());
4376                }
4377            }
4378
4379            ::fidl_next::wire::Table::encode_len(table, max_ord);
4380
4381            Ok(())
4382        }
4383    }
4384
4385    unsafe impl<'a, ___E>
4386        ::fidl_next::Encode<crate::wire::NodeSetDebugClientInfoRequest<'static>, ___E>
4387        for &'a NodeSetDebugClientInfoRequest
4388    where
4389        ___E: ::fidl_next::Encoder + ?Sized,
4390    {
4391        #[inline]
4392        fn encode(
4393            self,
4394            encoder: &mut ___E,
4395            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetDebugClientInfoRequest<'static>>,
4396            _: (),
4397        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4398            ::fidl_next::munge!(let crate::wire::NodeSetDebugClientInfoRequest { table } = out);
4399
4400            let max_ord = self.__max_ordinal();
4401
4402            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4403            ::fidl_next::Wire::zero_padding(&mut out);
4404
4405            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4406                ::fidl_next::wire::Envelope,
4407            >(encoder, max_ord);
4408
4409            for i in 1..=max_ord {
4410                match i {
4411                    2 => {
4412                        if let Some(value) = &self.id {
4413                            ::fidl_next::wire::Envelope::encode_value::<
4414                                ::fidl_next::wire::Uint64,
4415                                ___E,
4416                            >(
4417                                value, preallocated.encoder, &mut out, ()
4418                            )?;
4419                        } else {
4420                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4421                        }
4422                    }
4423
4424                    1 => {
4425                        if let Some(value) = &self.name {
4426                            ::fidl_next::wire::Envelope::encode_value::<
4427                                ::fidl_next::wire::String<'static>,
4428                                ___E,
4429                            >(
4430                                value, preallocated.encoder, &mut out, 256
4431                            )?;
4432                        } else {
4433                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4434                        }
4435                    }
4436
4437                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4438                }
4439                unsafe {
4440                    preallocated.write_next(out.assume_init_ref());
4441                }
4442            }
4443
4444            ::fidl_next::wire::Table::encode_len(table, max_ord);
4445
4446            Ok(())
4447        }
4448    }
4449
4450    impl<'de> ::fidl_next::FromWire<crate::wire::NodeSetDebugClientInfoRequest<'de>>
4451        for NodeSetDebugClientInfoRequest
4452    {
4453        #[inline]
4454        fn from_wire(wire_: crate::wire::NodeSetDebugClientInfoRequest<'de>) -> Self {
4455            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4456
4457            let name = wire_.table.get(1);
4458
4459            let id = wire_.table.get(2);
4460
4461            Self {
4462                name: name.map(|envelope| {
4463                    ::fidl_next::FromWire::from_wire(unsafe {
4464                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
4465                    })
4466                }),
4467
4468                id: id.map(|envelope| {
4469                    ::fidl_next::FromWire::from_wire(unsafe {
4470                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
4471                    })
4472                }),
4473            }
4474        }
4475    }
4476
4477    impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeSetDebugClientInfoRequest<'de>>
4478        for NodeSetDebugClientInfoRequest
4479    {
4480        #[inline]
4481        fn from_wire_ref(wire: &crate::wire::NodeSetDebugClientInfoRequest<'de>) -> Self {
4482            Self {
4483                name: wire.table.get(1).map(|envelope| {
4484                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4485                        envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
4486                    })
4487                }),
4488
4489                id: wire.table.get(2).map(|envelope| {
4490                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4491                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
4492                    })
4493                }),
4494            }
4495        }
4496    }
4497
4498    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4499    pub struct NodeSetDebugTimeoutLogDeadlineRequest {
4500        pub deadline: ::core::option::Option<i64>,
4501    }
4502
4503    impl NodeSetDebugTimeoutLogDeadlineRequest {
4504        fn __max_ordinal(&self) -> usize {
4505            if self.deadline.is_some() {
4506                return 1;
4507            }
4508
4509            0
4510        }
4511    }
4512
4513    unsafe impl<___E>
4514        ::fidl_next::Encode<crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'static>, ___E>
4515        for NodeSetDebugTimeoutLogDeadlineRequest
4516    where
4517        ___E: ::fidl_next::Encoder + ?Sized,
4518    {
4519        #[inline]
4520        fn encode(
4521            mut self,
4522            encoder: &mut ___E,
4523            out: &mut ::core::mem::MaybeUninit<
4524                crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'static>,
4525            >,
4526            _: (),
4527        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4528            ::fidl_next::munge!(let crate::wire::NodeSetDebugTimeoutLogDeadlineRequest { table } = out);
4529
4530            let max_ord = self.__max_ordinal();
4531
4532            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4533            ::fidl_next::Wire::zero_padding(&mut out);
4534
4535            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4536                ::fidl_next::wire::Envelope,
4537            >(encoder, max_ord);
4538
4539            for i in 1..=max_ord {
4540                match i {
4541                    1 => {
4542                        if let Some(value) = self.deadline.take() {
4543                            ::fidl_next::wire::Envelope::encode_value::<
4544                                ::fidl_next::wire::Int64,
4545                                ___E,
4546                            >(
4547                                value, preallocated.encoder, &mut out, ()
4548                            )?;
4549                        } else {
4550                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4551                        }
4552                    }
4553
4554                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4555                }
4556                unsafe {
4557                    preallocated.write_next(out.assume_init_ref());
4558                }
4559            }
4560
4561            ::fidl_next::wire::Table::encode_len(table, max_ord);
4562
4563            Ok(())
4564        }
4565    }
4566
4567    unsafe impl<'a, ___E>
4568        ::fidl_next::Encode<crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'static>, ___E>
4569        for &'a NodeSetDebugTimeoutLogDeadlineRequest
4570    where
4571        ___E: ::fidl_next::Encoder + ?Sized,
4572    {
4573        #[inline]
4574        fn encode(
4575            self,
4576            encoder: &mut ___E,
4577            out: &mut ::core::mem::MaybeUninit<
4578                crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'static>,
4579            >,
4580            _: (),
4581        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4582            ::fidl_next::munge!(let crate::wire::NodeSetDebugTimeoutLogDeadlineRequest { table } = out);
4583
4584            let max_ord = self.__max_ordinal();
4585
4586            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4587            ::fidl_next::Wire::zero_padding(&mut out);
4588
4589            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4590                ::fidl_next::wire::Envelope,
4591            >(encoder, max_ord);
4592
4593            for i in 1..=max_ord {
4594                match i {
4595                    1 => {
4596                        if let Some(value) = &self.deadline {
4597                            ::fidl_next::wire::Envelope::encode_value::<
4598                                ::fidl_next::wire::Int64,
4599                                ___E,
4600                            >(
4601                                value, preallocated.encoder, &mut out, ()
4602                            )?;
4603                        } else {
4604                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4605                        }
4606                    }
4607
4608                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4609                }
4610                unsafe {
4611                    preallocated.write_next(out.assume_init_ref());
4612                }
4613            }
4614
4615            ::fidl_next::wire::Table::encode_len(table, max_ord);
4616
4617            Ok(())
4618        }
4619    }
4620
4621    impl<'de> ::fidl_next::FromWire<crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'de>>
4622        for NodeSetDebugTimeoutLogDeadlineRequest
4623    {
4624        #[inline]
4625        fn from_wire(wire_: crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'de>) -> Self {
4626            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4627
4628            let deadline = wire_.table.get(1);
4629
4630            Self {
4631                deadline: deadline.map(|envelope| {
4632                    ::fidl_next::FromWire::from_wire(unsafe {
4633                        envelope.read_unchecked::<::fidl_next::wire::Int64>()
4634                    })
4635                }),
4636            }
4637        }
4638    }
4639
4640    impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'de>>
4641        for NodeSetDebugTimeoutLogDeadlineRequest
4642    {
4643        #[inline]
4644        fn from_wire_ref(wire: &crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'de>) -> Self {
4645            Self {
4646                deadline: wire.table.get(1).map(|envelope| {
4647                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4648                        envelope.deref_unchecked::<::fidl_next::wire::Int64>()
4649                    })
4650                }),
4651            }
4652        }
4653    }
4654
4655    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4656    pub struct NodeIsAlternateForResponse {
4657        pub is_alternate: ::core::option::Option<bool>,
4658    }
4659
4660    impl NodeIsAlternateForResponse {
4661        fn __max_ordinal(&self) -> usize {
4662            if self.is_alternate.is_some() {
4663                return 1;
4664            }
4665
4666            0
4667        }
4668    }
4669
4670    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeIsAlternateForResponse<'static>, ___E>
4671        for NodeIsAlternateForResponse
4672    where
4673        ___E: ::fidl_next::Encoder + ?Sized,
4674    {
4675        #[inline]
4676        fn encode(
4677            mut self,
4678            encoder: &mut ___E,
4679            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeIsAlternateForResponse<'static>>,
4680            _: (),
4681        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4682            ::fidl_next::munge!(let crate::wire::NodeIsAlternateForResponse { table } = out);
4683
4684            let max_ord = self.__max_ordinal();
4685
4686            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4687            ::fidl_next::Wire::zero_padding(&mut out);
4688
4689            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4690                ::fidl_next::wire::Envelope,
4691            >(encoder, max_ord);
4692
4693            for i in 1..=max_ord {
4694                match i {
4695                    1 => {
4696                        if let Some(value) = self.is_alternate.take() {
4697                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
4698                                value,
4699                                preallocated.encoder,
4700                                &mut out,
4701                                (),
4702                            )?;
4703                        } else {
4704                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4705                        }
4706                    }
4707
4708                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4709                }
4710                unsafe {
4711                    preallocated.write_next(out.assume_init_ref());
4712                }
4713            }
4714
4715            ::fidl_next::wire::Table::encode_len(table, max_ord);
4716
4717            Ok(())
4718        }
4719    }
4720
4721    unsafe impl<'a, ___E>
4722        ::fidl_next::Encode<crate::wire::NodeIsAlternateForResponse<'static>, ___E>
4723        for &'a NodeIsAlternateForResponse
4724    where
4725        ___E: ::fidl_next::Encoder + ?Sized,
4726    {
4727        #[inline]
4728        fn encode(
4729            self,
4730            encoder: &mut ___E,
4731            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeIsAlternateForResponse<'static>>,
4732            _: (),
4733        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4734            ::fidl_next::munge!(let crate::wire::NodeIsAlternateForResponse { table } = out);
4735
4736            let max_ord = self.__max_ordinal();
4737
4738            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4739            ::fidl_next::Wire::zero_padding(&mut out);
4740
4741            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4742                ::fidl_next::wire::Envelope,
4743            >(encoder, max_ord);
4744
4745            for i in 1..=max_ord {
4746                match i {
4747                    1 => {
4748                        if let Some(value) = &self.is_alternate {
4749                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
4750                                value,
4751                                preallocated.encoder,
4752                                &mut out,
4753                                (),
4754                            )?;
4755                        } else {
4756                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4757                        }
4758                    }
4759
4760                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4761                }
4762                unsafe {
4763                    preallocated.write_next(out.assume_init_ref());
4764                }
4765            }
4766
4767            ::fidl_next::wire::Table::encode_len(table, max_ord);
4768
4769            Ok(())
4770        }
4771    }
4772
4773    impl<'de> ::fidl_next::FromWire<crate::wire::NodeIsAlternateForResponse<'de>>
4774        for NodeIsAlternateForResponse
4775    {
4776        #[inline]
4777        fn from_wire(wire_: crate::wire::NodeIsAlternateForResponse<'de>) -> Self {
4778            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4779
4780            let is_alternate = wire_.table.get(1);
4781
4782            Self {
4783                is_alternate: is_alternate.map(|envelope| {
4784                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
4785                }),
4786            }
4787        }
4788    }
4789
4790    impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeIsAlternateForResponse<'de>>
4791        for NodeIsAlternateForResponse
4792    {
4793        #[inline]
4794        fn from_wire_ref(wire: &crate::wire::NodeIsAlternateForResponse<'de>) -> Self {
4795            Self {
4796                is_alternate: wire.table.get(1).map(|envelope| {
4797                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4798                        envelope.deref_unchecked::<bool>()
4799                    })
4800                }),
4801            }
4802        }
4803    }
4804
4805    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4806    pub struct NodeGetBufferCollectionIdResponse {
4807        pub buffer_collection_id: ::core::option::Option<u64>,
4808    }
4809
4810    impl NodeGetBufferCollectionIdResponse {
4811        fn __max_ordinal(&self) -> usize {
4812            if self.buffer_collection_id.is_some() {
4813                return 1;
4814            }
4815
4816            0
4817        }
4818    }
4819
4820    unsafe impl<___E>
4821        ::fidl_next::Encode<crate::wire::NodeGetBufferCollectionIdResponse<'static>, ___E>
4822        for NodeGetBufferCollectionIdResponse
4823    where
4824        ___E: ::fidl_next::Encoder + ?Sized,
4825    {
4826        #[inline]
4827        fn encode(
4828            mut self,
4829            encoder: &mut ___E,
4830            out: &mut ::core::mem::MaybeUninit<
4831                crate::wire::NodeGetBufferCollectionIdResponse<'static>,
4832            >,
4833            _: (),
4834        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4835            ::fidl_next::munge!(let crate::wire::NodeGetBufferCollectionIdResponse { table } = out);
4836
4837            let max_ord = self.__max_ordinal();
4838
4839            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4840            ::fidl_next::Wire::zero_padding(&mut out);
4841
4842            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4843                ::fidl_next::wire::Envelope,
4844            >(encoder, max_ord);
4845
4846            for i in 1..=max_ord {
4847                match i {
4848                    1 => {
4849                        if let Some(value) = self.buffer_collection_id.take() {
4850                            ::fidl_next::wire::Envelope::encode_value::<
4851                                ::fidl_next::wire::Uint64,
4852                                ___E,
4853                            >(
4854                                value, preallocated.encoder, &mut out, ()
4855                            )?;
4856                        } else {
4857                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4858                        }
4859                    }
4860
4861                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4862                }
4863                unsafe {
4864                    preallocated.write_next(out.assume_init_ref());
4865                }
4866            }
4867
4868            ::fidl_next::wire::Table::encode_len(table, max_ord);
4869
4870            Ok(())
4871        }
4872    }
4873
4874    unsafe impl<'a, ___E>
4875        ::fidl_next::Encode<crate::wire::NodeGetBufferCollectionIdResponse<'static>, ___E>
4876        for &'a NodeGetBufferCollectionIdResponse
4877    where
4878        ___E: ::fidl_next::Encoder + ?Sized,
4879    {
4880        #[inline]
4881        fn encode(
4882            self,
4883            encoder: &mut ___E,
4884            out: &mut ::core::mem::MaybeUninit<
4885                crate::wire::NodeGetBufferCollectionIdResponse<'static>,
4886            >,
4887            _: (),
4888        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4889            ::fidl_next::munge!(let crate::wire::NodeGetBufferCollectionIdResponse { table } = out);
4890
4891            let max_ord = self.__max_ordinal();
4892
4893            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4894            ::fidl_next::Wire::zero_padding(&mut out);
4895
4896            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4897                ::fidl_next::wire::Envelope,
4898            >(encoder, max_ord);
4899
4900            for i in 1..=max_ord {
4901                match i {
4902                    1 => {
4903                        if let Some(value) = &self.buffer_collection_id {
4904                            ::fidl_next::wire::Envelope::encode_value::<
4905                                ::fidl_next::wire::Uint64,
4906                                ___E,
4907                            >(
4908                                value, preallocated.encoder, &mut out, ()
4909                            )?;
4910                        } else {
4911                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4912                        }
4913                    }
4914
4915                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4916                }
4917                unsafe {
4918                    preallocated.write_next(out.assume_init_ref());
4919                }
4920            }
4921
4922            ::fidl_next::wire::Table::encode_len(table, max_ord);
4923
4924            Ok(())
4925        }
4926    }
4927
4928    impl<'de> ::fidl_next::FromWire<crate::wire::NodeGetBufferCollectionIdResponse<'de>>
4929        for NodeGetBufferCollectionIdResponse
4930    {
4931        #[inline]
4932        fn from_wire(wire_: crate::wire::NodeGetBufferCollectionIdResponse<'de>) -> Self {
4933            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4934
4935            let buffer_collection_id = wire_.table.get(1);
4936
4937            Self {
4938                buffer_collection_id: buffer_collection_id.map(|envelope| {
4939                    ::fidl_next::FromWire::from_wire(unsafe {
4940                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
4941                    })
4942                }),
4943            }
4944        }
4945    }
4946
4947    impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeGetBufferCollectionIdResponse<'de>>
4948        for NodeGetBufferCollectionIdResponse
4949    {
4950        #[inline]
4951        fn from_wire_ref(wire: &crate::wire::NodeGetBufferCollectionIdResponse<'de>) -> Self {
4952            Self {
4953                buffer_collection_id: wire.table.get(1).map(|envelope| {
4954                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4955                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
4956                    })
4957                }),
4958            }
4959        }
4960    }
4961
4962    pub type BufferCollectionCheckAllBuffersAllocatedResponse = ();
4963
4964    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4965    pub struct BufferCollectionTokenDuplicateSyncRequest {
4966        pub rights_attenuation_masks:
4967            ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::Rights>>,
4968    }
4969
4970    impl BufferCollectionTokenDuplicateSyncRequest {
4971        fn __max_ordinal(&self) -> usize {
4972            if self.rights_attenuation_masks.is_some() {
4973                return 1;
4974            }
4975
4976            0
4977        }
4978    }
4979
4980    unsafe impl<___E>
4981        ::fidl_next::Encode<crate::wire::BufferCollectionTokenDuplicateSyncRequest<'static>, ___E>
4982        for BufferCollectionTokenDuplicateSyncRequest
4983    where
4984        ___E: ::fidl_next::Encoder + ?Sized,
4985    {
4986        #[inline]
4987        fn encode(
4988            mut self,
4989            encoder: &mut ___E,
4990            out: &mut ::core::mem::MaybeUninit<
4991                crate::wire::BufferCollectionTokenDuplicateSyncRequest<'static>,
4992            >,
4993            _: (),
4994        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4995            ::fidl_next::munge!(let crate::wire::BufferCollectionTokenDuplicateSyncRequest { table } = out);
4996
4997            let max_ord = self.__max_ordinal();
4998
4999            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5000            ::fidl_next::Wire::zero_padding(&mut out);
5001
5002            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5003                ::fidl_next::wire::Envelope,
5004            >(encoder, max_ord);
5005
5006            for i in 1..=max_ord {
5007                match i {
5008                    1 => {
5009                        if let Some(value) = self.rights_attenuation_masks.take() {
5010                            ::fidl_next::wire::Envelope::encode_value::<
5011                                ::fidl_next::wire::Vector<
5012                                    'static,
5013                                    ::fidl_next::wire::fuchsia::Rights,
5014                                >,
5015                                ___E,
5016                            >(
5017                                value, preallocated.encoder, &mut out, (64, ())
5018                            )?;
5019                        } else {
5020                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5021                        }
5022                    }
5023
5024                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5025                }
5026                unsafe {
5027                    preallocated.write_next(out.assume_init_ref());
5028                }
5029            }
5030
5031            ::fidl_next::wire::Table::encode_len(table, max_ord);
5032
5033            Ok(())
5034        }
5035    }
5036
5037    unsafe impl<'a, ___E>
5038        ::fidl_next::Encode<crate::wire::BufferCollectionTokenDuplicateSyncRequest<'static>, ___E>
5039        for &'a BufferCollectionTokenDuplicateSyncRequest
5040    where
5041        ___E: ::fidl_next::Encoder + ?Sized,
5042    {
5043        #[inline]
5044        fn encode(
5045            self,
5046            encoder: &mut ___E,
5047            out: &mut ::core::mem::MaybeUninit<
5048                crate::wire::BufferCollectionTokenDuplicateSyncRequest<'static>,
5049            >,
5050            _: (),
5051        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5052            ::fidl_next::munge!(let crate::wire::BufferCollectionTokenDuplicateSyncRequest { table } = out);
5053
5054            let max_ord = self.__max_ordinal();
5055
5056            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5057            ::fidl_next::Wire::zero_padding(&mut out);
5058
5059            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5060                ::fidl_next::wire::Envelope,
5061            >(encoder, max_ord);
5062
5063            for i in 1..=max_ord {
5064                match i {
5065                    1 => {
5066                        if let Some(value) = &self.rights_attenuation_masks {
5067                            ::fidl_next::wire::Envelope::encode_value::<
5068                                ::fidl_next::wire::Vector<
5069                                    'static,
5070                                    ::fidl_next::wire::fuchsia::Rights,
5071                                >,
5072                                ___E,
5073                            >(
5074                                value, preallocated.encoder, &mut out, (64, ())
5075                            )?;
5076                        } else {
5077                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5078                        }
5079                    }
5080
5081                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5082                }
5083                unsafe {
5084                    preallocated.write_next(out.assume_init_ref());
5085                }
5086            }
5087
5088            ::fidl_next::wire::Table::encode_len(table, max_ord);
5089
5090            Ok(())
5091        }
5092    }
5093
5094    impl<'de> ::fidl_next::FromWire<crate::wire::BufferCollectionTokenDuplicateSyncRequest<'de>>
5095        for BufferCollectionTokenDuplicateSyncRequest
5096    {
5097        #[inline]
5098        fn from_wire(wire_: crate::wire::BufferCollectionTokenDuplicateSyncRequest<'de>) -> Self {
5099            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5100
5101            let rights_attenuation_masks = wire_.table.get(1);
5102
5103            Self {
5104
5105
5106                rights_attenuation_masks: rights_attenuation_masks.map(|envelope| ::fidl_next::FromWire::from_wire(
5107                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>>() }
5108                )),
5109
5110        }
5111        }
5112    }
5113
5114    impl<'de> ::fidl_next::FromWireRef<crate::wire::BufferCollectionTokenDuplicateSyncRequest<'de>>
5115        for BufferCollectionTokenDuplicateSyncRequest
5116    {
5117        #[inline]
5118        fn from_wire_ref(
5119            wire: &crate::wire::BufferCollectionTokenDuplicateSyncRequest<'de>,
5120        ) -> Self {
5121            Self {
5122
5123
5124                rights_attenuation_masks: wire.table.get(1)
5125                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5126                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>>() }
5127                    )),
5128
5129        }
5130        }
5131    }
5132
5133    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5134    pub struct BufferCollectionTokenGroupCreateChildrenSyncRequest {
5135        pub rights_attenuation_masks:
5136            ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::Rights>>,
5137    }
5138
5139    impl BufferCollectionTokenGroupCreateChildrenSyncRequest {
5140        fn __max_ordinal(&self) -> usize {
5141            if self.rights_attenuation_masks.is_some() {
5142                return 1;
5143            }
5144
5145            0
5146        }
5147    }
5148
5149    unsafe impl<___E>
5150        ::fidl_next::Encode<
5151            crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'static>,
5152            ___E,
5153        > for BufferCollectionTokenGroupCreateChildrenSyncRequest
5154    where
5155        ___E: ::fidl_next::Encoder + ?Sized,
5156    {
5157        #[inline]
5158        fn encode(
5159            mut self,
5160            encoder: &mut ___E,
5161            out: &mut ::core::mem::MaybeUninit<
5162                crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'static>,
5163            >,
5164            _: (),
5165        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5166            ::fidl_next::munge!(let crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest { table } = out);
5167
5168            let max_ord = self.__max_ordinal();
5169
5170            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5171            ::fidl_next::Wire::zero_padding(&mut out);
5172
5173            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5174                ::fidl_next::wire::Envelope,
5175            >(encoder, max_ord);
5176
5177            for i in 1..=max_ord {
5178                match i {
5179                    1 => {
5180                        if let Some(value) = self.rights_attenuation_masks.take() {
5181                            ::fidl_next::wire::Envelope::encode_value::<
5182                                ::fidl_next::wire::Vector<
5183                                    'static,
5184                                    ::fidl_next::wire::fuchsia::Rights,
5185                                >,
5186                                ___E,
5187                            >(
5188                                value, preallocated.encoder, &mut out, (64, ())
5189                            )?;
5190                        } else {
5191                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5192                        }
5193                    }
5194
5195                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5196                }
5197                unsafe {
5198                    preallocated.write_next(out.assume_init_ref());
5199                }
5200            }
5201
5202            ::fidl_next::wire::Table::encode_len(table, max_ord);
5203
5204            Ok(())
5205        }
5206    }
5207
5208    unsafe impl<'a, ___E>
5209        ::fidl_next::Encode<
5210            crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'static>,
5211            ___E,
5212        > for &'a BufferCollectionTokenGroupCreateChildrenSyncRequest
5213    where
5214        ___E: ::fidl_next::Encoder + ?Sized,
5215    {
5216        #[inline]
5217        fn encode(
5218            self,
5219            encoder: &mut ___E,
5220            out: &mut ::core::mem::MaybeUninit<
5221                crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'static>,
5222            >,
5223            _: (),
5224        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5225            ::fidl_next::munge!(let crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest { table } = out);
5226
5227            let max_ord = self.__max_ordinal();
5228
5229            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5230            ::fidl_next::Wire::zero_padding(&mut out);
5231
5232            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5233                ::fidl_next::wire::Envelope,
5234            >(encoder, max_ord);
5235
5236            for i in 1..=max_ord {
5237                match i {
5238                    1 => {
5239                        if let Some(value) = &self.rights_attenuation_masks {
5240                            ::fidl_next::wire::Envelope::encode_value::<
5241                                ::fidl_next::wire::Vector<
5242                                    'static,
5243                                    ::fidl_next::wire::fuchsia::Rights,
5244                                >,
5245                                ___E,
5246                            >(
5247                                value, preallocated.encoder, &mut out, (64, ())
5248                            )?;
5249                        } else {
5250                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5251                        }
5252                    }
5253
5254                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5255                }
5256                unsafe {
5257                    preallocated.write_next(out.assume_init_ref());
5258                }
5259            }
5260
5261            ::fidl_next::wire::Table::encode_len(table, max_ord);
5262
5263            Ok(())
5264        }
5265    }
5266
5267    impl<'de>
5268        ::fidl_next::FromWire<crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'de>>
5269        for BufferCollectionTokenGroupCreateChildrenSyncRequest
5270    {
5271        #[inline]
5272        fn from_wire(
5273            wire_: crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'de>,
5274        ) -> Self {
5275            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5276
5277            let rights_attenuation_masks = wire_.table.get(1);
5278
5279            Self {
5280
5281
5282                rights_attenuation_masks: rights_attenuation_masks.map(|envelope| ::fidl_next::FromWire::from_wire(
5283                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>>() }
5284                )),
5285
5286        }
5287        }
5288    }
5289
5290    impl<'de>
5291        ::fidl_next::FromWireRef<
5292            crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'de>,
5293        > for BufferCollectionTokenGroupCreateChildrenSyncRequest
5294    {
5295        #[inline]
5296        fn from_wire_ref(
5297            wire: &crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'de>,
5298        ) -> Self {
5299            Self {
5300
5301
5302                rights_attenuation_masks: wire.table.get(1)
5303                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5304                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>>() }
5305                    )),
5306
5307        }
5308        }
5309    }
5310
5311    #[doc = " Entries which have the same pixel_format, pixel_format_modifier, and\n required_usage_bits as a previous entry will override that previous entry.\n For matching purposes, an absent pixel_format_modifier matches LINEAR, and\n an absent required_buffer_usage_bits matches all-0 usage bits.\n"]
5312    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5313    pub struct FormatCostKey {
5314        pub pixel_format:
5315            ::core::option::Option<::fidl_next_common_fuchsia_images2::natural::PixelFormat>,
5316
5317        pub pixel_format_modifier: ::core::option::Option<
5318            ::fidl_next_common_fuchsia_images2::natural::PixelFormatModifier,
5319        >,
5320
5321        pub buffer_usage_bits: ::core::option::Option<crate::natural::BufferUsage>,
5322    }
5323
5324    impl FormatCostKey {
5325        fn __max_ordinal(&self) -> usize {
5326            if self.buffer_usage_bits.is_some() {
5327                return 3;
5328            }
5329
5330            if self.pixel_format_modifier.is_some() {
5331                return 2;
5332            }
5333
5334            if self.pixel_format.is_some() {
5335                return 1;
5336            }
5337
5338            0
5339        }
5340    }
5341
5342    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FormatCostKey<'static>, ___E> for FormatCostKey
5343    where
5344        ___E: ::fidl_next::Encoder + ?Sized,
5345    {
5346        #[inline]
5347        fn encode(
5348            mut self,
5349            encoder: &mut ___E,
5350            out: &mut ::core::mem::MaybeUninit<crate::wire::FormatCostKey<'static>>,
5351            _: (),
5352        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5353            ::fidl_next::munge!(let crate::wire::FormatCostKey { table } = out);
5354
5355            let max_ord = self.__max_ordinal();
5356
5357            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5358            ::fidl_next::Wire::zero_padding(&mut out);
5359
5360            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5361                ::fidl_next::wire::Envelope,
5362            >(encoder, max_ord);
5363
5364            for i in 1..=max_ord {
5365                match i {
5366                    3 => {
5367                        if let Some(value) = self.buffer_usage_bits.take() {
5368                            ::fidl_next::wire::Envelope::encode_value::<
5369                                crate::wire::BufferUsage<'static>,
5370                                ___E,
5371                            >(
5372                                value, preallocated.encoder, &mut out, ()
5373                            )?;
5374                        } else {
5375                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5376                        }
5377                    }
5378
5379                    2 => {
5380                        if let Some(value) = self.pixel_format_modifier.take() {
5381                            ::fidl_next::wire::Envelope::encode_value::<
5382                                ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
5383                                ___E,
5384                            >(
5385                                value, preallocated.encoder, &mut out, ()
5386                            )?;
5387                        } else {
5388                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5389                        }
5390                    }
5391
5392                    1 => {
5393                        if let Some(value) = self.pixel_format.take() {
5394                            ::fidl_next::wire::Envelope::encode_value::<
5395                                ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
5396                                ___E,
5397                            >(
5398                                value, preallocated.encoder, &mut out, ()
5399                            )?;
5400                        } else {
5401                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5402                        }
5403                    }
5404
5405                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5406                }
5407                unsafe {
5408                    preallocated.write_next(out.assume_init_ref());
5409                }
5410            }
5411
5412            ::fidl_next::wire::Table::encode_len(table, max_ord);
5413
5414            Ok(())
5415        }
5416    }
5417
5418    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FormatCostKey<'static>, ___E>
5419        for &'a FormatCostKey
5420    where
5421        ___E: ::fidl_next::Encoder + ?Sized,
5422    {
5423        #[inline]
5424        fn encode(
5425            self,
5426            encoder: &mut ___E,
5427            out: &mut ::core::mem::MaybeUninit<crate::wire::FormatCostKey<'static>>,
5428            _: (),
5429        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5430            ::fidl_next::munge!(let crate::wire::FormatCostKey { table } = out);
5431
5432            let max_ord = self.__max_ordinal();
5433
5434            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5435            ::fidl_next::Wire::zero_padding(&mut out);
5436
5437            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5438                ::fidl_next::wire::Envelope,
5439            >(encoder, max_ord);
5440
5441            for i in 1..=max_ord {
5442                match i {
5443                    3 => {
5444                        if let Some(value) = &self.buffer_usage_bits {
5445                            ::fidl_next::wire::Envelope::encode_value::<
5446                                crate::wire::BufferUsage<'static>,
5447                                ___E,
5448                            >(
5449                                value, preallocated.encoder, &mut out, ()
5450                            )?;
5451                        } else {
5452                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5453                        }
5454                    }
5455
5456                    2 => {
5457                        if let Some(value) = &self.pixel_format_modifier {
5458                            ::fidl_next::wire::Envelope::encode_value::<
5459                                ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
5460                                ___E,
5461                            >(
5462                                value, preallocated.encoder, &mut out, ()
5463                            )?;
5464                        } else {
5465                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5466                        }
5467                    }
5468
5469                    1 => {
5470                        if let Some(value) = &self.pixel_format {
5471                            ::fidl_next::wire::Envelope::encode_value::<
5472                                ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
5473                                ___E,
5474                            >(
5475                                value, preallocated.encoder, &mut out, ()
5476                            )?;
5477                        } else {
5478                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5479                        }
5480                    }
5481
5482                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5483                }
5484                unsafe {
5485                    preallocated.write_next(out.assume_init_ref());
5486                }
5487            }
5488
5489            ::fidl_next::wire::Table::encode_len(table, max_ord);
5490
5491            Ok(())
5492        }
5493    }
5494
5495    impl<'de> ::fidl_next::FromWire<crate::wire::FormatCostKey<'de>> for FormatCostKey {
5496        #[inline]
5497        fn from_wire(wire_: crate::wire::FormatCostKey<'de>) -> Self {
5498            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5499
5500            let pixel_format = wire_.table.get(1);
5501
5502            let pixel_format_modifier = wire_.table.get(2);
5503
5504            let buffer_usage_bits = wire_.table.get(3);
5505
5506            Self {
5507
5508
5509                pixel_format: pixel_format.map(|envelope| ::fidl_next::FromWire::from_wire(
5510                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormat>() }
5511                )),
5512
5513
5514                pixel_format_modifier: pixel_format_modifier.map(|envelope| ::fidl_next::FromWire::from_wire(
5515                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>() }
5516                )),
5517
5518
5519                buffer_usage_bits: buffer_usage_bits.map(|envelope| ::fidl_next::FromWire::from_wire(
5520                    unsafe { envelope.read_unchecked::<crate::wire::BufferUsage<'de>>() }
5521                )),
5522
5523        }
5524        }
5525    }
5526
5527    impl<'de> ::fidl_next::FromWireRef<crate::wire::FormatCostKey<'de>> for FormatCostKey {
5528        #[inline]
5529        fn from_wire_ref(wire: &crate::wire::FormatCostKey<'de>) -> Self {
5530            Self {
5531
5532
5533                pixel_format: wire.table.get(1)
5534                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5535                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormat>() }
5536                    )),
5537
5538
5539                pixel_format_modifier: wire.table.get(2)
5540                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5541                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>() }
5542                    )),
5543
5544
5545                buffer_usage_bits: wire.table.get(3)
5546                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5547                        unsafe { envelope.deref_unchecked::<crate::wire::BufferUsage<'de>>() }
5548                    )),
5549
5550        }
5551        }
5552    }
5553
5554    #[doc = " A FormatCostEntry can be used to influence which PixelFormatAndModifier is\n chosen for a buffer collection, optionally taking BufferUsage into account.\n\n The default cost is f32::MAX, so any specified cost with a non-MAX value\n will prefer the specified format over any formats that don\'t have any\n FormatCost entry.\n\n Entries which have the same pixel_format, pixel_format_modifier, and\n required_usage_bits as a previous entry will override that previous entry.\n For matching purposes, an absent pixel_format_modifier matches LINEAR, and\n an absent required_buffer_usage_bits matches all-0 usage bits.\n\n Board info sysmem_defaults entries are logically before platform sysmem\n entries.\n\n Sysmem uses the resulting aggregated list of FormatCostEntry(s) when\n breaking ties among the set of formats which are supported by all\n participants of a buffer collection. For each mutually-supported format,\n entries with non-matching format are ignored, and entries with extra\n buffer_usage_bits set are ignored. Among the remaining entries, the entry\n with the most usage bits in common with the aggregated participant usages is\n selected to determine the cost (if a tie, the later entry wins). Then the\n format with the lowest cost is chosen. If it\'s still a tie (equal cost), the\n tie is broken arbitrarily but not randomly.\n\n This is not intended as a mechanism to disallow selection of a format that\n is supported by all participants of a buffer collection. If a participant\n claims support for a format but fails to handle that format correctly, it\n should be fixed to handle that format correctly or changed to stop claiming\n support for that format.\n\n This mechanism is intended to influence format selection toward more\n efficient formats with better performance, lower memory bandwidth usage,\n etc, for a given set of usage bits, taking into account quirks that may be\n unique to a given board or overall platform config.\n"]
5555    #[derive(Debug, Default, Copy, Clone, PartialEq, PartialOrd)]
5556    pub struct FormatCostEntry {
5557        pub key: ::core::option::Option<crate::natural::FormatCostKey>,
5558
5559        pub cost: ::core::option::Option<f32>,
5560    }
5561
5562    impl FormatCostEntry {
5563        fn __max_ordinal(&self) -> usize {
5564            if self.cost.is_some() {
5565                return 2;
5566            }
5567
5568            if self.key.is_some() {
5569                return 1;
5570            }
5571
5572            0
5573        }
5574    }
5575
5576    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FormatCostEntry<'static>, ___E>
5577        for FormatCostEntry
5578    where
5579        ___E: ::fidl_next::Encoder + ?Sized,
5580    {
5581        #[inline]
5582        fn encode(
5583            mut self,
5584            encoder: &mut ___E,
5585            out: &mut ::core::mem::MaybeUninit<crate::wire::FormatCostEntry<'static>>,
5586            _: (),
5587        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5588            ::fidl_next::munge!(let crate::wire::FormatCostEntry { table } = out);
5589
5590            let max_ord = self.__max_ordinal();
5591
5592            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5593            ::fidl_next::Wire::zero_padding(&mut out);
5594
5595            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5596                ::fidl_next::wire::Envelope,
5597            >(encoder, max_ord);
5598
5599            for i in 1..=max_ord {
5600                match i {
5601                    2 => {
5602                        if let Some(value) = self.cost.take() {
5603                            ::fidl_next::wire::Envelope::encode_value::<
5604                                ::fidl_next::wire::Float32,
5605                                ___E,
5606                            >(
5607                                value, preallocated.encoder, &mut out, ()
5608                            )?;
5609                        } else {
5610                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5611                        }
5612                    }
5613
5614                    1 => {
5615                        if let Some(value) = self.key.take() {
5616                            ::fidl_next::wire::Envelope::encode_value::<
5617                                crate::wire::FormatCostKey<'static>,
5618                                ___E,
5619                            >(
5620                                value, preallocated.encoder, &mut out, ()
5621                            )?;
5622                        } else {
5623                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5624                        }
5625                    }
5626
5627                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5628                }
5629                unsafe {
5630                    preallocated.write_next(out.assume_init_ref());
5631                }
5632            }
5633
5634            ::fidl_next::wire::Table::encode_len(table, max_ord);
5635
5636            Ok(())
5637        }
5638    }
5639
5640    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FormatCostEntry<'static>, ___E>
5641        for &'a FormatCostEntry
5642    where
5643        ___E: ::fidl_next::Encoder + ?Sized,
5644    {
5645        #[inline]
5646        fn encode(
5647            self,
5648            encoder: &mut ___E,
5649            out: &mut ::core::mem::MaybeUninit<crate::wire::FormatCostEntry<'static>>,
5650            _: (),
5651        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5652            ::fidl_next::munge!(let crate::wire::FormatCostEntry { table } = out);
5653
5654            let max_ord = self.__max_ordinal();
5655
5656            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5657            ::fidl_next::Wire::zero_padding(&mut out);
5658
5659            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5660                ::fidl_next::wire::Envelope,
5661            >(encoder, max_ord);
5662
5663            for i in 1..=max_ord {
5664                match i {
5665                    2 => {
5666                        if let Some(value) = &self.cost {
5667                            ::fidl_next::wire::Envelope::encode_value::<
5668                                ::fidl_next::wire::Float32,
5669                                ___E,
5670                            >(
5671                                value, preallocated.encoder, &mut out, ()
5672                            )?;
5673                        } else {
5674                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5675                        }
5676                    }
5677
5678                    1 => {
5679                        if let Some(value) = &self.key {
5680                            ::fidl_next::wire::Envelope::encode_value::<
5681                                crate::wire::FormatCostKey<'static>,
5682                                ___E,
5683                            >(
5684                                value, preallocated.encoder, &mut out, ()
5685                            )?;
5686                        } else {
5687                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5688                        }
5689                    }
5690
5691                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5692                }
5693                unsafe {
5694                    preallocated.write_next(out.assume_init_ref());
5695                }
5696            }
5697
5698            ::fidl_next::wire::Table::encode_len(table, max_ord);
5699
5700            Ok(())
5701        }
5702    }
5703
5704    impl<'de> ::fidl_next::FromWire<crate::wire::FormatCostEntry<'de>> for FormatCostEntry {
5705        #[inline]
5706        fn from_wire(wire_: crate::wire::FormatCostEntry<'de>) -> Self {
5707            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5708
5709            let key = wire_.table.get(1);
5710
5711            let cost = wire_.table.get(2);
5712
5713            Self {
5714                key: key.map(|envelope| {
5715                    ::fidl_next::FromWire::from_wire(unsafe {
5716                        envelope.read_unchecked::<crate::wire::FormatCostKey<'de>>()
5717                    })
5718                }),
5719
5720                cost: cost.map(|envelope| {
5721                    ::fidl_next::FromWire::from_wire(unsafe {
5722                        envelope.read_unchecked::<::fidl_next::wire::Float32>()
5723                    })
5724                }),
5725            }
5726        }
5727    }
5728
5729    impl<'de> ::fidl_next::FromWireRef<crate::wire::FormatCostEntry<'de>> for FormatCostEntry {
5730        #[inline]
5731        fn from_wire_ref(wire: &crate::wire::FormatCostEntry<'de>) -> Self {
5732            Self {
5733                key: wire.table.get(1).map(|envelope| {
5734                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5735                        envelope.deref_unchecked::<crate::wire::FormatCostKey<'de>>()
5736                    })
5737                }),
5738
5739                cost: wire.table.get(2).map(|envelope| {
5740                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5741                        envelope.deref_unchecked::<::fidl_next::wire::Float32>()
5742                    })
5743                }),
5744            }
5745        }
5746    }
5747
5748    #[doc = " This type is fidl::Persist()\'ed in the sysmem_config.persistent_fidl file\n within the sysmem domain config by the assembly tool, and read by the sysmem\n driver.\n\n Normally json[5] would be preferable for config, but we generate this config\n in rust using FIDL types (to avoid repetition and to take advantage of FIDL\n rust codegen), and there\'s no json schema for FIDL types.\n\n Currently there is no mechanism to change anything in this config at runtime\n or from boot to boot. This config is static per run of the assembly tool.\n\n See src/lib/assembly/config_schema/src/platform_config/sysmem_config.rs for\n aspects of sysmem config which are specified directly inline in board info\n or assembly platform config. The two parts of sysmem config don\'t\n (currently) overlap. The config here is for aspects of sysmem config which\n would be too verbose for direct inclusion in board info or assembly platform\n config. In addition, some/most of the pixel format cost entries are\n programmatically generated (as of this comment).\n\n Prior to aggregation by assembly tool, there are multiple .persistent_fidl\n files each storing its own Config instance. The board info and assembly\n platform config lists the input persistent_fidl files, with board info\n logically before assembly platform config. The overall list of files is\n processed, which allows later files to override/replace info in prior files.\n\n Because this type is only intended for use with persistent fidl, where the\n length of a serialized instance isn\'t bounded, we don\'t bound the internal\n vector element counts.\n"]
5749    #[derive(Debug, Default, Clone, PartialEq, PartialOrd)]
5750    pub struct Config {
5751        pub format_costs: ::core::option::Option<::std::vec::Vec<crate::natural::FormatCostEntry>>,
5752    }
5753
5754    impl Config {
5755        fn __max_ordinal(&self) -> usize {
5756            if self.format_costs.is_some() {
5757                return 1;
5758            }
5759
5760            0
5761        }
5762    }
5763
5764    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Config<'static>, ___E> for Config
5765    where
5766        ___E: ::fidl_next::Encoder + ?Sized,
5767    {
5768        #[inline]
5769        fn encode(
5770            mut self,
5771            encoder: &mut ___E,
5772            out: &mut ::core::mem::MaybeUninit<crate::wire::Config<'static>>,
5773            _: (),
5774        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5775            ::fidl_next::munge!(let crate::wire::Config { table } = out);
5776
5777            let max_ord = self.__max_ordinal();
5778
5779            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5780            ::fidl_next::Wire::zero_padding(&mut out);
5781
5782            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5783                ::fidl_next::wire::Envelope,
5784            >(encoder, max_ord);
5785
5786            for i in 1..=max_ord {
5787                match i {
5788                    1 => {
5789                        if let Some(value) = self.format_costs.take() {
5790                            ::fidl_next::wire::Envelope::encode_value::<
5791                                ::fidl_next::wire::Vector<
5792                                    'static,
5793                                    crate::wire::FormatCostEntry<'static>,
5794                                >,
5795                                ___E,
5796                            >(
5797                                value, preallocated.encoder, &mut out, (4294967295, ())
5798                            )?;
5799                        } else {
5800                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5801                        }
5802                    }
5803
5804                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5805                }
5806                unsafe {
5807                    preallocated.write_next(out.assume_init_ref());
5808                }
5809            }
5810
5811            ::fidl_next::wire::Table::encode_len(table, max_ord);
5812
5813            Ok(())
5814        }
5815    }
5816
5817    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Config<'static>, ___E> for &'a Config
5818    where
5819        ___E: ::fidl_next::Encoder + ?Sized,
5820    {
5821        #[inline]
5822        fn encode(
5823            self,
5824            encoder: &mut ___E,
5825            out: &mut ::core::mem::MaybeUninit<crate::wire::Config<'static>>,
5826            _: (),
5827        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5828            ::fidl_next::munge!(let crate::wire::Config { table } = out);
5829
5830            let max_ord = self.__max_ordinal();
5831
5832            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5833            ::fidl_next::Wire::zero_padding(&mut out);
5834
5835            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5836                ::fidl_next::wire::Envelope,
5837            >(encoder, max_ord);
5838
5839            for i in 1..=max_ord {
5840                match i {
5841                    1 => {
5842                        if let Some(value) = &self.format_costs {
5843                            ::fidl_next::wire::Envelope::encode_value::<
5844                                ::fidl_next::wire::Vector<
5845                                    'static,
5846                                    crate::wire::FormatCostEntry<'static>,
5847                                >,
5848                                ___E,
5849                            >(
5850                                value, preallocated.encoder, &mut out, (4294967295, ())
5851                            )?;
5852                        } else {
5853                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5854                        }
5855                    }
5856
5857                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5858                }
5859                unsafe {
5860                    preallocated.write_next(out.assume_init_ref());
5861                }
5862            }
5863
5864            ::fidl_next::wire::Table::encode_len(table, max_ord);
5865
5866            Ok(())
5867        }
5868    }
5869
5870    impl<'de> ::fidl_next::FromWire<crate::wire::Config<'de>> for Config {
5871        #[inline]
5872        fn from_wire(wire_: crate::wire::Config<'de>) -> Self {
5873            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5874
5875            let format_costs = wire_.table.get(1);
5876
5877            Self {
5878
5879
5880                format_costs: format_costs.map(|envelope| ::fidl_next::FromWire::from_wire(
5881                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>() }
5882                )),
5883
5884        }
5885        }
5886    }
5887
5888    impl<'de> ::fidl_next::FromWireRef<crate::wire::Config<'de>> for Config {
5889        #[inline]
5890        fn from_wire_ref(wire: &crate::wire::Config<'de>) -> Self {
5891            Self {
5892
5893
5894                format_costs: wire.table.get(1)
5895                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5896                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>() }
5897                    )),
5898
5899        }
5900        }
5901    }
5902
5903    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5904    pub struct DynamicSecureHeap {
5905        pub heap: ::core::option::Option<crate::natural::Heap>,
5906    }
5907
5908    impl DynamicSecureHeap {
5909        fn __max_ordinal(&self) -> usize {
5910            if self.heap.is_some() {
5911                return 1;
5912            }
5913
5914            0
5915        }
5916    }
5917
5918    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DynamicSecureHeap<'static>, ___E>
5919        for DynamicSecureHeap
5920    where
5921        ___E: ::fidl_next::Encoder + ?Sized,
5922    {
5923        #[inline]
5924        fn encode(
5925            mut self,
5926            encoder: &mut ___E,
5927            out: &mut ::core::mem::MaybeUninit<crate::wire::DynamicSecureHeap<'static>>,
5928            _: (),
5929        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5930            ::fidl_next::munge!(let crate::wire::DynamicSecureHeap { table } = out);
5931
5932            let max_ord = self.__max_ordinal();
5933
5934            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5935            ::fidl_next::Wire::zero_padding(&mut out);
5936
5937            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5938                ::fidl_next::wire::Envelope,
5939            >(encoder, max_ord);
5940
5941            for i in 1..=max_ord {
5942                match i {
5943                    1 => {
5944                        if let Some(value) = self.heap.take() {
5945                            ::fidl_next::wire::Envelope::encode_value::<
5946                                crate::wire::Heap<'static>,
5947                                ___E,
5948                            >(
5949                                value, preallocated.encoder, &mut out, ()
5950                            )?;
5951                        } else {
5952                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5953                        }
5954                    }
5955
5956                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5957                }
5958                unsafe {
5959                    preallocated.write_next(out.assume_init_ref());
5960                }
5961            }
5962
5963            ::fidl_next::wire::Table::encode_len(table, max_ord);
5964
5965            Ok(())
5966        }
5967    }
5968
5969    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DynamicSecureHeap<'static>, ___E>
5970        for &'a DynamicSecureHeap
5971    where
5972        ___E: ::fidl_next::Encoder + ?Sized,
5973    {
5974        #[inline]
5975        fn encode(
5976            self,
5977            encoder: &mut ___E,
5978            out: &mut ::core::mem::MaybeUninit<crate::wire::DynamicSecureHeap<'static>>,
5979            _: (),
5980        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5981            ::fidl_next::munge!(let crate::wire::DynamicSecureHeap { table } = out);
5982
5983            let max_ord = self.__max_ordinal();
5984
5985            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5986            ::fidl_next::Wire::zero_padding(&mut out);
5987
5988            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5989                ::fidl_next::wire::Envelope,
5990            >(encoder, max_ord);
5991
5992            for i in 1..=max_ord {
5993                match i {
5994                    1 => {
5995                        if let Some(value) = &self.heap {
5996                            ::fidl_next::wire::Envelope::encode_value::<
5997                                crate::wire::Heap<'static>,
5998                                ___E,
5999                            >(
6000                                value, preallocated.encoder, &mut out, ()
6001                            )?;
6002                        } else {
6003                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6004                        }
6005                    }
6006
6007                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6008                }
6009                unsafe {
6010                    preallocated.write_next(out.assume_init_ref());
6011                }
6012            }
6013
6014            ::fidl_next::wire::Table::encode_len(table, max_ord);
6015
6016            Ok(())
6017        }
6018    }
6019
6020    impl<'de> ::fidl_next::FromWire<crate::wire::DynamicSecureHeap<'de>> for DynamicSecureHeap {
6021        #[inline]
6022        fn from_wire(wire_: crate::wire::DynamicSecureHeap<'de>) -> Self {
6023            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6024
6025            let heap = wire_.table.get(1);
6026
6027            Self {
6028                heap: heap.map(|envelope| {
6029                    ::fidl_next::FromWire::from_wire(unsafe {
6030                        envelope.read_unchecked::<crate::wire::Heap<'de>>()
6031                    })
6032                }),
6033            }
6034        }
6035    }
6036
6037    impl<'de> ::fidl_next::FromWireRef<crate::wire::DynamicSecureHeap<'de>> for DynamicSecureHeap {
6038        #[inline]
6039        fn from_wire_ref(wire: &crate::wire::DynamicSecureHeap<'de>) -> Self {
6040            Self {
6041                heap: wire.table.get(1).map(|envelope| {
6042                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6043                        envelope.deref_unchecked::<crate::wire::Heap<'de>>()
6044                    })
6045                }),
6046            }
6047        }
6048    }
6049
6050    #[doc = " This is the root of the persistent fidl in a format costs file. The format\n costs files are read by the assembly tool and merged into the single\n sysmem_config.persistent_fidl file in the sysmem domain config (see Config\n above).\n\n Normally json[5] would be preferable for config, but we generate this config\n in rust using FIDL types (to avoid repetition and to take advantage of FIDL\n rust codegen), and there\'s no json schema for FIDL types.\n\n While the resulting sysmem_config.persistent_fidl is a single file that can\n contain multiple aspects of sysmem config, in contrast a format costs file\n contains only format costs. We don\'t mind having more separate files during\n the build, but it\'s nice to get sysmem\'s domain config down to a single file\n on-device.\n"]
6051    #[derive(Debug, Default, Clone, PartialEq, PartialOrd)]
6052    pub struct FormatCosts {
6053        pub format_costs: ::core::option::Option<::std::vec::Vec<crate::natural::FormatCostEntry>>,
6054    }
6055
6056    impl FormatCosts {
6057        fn __max_ordinal(&self) -> usize {
6058            if self.format_costs.is_some() {
6059                return 1;
6060            }
6061
6062            0
6063        }
6064    }
6065
6066    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FormatCosts<'static>, ___E> for FormatCosts
6067    where
6068        ___E: ::fidl_next::Encoder + ?Sized,
6069    {
6070        #[inline]
6071        fn encode(
6072            mut self,
6073            encoder: &mut ___E,
6074            out: &mut ::core::mem::MaybeUninit<crate::wire::FormatCosts<'static>>,
6075            _: (),
6076        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6077            ::fidl_next::munge!(let crate::wire::FormatCosts { table } = out);
6078
6079            let max_ord = self.__max_ordinal();
6080
6081            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6082            ::fidl_next::Wire::zero_padding(&mut out);
6083
6084            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6085                ::fidl_next::wire::Envelope,
6086            >(encoder, max_ord);
6087
6088            for i in 1..=max_ord {
6089                match i {
6090                    1 => {
6091                        if let Some(value) = self.format_costs.take() {
6092                            ::fidl_next::wire::Envelope::encode_value::<
6093                                ::fidl_next::wire::Vector<
6094                                    'static,
6095                                    crate::wire::FormatCostEntry<'static>,
6096                                >,
6097                                ___E,
6098                            >(
6099                                value, preallocated.encoder, &mut out, (4294967295, ())
6100                            )?;
6101                        } else {
6102                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6103                        }
6104                    }
6105
6106                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6107                }
6108                unsafe {
6109                    preallocated.write_next(out.assume_init_ref());
6110                }
6111            }
6112
6113            ::fidl_next::wire::Table::encode_len(table, max_ord);
6114
6115            Ok(())
6116        }
6117    }
6118
6119    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FormatCosts<'static>, ___E>
6120        for &'a FormatCosts
6121    where
6122        ___E: ::fidl_next::Encoder + ?Sized,
6123    {
6124        #[inline]
6125        fn encode(
6126            self,
6127            encoder: &mut ___E,
6128            out: &mut ::core::mem::MaybeUninit<crate::wire::FormatCosts<'static>>,
6129            _: (),
6130        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6131            ::fidl_next::munge!(let crate::wire::FormatCosts { table } = out);
6132
6133            let max_ord = self.__max_ordinal();
6134
6135            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6136            ::fidl_next::Wire::zero_padding(&mut out);
6137
6138            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6139                ::fidl_next::wire::Envelope,
6140            >(encoder, max_ord);
6141
6142            for i in 1..=max_ord {
6143                match i {
6144                    1 => {
6145                        if let Some(value) = &self.format_costs {
6146                            ::fidl_next::wire::Envelope::encode_value::<
6147                                ::fidl_next::wire::Vector<
6148                                    'static,
6149                                    crate::wire::FormatCostEntry<'static>,
6150                                >,
6151                                ___E,
6152                            >(
6153                                value, preallocated.encoder, &mut out, (4294967295, ())
6154                            )?;
6155                        } else {
6156                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6157                        }
6158                    }
6159
6160                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6161                }
6162                unsafe {
6163                    preallocated.write_next(out.assume_init_ref());
6164                }
6165            }
6166
6167            ::fidl_next::wire::Table::encode_len(table, max_ord);
6168
6169            Ok(())
6170        }
6171    }
6172
6173    impl<'de> ::fidl_next::FromWire<crate::wire::FormatCosts<'de>> for FormatCosts {
6174        #[inline]
6175        fn from_wire(wire_: crate::wire::FormatCosts<'de>) -> Self {
6176            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6177
6178            let format_costs = wire_.table.get(1);
6179
6180            Self {
6181
6182
6183                format_costs: format_costs.map(|envelope| ::fidl_next::FromWire::from_wire(
6184                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>() }
6185                )),
6186
6187        }
6188        }
6189    }
6190
6191    impl<'de> ::fidl_next::FromWireRef<crate::wire::FormatCosts<'de>> for FormatCosts {
6192        #[inline]
6193        fn from_wire_ref(wire: &crate::wire::FormatCosts<'de>) -> Self {
6194            Self {
6195
6196
6197                format_costs: wire.table.get(1)
6198                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
6199                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>() }
6200                    )),
6201
6202        }
6203        }
6204    }
6205
6206    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6207    pub struct SecureHeapRange {
6208        pub physical_address: ::core::option::Option<u64>,
6209
6210        pub size_bytes: ::core::option::Option<u64>,
6211    }
6212
6213    impl SecureHeapRange {
6214        fn __max_ordinal(&self) -> usize {
6215            if self.size_bytes.is_some() {
6216                return 2;
6217            }
6218
6219            if self.physical_address.is_some() {
6220                return 1;
6221            }
6222
6223            0
6224        }
6225    }
6226
6227    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SecureHeapRange<'static>, ___E>
6228        for SecureHeapRange
6229    where
6230        ___E: ::fidl_next::Encoder + ?Sized,
6231    {
6232        #[inline]
6233        fn encode(
6234            mut self,
6235            encoder: &mut ___E,
6236            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapRange<'static>>,
6237            _: (),
6238        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6239            ::fidl_next::munge!(let crate::wire::SecureHeapRange { table } = out);
6240
6241            let max_ord = self.__max_ordinal();
6242
6243            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6244            ::fidl_next::Wire::zero_padding(&mut out);
6245
6246            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6247                ::fidl_next::wire::Envelope,
6248            >(encoder, max_ord);
6249
6250            for i in 1..=max_ord {
6251                match i {
6252                    2 => {
6253                        if let Some(value) = self.size_bytes.take() {
6254                            ::fidl_next::wire::Envelope::encode_value::<
6255                                ::fidl_next::wire::Uint64,
6256                                ___E,
6257                            >(
6258                                value, preallocated.encoder, &mut out, ()
6259                            )?;
6260                        } else {
6261                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6262                        }
6263                    }
6264
6265                    1 => {
6266                        if let Some(value) = self.physical_address.take() {
6267                            ::fidl_next::wire::Envelope::encode_value::<
6268                                ::fidl_next::wire::Uint64,
6269                                ___E,
6270                            >(
6271                                value, preallocated.encoder, &mut out, ()
6272                            )?;
6273                        } else {
6274                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6275                        }
6276                    }
6277
6278                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6279                }
6280                unsafe {
6281                    preallocated.write_next(out.assume_init_ref());
6282                }
6283            }
6284
6285            ::fidl_next::wire::Table::encode_len(table, max_ord);
6286
6287            Ok(())
6288        }
6289    }
6290
6291    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SecureHeapRange<'static>, ___E>
6292        for &'a SecureHeapRange
6293    where
6294        ___E: ::fidl_next::Encoder + ?Sized,
6295    {
6296        #[inline]
6297        fn encode(
6298            self,
6299            encoder: &mut ___E,
6300            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapRange<'static>>,
6301            _: (),
6302        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6303            ::fidl_next::munge!(let crate::wire::SecureHeapRange { table } = out);
6304
6305            let max_ord = self.__max_ordinal();
6306
6307            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6308            ::fidl_next::Wire::zero_padding(&mut out);
6309
6310            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6311                ::fidl_next::wire::Envelope,
6312            >(encoder, max_ord);
6313
6314            for i in 1..=max_ord {
6315                match i {
6316                    2 => {
6317                        if let Some(value) = &self.size_bytes {
6318                            ::fidl_next::wire::Envelope::encode_value::<
6319                                ::fidl_next::wire::Uint64,
6320                                ___E,
6321                            >(
6322                                value, preallocated.encoder, &mut out, ()
6323                            )?;
6324                        } else {
6325                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6326                        }
6327                    }
6328
6329                    1 => {
6330                        if let Some(value) = &self.physical_address {
6331                            ::fidl_next::wire::Envelope::encode_value::<
6332                                ::fidl_next::wire::Uint64,
6333                                ___E,
6334                            >(
6335                                value, preallocated.encoder, &mut out, ()
6336                            )?;
6337                        } else {
6338                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6339                        }
6340                    }
6341
6342                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6343                }
6344                unsafe {
6345                    preallocated.write_next(out.assume_init_ref());
6346                }
6347            }
6348
6349            ::fidl_next::wire::Table::encode_len(table, max_ord);
6350
6351            Ok(())
6352        }
6353    }
6354
6355    impl<'de> ::fidl_next::FromWire<crate::wire::SecureHeapRange<'de>> for SecureHeapRange {
6356        #[inline]
6357        fn from_wire(wire_: crate::wire::SecureHeapRange<'de>) -> Self {
6358            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6359
6360            let physical_address = wire_.table.get(1);
6361
6362            let size_bytes = wire_.table.get(2);
6363
6364            Self {
6365                physical_address: physical_address.map(|envelope| {
6366                    ::fidl_next::FromWire::from_wire(unsafe {
6367                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6368                    })
6369                }),
6370
6371                size_bytes: size_bytes.map(|envelope| {
6372                    ::fidl_next::FromWire::from_wire(unsafe {
6373                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6374                    })
6375                }),
6376            }
6377        }
6378    }
6379
6380    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureHeapRange<'de>> for SecureHeapRange {
6381        #[inline]
6382        fn from_wire_ref(wire: &crate::wire::SecureHeapRange<'de>) -> Self {
6383            Self {
6384                physical_address: wire.table.get(1).map(|envelope| {
6385                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6386                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6387                    })
6388                }),
6389
6390                size_bytes: wire.table.get(2).map(|envelope| {
6391                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6392                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6393                    })
6394                }),
6395            }
6396        }
6397    }
6398
6399    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6400    pub struct SecureHeapAndRange {
6401        pub heap: ::core::option::Option<crate::natural::Heap>,
6402
6403        pub range: ::core::option::Option<crate::natural::SecureHeapRange>,
6404    }
6405
6406    impl SecureHeapAndRange {
6407        fn __max_ordinal(&self) -> usize {
6408            if self.range.is_some() {
6409                return 2;
6410            }
6411
6412            if self.heap.is_some() {
6413                return 1;
6414            }
6415
6416            0
6417        }
6418    }
6419
6420    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SecureHeapAndRange<'static>, ___E>
6421        for SecureHeapAndRange
6422    where
6423        ___E: ::fidl_next::Encoder + ?Sized,
6424    {
6425        #[inline]
6426        fn encode(
6427            mut self,
6428            encoder: &mut ___E,
6429            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapAndRange<'static>>,
6430            _: (),
6431        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6432            ::fidl_next::munge!(let crate::wire::SecureHeapAndRange { table } = out);
6433
6434            let max_ord = self.__max_ordinal();
6435
6436            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6437            ::fidl_next::Wire::zero_padding(&mut out);
6438
6439            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6440                ::fidl_next::wire::Envelope,
6441            >(encoder, max_ord);
6442
6443            for i in 1..=max_ord {
6444                match i {
6445                    2 => {
6446                        if let Some(value) = self.range.take() {
6447                            ::fidl_next::wire::Envelope::encode_value::<
6448                                crate::wire::SecureHeapRange<'static>,
6449                                ___E,
6450                            >(
6451                                value, preallocated.encoder, &mut out, ()
6452                            )?;
6453                        } else {
6454                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6455                        }
6456                    }
6457
6458                    1 => {
6459                        if let Some(value) = self.heap.take() {
6460                            ::fidl_next::wire::Envelope::encode_value::<
6461                                crate::wire::Heap<'static>,
6462                                ___E,
6463                            >(
6464                                value, preallocated.encoder, &mut out, ()
6465                            )?;
6466                        } else {
6467                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6468                        }
6469                    }
6470
6471                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6472                }
6473                unsafe {
6474                    preallocated.write_next(out.assume_init_ref());
6475                }
6476            }
6477
6478            ::fidl_next::wire::Table::encode_len(table, max_ord);
6479
6480            Ok(())
6481        }
6482    }
6483
6484    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SecureHeapAndRange<'static>, ___E>
6485        for &'a SecureHeapAndRange
6486    where
6487        ___E: ::fidl_next::Encoder + ?Sized,
6488    {
6489        #[inline]
6490        fn encode(
6491            self,
6492            encoder: &mut ___E,
6493            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapAndRange<'static>>,
6494            _: (),
6495        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6496            ::fidl_next::munge!(let crate::wire::SecureHeapAndRange { table } = out);
6497
6498            let max_ord = self.__max_ordinal();
6499
6500            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6501            ::fidl_next::Wire::zero_padding(&mut out);
6502
6503            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6504                ::fidl_next::wire::Envelope,
6505            >(encoder, max_ord);
6506
6507            for i in 1..=max_ord {
6508                match i {
6509                    2 => {
6510                        if let Some(value) = &self.range {
6511                            ::fidl_next::wire::Envelope::encode_value::<
6512                                crate::wire::SecureHeapRange<'static>,
6513                                ___E,
6514                            >(
6515                                value, preallocated.encoder, &mut out, ()
6516                            )?;
6517                        } else {
6518                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6519                        }
6520                    }
6521
6522                    1 => {
6523                        if let Some(value) = &self.heap {
6524                            ::fidl_next::wire::Envelope::encode_value::<
6525                                crate::wire::Heap<'static>,
6526                                ___E,
6527                            >(
6528                                value, preallocated.encoder, &mut out, ()
6529                            )?;
6530                        } else {
6531                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6532                        }
6533                    }
6534
6535                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6536                }
6537                unsafe {
6538                    preallocated.write_next(out.assume_init_ref());
6539                }
6540            }
6541
6542            ::fidl_next::wire::Table::encode_len(table, max_ord);
6543
6544            Ok(())
6545        }
6546    }
6547
6548    impl<'de> ::fidl_next::FromWire<crate::wire::SecureHeapAndRange<'de>> for SecureHeapAndRange {
6549        #[inline]
6550        fn from_wire(wire_: crate::wire::SecureHeapAndRange<'de>) -> Self {
6551            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6552
6553            let heap = wire_.table.get(1);
6554
6555            let range = wire_.table.get(2);
6556
6557            Self {
6558                heap: heap.map(|envelope| {
6559                    ::fidl_next::FromWire::from_wire(unsafe {
6560                        envelope.read_unchecked::<crate::wire::Heap<'de>>()
6561                    })
6562                }),
6563
6564                range: range.map(|envelope| {
6565                    ::fidl_next::FromWire::from_wire(unsafe {
6566                        envelope.read_unchecked::<crate::wire::SecureHeapRange<'de>>()
6567                    })
6568                }),
6569            }
6570        }
6571    }
6572
6573    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureHeapAndRange<'de>> for SecureHeapAndRange {
6574        #[inline]
6575        fn from_wire_ref(wire: &crate::wire::SecureHeapAndRange<'de>) -> Self {
6576            Self {
6577                heap: wire.table.get(1).map(|envelope| {
6578                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6579                        envelope.deref_unchecked::<crate::wire::Heap<'de>>()
6580                    })
6581                }),
6582
6583                range: wire.table.get(2).map(|envelope| {
6584                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6585                        envelope.deref_unchecked::<crate::wire::SecureHeapRange<'de>>()
6586                    })
6587                }),
6588            }
6589        }
6590    }
6591
6592    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6593    pub struct SecureHeapAndRangeModification {
6594        pub heap: ::core::option::Option<crate::natural::Heap>,
6595
6596        pub old_range: ::core::option::Option<crate::natural::SecureHeapRange>,
6597
6598        pub new_range: ::core::option::Option<crate::natural::SecureHeapRange>,
6599    }
6600
6601    impl SecureHeapAndRangeModification {
6602        fn __max_ordinal(&self) -> usize {
6603            if self.new_range.is_some() {
6604                return 3;
6605            }
6606
6607            if self.old_range.is_some() {
6608                return 2;
6609            }
6610
6611            if self.heap.is_some() {
6612                return 1;
6613            }
6614
6615            0
6616        }
6617    }
6618
6619    unsafe impl<___E>
6620        ::fidl_next::Encode<crate::wire::SecureHeapAndRangeModification<'static>, ___E>
6621        for SecureHeapAndRangeModification
6622    where
6623        ___E: ::fidl_next::Encoder + ?Sized,
6624    {
6625        #[inline]
6626        fn encode(
6627            mut self,
6628            encoder: &mut ___E,
6629            out: &mut ::core::mem::MaybeUninit<
6630                crate::wire::SecureHeapAndRangeModification<'static>,
6631            >,
6632            _: (),
6633        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6634            ::fidl_next::munge!(let crate::wire::SecureHeapAndRangeModification { table } = out);
6635
6636            let max_ord = self.__max_ordinal();
6637
6638            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6639            ::fidl_next::Wire::zero_padding(&mut out);
6640
6641            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6642                ::fidl_next::wire::Envelope,
6643            >(encoder, max_ord);
6644
6645            for i in 1..=max_ord {
6646                match i {
6647                    3 => {
6648                        if let Some(value) = self.new_range.take() {
6649                            ::fidl_next::wire::Envelope::encode_value::<
6650                                crate::wire::SecureHeapRange<'static>,
6651                                ___E,
6652                            >(
6653                                value, preallocated.encoder, &mut out, ()
6654                            )?;
6655                        } else {
6656                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6657                        }
6658                    }
6659
6660                    2 => {
6661                        if let Some(value) = self.old_range.take() {
6662                            ::fidl_next::wire::Envelope::encode_value::<
6663                                crate::wire::SecureHeapRange<'static>,
6664                                ___E,
6665                            >(
6666                                value, preallocated.encoder, &mut out, ()
6667                            )?;
6668                        } else {
6669                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6670                        }
6671                    }
6672
6673                    1 => {
6674                        if let Some(value) = self.heap.take() {
6675                            ::fidl_next::wire::Envelope::encode_value::<
6676                                crate::wire::Heap<'static>,
6677                                ___E,
6678                            >(
6679                                value, preallocated.encoder, &mut out, ()
6680                            )?;
6681                        } else {
6682                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6683                        }
6684                    }
6685
6686                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6687                }
6688                unsafe {
6689                    preallocated.write_next(out.assume_init_ref());
6690                }
6691            }
6692
6693            ::fidl_next::wire::Table::encode_len(table, max_ord);
6694
6695            Ok(())
6696        }
6697    }
6698
6699    unsafe impl<'a, ___E>
6700        ::fidl_next::Encode<crate::wire::SecureHeapAndRangeModification<'static>, ___E>
6701        for &'a SecureHeapAndRangeModification
6702    where
6703        ___E: ::fidl_next::Encoder + ?Sized,
6704    {
6705        #[inline]
6706        fn encode(
6707            self,
6708            encoder: &mut ___E,
6709            out: &mut ::core::mem::MaybeUninit<
6710                crate::wire::SecureHeapAndRangeModification<'static>,
6711            >,
6712            _: (),
6713        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6714            ::fidl_next::munge!(let crate::wire::SecureHeapAndRangeModification { table } = out);
6715
6716            let max_ord = self.__max_ordinal();
6717
6718            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6719            ::fidl_next::Wire::zero_padding(&mut out);
6720
6721            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6722                ::fidl_next::wire::Envelope,
6723            >(encoder, max_ord);
6724
6725            for i in 1..=max_ord {
6726                match i {
6727                    3 => {
6728                        if let Some(value) = &self.new_range {
6729                            ::fidl_next::wire::Envelope::encode_value::<
6730                                crate::wire::SecureHeapRange<'static>,
6731                                ___E,
6732                            >(
6733                                value, preallocated.encoder, &mut out, ()
6734                            )?;
6735                        } else {
6736                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6737                        }
6738                    }
6739
6740                    2 => {
6741                        if let Some(value) = &self.old_range {
6742                            ::fidl_next::wire::Envelope::encode_value::<
6743                                crate::wire::SecureHeapRange<'static>,
6744                                ___E,
6745                            >(
6746                                value, preallocated.encoder, &mut out, ()
6747                            )?;
6748                        } else {
6749                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6750                        }
6751                    }
6752
6753                    1 => {
6754                        if let Some(value) = &self.heap {
6755                            ::fidl_next::wire::Envelope::encode_value::<
6756                                crate::wire::Heap<'static>,
6757                                ___E,
6758                            >(
6759                                value, preallocated.encoder, &mut out, ()
6760                            )?;
6761                        } else {
6762                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6763                        }
6764                    }
6765
6766                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6767                }
6768                unsafe {
6769                    preallocated.write_next(out.assume_init_ref());
6770                }
6771            }
6772
6773            ::fidl_next::wire::Table::encode_len(table, max_ord);
6774
6775            Ok(())
6776        }
6777    }
6778
6779    impl<'de> ::fidl_next::FromWire<crate::wire::SecureHeapAndRangeModification<'de>>
6780        for SecureHeapAndRangeModification
6781    {
6782        #[inline]
6783        fn from_wire(wire_: crate::wire::SecureHeapAndRangeModification<'de>) -> Self {
6784            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6785
6786            let heap = wire_.table.get(1);
6787
6788            let old_range = wire_.table.get(2);
6789
6790            let new_range = wire_.table.get(3);
6791
6792            Self {
6793                heap: heap.map(|envelope| {
6794                    ::fidl_next::FromWire::from_wire(unsafe {
6795                        envelope.read_unchecked::<crate::wire::Heap<'de>>()
6796                    })
6797                }),
6798
6799                old_range: old_range.map(|envelope| {
6800                    ::fidl_next::FromWire::from_wire(unsafe {
6801                        envelope.read_unchecked::<crate::wire::SecureHeapRange<'de>>()
6802                    })
6803                }),
6804
6805                new_range: new_range.map(|envelope| {
6806                    ::fidl_next::FromWire::from_wire(unsafe {
6807                        envelope.read_unchecked::<crate::wire::SecureHeapRange<'de>>()
6808                    })
6809                }),
6810            }
6811        }
6812    }
6813
6814    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureHeapAndRangeModification<'de>>
6815        for SecureHeapAndRangeModification
6816    {
6817        #[inline]
6818        fn from_wire_ref(wire: &crate::wire::SecureHeapAndRangeModification<'de>) -> Self {
6819            Self {
6820                heap: wire.table.get(1).map(|envelope| {
6821                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6822                        envelope.deref_unchecked::<crate::wire::Heap<'de>>()
6823                    })
6824                }),
6825
6826                old_range: wire.table.get(2).map(|envelope| {
6827                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6828                        envelope.deref_unchecked::<crate::wire::SecureHeapRange<'de>>()
6829                    })
6830                }),
6831
6832                new_range: wire.table.get(3).map(|envelope| {
6833                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6834                        envelope.deref_unchecked::<crate::wire::SecureHeapRange<'de>>()
6835                    })
6836                }),
6837            }
6838        }
6839    }
6840
6841    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6842    pub struct SecureHeapAndRanges {
6843        pub heap: ::core::option::Option<crate::natural::Heap>,
6844
6845        pub ranges: ::core::option::Option<::std::vec::Vec<crate::natural::SecureHeapRange>>,
6846    }
6847
6848    impl SecureHeapAndRanges {
6849        fn __max_ordinal(&self) -> usize {
6850            if self.ranges.is_some() {
6851                return 2;
6852            }
6853
6854            if self.heap.is_some() {
6855                return 1;
6856            }
6857
6858            0
6859        }
6860    }
6861
6862    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SecureHeapAndRanges<'static>, ___E>
6863        for SecureHeapAndRanges
6864    where
6865        ___E: ::fidl_next::Encoder + ?Sized,
6866    {
6867        #[inline]
6868        fn encode(
6869            mut self,
6870            encoder: &mut ___E,
6871            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapAndRanges<'static>>,
6872            _: (),
6873        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6874            ::fidl_next::munge!(let crate::wire::SecureHeapAndRanges { table } = out);
6875
6876            let max_ord = self.__max_ordinal();
6877
6878            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6879            ::fidl_next::Wire::zero_padding(&mut out);
6880
6881            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6882                ::fidl_next::wire::Envelope,
6883            >(encoder, max_ord);
6884
6885            for i in 1..=max_ord {
6886                match i {
6887                    2 => {
6888                        if let Some(value) = self.ranges.take() {
6889                            ::fidl_next::wire::Envelope::encode_value::<
6890                                ::fidl_next::wire::Vector<
6891                                    'static,
6892                                    crate::wire::SecureHeapRange<'static>,
6893                                >,
6894                                ___E,
6895                            >(
6896                                value, preallocated.encoder, &mut out, (128, ())
6897                            )?;
6898                        } else {
6899                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6900                        }
6901                    }
6902
6903                    1 => {
6904                        if let Some(value) = self.heap.take() {
6905                            ::fidl_next::wire::Envelope::encode_value::<
6906                                crate::wire::Heap<'static>,
6907                                ___E,
6908                            >(
6909                                value, preallocated.encoder, &mut out, ()
6910                            )?;
6911                        } else {
6912                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6913                        }
6914                    }
6915
6916                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6917                }
6918                unsafe {
6919                    preallocated.write_next(out.assume_init_ref());
6920                }
6921            }
6922
6923            ::fidl_next::wire::Table::encode_len(table, max_ord);
6924
6925            Ok(())
6926        }
6927    }
6928
6929    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SecureHeapAndRanges<'static>, ___E>
6930        for &'a SecureHeapAndRanges
6931    where
6932        ___E: ::fidl_next::Encoder + ?Sized,
6933    {
6934        #[inline]
6935        fn encode(
6936            self,
6937            encoder: &mut ___E,
6938            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapAndRanges<'static>>,
6939            _: (),
6940        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6941            ::fidl_next::munge!(let crate::wire::SecureHeapAndRanges { table } = out);
6942
6943            let max_ord = self.__max_ordinal();
6944
6945            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6946            ::fidl_next::Wire::zero_padding(&mut out);
6947
6948            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6949                ::fidl_next::wire::Envelope,
6950            >(encoder, max_ord);
6951
6952            for i in 1..=max_ord {
6953                match i {
6954                    2 => {
6955                        if let Some(value) = &self.ranges {
6956                            ::fidl_next::wire::Envelope::encode_value::<
6957                                ::fidl_next::wire::Vector<
6958                                    'static,
6959                                    crate::wire::SecureHeapRange<'static>,
6960                                >,
6961                                ___E,
6962                            >(
6963                                value, preallocated.encoder, &mut out, (128, ())
6964                            )?;
6965                        } else {
6966                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6967                        }
6968                    }
6969
6970                    1 => {
6971                        if let Some(value) = &self.heap {
6972                            ::fidl_next::wire::Envelope::encode_value::<
6973                                crate::wire::Heap<'static>,
6974                                ___E,
6975                            >(
6976                                value, preallocated.encoder, &mut out, ()
6977                            )?;
6978                        } else {
6979                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6980                        }
6981                    }
6982
6983                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6984                }
6985                unsafe {
6986                    preallocated.write_next(out.assume_init_ref());
6987                }
6988            }
6989
6990            ::fidl_next::wire::Table::encode_len(table, max_ord);
6991
6992            Ok(())
6993        }
6994    }
6995
6996    impl<'de> ::fidl_next::FromWire<crate::wire::SecureHeapAndRanges<'de>> for SecureHeapAndRanges {
6997        #[inline]
6998        fn from_wire(wire_: crate::wire::SecureHeapAndRanges<'de>) -> Self {
6999            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7000
7001            let heap = wire_.table.get(1);
7002
7003            let ranges = wire_.table.get(2);
7004
7005            Self {
7006
7007
7008                heap: heap.map(|envelope| ::fidl_next::FromWire::from_wire(
7009                    unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() }
7010                )),
7011
7012
7013                ranges: ranges.map(|envelope| ::fidl_next::FromWire::from_wire(
7014                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SecureHeapRange<'de>>>() }
7015                )),
7016
7017        }
7018        }
7019    }
7020
7021    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureHeapAndRanges<'de>> for SecureHeapAndRanges {
7022        #[inline]
7023        fn from_wire_ref(wire: &crate::wire::SecureHeapAndRanges<'de>) -> Self {
7024            Self {
7025
7026
7027                heap: wire.table.get(1)
7028                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
7029                        unsafe { envelope.deref_unchecked::<crate::wire::Heap<'de>>() }
7030                    )),
7031
7032
7033                ranges: wire.table.get(2)
7034                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
7035                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SecureHeapRange<'de>>>() }
7036                    )),
7037
7038        }
7039        }
7040    }
7041
7042    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7043    pub struct SecureHeapProperties {
7044        pub heap: ::core::option::Option<crate::natural::Heap>,
7045
7046        pub dynamic_protection_ranges: ::core::option::Option<bool>,
7047
7048        pub protected_range_granularity: ::core::option::Option<u32>,
7049
7050        pub max_protected_range_count: ::core::option::Option<u64>,
7051
7052        pub is_mod_protected_range_available: ::core::option::Option<bool>,
7053    }
7054
7055    impl SecureHeapProperties {
7056        fn __max_ordinal(&self) -> usize {
7057            if self.is_mod_protected_range_available.is_some() {
7058                return 5;
7059            }
7060
7061            if self.max_protected_range_count.is_some() {
7062                return 4;
7063            }
7064
7065            if self.protected_range_granularity.is_some() {
7066                return 3;
7067            }
7068
7069            if self.dynamic_protection_ranges.is_some() {
7070                return 2;
7071            }
7072
7073            if self.heap.is_some() {
7074                return 1;
7075            }
7076
7077            0
7078        }
7079    }
7080
7081    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SecureHeapProperties<'static>, ___E>
7082        for SecureHeapProperties
7083    where
7084        ___E: ::fidl_next::Encoder + ?Sized,
7085    {
7086        #[inline]
7087        fn encode(
7088            mut self,
7089            encoder: &mut ___E,
7090            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapProperties<'static>>,
7091            _: (),
7092        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7093            ::fidl_next::munge!(let crate::wire::SecureHeapProperties { table } = out);
7094
7095            let max_ord = self.__max_ordinal();
7096
7097            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7098            ::fidl_next::Wire::zero_padding(&mut out);
7099
7100            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7101                ::fidl_next::wire::Envelope,
7102            >(encoder, max_ord);
7103
7104            for i in 1..=max_ord {
7105                match i {
7106                    5 => {
7107                        if let Some(value) = self.is_mod_protected_range_available.take() {
7108                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
7109                                value,
7110                                preallocated.encoder,
7111                                &mut out,
7112                                (),
7113                            )?;
7114                        } else {
7115                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7116                        }
7117                    }
7118
7119                    4 => {
7120                        if let Some(value) = self.max_protected_range_count.take() {
7121                            ::fidl_next::wire::Envelope::encode_value::<
7122                                ::fidl_next::wire::Uint64,
7123                                ___E,
7124                            >(
7125                                value, preallocated.encoder, &mut out, ()
7126                            )?;
7127                        } else {
7128                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7129                        }
7130                    }
7131
7132                    3 => {
7133                        if let Some(value) = self.protected_range_granularity.take() {
7134                            ::fidl_next::wire::Envelope::encode_value::<
7135                                ::fidl_next::wire::Uint32,
7136                                ___E,
7137                            >(
7138                                value, preallocated.encoder, &mut out, ()
7139                            )?;
7140                        } else {
7141                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7142                        }
7143                    }
7144
7145                    2 => {
7146                        if let Some(value) = self.dynamic_protection_ranges.take() {
7147                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
7148                                value,
7149                                preallocated.encoder,
7150                                &mut out,
7151                                (),
7152                            )?;
7153                        } else {
7154                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7155                        }
7156                    }
7157
7158                    1 => {
7159                        if let Some(value) = self.heap.take() {
7160                            ::fidl_next::wire::Envelope::encode_value::<
7161                                crate::wire::Heap<'static>,
7162                                ___E,
7163                            >(
7164                                value, preallocated.encoder, &mut out, ()
7165                            )?;
7166                        } else {
7167                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7168                        }
7169                    }
7170
7171                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7172                }
7173                unsafe {
7174                    preallocated.write_next(out.assume_init_ref());
7175                }
7176            }
7177
7178            ::fidl_next::wire::Table::encode_len(table, max_ord);
7179
7180            Ok(())
7181        }
7182    }
7183
7184    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SecureHeapProperties<'static>, ___E>
7185        for &'a SecureHeapProperties
7186    where
7187        ___E: ::fidl_next::Encoder + ?Sized,
7188    {
7189        #[inline]
7190        fn encode(
7191            self,
7192            encoder: &mut ___E,
7193            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapProperties<'static>>,
7194            _: (),
7195        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7196            ::fidl_next::munge!(let crate::wire::SecureHeapProperties { table } = out);
7197
7198            let max_ord = self.__max_ordinal();
7199
7200            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7201            ::fidl_next::Wire::zero_padding(&mut out);
7202
7203            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7204                ::fidl_next::wire::Envelope,
7205            >(encoder, max_ord);
7206
7207            for i in 1..=max_ord {
7208                match i {
7209                    5 => {
7210                        if let Some(value) = &self.is_mod_protected_range_available {
7211                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
7212                                value,
7213                                preallocated.encoder,
7214                                &mut out,
7215                                (),
7216                            )?;
7217                        } else {
7218                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7219                        }
7220                    }
7221
7222                    4 => {
7223                        if let Some(value) = &self.max_protected_range_count {
7224                            ::fidl_next::wire::Envelope::encode_value::<
7225                                ::fidl_next::wire::Uint64,
7226                                ___E,
7227                            >(
7228                                value, preallocated.encoder, &mut out, ()
7229                            )?;
7230                        } else {
7231                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7232                        }
7233                    }
7234
7235                    3 => {
7236                        if let Some(value) = &self.protected_range_granularity {
7237                            ::fidl_next::wire::Envelope::encode_value::<
7238                                ::fidl_next::wire::Uint32,
7239                                ___E,
7240                            >(
7241                                value, preallocated.encoder, &mut out, ()
7242                            )?;
7243                        } else {
7244                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7245                        }
7246                    }
7247
7248                    2 => {
7249                        if let Some(value) = &self.dynamic_protection_ranges {
7250                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
7251                                value,
7252                                preallocated.encoder,
7253                                &mut out,
7254                                (),
7255                            )?;
7256                        } else {
7257                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7258                        }
7259                    }
7260
7261                    1 => {
7262                        if let Some(value) = &self.heap {
7263                            ::fidl_next::wire::Envelope::encode_value::<
7264                                crate::wire::Heap<'static>,
7265                                ___E,
7266                            >(
7267                                value, preallocated.encoder, &mut out, ()
7268                            )?;
7269                        } else {
7270                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7271                        }
7272                    }
7273
7274                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7275                }
7276                unsafe {
7277                    preallocated.write_next(out.assume_init_ref());
7278                }
7279            }
7280
7281            ::fidl_next::wire::Table::encode_len(table, max_ord);
7282
7283            Ok(())
7284        }
7285    }
7286
7287    impl<'de> ::fidl_next::FromWire<crate::wire::SecureHeapProperties<'de>> for SecureHeapProperties {
7288        #[inline]
7289        fn from_wire(wire_: crate::wire::SecureHeapProperties<'de>) -> Self {
7290            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7291
7292            let heap = wire_.table.get(1);
7293
7294            let dynamic_protection_ranges = wire_.table.get(2);
7295
7296            let protected_range_granularity = wire_.table.get(3);
7297
7298            let max_protected_range_count = wire_.table.get(4);
7299
7300            let is_mod_protected_range_available = wire_.table.get(5);
7301
7302            Self {
7303                heap: heap.map(|envelope| {
7304                    ::fidl_next::FromWire::from_wire(unsafe {
7305                        envelope.read_unchecked::<crate::wire::Heap<'de>>()
7306                    })
7307                }),
7308
7309                dynamic_protection_ranges: dynamic_protection_ranges.map(|envelope| {
7310                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
7311                }),
7312
7313                protected_range_granularity: protected_range_granularity.map(|envelope| {
7314                    ::fidl_next::FromWire::from_wire(unsafe {
7315                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
7316                    })
7317                }),
7318
7319                max_protected_range_count: max_protected_range_count.map(|envelope| {
7320                    ::fidl_next::FromWire::from_wire(unsafe {
7321                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
7322                    })
7323                }),
7324
7325                is_mod_protected_range_available: is_mod_protected_range_available.map(
7326                    |envelope| {
7327                        ::fidl_next::FromWire::from_wire(unsafe {
7328                            envelope.read_unchecked::<bool>()
7329                        })
7330                    },
7331                ),
7332            }
7333        }
7334    }
7335
7336    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureHeapProperties<'de>>
7337        for SecureHeapProperties
7338    {
7339        #[inline]
7340        fn from_wire_ref(wire: &crate::wire::SecureHeapProperties<'de>) -> Self {
7341            Self {
7342                heap: wire.table.get(1).map(|envelope| {
7343                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7344                        envelope.deref_unchecked::<crate::wire::Heap<'de>>()
7345                    })
7346                }),
7347
7348                dynamic_protection_ranges: wire.table.get(2).map(|envelope| {
7349                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7350                        envelope.deref_unchecked::<bool>()
7351                    })
7352                }),
7353
7354                protected_range_granularity: wire.table.get(3).map(|envelope| {
7355                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7356                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
7357                    })
7358                }),
7359
7360                max_protected_range_count: wire.table.get(4).map(|envelope| {
7361                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7362                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
7363                    })
7364                }),
7365
7366                is_mod_protected_range_available: wire.table.get(5).map(|envelope| {
7367                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7368                        envelope.deref_unchecked::<bool>()
7369                    })
7370                }),
7371            }
7372        }
7373    }
7374
7375    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7376    pub struct SecureMemGetPhysicalSecureHeapsResponse {
7377        pub heaps: ::core::option::Option<::std::vec::Vec<crate::natural::SecureHeapAndRanges>>,
7378    }
7379
7380    impl SecureMemGetPhysicalSecureHeapsResponse {
7381        fn __max_ordinal(&self) -> usize {
7382            if self.heaps.is_some() {
7383                return 1;
7384            }
7385
7386            0
7387        }
7388    }
7389
7390    unsafe impl<___E>
7391        ::fidl_next::Encode<crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'static>, ___E>
7392        for SecureMemGetPhysicalSecureHeapsResponse
7393    where
7394        ___E: ::fidl_next::Encoder + ?Sized,
7395    {
7396        #[inline]
7397        fn encode(
7398            mut self,
7399            encoder: &mut ___E,
7400            out: &mut ::core::mem::MaybeUninit<
7401                crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'static>,
7402            >,
7403            _: (),
7404        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7405            ::fidl_next::munge!(let crate::wire::SecureMemGetPhysicalSecureHeapsResponse { table } = out);
7406
7407            let max_ord = self.__max_ordinal();
7408
7409            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7410            ::fidl_next::Wire::zero_padding(&mut out);
7411
7412            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7413                ::fidl_next::wire::Envelope,
7414            >(encoder, max_ord);
7415
7416            for i in 1..=max_ord {
7417                match i {
7418                    1 => {
7419                        if let Some(value) = self.heaps.take() {
7420                            ::fidl_next::wire::Envelope::encode_value::<
7421                                ::fidl_next::wire::Vector<
7422                                    'static,
7423                                    crate::wire::SecureHeapAndRanges<'static>,
7424                                >,
7425                                ___E,
7426                            >(
7427                                value, preallocated.encoder, &mut out, (32, ())
7428                            )?;
7429                        } else {
7430                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7431                        }
7432                    }
7433
7434                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7435                }
7436                unsafe {
7437                    preallocated.write_next(out.assume_init_ref());
7438                }
7439            }
7440
7441            ::fidl_next::wire::Table::encode_len(table, max_ord);
7442
7443            Ok(())
7444        }
7445    }
7446
7447    unsafe impl<'a, ___E>
7448        ::fidl_next::Encode<crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'static>, ___E>
7449        for &'a SecureMemGetPhysicalSecureHeapsResponse
7450    where
7451        ___E: ::fidl_next::Encoder + ?Sized,
7452    {
7453        #[inline]
7454        fn encode(
7455            self,
7456            encoder: &mut ___E,
7457            out: &mut ::core::mem::MaybeUninit<
7458                crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'static>,
7459            >,
7460            _: (),
7461        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7462            ::fidl_next::munge!(let crate::wire::SecureMemGetPhysicalSecureHeapsResponse { table } = out);
7463
7464            let max_ord = self.__max_ordinal();
7465
7466            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7467            ::fidl_next::Wire::zero_padding(&mut out);
7468
7469            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7470                ::fidl_next::wire::Envelope,
7471            >(encoder, max_ord);
7472
7473            for i in 1..=max_ord {
7474                match i {
7475                    1 => {
7476                        if let Some(value) = &self.heaps {
7477                            ::fidl_next::wire::Envelope::encode_value::<
7478                                ::fidl_next::wire::Vector<
7479                                    'static,
7480                                    crate::wire::SecureHeapAndRanges<'static>,
7481                                >,
7482                                ___E,
7483                            >(
7484                                value, preallocated.encoder, &mut out, (32, ())
7485                            )?;
7486                        } else {
7487                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7488                        }
7489                    }
7490
7491                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7492                }
7493                unsafe {
7494                    preallocated.write_next(out.assume_init_ref());
7495                }
7496            }
7497
7498            ::fidl_next::wire::Table::encode_len(table, max_ord);
7499
7500            Ok(())
7501        }
7502    }
7503
7504    impl<'de> ::fidl_next::FromWire<crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'de>>
7505        for SecureMemGetPhysicalSecureHeapsResponse
7506    {
7507        #[inline]
7508        fn from_wire(wire_: crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'de>) -> Self {
7509            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7510
7511            let heaps = wire_.table.get(1);
7512
7513            Self {
7514                heaps:
7515                    heaps.map(|envelope| {
7516                        ::fidl_next::FromWire::from_wire(unsafe {
7517                            envelope.read_unchecked::<::fidl_next::wire::Vector<
7518                                'de,
7519                                crate::wire::SecureHeapAndRanges<'de>,
7520                            >>()
7521                        })
7522                    }),
7523            }
7524        }
7525    }
7526
7527    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'de>>
7528        for SecureMemGetPhysicalSecureHeapsResponse
7529    {
7530        #[inline]
7531        fn from_wire_ref(wire: &crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'de>) -> Self {
7532            Self {
7533                heaps:
7534                    wire.table.get(1).map(|envelope| {
7535                        ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7536                            envelope.deref_unchecked::<::fidl_next::wire::Vector<
7537                                'de,
7538                                crate::wire::SecureHeapAndRanges<'de>,
7539                            >>()
7540                        })
7541                    }),
7542            }
7543        }
7544    }
7545
7546    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7547    pub struct SecureMemGetDynamicSecureHeapsResponse {
7548        pub heaps: ::core::option::Option<::std::vec::Vec<crate::natural::DynamicSecureHeap>>,
7549    }
7550
7551    impl SecureMemGetDynamicSecureHeapsResponse {
7552        fn __max_ordinal(&self) -> usize {
7553            if self.heaps.is_some() {
7554                return 1;
7555            }
7556
7557            0
7558        }
7559    }
7560
7561    unsafe impl<___E>
7562        ::fidl_next::Encode<crate::wire::SecureMemGetDynamicSecureHeapsResponse<'static>, ___E>
7563        for SecureMemGetDynamicSecureHeapsResponse
7564    where
7565        ___E: ::fidl_next::Encoder + ?Sized,
7566    {
7567        #[inline]
7568        fn encode(
7569            mut self,
7570            encoder: &mut ___E,
7571            out: &mut ::core::mem::MaybeUninit<
7572                crate::wire::SecureMemGetDynamicSecureHeapsResponse<'static>,
7573            >,
7574            _: (),
7575        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7576            ::fidl_next::munge!(let crate::wire::SecureMemGetDynamicSecureHeapsResponse { table } = out);
7577
7578            let max_ord = self.__max_ordinal();
7579
7580            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7581            ::fidl_next::Wire::zero_padding(&mut out);
7582
7583            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7584                ::fidl_next::wire::Envelope,
7585            >(encoder, max_ord);
7586
7587            for i in 1..=max_ord {
7588                match i {
7589                    1 => {
7590                        if let Some(value) = self.heaps.take() {
7591                            ::fidl_next::wire::Envelope::encode_value::<
7592                                ::fidl_next::wire::Vector<
7593                                    'static,
7594                                    crate::wire::DynamicSecureHeap<'static>,
7595                                >,
7596                                ___E,
7597                            >(
7598                                value, preallocated.encoder, &mut out, (32, ())
7599                            )?;
7600                        } else {
7601                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7602                        }
7603                    }
7604
7605                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7606                }
7607                unsafe {
7608                    preallocated.write_next(out.assume_init_ref());
7609                }
7610            }
7611
7612            ::fidl_next::wire::Table::encode_len(table, max_ord);
7613
7614            Ok(())
7615        }
7616    }
7617
7618    unsafe impl<'a, ___E>
7619        ::fidl_next::Encode<crate::wire::SecureMemGetDynamicSecureHeapsResponse<'static>, ___E>
7620        for &'a SecureMemGetDynamicSecureHeapsResponse
7621    where
7622        ___E: ::fidl_next::Encoder + ?Sized,
7623    {
7624        #[inline]
7625        fn encode(
7626            self,
7627            encoder: &mut ___E,
7628            out: &mut ::core::mem::MaybeUninit<
7629                crate::wire::SecureMemGetDynamicSecureHeapsResponse<'static>,
7630            >,
7631            _: (),
7632        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7633            ::fidl_next::munge!(let crate::wire::SecureMemGetDynamicSecureHeapsResponse { table } = out);
7634
7635            let max_ord = self.__max_ordinal();
7636
7637            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7638            ::fidl_next::Wire::zero_padding(&mut out);
7639
7640            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7641                ::fidl_next::wire::Envelope,
7642            >(encoder, max_ord);
7643
7644            for i in 1..=max_ord {
7645                match i {
7646                    1 => {
7647                        if let Some(value) = &self.heaps {
7648                            ::fidl_next::wire::Envelope::encode_value::<
7649                                ::fidl_next::wire::Vector<
7650                                    'static,
7651                                    crate::wire::DynamicSecureHeap<'static>,
7652                                >,
7653                                ___E,
7654                            >(
7655                                value, preallocated.encoder, &mut out, (32, ())
7656                            )?;
7657                        } else {
7658                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7659                        }
7660                    }
7661
7662                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7663                }
7664                unsafe {
7665                    preallocated.write_next(out.assume_init_ref());
7666                }
7667            }
7668
7669            ::fidl_next::wire::Table::encode_len(table, max_ord);
7670
7671            Ok(())
7672        }
7673    }
7674
7675    impl<'de> ::fidl_next::FromWire<crate::wire::SecureMemGetDynamicSecureHeapsResponse<'de>>
7676        for SecureMemGetDynamicSecureHeapsResponse
7677    {
7678        #[inline]
7679        fn from_wire(wire_: crate::wire::SecureMemGetDynamicSecureHeapsResponse<'de>) -> Self {
7680            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7681
7682            let heaps = wire_.table.get(1);
7683
7684            Self {
7685
7686
7687                heaps: heaps.map(|envelope| ::fidl_next::FromWire::from_wire(
7688                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::DynamicSecureHeap<'de>>>() }
7689                )),
7690
7691        }
7692        }
7693    }
7694
7695    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureMemGetDynamicSecureHeapsResponse<'de>>
7696        for SecureMemGetDynamicSecureHeapsResponse
7697    {
7698        #[inline]
7699        fn from_wire_ref(wire: &crate::wire::SecureMemGetDynamicSecureHeapsResponse<'de>) -> Self {
7700            Self {
7701
7702
7703                heaps: wire.table.get(1)
7704                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
7705                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::DynamicSecureHeap<'de>>>() }
7706                    )),
7707
7708        }
7709        }
7710    }
7711
7712    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7713    pub struct SecureMemGetPhysicalSecureHeapPropertiesRequest {
7714        pub entire_heap: ::core::option::Option<crate::natural::SecureHeapAndRange>,
7715    }
7716
7717    impl SecureMemGetPhysicalSecureHeapPropertiesRequest {
7718        fn __max_ordinal(&self) -> usize {
7719            if self.entire_heap.is_some() {
7720                return 1;
7721            }
7722
7723            0
7724        }
7725    }
7726
7727    unsafe impl<___E>
7728        ::fidl_next::Encode<
7729            crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'static>,
7730            ___E,
7731        > for SecureMemGetPhysicalSecureHeapPropertiesRequest
7732    where
7733        ___E: ::fidl_next::Encoder + ?Sized,
7734    {
7735        #[inline]
7736        fn encode(
7737            mut self,
7738            encoder: &mut ___E,
7739            out: &mut ::core::mem::MaybeUninit<
7740                crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'static>,
7741            >,
7742            _: (),
7743        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7744            ::fidl_next::munge!(let crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest { table } = out);
7745
7746            let max_ord = self.__max_ordinal();
7747
7748            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7749            ::fidl_next::Wire::zero_padding(&mut out);
7750
7751            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7752                ::fidl_next::wire::Envelope,
7753            >(encoder, max_ord);
7754
7755            for i in 1..=max_ord {
7756                match i {
7757                    1 => {
7758                        if let Some(value) = self.entire_heap.take() {
7759                            ::fidl_next::wire::Envelope::encode_value::<
7760                                crate::wire::SecureHeapAndRange<'static>,
7761                                ___E,
7762                            >(
7763                                value, preallocated.encoder, &mut out, ()
7764                            )?;
7765                        } else {
7766                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7767                        }
7768                    }
7769
7770                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7771                }
7772                unsafe {
7773                    preallocated.write_next(out.assume_init_ref());
7774                }
7775            }
7776
7777            ::fidl_next::wire::Table::encode_len(table, max_ord);
7778
7779            Ok(())
7780        }
7781    }
7782
7783    unsafe impl<'a, ___E>
7784        ::fidl_next::Encode<
7785            crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'static>,
7786            ___E,
7787        > for &'a SecureMemGetPhysicalSecureHeapPropertiesRequest
7788    where
7789        ___E: ::fidl_next::Encoder + ?Sized,
7790    {
7791        #[inline]
7792        fn encode(
7793            self,
7794            encoder: &mut ___E,
7795            out: &mut ::core::mem::MaybeUninit<
7796                crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'static>,
7797            >,
7798            _: (),
7799        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7800            ::fidl_next::munge!(let crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest { table } = out);
7801
7802            let max_ord = self.__max_ordinal();
7803
7804            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7805            ::fidl_next::Wire::zero_padding(&mut out);
7806
7807            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7808                ::fidl_next::wire::Envelope,
7809            >(encoder, max_ord);
7810
7811            for i in 1..=max_ord {
7812                match i {
7813                    1 => {
7814                        if let Some(value) = &self.entire_heap {
7815                            ::fidl_next::wire::Envelope::encode_value::<
7816                                crate::wire::SecureHeapAndRange<'static>,
7817                                ___E,
7818                            >(
7819                                value, preallocated.encoder, &mut out, ()
7820                            )?;
7821                        } else {
7822                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7823                        }
7824                    }
7825
7826                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7827                }
7828                unsafe {
7829                    preallocated.write_next(out.assume_init_ref());
7830                }
7831            }
7832
7833            ::fidl_next::wire::Table::encode_len(table, max_ord);
7834
7835            Ok(())
7836        }
7837    }
7838
7839    impl<'de>
7840        ::fidl_next::FromWire<crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>>
7841        for SecureMemGetPhysicalSecureHeapPropertiesRequest
7842    {
7843        #[inline]
7844        fn from_wire(
7845            wire_: crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>,
7846        ) -> Self {
7847            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7848
7849            let entire_heap = wire_.table.get(1);
7850
7851            Self {
7852                entire_heap: entire_heap.map(|envelope| {
7853                    ::fidl_next::FromWire::from_wire(unsafe {
7854                        envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
7855                    })
7856                }),
7857            }
7858        }
7859    }
7860
7861    impl<'de>
7862        ::fidl_next::FromWireRef<crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>>
7863        for SecureMemGetPhysicalSecureHeapPropertiesRequest
7864    {
7865        #[inline]
7866        fn from_wire_ref(
7867            wire: &crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>,
7868        ) -> Self {
7869            Self {
7870                entire_heap: wire.table.get(1).map(|envelope| {
7871                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7872                        envelope.deref_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
7873                    })
7874                }),
7875            }
7876        }
7877    }
7878
7879    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7880    pub struct SecureMemGetPhysicalSecureHeapPropertiesResponse {
7881        pub properties: ::core::option::Option<crate::natural::SecureHeapProperties>,
7882    }
7883
7884    impl SecureMemGetPhysicalSecureHeapPropertiesResponse {
7885        fn __max_ordinal(&self) -> usize {
7886            if self.properties.is_some() {
7887                return 1;
7888            }
7889
7890            0
7891        }
7892    }
7893
7894    unsafe impl<___E>
7895        ::fidl_next::Encode<
7896            crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'static>,
7897            ___E,
7898        > for SecureMemGetPhysicalSecureHeapPropertiesResponse
7899    where
7900        ___E: ::fidl_next::Encoder + ?Sized,
7901    {
7902        #[inline]
7903        fn encode(
7904            mut self,
7905            encoder: &mut ___E,
7906            out: &mut ::core::mem::MaybeUninit<
7907                crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'static>,
7908            >,
7909            _: (),
7910        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7911            ::fidl_next::munge!(let crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse { table } = out);
7912
7913            let max_ord = self.__max_ordinal();
7914
7915            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7916            ::fidl_next::Wire::zero_padding(&mut out);
7917
7918            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7919                ::fidl_next::wire::Envelope,
7920            >(encoder, max_ord);
7921
7922            for i in 1..=max_ord {
7923                match i {
7924                    1 => {
7925                        if let Some(value) = self.properties.take() {
7926                            ::fidl_next::wire::Envelope::encode_value::<
7927                                crate::wire::SecureHeapProperties<'static>,
7928                                ___E,
7929                            >(
7930                                value, preallocated.encoder, &mut out, ()
7931                            )?;
7932                        } else {
7933                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7934                        }
7935                    }
7936
7937                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7938                }
7939                unsafe {
7940                    preallocated.write_next(out.assume_init_ref());
7941                }
7942            }
7943
7944            ::fidl_next::wire::Table::encode_len(table, max_ord);
7945
7946            Ok(())
7947        }
7948    }
7949
7950    unsafe impl<'a, ___E>
7951        ::fidl_next::Encode<
7952            crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'static>,
7953            ___E,
7954        > for &'a SecureMemGetPhysicalSecureHeapPropertiesResponse
7955    where
7956        ___E: ::fidl_next::Encoder + ?Sized,
7957    {
7958        #[inline]
7959        fn encode(
7960            self,
7961            encoder: &mut ___E,
7962            out: &mut ::core::mem::MaybeUninit<
7963                crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'static>,
7964            >,
7965            _: (),
7966        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7967            ::fidl_next::munge!(let crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse { table } = out);
7968
7969            let max_ord = self.__max_ordinal();
7970
7971            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7972            ::fidl_next::Wire::zero_padding(&mut out);
7973
7974            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7975                ::fidl_next::wire::Envelope,
7976            >(encoder, max_ord);
7977
7978            for i in 1..=max_ord {
7979                match i {
7980                    1 => {
7981                        if let Some(value) = &self.properties {
7982                            ::fidl_next::wire::Envelope::encode_value::<
7983                                crate::wire::SecureHeapProperties<'static>,
7984                                ___E,
7985                            >(
7986                                value, preallocated.encoder, &mut out, ()
7987                            )?;
7988                        } else {
7989                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7990                        }
7991                    }
7992
7993                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7994                }
7995                unsafe {
7996                    preallocated.write_next(out.assume_init_ref());
7997                }
7998            }
7999
8000            ::fidl_next::wire::Table::encode_len(table, max_ord);
8001
8002            Ok(())
8003        }
8004    }
8005
8006    impl<'de>
8007        ::fidl_next::FromWire<crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'de>>
8008        for SecureMemGetPhysicalSecureHeapPropertiesResponse
8009    {
8010        #[inline]
8011        fn from_wire(
8012            wire_: crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'de>,
8013        ) -> Self {
8014            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8015
8016            let properties = wire_.table.get(1);
8017
8018            Self {
8019                properties: properties.map(|envelope| {
8020                    ::fidl_next::FromWire::from_wire(unsafe {
8021                        envelope.read_unchecked::<crate::wire::SecureHeapProperties<'de>>()
8022                    })
8023                }),
8024            }
8025        }
8026    }
8027
8028    impl<'de>
8029        ::fidl_next::FromWireRef<crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'de>>
8030        for SecureMemGetPhysicalSecureHeapPropertiesResponse
8031    {
8032        #[inline]
8033        fn from_wire_ref(
8034            wire: &crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'de>,
8035        ) -> Self {
8036            Self {
8037                properties: wire.table.get(1).map(|envelope| {
8038                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8039                        envelope.deref_unchecked::<crate::wire::SecureHeapProperties<'de>>()
8040                    })
8041                }),
8042            }
8043        }
8044    }
8045
8046    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8047    pub struct SecureMemAddSecureHeapPhysicalRangeRequest {
8048        pub heap_range: ::core::option::Option<crate::natural::SecureHeapAndRange>,
8049    }
8050
8051    impl SecureMemAddSecureHeapPhysicalRangeRequest {
8052        fn __max_ordinal(&self) -> usize {
8053            if self.heap_range.is_some() {
8054                return 1;
8055            }
8056
8057            0
8058        }
8059    }
8060
8061    unsafe impl<___E>
8062        ::fidl_next::Encode<crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'static>, ___E>
8063        for SecureMemAddSecureHeapPhysicalRangeRequest
8064    where
8065        ___E: ::fidl_next::Encoder + ?Sized,
8066    {
8067        #[inline]
8068        fn encode(
8069            mut self,
8070            encoder: &mut ___E,
8071            out: &mut ::core::mem::MaybeUninit<
8072                crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'static>,
8073            >,
8074            _: (),
8075        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8076            ::fidl_next::munge!(let crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest { table } = out);
8077
8078            let max_ord = self.__max_ordinal();
8079
8080            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8081            ::fidl_next::Wire::zero_padding(&mut out);
8082
8083            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8084                ::fidl_next::wire::Envelope,
8085            >(encoder, max_ord);
8086
8087            for i in 1..=max_ord {
8088                match i {
8089                    1 => {
8090                        if let Some(value) = self.heap_range.take() {
8091                            ::fidl_next::wire::Envelope::encode_value::<
8092                                crate::wire::SecureHeapAndRange<'static>,
8093                                ___E,
8094                            >(
8095                                value, preallocated.encoder, &mut out, ()
8096                            )?;
8097                        } else {
8098                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8099                        }
8100                    }
8101
8102                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8103                }
8104                unsafe {
8105                    preallocated.write_next(out.assume_init_ref());
8106                }
8107            }
8108
8109            ::fidl_next::wire::Table::encode_len(table, max_ord);
8110
8111            Ok(())
8112        }
8113    }
8114
8115    unsafe impl<'a, ___E>
8116        ::fidl_next::Encode<crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'static>, ___E>
8117        for &'a SecureMemAddSecureHeapPhysicalRangeRequest
8118    where
8119        ___E: ::fidl_next::Encoder + ?Sized,
8120    {
8121        #[inline]
8122        fn encode(
8123            self,
8124            encoder: &mut ___E,
8125            out: &mut ::core::mem::MaybeUninit<
8126                crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'static>,
8127            >,
8128            _: (),
8129        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8130            ::fidl_next::munge!(let crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest { table } = out);
8131
8132            let max_ord = self.__max_ordinal();
8133
8134            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8135            ::fidl_next::Wire::zero_padding(&mut out);
8136
8137            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8138                ::fidl_next::wire::Envelope,
8139            >(encoder, max_ord);
8140
8141            for i in 1..=max_ord {
8142                match i {
8143                    1 => {
8144                        if let Some(value) = &self.heap_range {
8145                            ::fidl_next::wire::Envelope::encode_value::<
8146                                crate::wire::SecureHeapAndRange<'static>,
8147                                ___E,
8148                            >(
8149                                value, preallocated.encoder, &mut out, ()
8150                            )?;
8151                        } else {
8152                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8153                        }
8154                    }
8155
8156                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8157                }
8158                unsafe {
8159                    preallocated.write_next(out.assume_init_ref());
8160                }
8161            }
8162
8163            ::fidl_next::wire::Table::encode_len(table, max_ord);
8164
8165            Ok(())
8166        }
8167    }
8168
8169    impl<'de> ::fidl_next::FromWire<crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'de>>
8170        for SecureMemAddSecureHeapPhysicalRangeRequest
8171    {
8172        #[inline]
8173        fn from_wire(wire_: crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'de>) -> Self {
8174            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8175
8176            let heap_range = wire_.table.get(1);
8177
8178            Self {
8179                heap_range: heap_range.map(|envelope| {
8180                    ::fidl_next::FromWire::from_wire(unsafe {
8181                        envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
8182                    })
8183                }),
8184            }
8185        }
8186    }
8187
8188    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'de>>
8189        for SecureMemAddSecureHeapPhysicalRangeRequest
8190    {
8191        #[inline]
8192        fn from_wire_ref(
8193            wire: &crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'de>,
8194        ) -> Self {
8195            Self {
8196                heap_range: wire.table.get(1).map(|envelope| {
8197                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8198                        envelope.deref_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
8199                    })
8200                }),
8201            }
8202        }
8203    }
8204
8205    pub type SecureMemAddSecureHeapPhysicalRangeResponse = ();
8206
8207    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8208    pub struct SecureMemDeleteSecureHeapPhysicalRangeRequest {
8209        pub heap_range: ::core::option::Option<crate::natural::SecureHeapAndRange>,
8210    }
8211
8212    impl SecureMemDeleteSecureHeapPhysicalRangeRequest {
8213        fn __max_ordinal(&self) -> usize {
8214            if self.heap_range.is_some() {
8215                return 1;
8216            }
8217
8218            0
8219        }
8220    }
8221
8222    unsafe impl<___E>
8223        ::fidl_next::Encode<
8224            crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'static>,
8225            ___E,
8226        > for SecureMemDeleteSecureHeapPhysicalRangeRequest
8227    where
8228        ___E: ::fidl_next::Encoder + ?Sized,
8229    {
8230        #[inline]
8231        fn encode(
8232            mut self,
8233            encoder: &mut ___E,
8234            out: &mut ::core::mem::MaybeUninit<
8235                crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'static>,
8236            >,
8237            _: (),
8238        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8239            ::fidl_next::munge!(let crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest { table } = out);
8240
8241            let max_ord = self.__max_ordinal();
8242
8243            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8244            ::fidl_next::Wire::zero_padding(&mut out);
8245
8246            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8247                ::fidl_next::wire::Envelope,
8248            >(encoder, max_ord);
8249
8250            for i in 1..=max_ord {
8251                match i {
8252                    1 => {
8253                        if let Some(value) = self.heap_range.take() {
8254                            ::fidl_next::wire::Envelope::encode_value::<
8255                                crate::wire::SecureHeapAndRange<'static>,
8256                                ___E,
8257                            >(
8258                                value, preallocated.encoder, &mut out, ()
8259                            )?;
8260                        } else {
8261                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8262                        }
8263                    }
8264
8265                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8266                }
8267                unsafe {
8268                    preallocated.write_next(out.assume_init_ref());
8269                }
8270            }
8271
8272            ::fidl_next::wire::Table::encode_len(table, max_ord);
8273
8274            Ok(())
8275        }
8276    }
8277
8278    unsafe impl<'a, ___E>
8279        ::fidl_next::Encode<
8280            crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'static>,
8281            ___E,
8282        > for &'a SecureMemDeleteSecureHeapPhysicalRangeRequest
8283    where
8284        ___E: ::fidl_next::Encoder + ?Sized,
8285    {
8286        #[inline]
8287        fn encode(
8288            self,
8289            encoder: &mut ___E,
8290            out: &mut ::core::mem::MaybeUninit<
8291                crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'static>,
8292            >,
8293            _: (),
8294        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8295            ::fidl_next::munge!(let crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest { table } = out);
8296
8297            let max_ord = self.__max_ordinal();
8298
8299            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8300            ::fidl_next::Wire::zero_padding(&mut out);
8301
8302            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8303                ::fidl_next::wire::Envelope,
8304            >(encoder, max_ord);
8305
8306            for i in 1..=max_ord {
8307                match i {
8308                    1 => {
8309                        if let Some(value) = &self.heap_range {
8310                            ::fidl_next::wire::Envelope::encode_value::<
8311                                crate::wire::SecureHeapAndRange<'static>,
8312                                ___E,
8313                            >(
8314                                value, preallocated.encoder, &mut out, ()
8315                            )?;
8316                        } else {
8317                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8318                        }
8319                    }
8320
8321                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8322                }
8323                unsafe {
8324                    preallocated.write_next(out.assume_init_ref());
8325                }
8326            }
8327
8328            ::fidl_next::wire::Table::encode_len(table, max_ord);
8329
8330            Ok(())
8331        }
8332    }
8333
8334    impl<'de> ::fidl_next::FromWire<crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>>
8335        for SecureMemDeleteSecureHeapPhysicalRangeRequest
8336    {
8337        #[inline]
8338        fn from_wire(
8339            wire_: crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>,
8340        ) -> Self {
8341            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8342
8343            let heap_range = wire_.table.get(1);
8344
8345            Self {
8346                heap_range: heap_range.map(|envelope| {
8347                    ::fidl_next::FromWire::from_wire(unsafe {
8348                        envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
8349                    })
8350                }),
8351            }
8352        }
8353    }
8354
8355    impl<'de>
8356        ::fidl_next::FromWireRef<crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>>
8357        for SecureMemDeleteSecureHeapPhysicalRangeRequest
8358    {
8359        #[inline]
8360        fn from_wire_ref(
8361            wire: &crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>,
8362        ) -> Self {
8363            Self {
8364                heap_range: wire.table.get(1).map(|envelope| {
8365                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8366                        envelope.deref_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
8367                    })
8368                }),
8369            }
8370        }
8371    }
8372
8373    pub type SecureMemDeleteSecureHeapPhysicalRangeResponse = ();
8374
8375    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8376    pub struct SecureMemModifySecureHeapPhysicalRangeRequest {
8377        pub range_modification:
8378            ::core::option::Option<crate::natural::SecureHeapAndRangeModification>,
8379    }
8380
8381    impl SecureMemModifySecureHeapPhysicalRangeRequest {
8382        fn __max_ordinal(&self) -> usize {
8383            if self.range_modification.is_some() {
8384                return 1;
8385            }
8386
8387            0
8388        }
8389    }
8390
8391    unsafe impl<___E>
8392        ::fidl_next::Encode<
8393            crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'static>,
8394            ___E,
8395        > for SecureMemModifySecureHeapPhysicalRangeRequest
8396    where
8397        ___E: ::fidl_next::Encoder + ?Sized,
8398    {
8399        #[inline]
8400        fn encode(
8401            mut self,
8402            encoder: &mut ___E,
8403            out: &mut ::core::mem::MaybeUninit<
8404                crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'static>,
8405            >,
8406            _: (),
8407        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8408            ::fidl_next::munge!(let crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest { table } = out);
8409
8410            let max_ord = self.__max_ordinal();
8411
8412            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8413            ::fidl_next::Wire::zero_padding(&mut out);
8414
8415            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8416                ::fidl_next::wire::Envelope,
8417            >(encoder, max_ord);
8418
8419            for i in 1..=max_ord {
8420                match i {
8421                    1 => {
8422                        if let Some(value) = self.range_modification.take() {
8423                            ::fidl_next::wire::Envelope::encode_value::<
8424                                crate::wire::SecureHeapAndRangeModification<'static>,
8425                                ___E,
8426                            >(
8427                                value, preallocated.encoder, &mut out, ()
8428                            )?;
8429                        } else {
8430                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8431                        }
8432                    }
8433
8434                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8435                }
8436                unsafe {
8437                    preallocated.write_next(out.assume_init_ref());
8438                }
8439            }
8440
8441            ::fidl_next::wire::Table::encode_len(table, max_ord);
8442
8443            Ok(())
8444        }
8445    }
8446
8447    unsafe impl<'a, ___E>
8448        ::fidl_next::Encode<
8449            crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'static>,
8450            ___E,
8451        > for &'a SecureMemModifySecureHeapPhysicalRangeRequest
8452    where
8453        ___E: ::fidl_next::Encoder + ?Sized,
8454    {
8455        #[inline]
8456        fn encode(
8457            self,
8458            encoder: &mut ___E,
8459            out: &mut ::core::mem::MaybeUninit<
8460                crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'static>,
8461            >,
8462            _: (),
8463        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8464            ::fidl_next::munge!(let crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest { table } = out);
8465
8466            let max_ord = self.__max_ordinal();
8467
8468            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8469            ::fidl_next::Wire::zero_padding(&mut out);
8470
8471            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8472                ::fidl_next::wire::Envelope,
8473            >(encoder, max_ord);
8474
8475            for i in 1..=max_ord {
8476                match i {
8477                    1 => {
8478                        if let Some(value) = &self.range_modification {
8479                            ::fidl_next::wire::Envelope::encode_value::<
8480                                crate::wire::SecureHeapAndRangeModification<'static>,
8481                                ___E,
8482                            >(
8483                                value, preallocated.encoder, &mut out, ()
8484                            )?;
8485                        } else {
8486                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8487                        }
8488                    }
8489
8490                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8491                }
8492                unsafe {
8493                    preallocated.write_next(out.assume_init_ref());
8494                }
8495            }
8496
8497            ::fidl_next::wire::Table::encode_len(table, max_ord);
8498
8499            Ok(())
8500        }
8501    }
8502
8503    impl<'de> ::fidl_next::FromWire<crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'de>>
8504        for SecureMemModifySecureHeapPhysicalRangeRequest
8505    {
8506        #[inline]
8507        fn from_wire(
8508            wire_: crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'de>,
8509        ) -> Self {
8510            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8511
8512            let range_modification = wire_.table.get(1);
8513
8514            Self {
8515                range_modification: range_modification.map(|envelope| {
8516                    ::fidl_next::FromWire::from_wire(unsafe {
8517                        envelope
8518                            .read_unchecked::<crate::wire::SecureHeapAndRangeModification<'de>>()
8519                    })
8520                }),
8521            }
8522        }
8523    }
8524
8525    impl<'de>
8526        ::fidl_next::FromWireRef<crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'de>>
8527        for SecureMemModifySecureHeapPhysicalRangeRequest
8528    {
8529        #[inline]
8530        fn from_wire_ref(
8531            wire: &crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'de>,
8532        ) -> Self {
8533            Self {
8534                range_modification: wire.table.get(1).map(|envelope| {
8535                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8536                        envelope
8537                            .deref_unchecked::<crate::wire::SecureHeapAndRangeModification<'de>>()
8538                    })
8539                }),
8540            }
8541        }
8542    }
8543
8544    pub type SecureMemModifySecureHeapPhysicalRangeResponse = ();
8545
8546    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8547    pub struct SecureMemZeroSubRangeRequest {
8548        pub is_covering_range_explicit: ::core::option::Option<bool>,
8549
8550        pub heap_range: ::core::option::Option<crate::natural::SecureHeapAndRange>,
8551    }
8552
8553    impl SecureMemZeroSubRangeRequest {
8554        fn __max_ordinal(&self) -> usize {
8555            if self.heap_range.is_some() {
8556                return 2;
8557            }
8558
8559            if self.is_covering_range_explicit.is_some() {
8560                return 1;
8561            }
8562
8563            0
8564        }
8565    }
8566
8567    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SecureMemZeroSubRangeRequest<'static>, ___E>
8568        for SecureMemZeroSubRangeRequest
8569    where
8570        ___E: ::fidl_next::Encoder + ?Sized,
8571    {
8572        #[inline]
8573        fn encode(
8574            mut self,
8575            encoder: &mut ___E,
8576            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureMemZeroSubRangeRequest<'static>>,
8577            _: (),
8578        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8579            ::fidl_next::munge!(let crate::wire::SecureMemZeroSubRangeRequest { table } = out);
8580
8581            let max_ord = self.__max_ordinal();
8582
8583            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8584            ::fidl_next::Wire::zero_padding(&mut out);
8585
8586            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8587                ::fidl_next::wire::Envelope,
8588            >(encoder, max_ord);
8589
8590            for i in 1..=max_ord {
8591                match i {
8592                    2 => {
8593                        if let Some(value) = self.heap_range.take() {
8594                            ::fidl_next::wire::Envelope::encode_value::<
8595                                crate::wire::SecureHeapAndRange<'static>,
8596                                ___E,
8597                            >(
8598                                value, preallocated.encoder, &mut out, ()
8599                            )?;
8600                        } else {
8601                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8602                        }
8603                    }
8604
8605                    1 => {
8606                        if let Some(value) = self.is_covering_range_explicit.take() {
8607                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
8608                                value,
8609                                preallocated.encoder,
8610                                &mut out,
8611                                (),
8612                            )?;
8613                        } else {
8614                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8615                        }
8616                    }
8617
8618                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8619                }
8620                unsafe {
8621                    preallocated.write_next(out.assume_init_ref());
8622                }
8623            }
8624
8625            ::fidl_next::wire::Table::encode_len(table, max_ord);
8626
8627            Ok(())
8628        }
8629    }
8630
8631    unsafe impl<'a, ___E>
8632        ::fidl_next::Encode<crate::wire::SecureMemZeroSubRangeRequest<'static>, ___E>
8633        for &'a SecureMemZeroSubRangeRequest
8634    where
8635        ___E: ::fidl_next::Encoder + ?Sized,
8636    {
8637        #[inline]
8638        fn encode(
8639            self,
8640            encoder: &mut ___E,
8641            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureMemZeroSubRangeRequest<'static>>,
8642            _: (),
8643        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8644            ::fidl_next::munge!(let crate::wire::SecureMemZeroSubRangeRequest { table } = out);
8645
8646            let max_ord = self.__max_ordinal();
8647
8648            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8649            ::fidl_next::Wire::zero_padding(&mut out);
8650
8651            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8652                ::fidl_next::wire::Envelope,
8653            >(encoder, max_ord);
8654
8655            for i in 1..=max_ord {
8656                match i {
8657                    2 => {
8658                        if let Some(value) = &self.heap_range {
8659                            ::fidl_next::wire::Envelope::encode_value::<
8660                                crate::wire::SecureHeapAndRange<'static>,
8661                                ___E,
8662                            >(
8663                                value, preallocated.encoder, &mut out, ()
8664                            )?;
8665                        } else {
8666                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8667                        }
8668                    }
8669
8670                    1 => {
8671                        if let Some(value) = &self.is_covering_range_explicit {
8672                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
8673                                value,
8674                                preallocated.encoder,
8675                                &mut out,
8676                                (),
8677                            )?;
8678                        } else {
8679                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8680                        }
8681                    }
8682
8683                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8684                }
8685                unsafe {
8686                    preallocated.write_next(out.assume_init_ref());
8687                }
8688            }
8689
8690            ::fidl_next::wire::Table::encode_len(table, max_ord);
8691
8692            Ok(())
8693        }
8694    }
8695
8696    impl<'de> ::fidl_next::FromWire<crate::wire::SecureMemZeroSubRangeRequest<'de>>
8697        for SecureMemZeroSubRangeRequest
8698    {
8699        #[inline]
8700        fn from_wire(wire_: crate::wire::SecureMemZeroSubRangeRequest<'de>) -> Self {
8701            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8702
8703            let is_covering_range_explicit = wire_.table.get(1);
8704
8705            let heap_range = wire_.table.get(2);
8706
8707            Self {
8708                is_covering_range_explicit: is_covering_range_explicit.map(|envelope| {
8709                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
8710                }),
8711
8712                heap_range: heap_range.map(|envelope| {
8713                    ::fidl_next::FromWire::from_wire(unsafe {
8714                        envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
8715                    })
8716                }),
8717            }
8718        }
8719    }
8720
8721    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureMemZeroSubRangeRequest<'de>>
8722        for SecureMemZeroSubRangeRequest
8723    {
8724        #[inline]
8725        fn from_wire_ref(wire: &crate::wire::SecureMemZeroSubRangeRequest<'de>) -> Self {
8726            Self {
8727                is_covering_range_explicit: wire.table.get(1).map(|envelope| {
8728                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8729                        envelope.deref_unchecked::<bool>()
8730                    })
8731                }),
8732
8733                heap_range: wire.table.get(2).map(|envelope| {
8734                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8735                        envelope.deref_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
8736                    })
8737                }),
8738            }
8739        }
8740    }
8741
8742    pub type SecureMemZeroSubRangeResponse = ();
8743}
8744
8745pub mod wire {
8746
8747    /// The wire type corresponding to [`AllocatorValidateBufferCollectionTokenRequest`].
8748    #[repr(C)]
8749    pub struct AllocatorValidateBufferCollectionTokenRequest<'de> {
8750        pub(crate) table: ::fidl_next::wire::Table<'de>,
8751    }
8752
8753    impl<'de> Drop for AllocatorValidateBufferCollectionTokenRequest<'de> {
8754        fn drop(&mut self) {
8755            let _ = self
8756                .table
8757                .get(1)
8758                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
8759        }
8760    }
8761
8762    impl ::fidl_next::Constrained for AllocatorValidateBufferCollectionTokenRequest<'_> {
8763        type Constraint = ();
8764
8765        fn validate(
8766            _: ::fidl_next::Slot<'_, Self>,
8767            _: Self::Constraint,
8768        ) -> Result<(), ::fidl_next::ValidationError> {
8769            Ok(())
8770        }
8771    }
8772
8773    unsafe impl ::fidl_next::Wire for AllocatorValidateBufferCollectionTokenRequest<'static> {
8774        type Narrowed<'de> = AllocatorValidateBufferCollectionTokenRequest<'de>;
8775
8776        #[inline]
8777        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8778            ::fidl_next::munge!(let Self { table } = out);
8779            ::fidl_next::wire::Table::zero_padding(table);
8780        }
8781    }
8782
8783    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8784        for AllocatorValidateBufferCollectionTokenRequest<'de>
8785    where
8786        ___D: ::fidl_next::Decoder<'de> + ?Sized,
8787    {
8788        fn decode(
8789            slot: ::fidl_next::Slot<'_, Self>,
8790            decoder: &mut ___D,
8791            _: (),
8792        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8793            ::fidl_next::munge!(let Self { table } = slot);
8794
8795            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8796                match ordinal {
8797                    0 => unsafe { ::core::hint::unreachable_unchecked() },
8798
8799                    1 => {
8800                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
8801                            slot.as_mut(),
8802                            decoder,
8803                            (),
8804                        )?;
8805
8806                        Ok(())
8807                    }
8808
8809                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8810                }
8811            })
8812        }
8813    }
8814
8815    impl<'de> AllocatorValidateBufferCollectionTokenRequest<'de> {
8816        pub fn token_server_koid(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
8817            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8818        }
8819
8820        pub fn take_token_server_koid(
8821            &mut self,
8822        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
8823            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8824        }
8825    }
8826
8827    impl<'de> ::core::fmt::Debug for AllocatorValidateBufferCollectionTokenRequest<'de> {
8828        fn fmt(
8829            &self,
8830            f: &mut ::core::fmt::Formatter<'_>,
8831        ) -> ::core::result::Result<(), ::core::fmt::Error> {
8832            f.debug_struct("AllocatorValidateBufferCollectionTokenRequest")
8833                .field("token_server_koid", &self.token_server_koid())
8834                .finish()
8835        }
8836    }
8837
8838    impl<'de> ::fidl_next::IntoNatural for AllocatorValidateBufferCollectionTokenRequest<'de> {
8839        type Natural = crate::natural::AllocatorValidateBufferCollectionTokenRequest;
8840    }
8841
8842    /// The wire type corresponding to [`AllocatorValidateBufferCollectionTokenResponse`].
8843    #[repr(C)]
8844    pub struct AllocatorValidateBufferCollectionTokenResponse<'de> {
8845        pub(crate) table: ::fidl_next::wire::Table<'de>,
8846    }
8847
8848    impl<'de> Drop for AllocatorValidateBufferCollectionTokenResponse<'de> {
8849        fn drop(&mut self) {
8850            let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8851        }
8852    }
8853
8854    impl ::fidl_next::Constrained for AllocatorValidateBufferCollectionTokenResponse<'_> {
8855        type Constraint = ();
8856
8857        fn validate(
8858            _: ::fidl_next::Slot<'_, Self>,
8859            _: Self::Constraint,
8860        ) -> Result<(), ::fidl_next::ValidationError> {
8861            Ok(())
8862        }
8863    }
8864
8865    unsafe impl ::fidl_next::Wire for AllocatorValidateBufferCollectionTokenResponse<'static> {
8866        type Narrowed<'de> = AllocatorValidateBufferCollectionTokenResponse<'de>;
8867
8868        #[inline]
8869        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8870            ::fidl_next::munge!(let Self { table } = out);
8871            ::fidl_next::wire::Table::zero_padding(table);
8872        }
8873    }
8874
8875    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8876        for AllocatorValidateBufferCollectionTokenResponse<'de>
8877    where
8878        ___D: ::fidl_next::Decoder<'de> + ?Sized,
8879    {
8880        fn decode(
8881            slot: ::fidl_next::Slot<'_, Self>,
8882            decoder: &mut ___D,
8883            _: (),
8884        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8885            ::fidl_next::munge!(let Self { table } = slot);
8886
8887            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8888                match ordinal {
8889                    0 => unsafe { ::core::hint::unreachable_unchecked() },
8890
8891                    1 => {
8892                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
8893                            slot.as_mut(),
8894                            decoder,
8895                            (),
8896                        )?;
8897
8898                        Ok(())
8899                    }
8900
8901                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8902                }
8903            })
8904        }
8905    }
8906
8907    impl<'de> AllocatorValidateBufferCollectionTokenResponse<'de> {
8908        pub fn is_known(&self) -> ::core::option::Option<&bool> {
8909            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8910        }
8911
8912        pub fn take_is_known(&mut self) -> ::core::option::Option<bool> {
8913            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8914        }
8915    }
8916
8917    impl<'de> ::core::fmt::Debug for AllocatorValidateBufferCollectionTokenResponse<'de> {
8918        fn fmt(
8919            &self,
8920            f: &mut ::core::fmt::Formatter<'_>,
8921        ) -> ::core::result::Result<(), ::core::fmt::Error> {
8922            f.debug_struct("AllocatorValidateBufferCollectionTokenResponse")
8923                .field("is_known", &self.is_known())
8924                .finish()
8925        }
8926    }
8927
8928    impl<'de> ::fidl_next::IntoNatural for AllocatorValidateBufferCollectionTokenResponse<'de> {
8929        type Natural = crate::natural::AllocatorValidateBufferCollectionTokenResponse;
8930    }
8931
8932    /// The wire type corresponding to [`AllocatorSetDebugClientInfoRequest`].
8933    #[repr(C)]
8934    pub struct AllocatorSetDebugClientInfoRequest<'de> {
8935        pub(crate) table: ::fidl_next::wire::Table<'de>,
8936    }
8937
8938    impl<'de> Drop for AllocatorSetDebugClientInfoRequest<'de> {
8939        fn drop(&mut self) {
8940            let _ = self.table.get(1).map(|envelope| unsafe {
8941                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
8942            });
8943
8944            let _ = self
8945                .table
8946                .get(2)
8947                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
8948        }
8949    }
8950
8951    impl ::fidl_next::Constrained for AllocatorSetDebugClientInfoRequest<'_> {
8952        type Constraint = ();
8953
8954        fn validate(
8955            _: ::fidl_next::Slot<'_, Self>,
8956            _: Self::Constraint,
8957        ) -> Result<(), ::fidl_next::ValidationError> {
8958            Ok(())
8959        }
8960    }
8961
8962    unsafe impl ::fidl_next::Wire for AllocatorSetDebugClientInfoRequest<'static> {
8963        type Narrowed<'de> = AllocatorSetDebugClientInfoRequest<'de>;
8964
8965        #[inline]
8966        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8967            ::fidl_next::munge!(let Self { table } = out);
8968            ::fidl_next::wire::Table::zero_padding(table);
8969        }
8970    }
8971
8972    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AllocatorSetDebugClientInfoRequest<'de>
8973    where
8974        ___D: ::fidl_next::Decoder<'de> + ?Sized,
8975    {
8976        fn decode(
8977            slot: ::fidl_next::Slot<'_, Self>,
8978            decoder: &mut ___D,
8979            _: (),
8980        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8981            ::fidl_next::munge!(let Self { table } = slot);
8982
8983            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8984                match ordinal {
8985                    0 => unsafe { ::core::hint::unreachable_unchecked() },
8986
8987                    1 => {
8988                        ::fidl_next::wire::Envelope::decode_as::<
8989                            ___D,
8990                            ::fidl_next::wire::String<'de>,
8991                        >(slot.as_mut(), decoder, 256)?;
8992
8993                        let value = unsafe {
8994                            slot.deref_unchecked()
8995                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
8996                        };
8997
8998                        if value.len() > 256 {
8999                            return Err(::fidl_next::DecodeError::VectorTooLong {
9000                                size: value.len() as u64,
9001                                limit: 256,
9002                            });
9003                        }
9004
9005                        Ok(())
9006                    }
9007
9008                    2 => {
9009                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9010                            slot.as_mut(),
9011                            decoder,
9012                            (),
9013                        )?;
9014
9015                        Ok(())
9016                    }
9017
9018                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9019                }
9020            })
9021        }
9022    }
9023
9024    impl<'de> AllocatorSetDebugClientInfoRequest<'de> {
9025        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
9026            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9027        }
9028
9029        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
9030            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9031        }
9032
9033        pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
9034            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9035        }
9036
9037        pub fn take_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
9038            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
9039        }
9040    }
9041
9042    impl<'de> ::core::fmt::Debug for AllocatorSetDebugClientInfoRequest<'de> {
9043        fn fmt(
9044            &self,
9045            f: &mut ::core::fmt::Formatter<'_>,
9046        ) -> ::core::result::Result<(), ::core::fmt::Error> {
9047            f.debug_struct("AllocatorSetDebugClientInfoRequest")
9048                .field("name", &self.name())
9049                .field("id", &self.id())
9050                .finish()
9051        }
9052    }
9053
9054    impl<'de> ::fidl_next::IntoNatural for AllocatorSetDebugClientInfoRequest<'de> {
9055        type Natural = crate::natural::AllocatorSetDebugClientInfoRequest;
9056    }
9057
9058    /// The wire type corresponding to [`BufferUsage`].
9059    #[repr(C)]
9060    pub struct BufferUsage<'de> {
9061        pub(crate) table: ::fidl_next::wire::Table<'de>,
9062    }
9063
9064    impl<'de> Drop for BufferUsage<'de> {
9065        fn drop(&mut self) {
9066            let _ = self
9067                .table
9068                .get(1)
9069                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9070
9071            let _ = self
9072                .table
9073                .get(2)
9074                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9075
9076            let _ = self
9077                .table
9078                .get(3)
9079                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9080
9081            let _ = self
9082                .table
9083                .get(4)
9084                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9085
9086            let _ = self
9087                .table
9088                .get(5)
9089                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9090        }
9091    }
9092
9093    impl ::fidl_next::Constrained for BufferUsage<'_> {
9094        type Constraint = ();
9095
9096        fn validate(
9097            _: ::fidl_next::Slot<'_, Self>,
9098            _: Self::Constraint,
9099        ) -> Result<(), ::fidl_next::ValidationError> {
9100            Ok(())
9101        }
9102    }
9103
9104    unsafe impl ::fidl_next::Wire for BufferUsage<'static> {
9105        type Narrowed<'de> = BufferUsage<'de>;
9106
9107        #[inline]
9108        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9109            ::fidl_next::munge!(let Self { table } = out);
9110            ::fidl_next::wire::Table::zero_padding(table);
9111        }
9112    }
9113
9114    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BufferUsage<'de>
9115    where
9116        ___D: ::fidl_next::Decoder<'de> + ?Sized,
9117    {
9118        fn decode(
9119            slot: ::fidl_next::Slot<'_, Self>,
9120            decoder: &mut ___D,
9121            _: (),
9122        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9123            ::fidl_next::munge!(let Self { table } = slot);
9124
9125            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9126                match ordinal {
9127                    0 => unsafe { ::core::hint::unreachable_unchecked() },
9128
9129                    1 => {
9130                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
9131                            slot.as_mut(),
9132                            decoder,
9133                            (),
9134                        )?;
9135
9136                        Ok(())
9137                    }
9138
9139                    2 => {
9140                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
9141                            slot.as_mut(),
9142                            decoder,
9143                            (),
9144                        )?;
9145
9146                        Ok(())
9147                    }
9148
9149                    3 => {
9150                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
9151                            slot.as_mut(),
9152                            decoder,
9153                            (),
9154                        )?;
9155
9156                        Ok(())
9157                    }
9158
9159                    4 => {
9160                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
9161                            slot.as_mut(),
9162                            decoder,
9163                            (),
9164                        )?;
9165
9166                        Ok(())
9167                    }
9168
9169                    5 => {
9170                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
9171                            slot.as_mut(),
9172                            decoder,
9173                            (),
9174                        )?;
9175
9176                        Ok(())
9177                    }
9178
9179                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9180                }
9181            })
9182        }
9183    }
9184
9185    impl<'de> BufferUsage<'de> {
9186        pub fn none(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
9187            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9188        }
9189
9190        pub fn take_none(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
9191            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9192        }
9193
9194        pub fn cpu(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
9195            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9196        }
9197
9198        pub fn take_cpu(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
9199            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
9200        }
9201
9202        pub fn vulkan(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
9203            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
9204        }
9205
9206        pub fn take_vulkan(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
9207            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
9208        }
9209
9210        pub fn display(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
9211            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
9212        }
9213
9214        pub fn take_display(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
9215            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
9216        }
9217
9218        pub fn video(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
9219            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
9220        }
9221
9222        pub fn take_video(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
9223            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
9224        }
9225    }
9226
9227    impl<'de> ::core::fmt::Debug for BufferUsage<'de> {
9228        fn fmt(
9229            &self,
9230            f: &mut ::core::fmt::Formatter<'_>,
9231        ) -> ::core::result::Result<(), ::core::fmt::Error> {
9232            f.debug_struct("BufferUsage")
9233                .field("none", &self.none())
9234                .field("cpu", &self.cpu())
9235                .field("vulkan", &self.vulkan())
9236                .field("display", &self.display())
9237                .field("video", &self.video())
9238                .finish()
9239        }
9240    }
9241
9242    impl<'de> ::fidl_next::IntoNatural for BufferUsage<'de> {
9243        type Natural = crate::natural::BufferUsage;
9244    }
9245
9246    /// The wire type corresponding to [`Heap`].
9247    #[repr(C)]
9248    pub struct Heap<'de> {
9249        pub(crate) table: ::fidl_next::wire::Table<'de>,
9250    }
9251
9252    impl<'de> Drop for Heap<'de> {
9253        fn drop(&mut self) {
9254            let _ = self.table.get(1).map(|envelope| unsafe {
9255                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
9256            });
9257
9258            let _ = self
9259                .table
9260                .get(2)
9261                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
9262        }
9263    }
9264
9265    impl ::fidl_next::Constrained for Heap<'_> {
9266        type Constraint = ();
9267
9268        fn validate(
9269            _: ::fidl_next::Slot<'_, Self>,
9270            _: Self::Constraint,
9271        ) -> Result<(), ::fidl_next::ValidationError> {
9272            Ok(())
9273        }
9274    }
9275
9276    unsafe impl ::fidl_next::Wire for Heap<'static> {
9277        type Narrowed<'de> = Heap<'de>;
9278
9279        #[inline]
9280        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9281            ::fidl_next::munge!(let Self { table } = out);
9282            ::fidl_next::wire::Table::zero_padding(table);
9283        }
9284    }
9285
9286    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Heap<'de>
9287    where
9288        ___D: ::fidl_next::Decoder<'de> + ?Sized,
9289    {
9290        fn decode(
9291            slot: ::fidl_next::Slot<'_, Self>,
9292            decoder: &mut ___D,
9293            _: (),
9294        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9295            ::fidl_next::munge!(let Self { table } = slot);
9296
9297            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9298                match ordinal {
9299                    0 => unsafe { ::core::hint::unreachable_unchecked() },
9300
9301                    1 => {
9302                        ::fidl_next::wire::Envelope::decode_as::<
9303                            ___D,
9304                            ::fidl_next::wire::String<'de>,
9305                        >(slot.as_mut(), decoder, 128)?;
9306
9307                        let value = unsafe {
9308                            slot.deref_unchecked()
9309                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
9310                        };
9311
9312                        if value.len() > 128 {
9313                            return Err(::fidl_next::DecodeError::VectorTooLong {
9314                                size: value.len() as u64,
9315                                limit: 128,
9316                            });
9317                        }
9318
9319                        Ok(())
9320                    }
9321
9322                    2 => {
9323                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9324                            slot.as_mut(),
9325                            decoder,
9326                            (),
9327                        )?;
9328
9329                        Ok(())
9330                    }
9331
9332                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9333                }
9334            })
9335        }
9336    }
9337
9338    impl<'de> Heap<'de> {
9339        pub fn heap_type(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
9340            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9341        }
9342
9343        pub fn take_heap_type(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
9344            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9345        }
9346
9347        pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
9348            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9349        }
9350
9351        pub fn take_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
9352            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
9353        }
9354    }
9355
9356    impl<'de> ::core::fmt::Debug for Heap<'de> {
9357        fn fmt(
9358            &self,
9359            f: &mut ::core::fmt::Formatter<'_>,
9360        ) -> ::core::result::Result<(), ::core::fmt::Error> {
9361            f.debug_struct("Heap")
9362                .field("heap_type", &self.heap_type())
9363                .field("id", &self.id())
9364                .finish()
9365        }
9366    }
9367
9368    impl<'de> ::fidl_next::IntoNatural for Heap<'de> {
9369        type Natural = crate::natural::Heap;
9370    }
9371
9372    /// The wire type corresponding to [`BufferMemoryConstraints`].
9373    #[repr(C)]
9374    pub struct BufferMemoryConstraints<'de> {
9375        pub(crate) table: ::fidl_next::wire::Table<'de>,
9376    }
9377
9378    impl<'de> Drop for BufferMemoryConstraints<'de> {
9379        fn drop(&mut self) {
9380            let _ = self
9381                .table
9382                .get(1)
9383                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
9384
9385            let _ = self
9386                .table
9387                .get(2)
9388                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
9389
9390            let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9391
9392            let _ = self.table.get(4).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9393
9394            let _ = self.table.get(5).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9395
9396            let _ = self.table.get(6).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9397
9398            let _ = self.table.get(7).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9399
9400            let _ = self.table.get(8).map(|envelope| unsafe {
9401                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Heap<'de>>>()
9402            });
9403
9404            let _ = self
9405                .table
9406                .get(9)
9407                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
9408        }
9409    }
9410
9411    impl ::fidl_next::Constrained for BufferMemoryConstraints<'_> {
9412        type Constraint = ();
9413
9414        fn validate(
9415            _: ::fidl_next::Slot<'_, Self>,
9416            _: Self::Constraint,
9417        ) -> Result<(), ::fidl_next::ValidationError> {
9418            Ok(())
9419        }
9420    }
9421
9422    unsafe impl ::fidl_next::Wire for BufferMemoryConstraints<'static> {
9423        type Narrowed<'de> = BufferMemoryConstraints<'de>;
9424
9425        #[inline]
9426        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9427            ::fidl_next::munge!(let Self { table } = out);
9428            ::fidl_next::wire::Table::zero_padding(table);
9429        }
9430    }
9431
9432    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BufferMemoryConstraints<'de>
9433    where
9434        ___D: ::fidl_next::Decoder<'de> + ?Sized,
9435    {
9436        fn decode(
9437            slot: ::fidl_next::Slot<'_, Self>,
9438            decoder: &mut ___D,
9439            _: (),
9440        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9441            ::fidl_next::munge!(let Self { table } = slot);
9442
9443            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9444                match ordinal {
9445                    0 => unsafe { ::core::hint::unreachable_unchecked() },
9446
9447                    1 => {
9448                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9449                            slot.as_mut(),
9450                            decoder,
9451                            (),
9452                        )?;
9453
9454                        Ok(())
9455                    }
9456
9457                    2 => {
9458                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9459                            slot.as_mut(),
9460                            decoder,
9461                            (),
9462                        )?;
9463
9464                        Ok(())
9465                    }
9466
9467                    3 => {
9468                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
9469                            slot.as_mut(),
9470                            decoder,
9471                            (),
9472                        )?;
9473
9474                        Ok(())
9475                    }
9476
9477                    4 => {
9478                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
9479                            slot.as_mut(),
9480                            decoder,
9481                            (),
9482                        )?;
9483
9484                        Ok(())
9485                    }
9486
9487                    5 => {
9488                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
9489                            slot.as_mut(),
9490                            decoder,
9491                            (),
9492                        )?;
9493
9494                        Ok(())
9495                    }
9496
9497                    6 => {
9498                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
9499                            slot.as_mut(),
9500                            decoder,
9501                            (),
9502                        )?;
9503
9504                        Ok(())
9505                    }
9506
9507                    7 => {
9508                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
9509                            slot.as_mut(),
9510                            decoder,
9511                            (),
9512                        )?;
9513
9514                        Ok(())
9515                    }
9516
9517                    8 => {
9518                        ::fidl_next::wire::Envelope::decode_as::<
9519                            ___D,
9520                            ::fidl_next::wire::Vector<'de, crate::wire::Heap<'de>>,
9521                        >(slot.as_mut(), decoder, (64, ()))?;
9522
9523                        let value = unsafe {
9524                            slot
9525                                            .deref_unchecked()
9526                                            .deref_unchecked::<
9527                                                ::fidl_next::wire::Vector<'_, crate::wire::Heap<'_>>
9528                                            >()
9529                        };
9530
9531                        if value.len() > 64 {
9532                            return Err(::fidl_next::DecodeError::VectorTooLong {
9533                                size: value.len() as u64,
9534                                limit: 64,
9535                            });
9536                        }
9537
9538                        Ok(())
9539                    }
9540
9541                    9 => {
9542                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9543                            slot.as_mut(),
9544                            decoder,
9545                            (),
9546                        )?;
9547
9548                        Ok(())
9549                    }
9550
9551                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9552                }
9553            })
9554        }
9555    }
9556
9557    impl<'de> BufferMemoryConstraints<'de> {
9558        pub fn min_size_bytes(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
9559            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9560        }
9561
9562        pub fn take_min_size_bytes(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
9563            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9564        }
9565
9566        pub fn max_size_bytes(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
9567            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9568        }
9569
9570        pub fn take_max_size_bytes(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
9571            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
9572        }
9573
9574        pub fn physically_contiguous_required(&self) -> ::core::option::Option<&bool> {
9575            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
9576        }
9577
9578        pub fn take_physically_contiguous_required(&mut self) -> ::core::option::Option<bool> {
9579            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
9580        }
9581
9582        pub fn secure_required(&self) -> ::core::option::Option<&bool> {
9583            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
9584        }
9585
9586        pub fn take_secure_required(&mut self) -> ::core::option::Option<bool> {
9587            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
9588        }
9589
9590        pub fn cpu_domain_supported(&self) -> ::core::option::Option<&bool> {
9591            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
9592        }
9593
9594        pub fn take_cpu_domain_supported(&mut self) -> ::core::option::Option<bool> {
9595            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
9596        }
9597
9598        pub fn ram_domain_supported(&self) -> ::core::option::Option<&bool> {
9599            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
9600        }
9601
9602        pub fn take_ram_domain_supported(&mut self) -> ::core::option::Option<bool> {
9603            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
9604        }
9605
9606        pub fn inaccessible_domain_supported(&self) -> ::core::option::Option<&bool> {
9607            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
9608        }
9609
9610        pub fn take_inaccessible_domain_supported(&mut self) -> ::core::option::Option<bool> {
9611            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
9612        }
9613
9614        pub fn permitted_heaps(
9615            &self,
9616        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::Heap<'de>>>
9617        {
9618            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
9619        }
9620
9621        pub fn take_permitted_heaps(
9622            &mut self,
9623        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::Heap<'de>>>
9624        {
9625            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
9626        }
9627
9628        pub fn min_physical_base_alignment(
9629            &self,
9630        ) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
9631            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
9632        }
9633
9634        pub fn take_min_physical_base_alignment(
9635            &mut self,
9636        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
9637            unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
9638        }
9639    }
9640
9641    impl<'de> ::core::fmt::Debug for BufferMemoryConstraints<'de> {
9642        fn fmt(
9643            &self,
9644            f: &mut ::core::fmt::Formatter<'_>,
9645        ) -> ::core::result::Result<(), ::core::fmt::Error> {
9646            f.debug_struct("BufferMemoryConstraints")
9647                .field("min_size_bytes", &self.min_size_bytes())
9648                .field("max_size_bytes", &self.max_size_bytes())
9649                .field("physically_contiguous_required", &self.physically_contiguous_required())
9650                .field("secure_required", &self.secure_required())
9651                .field("cpu_domain_supported", &self.cpu_domain_supported())
9652                .field("ram_domain_supported", &self.ram_domain_supported())
9653                .field("inaccessible_domain_supported", &self.inaccessible_domain_supported())
9654                .field("permitted_heaps", &self.permitted_heaps())
9655                .field("min_physical_base_alignment", &self.min_physical_base_alignment())
9656                .finish()
9657        }
9658    }
9659
9660    impl<'de> ::fidl_next::IntoNatural for BufferMemoryConstraints<'de> {
9661        type Natural = crate::natural::BufferMemoryConstraints;
9662    }
9663
9664    /// The wire type corresponding to [`PixelFormatAndModifier`].
9665    #[derive(Clone, Debug)]
9666    #[repr(C)]
9667    pub struct PixelFormatAndModifier {
9668        pub pixel_format: ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
9669
9670        pub pixel_format_modifier: ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
9671    }
9672
9673    static_assertions::const_assert_eq!(std::mem::size_of::<PixelFormatAndModifier>(), 16);
9674    static_assertions::const_assert_eq!(std::mem::align_of::<PixelFormatAndModifier>(), 8);
9675
9676    static_assertions::const_assert_eq!(
9677        std::mem::offset_of!(PixelFormatAndModifier, pixel_format),
9678        0
9679    );
9680
9681    static_assertions::const_assert_eq!(
9682        std::mem::offset_of!(PixelFormatAndModifier, pixel_format_modifier),
9683        8
9684    );
9685
9686    impl ::fidl_next::Constrained for PixelFormatAndModifier {
9687        type Constraint = ();
9688
9689        fn validate(
9690            _: ::fidl_next::Slot<'_, Self>,
9691            _: Self::Constraint,
9692        ) -> Result<(), ::fidl_next::ValidationError> {
9693            Ok(())
9694        }
9695    }
9696
9697    unsafe impl ::fidl_next::Wire for PixelFormatAndModifier {
9698        type Narrowed<'de> = PixelFormatAndModifier;
9699
9700        #[inline]
9701        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9702            ::fidl_next::munge! {
9703                let Self {
9704                    pixel_format,
9705                    pixel_format_modifier,
9706
9707                } = &mut *out_;
9708            }
9709
9710            ::fidl_next::Wire::zero_padding(pixel_format);
9711
9712            ::fidl_next::Wire::zero_padding(pixel_format_modifier);
9713
9714            unsafe {
9715                out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
9716            }
9717        }
9718    }
9719
9720    unsafe impl<___D> ::fidl_next::Decode<___D> for PixelFormatAndModifier
9721    where
9722        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9723    {
9724        fn decode(
9725            slot_: ::fidl_next::Slot<'_, Self>,
9726            decoder_: &mut ___D,
9727            _: (),
9728        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9729            if slot_.as_bytes()[4..8] != [0u8; 4] {
9730                return Err(::fidl_next::DecodeError::InvalidPadding);
9731            }
9732
9733            ::fidl_next::munge! {
9734                let Self {
9735                    mut pixel_format,
9736                    mut pixel_format_modifier,
9737
9738                } = slot_;
9739            }
9740
9741            let _field = pixel_format.as_mut();
9742
9743            ::fidl_next::Decode::decode(pixel_format.as_mut(), decoder_, ())?;
9744
9745            let _field = pixel_format_modifier.as_mut();
9746
9747            ::fidl_next::Decode::decode(pixel_format_modifier.as_mut(), decoder_, ())?;
9748
9749            Ok(())
9750        }
9751    }
9752
9753    impl ::fidl_next::IntoNatural for PixelFormatAndModifier {
9754        type Natural = crate::natural::PixelFormatAndModifier;
9755    }
9756
9757    /// The wire type corresponding to [`ImageFormatConstraints`].
9758    #[repr(C)]
9759    pub struct ImageFormatConstraints<'de> {
9760        pub(crate) table: ::fidl_next::wire::Table<'de>,
9761    }
9762
9763    impl<'de> Drop for ImageFormatConstraints<'de> {
9764        fn drop(&mut self) {
9765            let _ = self.table.get(1).map(|envelope| unsafe {
9766                envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormat>()
9767            });
9768
9769            let _ = self.table.get(2)
9770                .map(|envelope| unsafe {
9771                    envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>()
9772                });
9773
9774            let _ = self.table.get(3).map(|envelope| unsafe {
9775                envelope.read_unchecked::<::fidl_next::wire::Vector<
9776                    'de,
9777                    ::fidl_next_common_fuchsia_images2::wire::ColorSpace,
9778                >>()
9779            });
9780
9781            let _ = self.table.get(4).map(|envelope| unsafe {
9782                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
9783            });
9784
9785            let _ = self.table.get(5).map(|envelope| unsafe {
9786                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
9787            });
9788
9789            let _ = self
9790                .table
9791                .get(6)
9792                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9793
9794            let _ = self
9795                .table
9796                .get(7)
9797                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9798
9799            let _ = self
9800                .table
9801                .get(8)
9802                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
9803
9804            let _ = self.table.get(9).map(|envelope| unsafe {
9805                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
9806            });
9807
9808            let _ = self.table.get(10).map(|envelope| unsafe {
9809                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
9810            });
9811
9812            let _ = self.table.get(11).map(|envelope| unsafe {
9813                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
9814            });
9815
9816            let _ = self.table.get(12).map(|envelope| unsafe {
9817                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
9818            });
9819
9820            let _ = self
9821                .table
9822                .get(13)
9823                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9824
9825            let _ = self
9826                .table
9827                .get(14)
9828                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9829
9830            let _ = self.table.get(15)
9831                .map(|envelope| unsafe {
9832                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::PixelFormatAndModifier>>()
9833                });
9834
9835            let _ = self.table.get(16).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9836
9837            let _ = self.table.get(17).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9838
9839            let _ = self.table.get(18)
9840                .map(|envelope| unsafe {
9841                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_math::wire::SizeU>>()
9842                });
9843
9844            let _ = self.table.get(19).map(|envelope| unsafe {
9845                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
9846            });
9847
9848            let _ = self
9849                .table
9850                .get(20)
9851                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
9852        }
9853    }
9854
9855    impl ::fidl_next::Constrained for ImageFormatConstraints<'_> {
9856        type Constraint = ();
9857
9858        fn validate(
9859            _: ::fidl_next::Slot<'_, Self>,
9860            _: Self::Constraint,
9861        ) -> Result<(), ::fidl_next::ValidationError> {
9862            Ok(())
9863        }
9864    }
9865
9866    unsafe impl ::fidl_next::Wire for ImageFormatConstraints<'static> {
9867        type Narrowed<'de> = ImageFormatConstraints<'de>;
9868
9869        #[inline]
9870        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9871            ::fidl_next::munge!(let Self { table } = out);
9872            ::fidl_next::wire::Table::zero_padding(table);
9873        }
9874    }
9875
9876    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ImageFormatConstraints<'de>
9877    where
9878        ___D: ::fidl_next::Decoder<'de> + ?Sized,
9879    {
9880        fn decode(
9881            slot: ::fidl_next::Slot<'_, Self>,
9882            decoder: &mut ___D,
9883            _: (),
9884        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9885            ::fidl_next::munge!(let Self { table } = slot);
9886
9887            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9888                match ordinal {
9889                    0 => unsafe { ::core::hint::unreachable_unchecked() },
9890
9891                    1 => {
9892                        ::fidl_next::wire::Envelope::decode_as::<
9893                            ___D,
9894                            ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
9895                        >(slot.as_mut(), decoder, ())?;
9896
9897                        Ok(())
9898                    }
9899
9900                    2 => {
9901                        ::fidl_next::wire::Envelope::decode_as::<
9902                            ___D,
9903                            ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
9904                        >(slot.as_mut(), decoder, ())?;
9905
9906                        Ok(())
9907                    }
9908
9909                    3 => {
9910                        ::fidl_next::wire::Envelope::decode_as::<
9911                            ___D,
9912                            ::fidl_next::wire::Vector<
9913                                'de,
9914                                ::fidl_next_common_fuchsia_images2::wire::ColorSpace,
9915                            >,
9916                        >(slot.as_mut(), decoder, (32, ()))?;
9917
9918                        let value = unsafe {
9919                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
9920                                '_,
9921                                ::fidl_next_common_fuchsia_images2::wire::ColorSpace,
9922                            >>()
9923                        };
9924
9925                        if value.len() > 32 {
9926                            return Err(::fidl_next::DecodeError::VectorTooLong {
9927                                size: value.len() as u64,
9928                                limit: 32,
9929                            });
9930                        }
9931
9932                        Ok(())
9933                    }
9934
9935                    4 => {
9936                        ::fidl_next::wire::Envelope::decode_as::<
9937                            ___D,
9938                            ::fidl_next_common_fuchsia_math::wire::SizeU,
9939                        >(slot.as_mut(), decoder, ())?;
9940
9941                        Ok(())
9942                    }
9943
9944                    5 => {
9945                        ::fidl_next::wire::Envelope::decode_as::<
9946                            ___D,
9947                            ::fidl_next_common_fuchsia_math::wire::SizeU,
9948                        >(slot.as_mut(), decoder, ())?;
9949
9950                        Ok(())
9951                    }
9952
9953                    6 => {
9954                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
9955                            slot.as_mut(),
9956                            decoder,
9957                            (),
9958                        )?;
9959
9960                        Ok(())
9961                    }
9962
9963                    7 => {
9964                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
9965                            slot.as_mut(),
9966                            decoder,
9967                            (),
9968                        )?;
9969
9970                        Ok(())
9971                    }
9972
9973                    8 => {
9974                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9975                            slot.as_mut(),
9976                            decoder,
9977                            (),
9978                        )?;
9979
9980                        Ok(())
9981                    }
9982
9983                    9 => {
9984                        ::fidl_next::wire::Envelope::decode_as::<
9985                            ___D,
9986                            ::fidl_next_common_fuchsia_math::wire::SizeU,
9987                        >(slot.as_mut(), decoder, ())?;
9988
9989                        Ok(())
9990                    }
9991
9992                    10 => {
9993                        ::fidl_next::wire::Envelope::decode_as::<
9994                            ___D,
9995                            ::fidl_next_common_fuchsia_math::wire::SizeU,
9996                        >(slot.as_mut(), decoder, ())?;
9997
9998                        Ok(())
9999                    }
10000
10001                    11 => {
10002                        ::fidl_next::wire::Envelope::decode_as::<
10003                            ___D,
10004                            ::fidl_next_common_fuchsia_math::wire::SizeU,
10005                        >(slot.as_mut(), decoder, ())?;
10006
10007                        Ok(())
10008                    }
10009
10010                    12 => {
10011                        ::fidl_next::wire::Envelope::decode_as::<
10012                            ___D,
10013                            ::fidl_next_common_fuchsia_math::wire::SizeU,
10014                        >(slot.as_mut(), decoder, ())?;
10015
10016                        Ok(())
10017                    }
10018
10019                    13 => {
10020                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10021                            slot.as_mut(),
10022                            decoder,
10023                            (),
10024                        )?;
10025
10026                        Ok(())
10027                    }
10028
10029                    14 => {
10030                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10031                            slot.as_mut(),
10032                            decoder,
10033                            (),
10034                        )?;
10035
10036                        Ok(())
10037                    }
10038
10039                    15 => {
10040                        ::fidl_next::wire::Envelope::decode_as::<
10041                            ___D,
10042                            ::fidl_next::wire::Vector<'de, crate::wire::PixelFormatAndModifier>,
10043                        >(slot.as_mut(), decoder, (64, ()))?;
10044
10045                        let value = unsafe {
10046                            slot
10047                                            .deref_unchecked()
10048                                            .deref_unchecked::<
10049                                                ::fidl_next::wire::Vector<'_, crate::wire::PixelFormatAndModifier>
10050                                            >()
10051                        };
10052
10053                        if value.len() > 64 {
10054                            return Err(::fidl_next::DecodeError::VectorTooLong {
10055                                size: value.len() as u64,
10056                                limit: 64,
10057                            });
10058                        }
10059
10060                        Ok(())
10061                    }
10062
10063                    16 => {
10064                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
10065                            slot.as_mut(),
10066                            decoder,
10067                            (),
10068                        )?;
10069
10070                        Ok(())
10071                    }
10072
10073                    17 => {
10074                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
10075                            slot.as_mut(),
10076                            decoder,
10077                            (),
10078                        )?;
10079
10080                        Ok(())
10081                    }
10082
10083                    18 => {
10084                        ::fidl_next::wire::Envelope::decode_as::<
10085                            ___D,
10086                            ::fidl_next::wire::Vector<
10087                                'de,
10088                                ::fidl_next_common_fuchsia_math::wire::SizeU,
10089                            >,
10090                        >(slot.as_mut(), decoder, (64, ()))?;
10091
10092                        let value = unsafe {
10093                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
10094                                '_,
10095                                ::fidl_next_common_fuchsia_math::wire::SizeU,
10096                            >>()
10097                        };
10098
10099                        if value.len() > 64 {
10100                            return Err(::fidl_next::DecodeError::VectorTooLong {
10101                                size: value.len() as u64,
10102                                limit: 64,
10103                            });
10104                        }
10105
10106                        Ok(())
10107                    }
10108
10109                    19 => {
10110                        ::fidl_next::wire::Envelope::decode_as::<
10111                            ___D,
10112                            ::fidl_next_common_fuchsia_math::wire::SizeU,
10113                        >(slot.as_mut(), decoder, ())?;
10114
10115                        Ok(())
10116                    }
10117
10118                    20 => {
10119                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
10120                            slot.as_mut(),
10121                            decoder,
10122                            (),
10123                        )?;
10124
10125                        Ok(())
10126                    }
10127
10128                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10129                }
10130            })
10131        }
10132    }
10133
10134    impl<'de> ImageFormatConstraints<'de> {
10135        pub fn pixel_format(
10136            &self,
10137        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_images2::wire::PixelFormat>
10138        {
10139            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
10140        }
10141
10142        pub fn take_pixel_format(
10143            &mut self,
10144        ) -> ::core::option::Option<::fidl_next_common_fuchsia_images2::wire::PixelFormat> {
10145            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
10146        }
10147
10148        pub fn pixel_format_modifier(
10149            &self,
10150        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>
10151        {
10152            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
10153        }
10154
10155        pub fn take_pixel_format_modifier(
10156            &mut self,
10157        ) -> ::core::option::Option<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>
10158        {
10159            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
10160        }
10161
10162        pub fn color_spaces(
10163            &self,
10164        ) -> ::core::option::Option<
10165            &::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_images2::wire::ColorSpace>,
10166        > {
10167            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
10168        }
10169
10170        pub fn take_color_spaces(
10171            &mut self,
10172        ) -> ::core::option::Option<
10173            ::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_images2::wire::ColorSpace>,
10174        > {
10175            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
10176        }
10177
10178        pub fn min_size(
10179            &self,
10180        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10181            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
10182        }
10183
10184        pub fn take_min_size(
10185            &mut self,
10186        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10187            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
10188        }
10189
10190        pub fn max_size(
10191            &self,
10192        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10193            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
10194        }
10195
10196        pub fn take_max_size(
10197            &mut self,
10198        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10199            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
10200        }
10201
10202        pub fn min_bytes_per_row(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10203            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
10204        }
10205
10206        pub fn take_min_bytes_per_row(
10207            &mut self,
10208        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10209            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
10210        }
10211
10212        pub fn max_bytes_per_row(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10213            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
10214        }
10215
10216        pub fn take_max_bytes_per_row(
10217            &mut self,
10218        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10219            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
10220        }
10221
10222        pub fn max_width_times_height(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
10223            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
10224        }
10225
10226        pub fn take_max_width_times_height(
10227            &mut self,
10228        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
10229            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
10230        }
10231
10232        pub fn size_alignment(
10233            &self,
10234        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10235            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
10236        }
10237
10238        pub fn take_size_alignment(
10239            &mut self,
10240        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10241            unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
10242        }
10243
10244        pub fn display_rect_alignment(
10245            &self,
10246        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10247            unsafe { Some(self.table.get(10)?.deref_unchecked()) }
10248        }
10249
10250        pub fn take_display_rect_alignment(
10251            &mut self,
10252        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10253            unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
10254        }
10255
10256        pub fn required_min_size(
10257            &self,
10258        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10259            unsafe { Some(self.table.get(11)?.deref_unchecked()) }
10260        }
10261
10262        pub fn take_required_min_size(
10263            &mut self,
10264        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10265            unsafe { Some(self.table.get_mut(11)?.take_unchecked()) }
10266        }
10267
10268        pub fn required_max_size(
10269            &self,
10270        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10271            unsafe { Some(self.table.get(12)?.deref_unchecked()) }
10272        }
10273
10274        pub fn take_required_max_size(
10275            &mut self,
10276        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10277            unsafe { Some(self.table.get_mut(12)?.take_unchecked()) }
10278        }
10279
10280        pub fn bytes_per_row_divisor(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10281            unsafe { Some(self.table.get(13)?.deref_unchecked()) }
10282        }
10283
10284        pub fn take_bytes_per_row_divisor(
10285            &mut self,
10286        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10287            unsafe { Some(self.table.get_mut(13)?.take_unchecked()) }
10288        }
10289
10290        pub fn start_offset_divisor(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10291            unsafe { Some(self.table.get(14)?.deref_unchecked()) }
10292        }
10293
10294        pub fn take_start_offset_divisor(
10295            &mut self,
10296        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10297            unsafe { Some(self.table.get_mut(14)?.take_unchecked()) }
10298        }
10299
10300        pub fn pixel_format_and_modifiers(
10301            &self,
10302        ) -> ::core::option::Option<
10303            &::fidl_next::wire::Vector<'de, crate::wire::PixelFormatAndModifier>,
10304        > {
10305            unsafe { Some(self.table.get(15)?.deref_unchecked()) }
10306        }
10307
10308        pub fn take_pixel_format_and_modifiers(
10309            &mut self,
10310        ) -> ::core::option::Option<
10311            ::fidl_next::wire::Vector<'de, crate::wire::PixelFormatAndModifier>,
10312        > {
10313            unsafe { Some(self.table.get_mut(15)?.take_unchecked()) }
10314        }
10315
10316        pub fn require_bytes_per_row_at_pixel_boundary(&self) -> ::core::option::Option<&bool> {
10317            unsafe { Some(self.table.get(16)?.deref_unchecked()) }
10318        }
10319
10320        pub fn take_require_bytes_per_row_at_pixel_boundary(
10321            &mut self,
10322        ) -> ::core::option::Option<bool> {
10323            unsafe { Some(self.table.get_mut(16)?.take_unchecked()) }
10324        }
10325
10326        pub fn is_alpha_present(&self) -> ::core::option::Option<&bool> {
10327            unsafe { Some(self.table.get(17)?.deref_unchecked()) }
10328        }
10329
10330        pub fn take_is_alpha_present(&mut self) -> ::core::option::Option<bool> {
10331            unsafe { Some(self.table.get_mut(17)?.take_unchecked()) }
10332        }
10333
10334        pub fn required_max_size_list(
10335            &self,
10336        ) -> ::core::option::Option<
10337            &::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_math::wire::SizeU>,
10338        > {
10339            unsafe { Some(self.table.get(18)?.deref_unchecked()) }
10340        }
10341
10342        pub fn take_required_max_size_list(
10343            &mut self,
10344        ) -> ::core::option::Option<
10345            ::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_math::wire::SizeU>,
10346        > {
10347            unsafe { Some(self.table.get_mut(18)?.take_unchecked()) }
10348        }
10349
10350        pub fn pad_for_block_size(
10351            &self,
10352        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10353            unsafe { Some(self.table.get(19)?.deref_unchecked()) }
10354        }
10355
10356        pub fn take_pad_for_block_size(
10357            &mut self,
10358        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10359            unsafe { Some(self.table.get_mut(19)?.take_unchecked()) }
10360        }
10361
10362        pub fn pad_beyond_image_size_bytes(
10363            &self,
10364        ) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
10365            unsafe { Some(self.table.get(20)?.deref_unchecked()) }
10366        }
10367
10368        pub fn take_pad_beyond_image_size_bytes(
10369            &mut self,
10370        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
10371            unsafe { Some(self.table.get_mut(20)?.take_unchecked()) }
10372        }
10373    }
10374
10375    impl<'de> ::core::fmt::Debug for ImageFormatConstraints<'de> {
10376        fn fmt(
10377            &self,
10378            f: &mut ::core::fmt::Formatter<'_>,
10379        ) -> ::core::result::Result<(), ::core::fmt::Error> {
10380            f.debug_struct("ImageFormatConstraints")
10381                .field("pixel_format", &self.pixel_format())
10382                .field("pixel_format_modifier", &self.pixel_format_modifier())
10383                .field("color_spaces", &self.color_spaces())
10384                .field("min_size", &self.min_size())
10385                .field("max_size", &self.max_size())
10386                .field("min_bytes_per_row", &self.min_bytes_per_row())
10387                .field("max_bytes_per_row", &self.max_bytes_per_row())
10388                .field("max_width_times_height", &self.max_width_times_height())
10389                .field("size_alignment", &self.size_alignment())
10390                .field("display_rect_alignment", &self.display_rect_alignment())
10391                .field("required_min_size", &self.required_min_size())
10392                .field("required_max_size", &self.required_max_size())
10393                .field("bytes_per_row_divisor", &self.bytes_per_row_divisor())
10394                .field("start_offset_divisor", &self.start_offset_divisor())
10395                .field("pixel_format_and_modifiers", &self.pixel_format_and_modifiers())
10396                .field(
10397                    "require_bytes_per_row_at_pixel_boundary",
10398                    &self.require_bytes_per_row_at_pixel_boundary(),
10399                )
10400                .field("is_alpha_present", &self.is_alpha_present())
10401                .field("required_max_size_list", &self.required_max_size_list())
10402                .field("pad_for_block_size", &self.pad_for_block_size())
10403                .field("pad_beyond_image_size_bytes", &self.pad_beyond_image_size_bytes())
10404                .finish()
10405        }
10406    }
10407
10408    impl<'de> ::fidl_next::IntoNatural for ImageFormatConstraints<'de> {
10409        type Natural = crate::natural::ImageFormatConstraints;
10410    }
10411
10412    /// The wire type corresponding to [`BufferCollectionConstraints`].
10413    #[repr(C)]
10414    pub struct BufferCollectionConstraints<'de> {
10415        pub(crate) table: ::fidl_next::wire::Table<'de>,
10416    }
10417
10418    impl<'de> Drop for BufferCollectionConstraints<'de> {
10419        fn drop(&mut self) {
10420            let _ = self.table.get(1).map(|envelope| unsafe {
10421                envelope.read_unchecked::<crate::wire::BufferUsage<'de>>()
10422            });
10423
10424            let _ = self
10425                .table
10426                .get(2)
10427                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10428
10429            let _ = self
10430                .table
10431                .get(3)
10432                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10433
10434            let _ = self
10435                .table
10436                .get(4)
10437                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10438
10439            let _ = self
10440                .table
10441                .get(5)
10442                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10443
10444            let _ = self
10445                .table
10446                .get(6)
10447                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10448
10449            let _ = self.table.get(7).map(|envelope| unsafe {
10450                envelope.read_unchecked::<crate::wire::BufferMemoryConstraints<'de>>()
10451            });
10452
10453            let _ = self.table.get(8)
10454                .map(|envelope| unsafe {
10455                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ImageFormatConstraints<'de>>>()
10456                });
10457        }
10458    }
10459
10460    impl ::fidl_next::Constrained for BufferCollectionConstraints<'_> {
10461        type Constraint = ();
10462
10463        fn validate(
10464            _: ::fidl_next::Slot<'_, Self>,
10465            _: Self::Constraint,
10466        ) -> Result<(), ::fidl_next::ValidationError> {
10467            Ok(())
10468        }
10469    }
10470
10471    unsafe impl ::fidl_next::Wire for BufferCollectionConstraints<'static> {
10472        type Narrowed<'de> = BufferCollectionConstraints<'de>;
10473
10474        #[inline]
10475        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10476            ::fidl_next::munge!(let Self { table } = out);
10477            ::fidl_next::wire::Table::zero_padding(table);
10478        }
10479    }
10480
10481    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BufferCollectionConstraints<'de>
10482    where
10483        ___D: ::fidl_next::Decoder<'de> + ?Sized,
10484    {
10485        fn decode(
10486            slot: ::fidl_next::Slot<'_, Self>,
10487            decoder: &mut ___D,
10488            _: (),
10489        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10490            ::fidl_next::munge!(let Self { table } = slot);
10491
10492            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10493                match ordinal {
10494                    0 => unsafe { ::core::hint::unreachable_unchecked() },
10495
10496                    1 => {
10497                        ::fidl_next::wire::Envelope::decode_as::<
10498                            ___D,
10499                            crate::wire::BufferUsage<'de>,
10500                        >(slot.as_mut(), decoder, ())?;
10501
10502                        Ok(())
10503                    }
10504
10505                    2 => {
10506                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10507                            slot.as_mut(),
10508                            decoder,
10509                            (),
10510                        )?;
10511
10512                        Ok(())
10513                    }
10514
10515                    3 => {
10516                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10517                            slot.as_mut(),
10518                            decoder,
10519                            (),
10520                        )?;
10521
10522                        Ok(())
10523                    }
10524
10525                    4 => {
10526                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10527                            slot.as_mut(),
10528                            decoder,
10529                            (),
10530                        )?;
10531
10532                        Ok(())
10533                    }
10534
10535                    5 => {
10536                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10537                            slot.as_mut(),
10538                            decoder,
10539                            (),
10540                        )?;
10541
10542                        Ok(())
10543                    }
10544
10545                    6 => {
10546                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10547                            slot.as_mut(),
10548                            decoder,
10549                            (),
10550                        )?;
10551
10552                        Ok(())
10553                    }
10554
10555                    7 => {
10556                        ::fidl_next::wire::Envelope::decode_as::<
10557                            ___D,
10558                            crate::wire::BufferMemoryConstraints<'de>,
10559                        >(slot.as_mut(), decoder, ())?;
10560
10561                        Ok(())
10562                    }
10563
10564                    8 => {
10565                        ::fidl_next::wire::Envelope::decode_as::<
10566                            ___D,
10567                            ::fidl_next::wire::Vector<
10568                                'de,
10569                                crate::wire::ImageFormatConstraints<'de>,
10570                            >,
10571                        >(slot.as_mut(), decoder, (64, ()))?;
10572
10573                        let value = unsafe {
10574                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
10575                                '_,
10576                                crate::wire::ImageFormatConstraints<'_>,
10577                            >>()
10578                        };
10579
10580                        if value.len() > 64 {
10581                            return Err(::fidl_next::DecodeError::VectorTooLong {
10582                                size: value.len() as u64,
10583                                limit: 64,
10584                            });
10585                        }
10586
10587                        Ok(())
10588                    }
10589
10590                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10591                }
10592            })
10593        }
10594    }
10595
10596    impl<'de> BufferCollectionConstraints<'de> {
10597        pub fn usage(&self) -> ::core::option::Option<&crate::wire::BufferUsage<'de>> {
10598            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
10599        }
10600
10601        pub fn take_usage(&mut self) -> ::core::option::Option<crate::wire::BufferUsage<'de>> {
10602            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
10603        }
10604
10605        pub fn min_buffer_count_for_camping(
10606            &self,
10607        ) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10608            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
10609        }
10610
10611        pub fn take_min_buffer_count_for_camping(
10612            &mut self,
10613        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10614            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
10615        }
10616
10617        pub fn min_buffer_count_for_dedicated_slack(
10618            &self,
10619        ) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10620            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
10621        }
10622
10623        pub fn take_min_buffer_count_for_dedicated_slack(
10624            &mut self,
10625        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10626            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
10627        }
10628
10629        pub fn min_buffer_count_for_shared_slack(
10630            &self,
10631        ) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10632            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
10633        }
10634
10635        pub fn take_min_buffer_count_for_shared_slack(
10636            &mut self,
10637        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10638            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
10639        }
10640
10641        pub fn min_buffer_count(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10642            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
10643        }
10644
10645        pub fn take_min_buffer_count(
10646            &mut self,
10647        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10648            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
10649        }
10650
10651        pub fn max_buffer_count(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10652            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
10653        }
10654
10655        pub fn take_max_buffer_count(
10656            &mut self,
10657        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10658            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
10659        }
10660
10661        pub fn buffer_memory_constraints(
10662            &self,
10663        ) -> ::core::option::Option<&crate::wire::BufferMemoryConstraints<'de>> {
10664            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
10665        }
10666
10667        pub fn take_buffer_memory_constraints(
10668            &mut self,
10669        ) -> ::core::option::Option<crate::wire::BufferMemoryConstraints<'de>> {
10670            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
10671        }
10672
10673        pub fn image_format_constraints(
10674            &self,
10675        ) -> ::core::option::Option<
10676            &::fidl_next::wire::Vector<'de, crate::wire::ImageFormatConstraints<'de>>,
10677        > {
10678            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
10679        }
10680
10681        pub fn take_image_format_constraints(
10682            &mut self,
10683        ) -> ::core::option::Option<
10684            ::fidl_next::wire::Vector<'de, crate::wire::ImageFormatConstraints<'de>>,
10685        > {
10686            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
10687        }
10688    }
10689
10690    impl<'de> ::core::fmt::Debug for BufferCollectionConstraints<'de> {
10691        fn fmt(
10692            &self,
10693            f: &mut ::core::fmt::Formatter<'_>,
10694        ) -> ::core::result::Result<(), ::core::fmt::Error> {
10695            f.debug_struct("BufferCollectionConstraints")
10696                .field("usage", &self.usage())
10697                .field("min_buffer_count_for_camping", &self.min_buffer_count_for_camping())
10698                .field(
10699                    "min_buffer_count_for_dedicated_slack",
10700                    &self.min_buffer_count_for_dedicated_slack(),
10701                )
10702                .field(
10703                    "min_buffer_count_for_shared_slack",
10704                    &self.min_buffer_count_for_shared_slack(),
10705                )
10706                .field("min_buffer_count", &self.min_buffer_count())
10707                .field("max_buffer_count", &self.max_buffer_count())
10708                .field("buffer_memory_constraints", &self.buffer_memory_constraints())
10709                .field("image_format_constraints", &self.image_format_constraints())
10710                .finish()
10711        }
10712    }
10713
10714    impl<'de> ::fidl_next::IntoNatural for BufferCollectionConstraints<'de> {
10715        type Natural = crate::natural::BufferCollectionConstraints;
10716    }
10717
10718    /// The wire type corresponding to [`CoherencyDomain`].
10719    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
10720    #[repr(transparent)]
10721    pub struct CoherencyDomain {
10722        pub(crate) value: ::fidl_next::wire::Uint32,
10723    }
10724
10725    impl ::fidl_next::Constrained for CoherencyDomain {
10726        type Constraint = ();
10727
10728        fn validate(
10729            _: ::fidl_next::Slot<'_, Self>,
10730            _: Self::Constraint,
10731        ) -> Result<(), ::fidl_next::ValidationError> {
10732            Ok(())
10733        }
10734    }
10735
10736    unsafe impl ::fidl_next::Wire for CoherencyDomain {
10737        type Narrowed<'de> = Self;
10738
10739        #[inline]
10740        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10741            // Wire enums have no padding
10742        }
10743    }
10744
10745    impl CoherencyDomain {
10746        pub const CPU: CoherencyDomain = CoherencyDomain { value: ::fidl_next::wire::Uint32(0) };
10747
10748        pub const RAM: CoherencyDomain = CoherencyDomain { value: ::fidl_next::wire::Uint32(1) };
10749
10750        pub const INACCESSIBLE: CoherencyDomain =
10751            CoherencyDomain { value: ::fidl_next::wire::Uint32(2) };
10752    }
10753
10754    unsafe impl<___D> ::fidl_next::Decode<___D> for CoherencyDomain
10755    where
10756        ___D: ?Sized,
10757    {
10758        fn decode(
10759            slot: ::fidl_next::Slot<'_, Self>,
10760            _: &mut ___D,
10761            _: (),
10762        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10763            Ok(())
10764        }
10765    }
10766
10767    impl ::core::convert::From<crate::natural::CoherencyDomain> for CoherencyDomain {
10768        fn from(natural: crate::natural::CoherencyDomain) -> Self {
10769            match natural {
10770                crate::natural::CoherencyDomain::Cpu => CoherencyDomain::CPU,
10771
10772                crate::natural::CoherencyDomain::Ram => CoherencyDomain::RAM,
10773
10774                crate::natural::CoherencyDomain::Inaccessible => CoherencyDomain::INACCESSIBLE,
10775
10776                crate::natural::CoherencyDomain::UnknownOrdinal_(value) => {
10777                    CoherencyDomain { value: ::fidl_next::wire::Uint32::from(value) }
10778                }
10779            }
10780        }
10781    }
10782
10783    impl ::fidl_next::IntoNatural for CoherencyDomain {
10784        type Natural = crate::natural::CoherencyDomain;
10785    }
10786
10787    /// The wire type corresponding to [`BufferMemorySettings`].
10788    #[repr(C)]
10789    pub struct BufferMemorySettings<'de> {
10790        pub(crate) table: ::fidl_next::wire::Table<'de>,
10791    }
10792
10793    impl<'de> Drop for BufferMemorySettings<'de> {
10794        fn drop(&mut self) {
10795            let _ = self
10796                .table
10797                .get(1)
10798                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
10799
10800            let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
10801
10802            let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
10803
10804            let _ = self.table.get(4).map(|envelope| unsafe {
10805                envelope.read_unchecked::<crate::wire::CoherencyDomain>()
10806            });
10807
10808            let _ = self
10809                .table
10810                .get(5)
10811                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() });
10812
10813            let _ = self
10814                .table
10815                .get(6)
10816                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
10817        }
10818    }
10819
10820    impl ::fidl_next::Constrained for BufferMemorySettings<'_> {
10821        type Constraint = ();
10822
10823        fn validate(
10824            _: ::fidl_next::Slot<'_, Self>,
10825            _: Self::Constraint,
10826        ) -> Result<(), ::fidl_next::ValidationError> {
10827            Ok(())
10828        }
10829    }
10830
10831    unsafe impl ::fidl_next::Wire for BufferMemorySettings<'static> {
10832        type Narrowed<'de> = BufferMemorySettings<'de>;
10833
10834        #[inline]
10835        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10836            ::fidl_next::munge!(let Self { table } = out);
10837            ::fidl_next::wire::Table::zero_padding(table);
10838        }
10839    }
10840
10841    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BufferMemorySettings<'de>
10842    where
10843        ___D: ::fidl_next::Decoder<'de> + ?Sized,
10844    {
10845        fn decode(
10846            slot: ::fidl_next::Slot<'_, Self>,
10847            decoder: &mut ___D,
10848            _: (),
10849        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10850            ::fidl_next::munge!(let Self { table } = slot);
10851
10852            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10853                match ordinal {
10854                    0 => unsafe { ::core::hint::unreachable_unchecked() },
10855
10856                    1 => {
10857                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
10858                            slot.as_mut(),
10859                            decoder,
10860                            (),
10861                        )?;
10862
10863                        Ok(())
10864                    }
10865
10866                    2 => {
10867                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
10868                            slot.as_mut(),
10869                            decoder,
10870                            (),
10871                        )?;
10872
10873                        Ok(())
10874                    }
10875
10876                    3 => {
10877                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
10878                            slot.as_mut(),
10879                            decoder,
10880                            (),
10881                        )?;
10882
10883                        Ok(())
10884                    }
10885
10886                    4 => {
10887                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::CoherencyDomain>(
10888                            slot.as_mut(),
10889                            decoder,
10890                            (),
10891                        )?;
10892
10893                        Ok(())
10894                    }
10895
10896                    5 => {
10897                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Heap<'de>>(
10898                            slot.as_mut(),
10899                            decoder,
10900                            (),
10901                        )?;
10902
10903                        Ok(())
10904                    }
10905
10906                    6 => {
10907                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
10908                            slot.as_mut(),
10909                            decoder,
10910                            (),
10911                        )?;
10912
10913                        Ok(())
10914                    }
10915
10916                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10917                }
10918            })
10919        }
10920    }
10921
10922    impl<'de> BufferMemorySettings<'de> {
10923        pub fn size_bytes(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
10924            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
10925        }
10926
10927        pub fn take_size_bytes(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
10928            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
10929        }
10930
10931        pub fn is_physically_contiguous(&self) -> ::core::option::Option<&bool> {
10932            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
10933        }
10934
10935        pub fn take_is_physically_contiguous(&mut self) -> ::core::option::Option<bool> {
10936            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
10937        }
10938
10939        pub fn is_secure(&self) -> ::core::option::Option<&bool> {
10940            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
10941        }
10942
10943        pub fn take_is_secure(&mut self) -> ::core::option::Option<bool> {
10944            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
10945        }
10946
10947        pub fn coherency_domain(&self) -> ::core::option::Option<&crate::wire::CoherencyDomain> {
10948            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
10949        }
10950
10951        pub fn take_coherency_domain(
10952            &mut self,
10953        ) -> ::core::option::Option<crate::wire::CoherencyDomain> {
10954            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
10955        }
10956
10957        pub fn heap(&self) -> ::core::option::Option<&crate::wire::Heap<'de>> {
10958            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
10959        }
10960
10961        pub fn take_heap(&mut self) -> ::core::option::Option<crate::wire::Heap<'de>> {
10962            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
10963        }
10964
10965        pub fn raw_vmo_size(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
10966            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
10967        }
10968
10969        pub fn take_raw_vmo_size(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
10970            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
10971        }
10972    }
10973
10974    impl<'de> ::core::fmt::Debug for BufferMemorySettings<'de> {
10975        fn fmt(
10976            &self,
10977            f: &mut ::core::fmt::Formatter<'_>,
10978        ) -> ::core::result::Result<(), ::core::fmt::Error> {
10979            f.debug_struct("BufferMemorySettings")
10980                .field("size_bytes", &self.size_bytes())
10981                .field("is_physically_contiguous", &self.is_physically_contiguous())
10982                .field("is_secure", &self.is_secure())
10983                .field("coherency_domain", &self.coherency_domain())
10984                .field("heap", &self.heap())
10985                .field("raw_vmo_size", &self.raw_vmo_size())
10986                .finish()
10987        }
10988    }
10989
10990    impl<'de> ::fidl_next::IntoNatural for BufferMemorySettings<'de> {
10991        type Natural = crate::natural::BufferMemorySettings;
10992    }
10993
10994    /// The wire type corresponding to [`SingleBufferSettings`].
10995    #[repr(C)]
10996    pub struct SingleBufferSettings<'de> {
10997        pub(crate) table: ::fidl_next::wire::Table<'de>,
10998    }
10999
11000    impl<'de> Drop for SingleBufferSettings<'de> {
11001        fn drop(&mut self) {
11002            let _ = self.table.get(1).map(|envelope| unsafe {
11003                envelope.read_unchecked::<crate::wire::BufferMemorySettings<'de>>()
11004            });
11005
11006            let _ = self.table.get(2).map(|envelope| unsafe {
11007                envelope.read_unchecked::<crate::wire::ImageFormatConstraints<'de>>()
11008            });
11009        }
11010    }
11011
11012    impl ::fidl_next::Constrained for SingleBufferSettings<'_> {
11013        type Constraint = ();
11014
11015        fn validate(
11016            _: ::fidl_next::Slot<'_, Self>,
11017            _: Self::Constraint,
11018        ) -> Result<(), ::fidl_next::ValidationError> {
11019            Ok(())
11020        }
11021    }
11022
11023    unsafe impl ::fidl_next::Wire for SingleBufferSettings<'static> {
11024        type Narrowed<'de> = SingleBufferSettings<'de>;
11025
11026        #[inline]
11027        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11028            ::fidl_next::munge!(let Self { table } = out);
11029            ::fidl_next::wire::Table::zero_padding(table);
11030        }
11031    }
11032
11033    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SingleBufferSettings<'de>
11034    where
11035        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11036    {
11037        fn decode(
11038            slot: ::fidl_next::Slot<'_, Self>,
11039            decoder: &mut ___D,
11040            _: (),
11041        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11042            ::fidl_next::munge!(let Self { table } = slot);
11043
11044            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11045                match ordinal {
11046                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11047
11048                    1 => {
11049                        ::fidl_next::wire::Envelope::decode_as::<
11050                            ___D,
11051                            crate::wire::BufferMemorySettings<'de>,
11052                        >(slot.as_mut(), decoder, ())?;
11053
11054                        Ok(())
11055                    }
11056
11057                    2 => {
11058                        ::fidl_next::wire::Envelope::decode_as::<
11059                            ___D,
11060                            crate::wire::ImageFormatConstraints<'de>,
11061                        >(slot.as_mut(), decoder, ())?;
11062
11063                        Ok(())
11064                    }
11065
11066                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11067                }
11068            })
11069        }
11070    }
11071
11072    impl<'de> SingleBufferSettings<'de> {
11073        pub fn buffer_settings(
11074            &self,
11075        ) -> ::core::option::Option<&crate::wire::BufferMemorySettings<'de>> {
11076            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11077        }
11078
11079        pub fn take_buffer_settings(
11080            &mut self,
11081        ) -> ::core::option::Option<crate::wire::BufferMemorySettings<'de>> {
11082            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11083        }
11084
11085        pub fn image_format_constraints(
11086            &self,
11087        ) -> ::core::option::Option<&crate::wire::ImageFormatConstraints<'de>> {
11088            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
11089        }
11090
11091        pub fn take_image_format_constraints(
11092            &mut self,
11093        ) -> ::core::option::Option<crate::wire::ImageFormatConstraints<'de>> {
11094            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
11095        }
11096    }
11097
11098    impl<'de> ::core::fmt::Debug for SingleBufferSettings<'de> {
11099        fn fmt(
11100            &self,
11101            f: &mut ::core::fmt::Formatter<'_>,
11102        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11103            f.debug_struct("SingleBufferSettings")
11104                .field("buffer_settings", &self.buffer_settings())
11105                .field("image_format_constraints", &self.image_format_constraints())
11106                .finish()
11107        }
11108    }
11109
11110    impl<'de> ::fidl_next::IntoNatural for SingleBufferSettings<'de> {
11111        type Natural = crate::natural::SingleBufferSettings;
11112    }
11113
11114    /// The wire type corresponding to [`Error`].
11115    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
11116    #[repr(transparent)]
11117    pub struct Error {
11118        pub(crate) value: ::fidl_next::wire::Uint32,
11119    }
11120
11121    impl ::fidl_next::Constrained for Error {
11122        type Constraint = ();
11123
11124        fn validate(
11125            _: ::fidl_next::Slot<'_, Self>,
11126            _: Self::Constraint,
11127        ) -> Result<(), ::fidl_next::ValidationError> {
11128            Ok(())
11129        }
11130    }
11131
11132    unsafe impl ::fidl_next::Wire for Error {
11133        type Narrowed<'de> = Self;
11134
11135        #[inline]
11136        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
11137            // Wire enums have no padding
11138        }
11139    }
11140
11141    impl Error {
11142        pub const INVALID: Error = Error { value: ::fidl_next::wire::Uint32(0) };
11143
11144        pub const UNSPECIFIED: Error = Error { value: ::fidl_next::wire::Uint32(1) };
11145
11146        pub const PROTOCOL_DEVIATION: Error = Error { value: ::fidl_next::wire::Uint32(2) };
11147
11148        pub const NOT_FOUND: Error = Error { value: ::fidl_next::wire::Uint32(3) };
11149
11150        pub const HANDLE_ACCESS_DENIED: Error = Error { value: ::fidl_next::wire::Uint32(4) };
11151
11152        pub const NO_MEMORY: Error = Error { value: ::fidl_next::wire::Uint32(5) };
11153
11154        pub const CONSTRAINTS_INTERSECTION_EMPTY: Error =
11155            Error { value: ::fidl_next::wire::Uint32(6) };
11156
11157        pub const PENDING: Error = Error { value: ::fidl_next::wire::Uint32(7) };
11158
11159        pub const TOO_MANY_GROUP_CHILD_COMBINATIONS: Error =
11160            Error { value: ::fidl_next::wire::Uint32(8) };
11161
11162        pub const NO_MORE_STRONG_VMO_HANDLES: Error = Error { value: ::fidl_next::wire::Uint32(9) };
11163    }
11164
11165    unsafe impl<___D> ::fidl_next::Decode<___D> for Error
11166    where
11167        ___D: ?Sized,
11168    {
11169        fn decode(
11170            slot: ::fidl_next::Slot<'_, Self>,
11171            _: &mut ___D,
11172            _: (),
11173        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11174            Ok(())
11175        }
11176    }
11177
11178    impl ::core::convert::From<crate::natural::Error> for Error {
11179        fn from(natural: crate::natural::Error) -> Self {
11180            match natural {
11181                crate::natural::Error::Invalid => Error::INVALID,
11182
11183                crate::natural::Error::Unspecified => Error::UNSPECIFIED,
11184
11185                crate::natural::Error::ProtocolDeviation => Error::PROTOCOL_DEVIATION,
11186
11187                crate::natural::Error::NotFound => Error::NOT_FOUND,
11188
11189                crate::natural::Error::HandleAccessDenied => Error::HANDLE_ACCESS_DENIED,
11190
11191                crate::natural::Error::NoMemory => Error::NO_MEMORY,
11192
11193                crate::natural::Error::ConstraintsIntersectionEmpty => {
11194                    Error::CONSTRAINTS_INTERSECTION_EMPTY
11195                }
11196
11197                crate::natural::Error::Pending => Error::PENDING,
11198
11199                crate::natural::Error::TooManyGroupChildCombinations => {
11200                    Error::TOO_MANY_GROUP_CHILD_COMBINATIONS
11201                }
11202
11203                crate::natural::Error::NoMoreStrongVmoHandles => Error::NO_MORE_STRONG_VMO_HANDLES,
11204
11205                crate::natural::Error::UnknownOrdinal_(value) => {
11206                    Error { value: ::fidl_next::wire::Uint32::from(value) }
11207                }
11208            }
11209        }
11210    }
11211
11212    impl ::fidl_next::IntoNatural for Error {
11213        type Natural = crate::natural::Error;
11214    }
11215
11216    /// The wire type corresponding to [`NodeSyncResponse`].
11217    pub type NodeSyncResponse = ::fidl_next::wire::Unit;
11218
11219    /// The wire type corresponding to [`NodeSetNameRequest`].
11220    #[repr(C)]
11221    pub struct NodeSetNameRequest<'de> {
11222        pub(crate) table: ::fidl_next::wire::Table<'de>,
11223    }
11224
11225    impl<'de> Drop for NodeSetNameRequest<'de> {
11226        fn drop(&mut self) {
11227            let _ = self
11228                .table
11229                .get(1)
11230                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
11231
11232            let _ = self.table.get(2).map(|envelope| unsafe {
11233                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
11234            });
11235        }
11236    }
11237
11238    impl ::fidl_next::Constrained for NodeSetNameRequest<'_> {
11239        type Constraint = ();
11240
11241        fn validate(
11242            _: ::fidl_next::Slot<'_, Self>,
11243            _: Self::Constraint,
11244        ) -> Result<(), ::fidl_next::ValidationError> {
11245            Ok(())
11246        }
11247    }
11248
11249    unsafe impl ::fidl_next::Wire for NodeSetNameRequest<'static> {
11250        type Narrowed<'de> = NodeSetNameRequest<'de>;
11251
11252        #[inline]
11253        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11254            ::fidl_next::munge!(let Self { table } = out);
11255            ::fidl_next::wire::Table::zero_padding(table);
11256        }
11257    }
11258
11259    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetNameRequest<'de>
11260    where
11261        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11262    {
11263        fn decode(
11264            slot: ::fidl_next::Slot<'_, Self>,
11265            decoder: &mut ___D,
11266            _: (),
11267        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11268            ::fidl_next::munge!(let Self { table } = slot);
11269
11270            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11271                match ordinal {
11272                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11273
11274                    1 => {
11275                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
11276                            slot.as_mut(),
11277                            decoder,
11278                            (),
11279                        )?;
11280
11281                        Ok(())
11282                    }
11283
11284                    2 => {
11285                        ::fidl_next::wire::Envelope::decode_as::<
11286                            ___D,
11287                            ::fidl_next::wire::String<'de>,
11288                        >(slot.as_mut(), decoder, 64)?;
11289
11290                        let value = unsafe {
11291                            slot.deref_unchecked()
11292                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
11293                        };
11294
11295                        if value.len() > 64 {
11296                            return Err(::fidl_next::DecodeError::VectorTooLong {
11297                                size: value.len() as u64,
11298                                limit: 64,
11299                            });
11300                        }
11301
11302                        Ok(())
11303                    }
11304
11305                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11306                }
11307            })
11308        }
11309    }
11310
11311    impl<'de> NodeSetNameRequest<'de> {
11312        pub fn priority(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
11313            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11314        }
11315
11316        pub fn take_priority(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
11317            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11318        }
11319
11320        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
11321            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
11322        }
11323
11324        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
11325            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
11326        }
11327    }
11328
11329    impl<'de> ::core::fmt::Debug for NodeSetNameRequest<'de> {
11330        fn fmt(
11331            &self,
11332            f: &mut ::core::fmt::Formatter<'_>,
11333        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11334            f.debug_struct("NodeSetNameRequest")
11335                .field("priority", &self.priority())
11336                .field("name", &self.name())
11337                .finish()
11338        }
11339    }
11340
11341    impl<'de> ::fidl_next::IntoNatural for NodeSetNameRequest<'de> {
11342        type Natural = crate::natural::NodeSetNameRequest;
11343    }
11344
11345    /// The wire type corresponding to [`NodeSetDebugClientInfoRequest`].
11346    #[repr(C)]
11347    pub struct NodeSetDebugClientInfoRequest<'de> {
11348        pub(crate) table: ::fidl_next::wire::Table<'de>,
11349    }
11350
11351    impl<'de> Drop for NodeSetDebugClientInfoRequest<'de> {
11352        fn drop(&mut self) {
11353            let _ = self.table.get(1).map(|envelope| unsafe {
11354                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
11355            });
11356
11357            let _ = self
11358                .table
11359                .get(2)
11360                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
11361        }
11362    }
11363
11364    impl ::fidl_next::Constrained for NodeSetDebugClientInfoRequest<'_> {
11365        type Constraint = ();
11366
11367        fn validate(
11368            _: ::fidl_next::Slot<'_, Self>,
11369            _: Self::Constraint,
11370        ) -> Result<(), ::fidl_next::ValidationError> {
11371            Ok(())
11372        }
11373    }
11374
11375    unsafe impl ::fidl_next::Wire for NodeSetDebugClientInfoRequest<'static> {
11376        type Narrowed<'de> = NodeSetDebugClientInfoRequest<'de>;
11377
11378        #[inline]
11379        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11380            ::fidl_next::munge!(let Self { table } = out);
11381            ::fidl_next::wire::Table::zero_padding(table);
11382        }
11383    }
11384
11385    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetDebugClientInfoRequest<'de>
11386    where
11387        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11388    {
11389        fn decode(
11390            slot: ::fidl_next::Slot<'_, Self>,
11391            decoder: &mut ___D,
11392            _: (),
11393        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11394            ::fidl_next::munge!(let Self { table } = slot);
11395
11396            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11397                match ordinal {
11398                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11399
11400                    1 => {
11401                        ::fidl_next::wire::Envelope::decode_as::<
11402                            ___D,
11403                            ::fidl_next::wire::String<'de>,
11404                        >(slot.as_mut(), decoder, 256)?;
11405
11406                        let value = unsafe {
11407                            slot.deref_unchecked()
11408                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
11409                        };
11410
11411                        if value.len() > 256 {
11412                            return Err(::fidl_next::DecodeError::VectorTooLong {
11413                                size: value.len() as u64,
11414                                limit: 256,
11415                            });
11416                        }
11417
11418                        Ok(())
11419                    }
11420
11421                    2 => {
11422                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
11423                            slot.as_mut(),
11424                            decoder,
11425                            (),
11426                        )?;
11427
11428                        Ok(())
11429                    }
11430
11431                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11432                }
11433            })
11434        }
11435    }
11436
11437    impl<'de> NodeSetDebugClientInfoRequest<'de> {
11438        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
11439            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11440        }
11441
11442        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
11443            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11444        }
11445
11446        pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
11447            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
11448        }
11449
11450        pub fn take_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
11451            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
11452        }
11453    }
11454
11455    impl<'de> ::core::fmt::Debug for NodeSetDebugClientInfoRequest<'de> {
11456        fn fmt(
11457            &self,
11458            f: &mut ::core::fmt::Formatter<'_>,
11459        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11460            f.debug_struct("NodeSetDebugClientInfoRequest")
11461                .field("name", &self.name())
11462                .field("id", &self.id())
11463                .finish()
11464        }
11465    }
11466
11467    impl<'de> ::fidl_next::IntoNatural for NodeSetDebugClientInfoRequest<'de> {
11468        type Natural = crate::natural::NodeSetDebugClientInfoRequest;
11469    }
11470
11471    /// The wire type corresponding to [`NodeSetDebugTimeoutLogDeadlineRequest`].
11472    #[repr(C)]
11473    pub struct NodeSetDebugTimeoutLogDeadlineRequest<'de> {
11474        pub(crate) table: ::fidl_next::wire::Table<'de>,
11475    }
11476
11477    impl<'de> Drop for NodeSetDebugTimeoutLogDeadlineRequest<'de> {
11478        fn drop(&mut self) {
11479            let _ = self
11480                .table
11481                .get(1)
11482                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
11483        }
11484    }
11485
11486    impl ::fidl_next::Constrained for NodeSetDebugTimeoutLogDeadlineRequest<'_> {
11487        type Constraint = ();
11488
11489        fn validate(
11490            _: ::fidl_next::Slot<'_, Self>,
11491            _: Self::Constraint,
11492        ) -> Result<(), ::fidl_next::ValidationError> {
11493            Ok(())
11494        }
11495    }
11496
11497    unsafe impl ::fidl_next::Wire for NodeSetDebugTimeoutLogDeadlineRequest<'static> {
11498        type Narrowed<'de> = NodeSetDebugTimeoutLogDeadlineRequest<'de>;
11499
11500        #[inline]
11501        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11502            ::fidl_next::munge!(let Self { table } = out);
11503            ::fidl_next::wire::Table::zero_padding(table);
11504        }
11505    }
11506
11507    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetDebugTimeoutLogDeadlineRequest<'de>
11508    where
11509        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11510    {
11511        fn decode(
11512            slot: ::fidl_next::Slot<'_, Self>,
11513            decoder: &mut ___D,
11514            _: (),
11515        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11516            ::fidl_next::munge!(let Self { table } = slot);
11517
11518            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11519                match ordinal {
11520                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11521
11522                    1 => {
11523                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
11524                            slot.as_mut(),
11525                            decoder,
11526                            (),
11527                        )?;
11528
11529                        Ok(())
11530                    }
11531
11532                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11533                }
11534            })
11535        }
11536    }
11537
11538    impl<'de> NodeSetDebugTimeoutLogDeadlineRequest<'de> {
11539        pub fn deadline(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
11540            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11541        }
11542
11543        pub fn take_deadline(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
11544            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11545        }
11546    }
11547
11548    impl<'de> ::core::fmt::Debug for NodeSetDebugTimeoutLogDeadlineRequest<'de> {
11549        fn fmt(
11550            &self,
11551            f: &mut ::core::fmt::Formatter<'_>,
11552        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11553            f.debug_struct("NodeSetDebugTimeoutLogDeadlineRequest")
11554                .field("deadline", &self.deadline())
11555                .finish()
11556        }
11557    }
11558
11559    impl<'de> ::fidl_next::IntoNatural for NodeSetDebugTimeoutLogDeadlineRequest<'de> {
11560        type Natural = crate::natural::NodeSetDebugTimeoutLogDeadlineRequest;
11561    }
11562
11563    /// The wire type corresponding to [`NodeIsAlternateForResponse`].
11564    #[repr(C)]
11565    pub struct NodeIsAlternateForResponse<'de> {
11566        pub(crate) table: ::fidl_next::wire::Table<'de>,
11567    }
11568
11569    impl<'de> Drop for NodeIsAlternateForResponse<'de> {
11570        fn drop(&mut self) {
11571            let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
11572        }
11573    }
11574
11575    impl ::fidl_next::Constrained for NodeIsAlternateForResponse<'_> {
11576        type Constraint = ();
11577
11578        fn validate(
11579            _: ::fidl_next::Slot<'_, Self>,
11580            _: Self::Constraint,
11581        ) -> Result<(), ::fidl_next::ValidationError> {
11582            Ok(())
11583        }
11584    }
11585
11586    unsafe impl ::fidl_next::Wire for NodeIsAlternateForResponse<'static> {
11587        type Narrowed<'de> = NodeIsAlternateForResponse<'de>;
11588
11589        #[inline]
11590        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11591            ::fidl_next::munge!(let Self { table } = out);
11592            ::fidl_next::wire::Table::zero_padding(table);
11593        }
11594    }
11595
11596    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeIsAlternateForResponse<'de>
11597    where
11598        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11599    {
11600        fn decode(
11601            slot: ::fidl_next::Slot<'_, Self>,
11602            decoder: &mut ___D,
11603            _: (),
11604        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11605            ::fidl_next::munge!(let Self { table } = slot);
11606
11607            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11608                match ordinal {
11609                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11610
11611                    1 => {
11612                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
11613                            slot.as_mut(),
11614                            decoder,
11615                            (),
11616                        )?;
11617
11618                        Ok(())
11619                    }
11620
11621                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11622                }
11623            })
11624        }
11625    }
11626
11627    impl<'de> NodeIsAlternateForResponse<'de> {
11628        pub fn is_alternate(&self) -> ::core::option::Option<&bool> {
11629            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11630        }
11631
11632        pub fn take_is_alternate(&mut self) -> ::core::option::Option<bool> {
11633            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11634        }
11635    }
11636
11637    impl<'de> ::core::fmt::Debug for NodeIsAlternateForResponse<'de> {
11638        fn fmt(
11639            &self,
11640            f: &mut ::core::fmt::Formatter<'_>,
11641        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11642            f.debug_struct("NodeIsAlternateForResponse")
11643                .field("is_alternate", &self.is_alternate())
11644                .finish()
11645        }
11646    }
11647
11648    impl<'de> ::fidl_next::IntoNatural for NodeIsAlternateForResponse<'de> {
11649        type Natural = crate::natural::NodeIsAlternateForResponse;
11650    }
11651
11652    /// The wire type corresponding to [`NodeGetBufferCollectionIdResponse`].
11653    #[repr(C)]
11654    pub struct NodeGetBufferCollectionIdResponse<'de> {
11655        pub(crate) table: ::fidl_next::wire::Table<'de>,
11656    }
11657
11658    impl<'de> Drop for NodeGetBufferCollectionIdResponse<'de> {
11659        fn drop(&mut self) {
11660            let _ = self
11661                .table
11662                .get(1)
11663                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
11664        }
11665    }
11666
11667    impl ::fidl_next::Constrained for NodeGetBufferCollectionIdResponse<'_> {
11668        type Constraint = ();
11669
11670        fn validate(
11671            _: ::fidl_next::Slot<'_, Self>,
11672            _: Self::Constraint,
11673        ) -> Result<(), ::fidl_next::ValidationError> {
11674            Ok(())
11675        }
11676    }
11677
11678    unsafe impl ::fidl_next::Wire for NodeGetBufferCollectionIdResponse<'static> {
11679        type Narrowed<'de> = NodeGetBufferCollectionIdResponse<'de>;
11680
11681        #[inline]
11682        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11683            ::fidl_next::munge!(let Self { table } = out);
11684            ::fidl_next::wire::Table::zero_padding(table);
11685        }
11686    }
11687
11688    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeGetBufferCollectionIdResponse<'de>
11689    where
11690        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11691    {
11692        fn decode(
11693            slot: ::fidl_next::Slot<'_, Self>,
11694            decoder: &mut ___D,
11695            _: (),
11696        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11697            ::fidl_next::munge!(let Self { table } = slot);
11698
11699            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11700                match ordinal {
11701                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11702
11703                    1 => {
11704                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
11705                            slot.as_mut(),
11706                            decoder,
11707                            (),
11708                        )?;
11709
11710                        Ok(())
11711                    }
11712
11713                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11714                }
11715            })
11716        }
11717    }
11718
11719    impl<'de> NodeGetBufferCollectionIdResponse<'de> {
11720        pub fn buffer_collection_id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
11721            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11722        }
11723
11724        pub fn take_buffer_collection_id(
11725            &mut self,
11726        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
11727            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11728        }
11729    }
11730
11731    impl<'de> ::core::fmt::Debug for NodeGetBufferCollectionIdResponse<'de> {
11732        fn fmt(
11733            &self,
11734            f: &mut ::core::fmt::Formatter<'_>,
11735        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11736            f.debug_struct("NodeGetBufferCollectionIdResponse")
11737                .field("buffer_collection_id", &self.buffer_collection_id())
11738                .finish()
11739        }
11740    }
11741
11742    impl<'de> ::fidl_next::IntoNatural for NodeGetBufferCollectionIdResponse<'de> {
11743        type Natural = crate::natural::NodeGetBufferCollectionIdResponse;
11744    }
11745
11746    /// The wire type corresponding to [`BufferCollectionCheckAllBuffersAllocatedResponse`].
11747    pub type BufferCollectionCheckAllBuffersAllocatedResponse = ::fidl_next::wire::Unit;
11748
11749    /// The wire type corresponding to [`BufferCollectionTokenDuplicateSyncRequest`].
11750    #[repr(C)]
11751    pub struct BufferCollectionTokenDuplicateSyncRequest<'de> {
11752        pub(crate) table: ::fidl_next::wire::Table<'de>,
11753    }
11754
11755    impl<'de> Drop for BufferCollectionTokenDuplicateSyncRequest<'de> {
11756        fn drop(&mut self) {
11757            let _ = self.table.get(1)
11758                .map(|envelope| unsafe {
11759                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>>()
11760                });
11761        }
11762    }
11763
11764    impl ::fidl_next::Constrained for BufferCollectionTokenDuplicateSyncRequest<'_> {
11765        type Constraint = ();
11766
11767        fn validate(
11768            _: ::fidl_next::Slot<'_, Self>,
11769            _: Self::Constraint,
11770        ) -> Result<(), ::fidl_next::ValidationError> {
11771            Ok(())
11772        }
11773    }
11774
11775    unsafe impl ::fidl_next::Wire for BufferCollectionTokenDuplicateSyncRequest<'static> {
11776        type Narrowed<'de> = BufferCollectionTokenDuplicateSyncRequest<'de>;
11777
11778        #[inline]
11779        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11780            ::fidl_next::munge!(let Self { table } = out);
11781            ::fidl_next::wire::Table::zero_padding(table);
11782        }
11783    }
11784
11785    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BufferCollectionTokenDuplicateSyncRequest<'de>
11786    where
11787        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11788    {
11789        fn decode(
11790            slot: ::fidl_next::Slot<'_, Self>,
11791            decoder: &mut ___D,
11792            _: (),
11793        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11794            ::fidl_next::munge!(let Self { table } = slot);
11795
11796            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11797                match ordinal {
11798                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11799
11800                    1 => {
11801                        ::fidl_next::wire::Envelope::decode_as::<
11802                            ___D,
11803                            ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>,
11804                        >(slot.as_mut(), decoder, (64, ()))?;
11805
11806                        let value = unsafe {
11807                            slot
11808                                            .deref_unchecked()
11809                                            .deref_unchecked::<
11810                                                ::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Rights>
11811                                            >()
11812                        };
11813
11814                        if value.len() > 64 {
11815                            return Err(::fidl_next::DecodeError::VectorTooLong {
11816                                size: value.len() as u64,
11817                                limit: 64,
11818                            });
11819                        }
11820
11821                        Ok(())
11822                    }
11823
11824                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11825                }
11826            })
11827        }
11828    }
11829
11830    impl<'de> BufferCollectionTokenDuplicateSyncRequest<'de> {
11831        pub fn rights_attenuation_masks(
11832            &self,
11833        ) -> ::core::option::Option<
11834            &::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>,
11835        > {
11836            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11837        }
11838
11839        pub fn take_rights_attenuation_masks(
11840            &mut self,
11841        ) -> ::core::option::Option<
11842            ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>,
11843        > {
11844            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11845        }
11846    }
11847
11848    impl<'de> ::core::fmt::Debug for BufferCollectionTokenDuplicateSyncRequest<'de> {
11849        fn fmt(
11850            &self,
11851            f: &mut ::core::fmt::Formatter<'_>,
11852        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11853            f.debug_struct("BufferCollectionTokenDuplicateSyncRequest")
11854                .field("rights_attenuation_masks", &self.rights_attenuation_masks())
11855                .finish()
11856        }
11857    }
11858
11859    impl<'de> ::fidl_next::IntoNatural for BufferCollectionTokenDuplicateSyncRequest<'de> {
11860        type Natural = crate::natural::BufferCollectionTokenDuplicateSyncRequest;
11861    }
11862
11863    /// The wire type corresponding to [`BufferCollectionTokenGroupCreateChildrenSyncRequest`].
11864    #[repr(C)]
11865    pub struct BufferCollectionTokenGroupCreateChildrenSyncRequest<'de> {
11866        pub(crate) table: ::fidl_next::wire::Table<'de>,
11867    }
11868
11869    impl<'de> Drop for BufferCollectionTokenGroupCreateChildrenSyncRequest<'de> {
11870        fn drop(&mut self) {
11871            let _ = self.table.get(1)
11872                .map(|envelope| unsafe {
11873                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>>()
11874                });
11875        }
11876    }
11877
11878    impl ::fidl_next::Constrained for BufferCollectionTokenGroupCreateChildrenSyncRequest<'_> {
11879        type Constraint = ();
11880
11881        fn validate(
11882            _: ::fidl_next::Slot<'_, Self>,
11883            _: Self::Constraint,
11884        ) -> Result<(), ::fidl_next::ValidationError> {
11885            Ok(())
11886        }
11887    }
11888
11889    unsafe impl ::fidl_next::Wire for BufferCollectionTokenGroupCreateChildrenSyncRequest<'static> {
11890        type Narrowed<'de> = BufferCollectionTokenGroupCreateChildrenSyncRequest<'de>;
11891
11892        #[inline]
11893        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11894            ::fidl_next::munge!(let Self { table } = out);
11895            ::fidl_next::wire::Table::zero_padding(table);
11896        }
11897    }
11898
11899    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
11900        for BufferCollectionTokenGroupCreateChildrenSyncRequest<'de>
11901    where
11902        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11903    {
11904        fn decode(
11905            slot: ::fidl_next::Slot<'_, Self>,
11906            decoder: &mut ___D,
11907            _: (),
11908        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11909            ::fidl_next::munge!(let Self { table } = slot);
11910
11911            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11912                match ordinal {
11913                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11914
11915                    1 => {
11916                        ::fidl_next::wire::Envelope::decode_as::<
11917                            ___D,
11918                            ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>,
11919                        >(slot.as_mut(), decoder, (64, ()))?;
11920
11921                        let value = unsafe {
11922                            slot
11923                                            .deref_unchecked()
11924                                            .deref_unchecked::<
11925                                                ::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Rights>
11926                                            >()
11927                        };
11928
11929                        if value.len() > 64 {
11930                            return Err(::fidl_next::DecodeError::VectorTooLong {
11931                                size: value.len() as u64,
11932                                limit: 64,
11933                            });
11934                        }
11935
11936                        Ok(())
11937                    }
11938
11939                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11940                }
11941            })
11942        }
11943    }
11944
11945    impl<'de> BufferCollectionTokenGroupCreateChildrenSyncRequest<'de> {
11946        pub fn rights_attenuation_masks(
11947            &self,
11948        ) -> ::core::option::Option<
11949            &::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>,
11950        > {
11951            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11952        }
11953
11954        pub fn take_rights_attenuation_masks(
11955            &mut self,
11956        ) -> ::core::option::Option<
11957            ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>,
11958        > {
11959            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11960        }
11961    }
11962
11963    impl<'de> ::core::fmt::Debug for BufferCollectionTokenGroupCreateChildrenSyncRequest<'de> {
11964        fn fmt(
11965            &self,
11966            f: &mut ::core::fmt::Formatter<'_>,
11967        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11968            f.debug_struct("BufferCollectionTokenGroupCreateChildrenSyncRequest")
11969                .field("rights_attenuation_masks", &self.rights_attenuation_masks())
11970                .finish()
11971        }
11972    }
11973
11974    impl<'de> ::fidl_next::IntoNatural for BufferCollectionTokenGroupCreateChildrenSyncRequest<'de> {
11975        type Natural = crate::natural::BufferCollectionTokenGroupCreateChildrenSyncRequest;
11976    }
11977
11978    /// The wire type corresponding to [`FormatCostKey`].
11979    #[repr(C)]
11980    pub struct FormatCostKey<'de> {
11981        pub(crate) table: ::fidl_next::wire::Table<'de>,
11982    }
11983
11984    impl<'de> Drop for FormatCostKey<'de> {
11985        fn drop(&mut self) {
11986            let _ = self.table.get(1).map(|envelope| unsafe {
11987                envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormat>()
11988            });
11989
11990            let _ = self.table.get(2)
11991                .map(|envelope| unsafe {
11992                    envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>()
11993                });
11994
11995            let _ = self.table.get(3).map(|envelope| unsafe {
11996                envelope.read_unchecked::<crate::wire::BufferUsage<'de>>()
11997            });
11998        }
11999    }
12000
12001    impl ::fidl_next::Constrained for FormatCostKey<'_> {
12002        type Constraint = ();
12003
12004        fn validate(
12005            _: ::fidl_next::Slot<'_, Self>,
12006            _: Self::Constraint,
12007        ) -> Result<(), ::fidl_next::ValidationError> {
12008            Ok(())
12009        }
12010    }
12011
12012    unsafe impl ::fidl_next::Wire for FormatCostKey<'static> {
12013        type Narrowed<'de> = FormatCostKey<'de>;
12014
12015        #[inline]
12016        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12017            ::fidl_next::munge!(let Self { table } = out);
12018            ::fidl_next::wire::Table::zero_padding(table);
12019        }
12020    }
12021
12022    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FormatCostKey<'de>
12023    where
12024        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12025    {
12026        fn decode(
12027            slot: ::fidl_next::Slot<'_, Self>,
12028            decoder: &mut ___D,
12029            _: (),
12030        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12031            ::fidl_next::munge!(let Self { table } = slot);
12032
12033            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12034                match ordinal {
12035                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12036
12037                    1 => {
12038                        ::fidl_next::wire::Envelope::decode_as::<
12039                            ___D,
12040                            ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
12041                        >(slot.as_mut(), decoder, ())?;
12042
12043                        Ok(())
12044                    }
12045
12046                    2 => {
12047                        ::fidl_next::wire::Envelope::decode_as::<
12048                            ___D,
12049                            ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
12050                        >(slot.as_mut(), decoder, ())?;
12051
12052                        Ok(())
12053                    }
12054
12055                    3 => {
12056                        ::fidl_next::wire::Envelope::decode_as::<
12057                            ___D,
12058                            crate::wire::BufferUsage<'de>,
12059                        >(slot.as_mut(), decoder, ())?;
12060
12061                        Ok(())
12062                    }
12063
12064                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12065                }
12066            })
12067        }
12068    }
12069
12070    impl<'de> FormatCostKey<'de> {
12071        pub fn pixel_format(
12072            &self,
12073        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_images2::wire::PixelFormat>
12074        {
12075            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12076        }
12077
12078        pub fn take_pixel_format(
12079            &mut self,
12080        ) -> ::core::option::Option<::fidl_next_common_fuchsia_images2::wire::PixelFormat> {
12081            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12082        }
12083
12084        pub fn pixel_format_modifier(
12085            &self,
12086        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>
12087        {
12088            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
12089        }
12090
12091        pub fn take_pixel_format_modifier(
12092            &mut self,
12093        ) -> ::core::option::Option<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>
12094        {
12095            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
12096        }
12097
12098        pub fn buffer_usage_bits(&self) -> ::core::option::Option<&crate::wire::BufferUsage<'de>> {
12099            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
12100        }
12101
12102        pub fn take_buffer_usage_bits(
12103            &mut self,
12104        ) -> ::core::option::Option<crate::wire::BufferUsage<'de>> {
12105            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
12106        }
12107    }
12108
12109    impl<'de> ::core::fmt::Debug for FormatCostKey<'de> {
12110        fn fmt(
12111            &self,
12112            f: &mut ::core::fmt::Formatter<'_>,
12113        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12114            f.debug_struct("FormatCostKey")
12115                .field("pixel_format", &self.pixel_format())
12116                .field("pixel_format_modifier", &self.pixel_format_modifier())
12117                .field("buffer_usage_bits", &self.buffer_usage_bits())
12118                .finish()
12119        }
12120    }
12121
12122    impl<'de> ::fidl_next::IntoNatural for FormatCostKey<'de> {
12123        type Natural = crate::natural::FormatCostKey;
12124    }
12125
12126    /// The wire type corresponding to [`FormatCostEntry`].
12127    #[repr(C)]
12128    pub struct FormatCostEntry<'de> {
12129        pub(crate) table: ::fidl_next::wire::Table<'de>,
12130    }
12131
12132    impl<'de> Drop for FormatCostEntry<'de> {
12133        fn drop(&mut self) {
12134            let _ = self.table.get(1).map(|envelope| unsafe {
12135                envelope.read_unchecked::<crate::wire::FormatCostKey<'de>>()
12136            });
12137
12138            let _ = self
12139                .table
12140                .get(2)
12141                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Float32>() });
12142        }
12143    }
12144
12145    impl ::fidl_next::Constrained for FormatCostEntry<'_> {
12146        type Constraint = ();
12147
12148        fn validate(
12149            _: ::fidl_next::Slot<'_, Self>,
12150            _: Self::Constraint,
12151        ) -> Result<(), ::fidl_next::ValidationError> {
12152            Ok(())
12153        }
12154    }
12155
12156    unsafe impl ::fidl_next::Wire for FormatCostEntry<'static> {
12157        type Narrowed<'de> = FormatCostEntry<'de>;
12158
12159        #[inline]
12160        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12161            ::fidl_next::munge!(let Self { table } = out);
12162            ::fidl_next::wire::Table::zero_padding(table);
12163        }
12164    }
12165
12166    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FormatCostEntry<'de>
12167    where
12168        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12169    {
12170        fn decode(
12171            slot: ::fidl_next::Slot<'_, Self>,
12172            decoder: &mut ___D,
12173            _: (),
12174        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12175            ::fidl_next::munge!(let Self { table } = slot);
12176
12177            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12178                match ordinal {
12179                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12180
12181                    1 => {
12182                        ::fidl_next::wire::Envelope::decode_as::<
12183                            ___D,
12184                            crate::wire::FormatCostKey<'de>,
12185                        >(slot.as_mut(), decoder, ())?;
12186
12187                        Ok(())
12188                    }
12189
12190                    2 => {
12191                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Float32>(
12192                            slot.as_mut(),
12193                            decoder,
12194                            (),
12195                        )?;
12196
12197                        Ok(())
12198                    }
12199
12200                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12201                }
12202            })
12203        }
12204    }
12205
12206    impl<'de> FormatCostEntry<'de> {
12207        pub fn key(&self) -> ::core::option::Option<&crate::wire::FormatCostKey<'de>> {
12208            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12209        }
12210
12211        pub fn take_key(&mut self) -> ::core::option::Option<crate::wire::FormatCostKey<'de>> {
12212            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12213        }
12214
12215        pub fn cost(&self) -> ::core::option::Option<&::fidl_next::wire::Float32> {
12216            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
12217        }
12218
12219        pub fn take_cost(&mut self) -> ::core::option::Option<::fidl_next::wire::Float32> {
12220            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
12221        }
12222    }
12223
12224    impl<'de> ::core::fmt::Debug for FormatCostEntry<'de> {
12225        fn fmt(
12226            &self,
12227            f: &mut ::core::fmt::Formatter<'_>,
12228        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12229            f.debug_struct("FormatCostEntry")
12230                .field("key", &self.key())
12231                .field("cost", &self.cost())
12232                .finish()
12233        }
12234    }
12235
12236    impl<'de> ::fidl_next::IntoNatural for FormatCostEntry<'de> {
12237        type Natural = crate::natural::FormatCostEntry;
12238    }
12239
12240    /// The wire type corresponding to [`Config`].
12241    #[repr(C)]
12242    pub struct Config<'de> {
12243        pub(crate) table: ::fidl_next::wire::Table<'de>,
12244    }
12245
12246    impl<'de> Drop for Config<'de> {
12247        fn drop(&mut self) {
12248            let _ = self.table.get(1)
12249                .map(|envelope| unsafe {
12250                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>()
12251                });
12252        }
12253    }
12254
12255    impl ::fidl_next::Constrained for Config<'_> {
12256        type Constraint = ();
12257
12258        fn validate(
12259            _: ::fidl_next::Slot<'_, Self>,
12260            _: Self::Constraint,
12261        ) -> Result<(), ::fidl_next::ValidationError> {
12262            Ok(())
12263        }
12264    }
12265
12266    unsafe impl ::fidl_next::Wire for Config<'static> {
12267        type Narrowed<'de> = Config<'de>;
12268
12269        #[inline]
12270        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12271            ::fidl_next::munge!(let Self { table } = out);
12272            ::fidl_next::wire::Table::zero_padding(table);
12273        }
12274    }
12275
12276    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Config<'de>
12277    where
12278        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12279    {
12280        fn decode(
12281            slot: ::fidl_next::Slot<'_, Self>,
12282            decoder: &mut ___D,
12283            _: (),
12284        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12285            ::fidl_next::munge!(let Self { table } = slot);
12286
12287            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12288                match ordinal {
12289                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12290
12291                    1 => {
12292                        ::fidl_next::wire::Envelope::decode_as::<
12293                            ___D,
12294                            ::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>,
12295                        >(slot.as_mut(), decoder, (4294967295, ()))?;
12296
12297                        Ok(())
12298                    }
12299
12300                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12301                }
12302            })
12303        }
12304    }
12305
12306    impl<'de> Config<'de> {
12307        pub fn format_costs(
12308            &self,
12309        ) -> ::core::option::Option<
12310            &::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>,
12311        > {
12312            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12313        }
12314
12315        pub fn take_format_costs(
12316            &mut self,
12317        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>
12318        {
12319            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12320        }
12321    }
12322
12323    impl<'de> ::core::fmt::Debug for Config<'de> {
12324        fn fmt(
12325            &self,
12326            f: &mut ::core::fmt::Formatter<'_>,
12327        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12328            f.debug_struct("Config").field("format_costs", &self.format_costs()).finish()
12329        }
12330    }
12331
12332    impl<'de> ::fidl_next::IntoNatural for Config<'de> {
12333        type Natural = crate::natural::Config;
12334    }
12335
12336    /// The wire type corresponding to [`DynamicSecureHeap`].
12337    #[repr(C)]
12338    pub struct DynamicSecureHeap<'de> {
12339        pub(crate) table: ::fidl_next::wire::Table<'de>,
12340    }
12341
12342    impl<'de> Drop for DynamicSecureHeap<'de> {
12343        fn drop(&mut self) {
12344            let _ = self
12345                .table
12346                .get(1)
12347                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() });
12348        }
12349    }
12350
12351    impl ::fidl_next::Constrained for DynamicSecureHeap<'_> {
12352        type Constraint = ();
12353
12354        fn validate(
12355            _: ::fidl_next::Slot<'_, Self>,
12356            _: Self::Constraint,
12357        ) -> Result<(), ::fidl_next::ValidationError> {
12358            Ok(())
12359        }
12360    }
12361
12362    unsafe impl ::fidl_next::Wire for DynamicSecureHeap<'static> {
12363        type Narrowed<'de> = DynamicSecureHeap<'de>;
12364
12365        #[inline]
12366        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12367            ::fidl_next::munge!(let Self { table } = out);
12368            ::fidl_next::wire::Table::zero_padding(table);
12369        }
12370    }
12371
12372    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DynamicSecureHeap<'de>
12373    where
12374        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12375    {
12376        fn decode(
12377            slot: ::fidl_next::Slot<'_, Self>,
12378            decoder: &mut ___D,
12379            _: (),
12380        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12381            ::fidl_next::munge!(let Self { table } = slot);
12382
12383            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12384                match ordinal {
12385                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12386
12387                    1 => {
12388                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Heap<'de>>(
12389                            slot.as_mut(),
12390                            decoder,
12391                            (),
12392                        )?;
12393
12394                        Ok(())
12395                    }
12396
12397                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12398                }
12399            })
12400        }
12401    }
12402
12403    impl<'de> DynamicSecureHeap<'de> {
12404        pub fn heap(&self) -> ::core::option::Option<&crate::wire::Heap<'de>> {
12405            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12406        }
12407
12408        pub fn take_heap(&mut self) -> ::core::option::Option<crate::wire::Heap<'de>> {
12409            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12410        }
12411    }
12412
12413    impl<'de> ::core::fmt::Debug for DynamicSecureHeap<'de> {
12414        fn fmt(
12415            &self,
12416            f: &mut ::core::fmt::Formatter<'_>,
12417        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12418            f.debug_struct("DynamicSecureHeap").field("heap", &self.heap()).finish()
12419        }
12420    }
12421
12422    impl<'de> ::fidl_next::IntoNatural for DynamicSecureHeap<'de> {
12423        type Natural = crate::natural::DynamicSecureHeap;
12424    }
12425
12426    /// The wire type corresponding to [`FormatCosts`].
12427    #[repr(C)]
12428    pub struct FormatCosts<'de> {
12429        pub(crate) table: ::fidl_next::wire::Table<'de>,
12430    }
12431
12432    impl<'de> Drop for FormatCosts<'de> {
12433        fn drop(&mut self) {
12434            let _ = self.table.get(1)
12435                .map(|envelope| unsafe {
12436                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>()
12437                });
12438        }
12439    }
12440
12441    impl ::fidl_next::Constrained for FormatCosts<'_> {
12442        type Constraint = ();
12443
12444        fn validate(
12445            _: ::fidl_next::Slot<'_, Self>,
12446            _: Self::Constraint,
12447        ) -> Result<(), ::fidl_next::ValidationError> {
12448            Ok(())
12449        }
12450    }
12451
12452    unsafe impl ::fidl_next::Wire for FormatCosts<'static> {
12453        type Narrowed<'de> = FormatCosts<'de>;
12454
12455        #[inline]
12456        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12457            ::fidl_next::munge!(let Self { table } = out);
12458            ::fidl_next::wire::Table::zero_padding(table);
12459        }
12460    }
12461
12462    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FormatCosts<'de>
12463    where
12464        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12465    {
12466        fn decode(
12467            slot: ::fidl_next::Slot<'_, Self>,
12468            decoder: &mut ___D,
12469            _: (),
12470        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12471            ::fidl_next::munge!(let Self { table } = slot);
12472
12473            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12474                match ordinal {
12475                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12476
12477                    1 => {
12478                        ::fidl_next::wire::Envelope::decode_as::<
12479                            ___D,
12480                            ::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>,
12481                        >(slot.as_mut(), decoder, (4294967295, ()))?;
12482
12483                        Ok(())
12484                    }
12485
12486                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12487                }
12488            })
12489        }
12490    }
12491
12492    impl<'de> FormatCosts<'de> {
12493        pub fn format_costs(
12494            &self,
12495        ) -> ::core::option::Option<
12496            &::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>,
12497        > {
12498            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12499        }
12500
12501        pub fn take_format_costs(
12502            &mut self,
12503        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>
12504        {
12505            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12506        }
12507    }
12508
12509    impl<'de> ::core::fmt::Debug for FormatCosts<'de> {
12510        fn fmt(
12511            &self,
12512            f: &mut ::core::fmt::Formatter<'_>,
12513        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12514            f.debug_struct("FormatCosts").field("format_costs", &self.format_costs()).finish()
12515        }
12516    }
12517
12518    impl<'de> ::fidl_next::IntoNatural for FormatCosts<'de> {
12519        type Natural = crate::natural::FormatCosts;
12520    }
12521
12522    /// The wire type corresponding to [`SecureHeapRange`].
12523    #[repr(C)]
12524    pub struct SecureHeapRange<'de> {
12525        pub(crate) table: ::fidl_next::wire::Table<'de>,
12526    }
12527
12528    impl<'de> Drop for SecureHeapRange<'de> {
12529        fn drop(&mut self) {
12530            let _ = self
12531                .table
12532                .get(1)
12533                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
12534
12535            let _ = self
12536                .table
12537                .get(2)
12538                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
12539        }
12540    }
12541
12542    impl ::fidl_next::Constrained for SecureHeapRange<'_> {
12543        type Constraint = ();
12544
12545        fn validate(
12546            _: ::fidl_next::Slot<'_, Self>,
12547            _: Self::Constraint,
12548        ) -> Result<(), ::fidl_next::ValidationError> {
12549            Ok(())
12550        }
12551    }
12552
12553    unsafe impl ::fidl_next::Wire for SecureHeapRange<'static> {
12554        type Narrowed<'de> = SecureHeapRange<'de>;
12555
12556        #[inline]
12557        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12558            ::fidl_next::munge!(let Self { table } = out);
12559            ::fidl_next::wire::Table::zero_padding(table);
12560        }
12561    }
12562
12563    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureHeapRange<'de>
12564    where
12565        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12566    {
12567        fn decode(
12568            slot: ::fidl_next::Slot<'_, Self>,
12569            decoder: &mut ___D,
12570            _: (),
12571        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12572            ::fidl_next::munge!(let Self { table } = slot);
12573
12574            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12575                match ordinal {
12576                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12577
12578                    1 => {
12579                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
12580                            slot.as_mut(),
12581                            decoder,
12582                            (),
12583                        )?;
12584
12585                        Ok(())
12586                    }
12587
12588                    2 => {
12589                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
12590                            slot.as_mut(),
12591                            decoder,
12592                            (),
12593                        )?;
12594
12595                        Ok(())
12596                    }
12597
12598                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12599                }
12600            })
12601        }
12602    }
12603
12604    impl<'de> SecureHeapRange<'de> {
12605        pub fn physical_address(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
12606            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12607        }
12608
12609        pub fn take_physical_address(
12610            &mut self,
12611        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
12612            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12613        }
12614
12615        pub fn size_bytes(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
12616            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
12617        }
12618
12619        pub fn take_size_bytes(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
12620            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
12621        }
12622    }
12623
12624    impl<'de> ::core::fmt::Debug for SecureHeapRange<'de> {
12625        fn fmt(
12626            &self,
12627            f: &mut ::core::fmt::Formatter<'_>,
12628        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12629            f.debug_struct("SecureHeapRange")
12630                .field("physical_address", &self.physical_address())
12631                .field("size_bytes", &self.size_bytes())
12632                .finish()
12633        }
12634    }
12635
12636    impl<'de> ::fidl_next::IntoNatural for SecureHeapRange<'de> {
12637        type Natural = crate::natural::SecureHeapRange;
12638    }
12639
12640    /// The wire type corresponding to [`SecureHeapAndRange`].
12641    #[repr(C)]
12642    pub struct SecureHeapAndRange<'de> {
12643        pub(crate) table: ::fidl_next::wire::Table<'de>,
12644    }
12645
12646    impl<'de> Drop for SecureHeapAndRange<'de> {
12647        fn drop(&mut self) {
12648            let _ = self
12649                .table
12650                .get(1)
12651                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() });
12652
12653            let _ = self.table.get(2).map(|envelope| unsafe {
12654                envelope.read_unchecked::<crate::wire::SecureHeapRange<'de>>()
12655            });
12656        }
12657    }
12658
12659    impl ::fidl_next::Constrained for SecureHeapAndRange<'_> {
12660        type Constraint = ();
12661
12662        fn validate(
12663            _: ::fidl_next::Slot<'_, Self>,
12664            _: Self::Constraint,
12665        ) -> Result<(), ::fidl_next::ValidationError> {
12666            Ok(())
12667        }
12668    }
12669
12670    unsafe impl ::fidl_next::Wire for SecureHeapAndRange<'static> {
12671        type Narrowed<'de> = SecureHeapAndRange<'de>;
12672
12673        #[inline]
12674        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12675            ::fidl_next::munge!(let Self { table } = out);
12676            ::fidl_next::wire::Table::zero_padding(table);
12677        }
12678    }
12679
12680    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureHeapAndRange<'de>
12681    where
12682        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12683    {
12684        fn decode(
12685            slot: ::fidl_next::Slot<'_, Self>,
12686            decoder: &mut ___D,
12687            _: (),
12688        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12689            ::fidl_next::munge!(let Self { table } = slot);
12690
12691            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12692                match ordinal {
12693                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12694
12695                    1 => {
12696                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Heap<'de>>(
12697                            slot.as_mut(),
12698                            decoder,
12699                            (),
12700                        )?;
12701
12702                        Ok(())
12703                    }
12704
12705                    2 => {
12706                        ::fidl_next::wire::Envelope::decode_as::<
12707                            ___D,
12708                            crate::wire::SecureHeapRange<'de>,
12709                        >(slot.as_mut(), decoder, ())?;
12710
12711                        Ok(())
12712                    }
12713
12714                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12715                }
12716            })
12717        }
12718    }
12719
12720    impl<'de> SecureHeapAndRange<'de> {
12721        pub fn heap(&self) -> ::core::option::Option<&crate::wire::Heap<'de>> {
12722            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12723        }
12724
12725        pub fn take_heap(&mut self) -> ::core::option::Option<crate::wire::Heap<'de>> {
12726            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12727        }
12728
12729        pub fn range(&self) -> ::core::option::Option<&crate::wire::SecureHeapRange<'de>> {
12730            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
12731        }
12732
12733        pub fn take_range(&mut self) -> ::core::option::Option<crate::wire::SecureHeapRange<'de>> {
12734            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
12735        }
12736    }
12737
12738    impl<'de> ::core::fmt::Debug for SecureHeapAndRange<'de> {
12739        fn fmt(
12740            &self,
12741            f: &mut ::core::fmt::Formatter<'_>,
12742        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12743            f.debug_struct("SecureHeapAndRange")
12744                .field("heap", &self.heap())
12745                .field("range", &self.range())
12746                .finish()
12747        }
12748    }
12749
12750    impl<'de> ::fidl_next::IntoNatural for SecureHeapAndRange<'de> {
12751        type Natural = crate::natural::SecureHeapAndRange;
12752    }
12753
12754    /// The wire type corresponding to [`SecureHeapAndRangeModification`].
12755    #[repr(C)]
12756    pub struct SecureHeapAndRangeModification<'de> {
12757        pub(crate) table: ::fidl_next::wire::Table<'de>,
12758    }
12759
12760    impl<'de> Drop for SecureHeapAndRangeModification<'de> {
12761        fn drop(&mut self) {
12762            let _ = self
12763                .table
12764                .get(1)
12765                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() });
12766
12767            let _ = self.table.get(2).map(|envelope| unsafe {
12768                envelope.read_unchecked::<crate::wire::SecureHeapRange<'de>>()
12769            });
12770
12771            let _ = self.table.get(3).map(|envelope| unsafe {
12772                envelope.read_unchecked::<crate::wire::SecureHeapRange<'de>>()
12773            });
12774        }
12775    }
12776
12777    impl ::fidl_next::Constrained for SecureHeapAndRangeModification<'_> {
12778        type Constraint = ();
12779
12780        fn validate(
12781            _: ::fidl_next::Slot<'_, Self>,
12782            _: Self::Constraint,
12783        ) -> Result<(), ::fidl_next::ValidationError> {
12784            Ok(())
12785        }
12786    }
12787
12788    unsafe impl ::fidl_next::Wire for SecureHeapAndRangeModification<'static> {
12789        type Narrowed<'de> = SecureHeapAndRangeModification<'de>;
12790
12791        #[inline]
12792        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12793            ::fidl_next::munge!(let Self { table } = out);
12794            ::fidl_next::wire::Table::zero_padding(table);
12795        }
12796    }
12797
12798    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureHeapAndRangeModification<'de>
12799    where
12800        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12801    {
12802        fn decode(
12803            slot: ::fidl_next::Slot<'_, Self>,
12804            decoder: &mut ___D,
12805            _: (),
12806        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12807            ::fidl_next::munge!(let Self { table } = slot);
12808
12809            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12810                match ordinal {
12811                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12812
12813                    1 => {
12814                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Heap<'de>>(
12815                            slot.as_mut(),
12816                            decoder,
12817                            (),
12818                        )?;
12819
12820                        Ok(())
12821                    }
12822
12823                    2 => {
12824                        ::fidl_next::wire::Envelope::decode_as::<
12825                            ___D,
12826                            crate::wire::SecureHeapRange<'de>,
12827                        >(slot.as_mut(), decoder, ())?;
12828
12829                        Ok(())
12830                    }
12831
12832                    3 => {
12833                        ::fidl_next::wire::Envelope::decode_as::<
12834                            ___D,
12835                            crate::wire::SecureHeapRange<'de>,
12836                        >(slot.as_mut(), decoder, ())?;
12837
12838                        Ok(())
12839                    }
12840
12841                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12842                }
12843            })
12844        }
12845    }
12846
12847    impl<'de> SecureHeapAndRangeModification<'de> {
12848        pub fn heap(&self) -> ::core::option::Option<&crate::wire::Heap<'de>> {
12849            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12850        }
12851
12852        pub fn take_heap(&mut self) -> ::core::option::Option<crate::wire::Heap<'de>> {
12853            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12854        }
12855
12856        pub fn old_range(&self) -> ::core::option::Option<&crate::wire::SecureHeapRange<'de>> {
12857            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
12858        }
12859
12860        pub fn take_old_range(
12861            &mut self,
12862        ) -> ::core::option::Option<crate::wire::SecureHeapRange<'de>> {
12863            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
12864        }
12865
12866        pub fn new_range(&self) -> ::core::option::Option<&crate::wire::SecureHeapRange<'de>> {
12867            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
12868        }
12869
12870        pub fn take_new_range(
12871            &mut self,
12872        ) -> ::core::option::Option<crate::wire::SecureHeapRange<'de>> {
12873            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
12874        }
12875    }
12876
12877    impl<'de> ::core::fmt::Debug for SecureHeapAndRangeModification<'de> {
12878        fn fmt(
12879            &self,
12880            f: &mut ::core::fmt::Formatter<'_>,
12881        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12882            f.debug_struct("SecureHeapAndRangeModification")
12883                .field("heap", &self.heap())
12884                .field("old_range", &self.old_range())
12885                .field("new_range", &self.new_range())
12886                .finish()
12887        }
12888    }
12889
12890    impl<'de> ::fidl_next::IntoNatural for SecureHeapAndRangeModification<'de> {
12891        type Natural = crate::natural::SecureHeapAndRangeModification;
12892    }
12893
12894    /// The wire type corresponding to [`SecureHeapAndRanges`].
12895    #[repr(C)]
12896    pub struct SecureHeapAndRanges<'de> {
12897        pub(crate) table: ::fidl_next::wire::Table<'de>,
12898    }
12899
12900    impl<'de> Drop for SecureHeapAndRanges<'de> {
12901        fn drop(&mut self) {
12902            let _ = self
12903                .table
12904                .get(1)
12905                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() });
12906
12907            let _ = self.table.get(2)
12908                .map(|envelope| unsafe {
12909                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SecureHeapRange<'de>>>()
12910                });
12911        }
12912    }
12913
12914    impl ::fidl_next::Constrained for SecureHeapAndRanges<'_> {
12915        type Constraint = ();
12916
12917        fn validate(
12918            _: ::fidl_next::Slot<'_, Self>,
12919            _: Self::Constraint,
12920        ) -> Result<(), ::fidl_next::ValidationError> {
12921            Ok(())
12922        }
12923    }
12924
12925    unsafe impl ::fidl_next::Wire for SecureHeapAndRanges<'static> {
12926        type Narrowed<'de> = SecureHeapAndRanges<'de>;
12927
12928        #[inline]
12929        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12930            ::fidl_next::munge!(let Self { table } = out);
12931            ::fidl_next::wire::Table::zero_padding(table);
12932        }
12933    }
12934
12935    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureHeapAndRanges<'de>
12936    where
12937        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12938    {
12939        fn decode(
12940            slot: ::fidl_next::Slot<'_, Self>,
12941            decoder: &mut ___D,
12942            _: (),
12943        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12944            ::fidl_next::munge!(let Self { table } = slot);
12945
12946            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12947                match ordinal {
12948                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12949
12950                    1 => {
12951                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Heap<'de>>(
12952                            slot.as_mut(),
12953                            decoder,
12954                            (),
12955                        )?;
12956
12957                        Ok(())
12958                    }
12959
12960                    2 => {
12961                        ::fidl_next::wire::Envelope::decode_as::<
12962                            ___D,
12963                            ::fidl_next::wire::Vector<'de, crate::wire::SecureHeapRange<'de>>,
12964                        >(slot.as_mut(), decoder, (128, ()))?;
12965
12966                        let value = unsafe {
12967                            slot
12968                                            .deref_unchecked()
12969                                            .deref_unchecked::<
12970                                                ::fidl_next::wire::Vector<'_, crate::wire::SecureHeapRange<'_>>
12971                                            >()
12972                        };
12973
12974                        if value.len() > 128 {
12975                            return Err(::fidl_next::DecodeError::VectorTooLong {
12976                                size: value.len() as u64,
12977                                limit: 128,
12978                            });
12979                        }
12980
12981                        Ok(())
12982                    }
12983
12984                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12985                }
12986            })
12987        }
12988    }
12989
12990    impl<'de> SecureHeapAndRanges<'de> {
12991        pub fn heap(&self) -> ::core::option::Option<&crate::wire::Heap<'de>> {
12992            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12993        }
12994
12995        pub fn take_heap(&mut self) -> ::core::option::Option<crate::wire::Heap<'de>> {
12996            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12997        }
12998
12999        pub fn ranges(
13000            &self,
13001        ) -> ::core::option::Option<
13002            &::fidl_next::wire::Vector<'de, crate::wire::SecureHeapRange<'de>>,
13003        > {
13004            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13005        }
13006
13007        pub fn take_ranges(
13008            &mut self,
13009        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::SecureHeapRange<'de>>>
13010        {
13011            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
13012        }
13013    }
13014
13015    impl<'de> ::core::fmt::Debug for SecureHeapAndRanges<'de> {
13016        fn fmt(
13017            &self,
13018            f: &mut ::core::fmt::Formatter<'_>,
13019        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13020            f.debug_struct("SecureHeapAndRanges")
13021                .field("heap", &self.heap())
13022                .field("ranges", &self.ranges())
13023                .finish()
13024        }
13025    }
13026
13027    impl<'de> ::fidl_next::IntoNatural for SecureHeapAndRanges<'de> {
13028        type Natural = crate::natural::SecureHeapAndRanges;
13029    }
13030
13031    /// The wire type corresponding to [`SecureHeapProperties`].
13032    #[repr(C)]
13033    pub struct SecureHeapProperties<'de> {
13034        pub(crate) table: ::fidl_next::wire::Table<'de>,
13035    }
13036
13037    impl<'de> Drop for SecureHeapProperties<'de> {
13038        fn drop(&mut self) {
13039            let _ = self
13040                .table
13041                .get(1)
13042                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() });
13043
13044            let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
13045
13046            let _ = self
13047                .table
13048                .get(3)
13049                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
13050
13051            let _ = self
13052                .table
13053                .get(4)
13054                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13055
13056            let _ = self.table.get(5).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
13057        }
13058    }
13059
13060    impl ::fidl_next::Constrained for SecureHeapProperties<'_> {
13061        type Constraint = ();
13062
13063        fn validate(
13064            _: ::fidl_next::Slot<'_, Self>,
13065            _: Self::Constraint,
13066        ) -> Result<(), ::fidl_next::ValidationError> {
13067            Ok(())
13068        }
13069    }
13070
13071    unsafe impl ::fidl_next::Wire for SecureHeapProperties<'static> {
13072        type Narrowed<'de> = SecureHeapProperties<'de>;
13073
13074        #[inline]
13075        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13076            ::fidl_next::munge!(let Self { table } = out);
13077            ::fidl_next::wire::Table::zero_padding(table);
13078        }
13079    }
13080
13081    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureHeapProperties<'de>
13082    where
13083        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13084    {
13085        fn decode(
13086            slot: ::fidl_next::Slot<'_, Self>,
13087            decoder: &mut ___D,
13088            _: (),
13089        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13090            ::fidl_next::munge!(let Self { table } = slot);
13091
13092            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13093                match ordinal {
13094                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13095
13096                    1 => {
13097                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Heap<'de>>(
13098                            slot.as_mut(),
13099                            decoder,
13100                            (),
13101                        )?;
13102
13103                        Ok(())
13104                    }
13105
13106                    2 => {
13107                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
13108                            slot.as_mut(),
13109                            decoder,
13110                            (),
13111                        )?;
13112
13113                        Ok(())
13114                    }
13115
13116                    3 => {
13117                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
13118                            slot.as_mut(),
13119                            decoder,
13120                            (),
13121                        )?;
13122
13123                        Ok(())
13124                    }
13125
13126                    4 => {
13127                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13128                            slot.as_mut(),
13129                            decoder,
13130                            (),
13131                        )?;
13132
13133                        Ok(())
13134                    }
13135
13136                    5 => {
13137                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
13138                            slot.as_mut(),
13139                            decoder,
13140                            (),
13141                        )?;
13142
13143                        Ok(())
13144                    }
13145
13146                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13147                }
13148            })
13149        }
13150    }
13151
13152    impl<'de> SecureHeapProperties<'de> {
13153        pub fn heap(&self) -> ::core::option::Option<&crate::wire::Heap<'de>> {
13154            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13155        }
13156
13157        pub fn take_heap(&mut self) -> ::core::option::Option<crate::wire::Heap<'de>> {
13158            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13159        }
13160
13161        pub fn dynamic_protection_ranges(&self) -> ::core::option::Option<&bool> {
13162            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13163        }
13164
13165        pub fn take_dynamic_protection_ranges(&mut self) -> ::core::option::Option<bool> {
13166            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
13167        }
13168
13169        pub fn protected_range_granularity(
13170            &self,
13171        ) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
13172            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
13173        }
13174
13175        pub fn take_protected_range_granularity(
13176            &mut self,
13177        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
13178            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
13179        }
13180
13181        pub fn max_protected_range_count(
13182            &self,
13183        ) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13184            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
13185        }
13186
13187        pub fn take_max_protected_range_count(
13188            &mut self,
13189        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13190            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
13191        }
13192
13193        pub fn is_mod_protected_range_available(&self) -> ::core::option::Option<&bool> {
13194            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
13195        }
13196
13197        pub fn take_is_mod_protected_range_available(&mut self) -> ::core::option::Option<bool> {
13198            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
13199        }
13200    }
13201
13202    impl<'de> ::core::fmt::Debug for SecureHeapProperties<'de> {
13203        fn fmt(
13204            &self,
13205            f: &mut ::core::fmt::Formatter<'_>,
13206        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13207            f.debug_struct("SecureHeapProperties")
13208                .field("heap", &self.heap())
13209                .field("dynamic_protection_ranges", &self.dynamic_protection_ranges())
13210                .field("protected_range_granularity", &self.protected_range_granularity())
13211                .field("max_protected_range_count", &self.max_protected_range_count())
13212                .field("is_mod_protected_range_available", &self.is_mod_protected_range_available())
13213                .finish()
13214        }
13215    }
13216
13217    impl<'de> ::fidl_next::IntoNatural for SecureHeapProperties<'de> {
13218        type Natural = crate::natural::SecureHeapProperties;
13219    }
13220
13221    /// The wire type corresponding to [`SecureMemGetPhysicalSecureHeapsResponse`].
13222    #[repr(C)]
13223    pub struct SecureMemGetPhysicalSecureHeapsResponse<'de> {
13224        pub(crate) table: ::fidl_next::wire::Table<'de>,
13225    }
13226
13227    impl<'de> Drop for SecureMemGetPhysicalSecureHeapsResponse<'de> {
13228        fn drop(&mut self) {
13229            let _ = self.table.get(1)
13230                .map(|envelope| unsafe {
13231                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SecureHeapAndRanges<'de>>>()
13232                });
13233        }
13234    }
13235
13236    impl ::fidl_next::Constrained for SecureMemGetPhysicalSecureHeapsResponse<'_> {
13237        type Constraint = ();
13238
13239        fn validate(
13240            _: ::fidl_next::Slot<'_, Self>,
13241            _: Self::Constraint,
13242        ) -> Result<(), ::fidl_next::ValidationError> {
13243            Ok(())
13244        }
13245    }
13246
13247    unsafe impl ::fidl_next::Wire for SecureMemGetPhysicalSecureHeapsResponse<'static> {
13248        type Narrowed<'de> = SecureMemGetPhysicalSecureHeapsResponse<'de>;
13249
13250        #[inline]
13251        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13252            ::fidl_next::munge!(let Self { table } = out);
13253            ::fidl_next::wire::Table::zero_padding(table);
13254        }
13255    }
13256
13257    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureMemGetPhysicalSecureHeapsResponse<'de>
13258    where
13259        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13260    {
13261        fn decode(
13262            slot: ::fidl_next::Slot<'_, Self>,
13263            decoder: &mut ___D,
13264            _: (),
13265        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13266            ::fidl_next::munge!(let Self { table } = slot);
13267
13268            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13269                match ordinal {
13270                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13271
13272                    1 => {
13273                        ::fidl_next::wire::Envelope::decode_as::<
13274                            ___D,
13275                            ::fidl_next::wire::Vector<'de, crate::wire::SecureHeapAndRanges<'de>>,
13276                        >(slot.as_mut(), decoder, (32, ()))?;
13277
13278                        let value = unsafe {
13279                            slot
13280                                            .deref_unchecked()
13281                                            .deref_unchecked::<
13282                                                ::fidl_next::wire::Vector<'_, crate::wire::SecureHeapAndRanges<'_>>
13283                                            >()
13284                        };
13285
13286                        if value.len() > 32 {
13287                            return Err(::fidl_next::DecodeError::VectorTooLong {
13288                                size: value.len() as u64,
13289                                limit: 32,
13290                            });
13291                        }
13292
13293                        Ok(())
13294                    }
13295
13296                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13297                }
13298            })
13299        }
13300    }
13301
13302    impl<'de> SecureMemGetPhysicalSecureHeapsResponse<'de> {
13303        pub fn heaps(
13304            &self,
13305        ) -> ::core::option::Option<
13306            &::fidl_next::wire::Vector<'de, crate::wire::SecureHeapAndRanges<'de>>,
13307        > {
13308            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13309        }
13310
13311        pub fn take_heaps(
13312            &mut self,
13313        ) -> ::core::option::Option<
13314            ::fidl_next::wire::Vector<'de, crate::wire::SecureHeapAndRanges<'de>>,
13315        > {
13316            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13317        }
13318    }
13319
13320    impl<'de> ::core::fmt::Debug for SecureMemGetPhysicalSecureHeapsResponse<'de> {
13321        fn fmt(
13322            &self,
13323            f: &mut ::core::fmt::Formatter<'_>,
13324        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13325            f.debug_struct("SecureMemGetPhysicalSecureHeapsResponse")
13326                .field("heaps", &self.heaps())
13327                .finish()
13328        }
13329    }
13330
13331    impl<'de> ::fidl_next::IntoNatural for SecureMemGetPhysicalSecureHeapsResponse<'de> {
13332        type Natural = crate::natural::SecureMemGetPhysicalSecureHeapsResponse;
13333    }
13334
13335    /// The wire type corresponding to [`SecureMemGetDynamicSecureHeapsResponse`].
13336    #[repr(C)]
13337    pub struct SecureMemGetDynamicSecureHeapsResponse<'de> {
13338        pub(crate) table: ::fidl_next::wire::Table<'de>,
13339    }
13340
13341    impl<'de> Drop for SecureMemGetDynamicSecureHeapsResponse<'de> {
13342        fn drop(&mut self) {
13343            let _ = self.table.get(1)
13344                .map(|envelope| unsafe {
13345                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::DynamicSecureHeap<'de>>>()
13346                });
13347        }
13348    }
13349
13350    impl ::fidl_next::Constrained for SecureMemGetDynamicSecureHeapsResponse<'_> {
13351        type Constraint = ();
13352
13353        fn validate(
13354            _: ::fidl_next::Slot<'_, Self>,
13355            _: Self::Constraint,
13356        ) -> Result<(), ::fidl_next::ValidationError> {
13357            Ok(())
13358        }
13359    }
13360
13361    unsafe impl ::fidl_next::Wire for SecureMemGetDynamicSecureHeapsResponse<'static> {
13362        type Narrowed<'de> = SecureMemGetDynamicSecureHeapsResponse<'de>;
13363
13364        #[inline]
13365        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13366            ::fidl_next::munge!(let Self { table } = out);
13367            ::fidl_next::wire::Table::zero_padding(table);
13368        }
13369    }
13370
13371    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureMemGetDynamicSecureHeapsResponse<'de>
13372    where
13373        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13374    {
13375        fn decode(
13376            slot: ::fidl_next::Slot<'_, Self>,
13377            decoder: &mut ___D,
13378            _: (),
13379        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13380            ::fidl_next::munge!(let Self { table } = slot);
13381
13382            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13383                match ordinal {
13384                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13385
13386                    1 => {
13387                        ::fidl_next::wire::Envelope::decode_as::<
13388                            ___D,
13389                            ::fidl_next::wire::Vector<'de, crate::wire::DynamicSecureHeap<'de>>,
13390                        >(slot.as_mut(), decoder, (32, ()))?;
13391
13392                        let value = unsafe {
13393                            slot
13394                                            .deref_unchecked()
13395                                            .deref_unchecked::<
13396                                                ::fidl_next::wire::Vector<'_, crate::wire::DynamicSecureHeap<'_>>
13397                                            >()
13398                        };
13399
13400                        if value.len() > 32 {
13401                            return Err(::fidl_next::DecodeError::VectorTooLong {
13402                                size: value.len() as u64,
13403                                limit: 32,
13404                            });
13405                        }
13406
13407                        Ok(())
13408                    }
13409
13410                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13411                }
13412            })
13413        }
13414    }
13415
13416    impl<'de> SecureMemGetDynamicSecureHeapsResponse<'de> {
13417        pub fn heaps(
13418            &self,
13419        ) -> ::core::option::Option<
13420            &::fidl_next::wire::Vector<'de, crate::wire::DynamicSecureHeap<'de>>,
13421        > {
13422            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13423        }
13424
13425        pub fn take_heaps(
13426            &mut self,
13427        ) -> ::core::option::Option<
13428            ::fidl_next::wire::Vector<'de, crate::wire::DynamicSecureHeap<'de>>,
13429        > {
13430            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13431        }
13432    }
13433
13434    impl<'de> ::core::fmt::Debug for SecureMemGetDynamicSecureHeapsResponse<'de> {
13435        fn fmt(
13436            &self,
13437            f: &mut ::core::fmt::Formatter<'_>,
13438        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13439            f.debug_struct("SecureMemGetDynamicSecureHeapsResponse")
13440                .field("heaps", &self.heaps())
13441                .finish()
13442        }
13443    }
13444
13445    impl<'de> ::fidl_next::IntoNatural for SecureMemGetDynamicSecureHeapsResponse<'de> {
13446        type Natural = crate::natural::SecureMemGetDynamicSecureHeapsResponse;
13447    }
13448
13449    /// The wire type corresponding to [`SecureMemGetPhysicalSecureHeapPropertiesRequest`].
13450    #[repr(C)]
13451    pub struct SecureMemGetPhysicalSecureHeapPropertiesRequest<'de> {
13452        pub(crate) table: ::fidl_next::wire::Table<'de>,
13453    }
13454
13455    impl<'de> Drop for SecureMemGetPhysicalSecureHeapPropertiesRequest<'de> {
13456        fn drop(&mut self) {
13457            let _ = self.table.get(1).map(|envelope| unsafe {
13458                envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
13459            });
13460        }
13461    }
13462
13463    impl ::fidl_next::Constrained for SecureMemGetPhysicalSecureHeapPropertiesRequest<'_> {
13464        type Constraint = ();
13465
13466        fn validate(
13467            _: ::fidl_next::Slot<'_, Self>,
13468            _: Self::Constraint,
13469        ) -> Result<(), ::fidl_next::ValidationError> {
13470            Ok(())
13471        }
13472    }
13473
13474    unsafe impl ::fidl_next::Wire for SecureMemGetPhysicalSecureHeapPropertiesRequest<'static> {
13475        type Narrowed<'de> = SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>;
13476
13477        #[inline]
13478        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13479            ::fidl_next::munge!(let Self { table } = out);
13480            ::fidl_next::wire::Table::zero_padding(table);
13481        }
13482    }
13483
13484    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
13485        for SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>
13486    where
13487        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13488    {
13489        fn decode(
13490            slot: ::fidl_next::Slot<'_, Self>,
13491            decoder: &mut ___D,
13492            _: (),
13493        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13494            ::fidl_next::munge!(let Self { table } = slot);
13495
13496            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13497                match ordinal {
13498                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13499
13500                    1 => {
13501                        ::fidl_next::wire::Envelope::decode_as::<
13502                            ___D,
13503                            crate::wire::SecureHeapAndRange<'de>,
13504                        >(slot.as_mut(), decoder, ())?;
13505
13506                        Ok(())
13507                    }
13508
13509                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13510                }
13511            })
13512        }
13513    }
13514
13515    impl<'de> SecureMemGetPhysicalSecureHeapPropertiesRequest<'de> {
13516        pub fn entire_heap(&self) -> ::core::option::Option<&crate::wire::SecureHeapAndRange<'de>> {
13517            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13518        }
13519
13520        pub fn take_entire_heap(
13521            &mut self,
13522        ) -> ::core::option::Option<crate::wire::SecureHeapAndRange<'de>> {
13523            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13524        }
13525    }
13526
13527    impl<'de> ::core::fmt::Debug for SecureMemGetPhysicalSecureHeapPropertiesRequest<'de> {
13528        fn fmt(
13529            &self,
13530            f: &mut ::core::fmt::Formatter<'_>,
13531        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13532            f.debug_struct("SecureMemGetPhysicalSecureHeapPropertiesRequest")
13533                .field("entire_heap", &self.entire_heap())
13534                .finish()
13535        }
13536    }
13537
13538    impl<'de> ::fidl_next::IntoNatural for SecureMemGetPhysicalSecureHeapPropertiesRequest<'de> {
13539        type Natural = crate::natural::SecureMemGetPhysicalSecureHeapPropertiesRequest;
13540    }
13541
13542    /// The wire type corresponding to [`SecureMemGetPhysicalSecureHeapPropertiesResponse`].
13543    #[repr(C)]
13544    pub struct SecureMemGetPhysicalSecureHeapPropertiesResponse<'de> {
13545        pub(crate) table: ::fidl_next::wire::Table<'de>,
13546    }
13547
13548    impl<'de> Drop for SecureMemGetPhysicalSecureHeapPropertiesResponse<'de> {
13549        fn drop(&mut self) {
13550            let _ = self.table.get(1).map(|envelope| unsafe {
13551                envelope.read_unchecked::<crate::wire::SecureHeapProperties<'de>>()
13552            });
13553        }
13554    }
13555
13556    impl ::fidl_next::Constrained for SecureMemGetPhysicalSecureHeapPropertiesResponse<'_> {
13557        type Constraint = ();
13558
13559        fn validate(
13560            _: ::fidl_next::Slot<'_, Self>,
13561            _: Self::Constraint,
13562        ) -> Result<(), ::fidl_next::ValidationError> {
13563            Ok(())
13564        }
13565    }
13566
13567    unsafe impl ::fidl_next::Wire for SecureMemGetPhysicalSecureHeapPropertiesResponse<'static> {
13568        type Narrowed<'de> = SecureMemGetPhysicalSecureHeapPropertiesResponse<'de>;
13569
13570        #[inline]
13571        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13572            ::fidl_next::munge!(let Self { table } = out);
13573            ::fidl_next::wire::Table::zero_padding(table);
13574        }
13575    }
13576
13577    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
13578        for SecureMemGetPhysicalSecureHeapPropertiesResponse<'de>
13579    where
13580        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13581    {
13582        fn decode(
13583            slot: ::fidl_next::Slot<'_, Self>,
13584            decoder: &mut ___D,
13585            _: (),
13586        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13587            ::fidl_next::munge!(let Self { table } = slot);
13588
13589            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13590                match ordinal {
13591                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13592
13593                    1 => {
13594                        ::fidl_next::wire::Envelope::decode_as::<
13595                            ___D,
13596                            crate::wire::SecureHeapProperties<'de>,
13597                        >(slot.as_mut(), decoder, ())?;
13598
13599                        Ok(())
13600                    }
13601
13602                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13603                }
13604            })
13605        }
13606    }
13607
13608    impl<'de> SecureMemGetPhysicalSecureHeapPropertiesResponse<'de> {
13609        pub fn properties(
13610            &self,
13611        ) -> ::core::option::Option<&crate::wire::SecureHeapProperties<'de>> {
13612            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13613        }
13614
13615        pub fn take_properties(
13616            &mut self,
13617        ) -> ::core::option::Option<crate::wire::SecureHeapProperties<'de>> {
13618            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13619        }
13620    }
13621
13622    impl<'de> ::core::fmt::Debug for SecureMemGetPhysicalSecureHeapPropertiesResponse<'de> {
13623        fn fmt(
13624            &self,
13625            f: &mut ::core::fmt::Formatter<'_>,
13626        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13627            f.debug_struct("SecureMemGetPhysicalSecureHeapPropertiesResponse")
13628                .field("properties", &self.properties())
13629                .finish()
13630        }
13631    }
13632
13633    impl<'de> ::fidl_next::IntoNatural for SecureMemGetPhysicalSecureHeapPropertiesResponse<'de> {
13634        type Natural = crate::natural::SecureMemGetPhysicalSecureHeapPropertiesResponse;
13635    }
13636
13637    /// The wire type corresponding to [`SecureMemAddSecureHeapPhysicalRangeRequest`].
13638    #[repr(C)]
13639    pub struct SecureMemAddSecureHeapPhysicalRangeRequest<'de> {
13640        pub(crate) table: ::fidl_next::wire::Table<'de>,
13641    }
13642
13643    impl<'de> Drop for SecureMemAddSecureHeapPhysicalRangeRequest<'de> {
13644        fn drop(&mut self) {
13645            let _ = self.table.get(1).map(|envelope| unsafe {
13646                envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
13647            });
13648        }
13649    }
13650
13651    impl ::fidl_next::Constrained for SecureMemAddSecureHeapPhysicalRangeRequest<'_> {
13652        type Constraint = ();
13653
13654        fn validate(
13655            _: ::fidl_next::Slot<'_, Self>,
13656            _: Self::Constraint,
13657        ) -> Result<(), ::fidl_next::ValidationError> {
13658            Ok(())
13659        }
13660    }
13661
13662    unsafe impl ::fidl_next::Wire for SecureMemAddSecureHeapPhysicalRangeRequest<'static> {
13663        type Narrowed<'de> = SecureMemAddSecureHeapPhysicalRangeRequest<'de>;
13664
13665        #[inline]
13666        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13667            ::fidl_next::munge!(let Self { table } = out);
13668            ::fidl_next::wire::Table::zero_padding(table);
13669        }
13670    }
13671
13672    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureMemAddSecureHeapPhysicalRangeRequest<'de>
13673    where
13674        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13675    {
13676        fn decode(
13677            slot: ::fidl_next::Slot<'_, Self>,
13678            decoder: &mut ___D,
13679            _: (),
13680        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13681            ::fidl_next::munge!(let Self { table } = slot);
13682
13683            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13684                match ordinal {
13685                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13686
13687                    1 => {
13688                        ::fidl_next::wire::Envelope::decode_as::<
13689                            ___D,
13690                            crate::wire::SecureHeapAndRange<'de>,
13691                        >(slot.as_mut(), decoder, ())?;
13692
13693                        Ok(())
13694                    }
13695
13696                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13697                }
13698            })
13699        }
13700    }
13701
13702    impl<'de> SecureMemAddSecureHeapPhysicalRangeRequest<'de> {
13703        pub fn heap_range(&self) -> ::core::option::Option<&crate::wire::SecureHeapAndRange<'de>> {
13704            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13705        }
13706
13707        pub fn take_heap_range(
13708            &mut self,
13709        ) -> ::core::option::Option<crate::wire::SecureHeapAndRange<'de>> {
13710            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13711        }
13712    }
13713
13714    impl<'de> ::core::fmt::Debug for SecureMemAddSecureHeapPhysicalRangeRequest<'de> {
13715        fn fmt(
13716            &self,
13717            f: &mut ::core::fmt::Formatter<'_>,
13718        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13719            f.debug_struct("SecureMemAddSecureHeapPhysicalRangeRequest")
13720                .field("heap_range", &self.heap_range())
13721                .finish()
13722        }
13723    }
13724
13725    impl<'de> ::fidl_next::IntoNatural for SecureMemAddSecureHeapPhysicalRangeRequest<'de> {
13726        type Natural = crate::natural::SecureMemAddSecureHeapPhysicalRangeRequest;
13727    }
13728
13729    /// The wire type corresponding to [`SecureMemAddSecureHeapPhysicalRangeResponse`].
13730    pub type SecureMemAddSecureHeapPhysicalRangeResponse = ::fidl_next::wire::Unit;
13731
13732    /// The wire type corresponding to [`SecureMemDeleteSecureHeapPhysicalRangeRequest`].
13733    #[repr(C)]
13734    pub struct SecureMemDeleteSecureHeapPhysicalRangeRequest<'de> {
13735        pub(crate) table: ::fidl_next::wire::Table<'de>,
13736    }
13737
13738    impl<'de> Drop for SecureMemDeleteSecureHeapPhysicalRangeRequest<'de> {
13739        fn drop(&mut self) {
13740            let _ = self.table.get(1).map(|envelope| unsafe {
13741                envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
13742            });
13743        }
13744    }
13745
13746    impl ::fidl_next::Constrained for SecureMemDeleteSecureHeapPhysicalRangeRequest<'_> {
13747        type Constraint = ();
13748
13749        fn validate(
13750            _: ::fidl_next::Slot<'_, Self>,
13751            _: Self::Constraint,
13752        ) -> Result<(), ::fidl_next::ValidationError> {
13753            Ok(())
13754        }
13755    }
13756
13757    unsafe impl ::fidl_next::Wire for SecureMemDeleteSecureHeapPhysicalRangeRequest<'static> {
13758        type Narrowed<'de> = SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>;
13759
13760        #[inline]
13761        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13762            ::fidl_next::munge!(let Self { table } = out);
13763            ::fidl_next::wire::Table::zero_padding(table);
13764        }
13765    }
13766
13767    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
13768        for SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>
13769    where
13770        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13771    {
13772        fn decode(
13773            slot: ::fidl_next::Slot<'_, Self>,
13774            decoder: &mut ___D,
13775            _: (),
13776        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13777            ::fidl_next::munge!(let Self { table } = slot);
13778
13779            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13780                match ordinal {
13781                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13782
13783                    1 => {
13784                        ::fidl_next::wire::Envelope::decode_as::<
13785                            ___D,
13786                            crate::wire::SecureHeapAndRange<'de>,
13787                        >(slot.as_mut(), decoder, ())?;
13788
13789                        Ok(())
13790                    }
13791
13792                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13793                }
13794            })
13795        }
13796    }
13797
13798    impl<'de> SecureMemDeleteSecureHeapPhysicalRangeRequest<'de> {
13799        pub fn heap_range(&self) -> ::core::option::Option<&crate::wire::SecureHeapAndRange<'de>> {
13800            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13801        }
13802
13803        pub fn take_heap_range(
13804            &mut self,
13805        ) -> ::core::option::Option<crate::wire::SecureHeapAndRange<'de>> {
13806            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13807        }
13808    }
13809
13810    impl<'de> ::core::fmt::Debug for SecureMemDeleteSecureHeapPhysicalRangeRequest<'de> {
13811        fn fmt(
13812            &self,
13813            f: &mut ::core::fmt::Formatter<'_>,
13814        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13815            f.debug_struct("SecureMemDeleteSecureHeapPhysicalRangeRequest")
13816                .field("heap_range", &self.heap_range())
13817                .finish()
13818        }
13819    }
13820
13821    impl<'de> ::fidl_next::IntoNatural for SecureMemDeleteSecureHeapPhysicalRangeRequest<'de> {
13822        type Natural = crate::natural::SecureMemDeleteSecureHeapPhysicalRangeRequest;
13823    }
13824
13825    /// The wire type corresponding to [`SecureMemDeleteSecureHeapPhysicalRangeResponse`].
13826    pub type SecureMemDeleteSecureHeapPhysicalRangeResponse = ::fidl_next::wire::Unit;
13827
13828    /// The wire type corresponding to [`SecureMemModifySecureHeapPhysicalRangeRequest`].
13829    #[repr(C)]
13830    pub struct SecureMemModifySecureHeapPhysicalRangeRequest<'de> {
13831        pub(crate) table: ::fidl_next::wire::Table<'de>,
13832    }
13833
13834    impl<'de> Drop for SecureMemModifySecureHeapPhysicalRangeRequest<'de> {
13835        fn drop(&mut self) {
13836            let _ = self.table.get(1).map(|envelope| unsafe {
13837                envelope.read_unchecked::<crate::wire::SecureHeapAndRangeModification<'de>>()
13838            });
13839        }
13840    }
13841
13842    impl ::fidl_next::Constrained for SecureMemModifySecureHeapPhysicalRangeRequest<'_> {
13843        type Constraint = ();
13844
13845        fn validate(
13846            _: ::fidl_next::Slot<'_, Self>,
13847            _: Self::Constraint,
13848        ) -> Result<(), ::fidl_next::ValidationError> {
13849            Ok(())
13850        }
13851    }
13852
13853    unsafe impl ::fidl_next::Wire for SecureMemModifySecureHeapPhysicalRangeRequest<'static> {
13854        type Narrowed<'de> = SecureMemModifySecureHeapPhysicalRangeRequest<'de>;
13855
13856        #[inline]
13857        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13858            ::fidl_next::munge!(let Self { table } = out);
13859            ::fidl_next::wire::Table::zero_padding(table);
13860        }
13861    }
13862
13863    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
13864        for SecureMemModifySecureHeapPhysicalRangeRequest<'de>
13865    where
13866        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13867    {
13868        fn decode(
13869            slot: ::fidl_next::Slot<'_, Self>,
13870            decoder: &mut ___D,
13871            _: (),
13872        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13873            ::fidl_next::munge!(let Self { table } = slot);
13874
13875            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13876                match ordinal {
13877                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13878
13879                    1 => {
13880                        ::fidl_next::wire::Envelope::decode_as::<
13881                            ___D,
13882                            crate::wire::SecureHeapAndRangeModification<'de>,
13883                        >(slot.as_mut(), decoder, ())?;
13884
13885                        Ok(())
13886                    }
13887
13888                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13889                }
13890            })
13891        }
13892    }
13893
13894    impl<'de> SecureMemModifySecureHeapPhysicalRangeRequest<'de> {
13895        pub fn range_modification(
13896            &self,
13897        ) -> ::core::option::Option<&crate::wire::SecureHeapAndRangeModification<'de>> {
13898            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13899        }
13900
13901        pub fn take_range_modification(
13902            &mut self,
13903        ) -> ::core::option::Option<crate::wire::SecureHeapAndRangeModification<'de>> {
13904            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13905        }
13906    }
13907
13908    impl<'de> ::core::fmt::Debug for SecureMemModifySecureHeapPhysicalRangeRequest<'de> {
13909        fn fmt(
13910            &self,
13911            f: &mut ::core::fmt::Formatter<'_>,
13912        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13913            f.debug_struct("SecureMemModifySecureHeapPhysicalRangeRequest")
13914                .field("range_modification", &self.range_modification())
13915                .finish()
13916        }
13917    }
13918
13919    impl<'de> ::fidl_next::IntoNatural for SecureMemModifySecureHeapPhysicalRangeRequest<'de> {
13920        type Natural = crate::natural::SecureMemModifySecureHeapPhysicalRangeRequest;
13921    }
13922
13923    /// The wire type corresponding to [`SecureMemModifySecureHeapPhysicalRangeResponse`].
13924    pub type SecureMemModifySecureHeapPhysicalRangeResponse = ::fidl_next::wire::Unit;
13925
13926    /// The wire type corresponding to [`SecureMemZeroSubRangeRequest`].
13927    #[repr(C)]
13928    pub struct SecureMemZeroSubRangeRequest<'de> {
13929        pub(crate) table: ::fidl_next::wire::Table<'de>,
13930    }
13931
13932    impl<'de> Drop for SecureMemZeroSubRangeRequest<'de> {
13933        fn drop(&mut self) {
13934            let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
13935
13936            let _ = self.table.get(2).map(|envelope| unsafe {
13937                envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
13938            });
13939        }
13940    }
13941
13942    impl ::fidl_next::Constrained for SecureMemZeroSubRangeRequest<'_> {
13943        type Constraint = ();
13944
13945        fn validate(
13946            _: ::fidl_next::Slot<'_, Self>,
13947            _: Self::Constraint,
13948        ) -> Result<(), ::fidl_next::ValidationError> {
13949            Ok(())
13950        }
13951    }
13952
13953    unsafe impl ::fidl_next::Wire for SecureMemZeroSubRangeRequest<'static> {
13954        type Narrowed<'de> = SecureMemZeroSubRangeRequest<'de>;
13955
13956        #[inline]
13957        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13958            ::fidl_next::munge!(let Self { table } = out);
13959            ::fidl_next::wire::Table::zero_padding(table);
13960        }
13961    }
13962
13963    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureMemZeroSubRangeRequest<'de>
13964    where
13965        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13966    {
13967        fn decode(
13968            slot: ::fidl_next::Slot<'_, Self>,
13969            decoder: &mut ___D,
13970            _: (),
13971        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13972            ::fidl_next::munge!(let Self { table } = slot);
13973
13974            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13975                match ordinal {
13976                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13977
13978                    1 => {
13979                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
13980                            slot.as_mut(),
13981                            decoder,
13982                            (),
13983                        )?;
13984
13985                        Ok(())
13986                    }
13987
13988                    2 => {
13989                        ::fidl_next::wire::Envelope::decode_as::<
13990                            ___D,
13991                            crate::wire::SecureHeapAndRange<'de>,
13992                        >(slot.as_mut(), decoder, ())?;
13993
13994                        Ok(())
13995                    }
13996
13997                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13998                }
13999            })
14000        }
14001    }
14002
14003    impl<'de> SecureMemZeroSubRangeRequest<'de> {
14004        pub fn is_covering_range_explicit(&self) -> ::core::option::Option<&bool> {
14005            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14006        }
14007
14008        pub fn take_is_covering_range_explicit(&mut self) -> ::core::option::Option<bool> {
14009            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14010        }
14011
14012        pub fn heap_range(&self) -> ::core::option::Option<&crate::wire::SecureHeapAndRange<'de>> {
14013            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14014        }
14015
14016        pub fn take_heap_range(
14017            &mut self,
14018        ) -> ::core::option::Option<crate::wire::SecureHeapAndRange<'de>> {
14019            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14020        }
14021    }
14022
14023    impl<'de> ::core::fmt::Debug for SecureMemZeroSubRangeRequest<'de> {
14024        fn fmt(
14025            &self,
14026            f: &mut ::core::fmt::Formatter<'_>,
14027        ) -> ::core::result::Result<(), ::core::fmt::Error> {
14028            f.debug_struct("SecureMemZeroSubRangeRequest")
14029                .field("is_covering_range_explicit", &self.is_covering_range_explicit())
14030                .field("heap_range", &self.heap_range())
14031                .finish()
14032        }
14033    }
14034
14035    impl<'de> ::fidl_next::IntoNatural for SecureMemZeroSubRangeRequest<'de> {
14036        type Natural = crate::natural::SecureMemZeroSubRangeRequest;
14037    }
14038
14039    /// The wire type corresponding to [`SecureMemZeroSubRangeResponse`].
14040    pub type SecureMemZeroSubRangeResponse = ::fidl_next::wire::Unit;
14041}
14042
14043pub mod wire_optional {}
14044
14045pub mod generic {
14046
14047    /// The generic type corresponding to [`PixelFormatAndModifier`].
14048    pub struct PixelFormatAndModifier<T0, T1> {
14049        pub pixel_format: T0,
14050
14051        pub pixel_format_modifier: T1,
14052    }
14053
14054    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::PixelFormatAndModifier, ___E>
14055        for PixelFormatAndModifier<T0, T1>
14056    where
14057        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
14058        T0: ::fidl_next::Encode<::fidl_next_common_fuchsia_images2::wire::PixelFormat, ___E>,
14059        T1: ::fidl_next::Encode<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier, ___E>,
14060    {
14061        #[inline]
14062        fn encode(
14063            self,
14064            encoder_: &mut ___E,
14065            out_: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormatAndModifier>,
14066            _: (),
14067        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
14068            ::fidl_next::munge! {
14069                let crate::wire::PixelFormatAndModifier {
14070                    pixel_format,
14071                    pixel_format_modifier,
14072
14073                } = out_;
14074            }
14075
14076            ::fidl_next::Encode::encode(self.pixel_format, encoder_, pixel_format, ())?;
14077
14078            ::fidl_next::Encode::encode(
14079                self.pixel_format_modifier,
14080                encoder_,
14081                pixel_format_modifier,
14082                (),
14083            )?;
14084
14085            Ok(())
14086        }
14087    }
14088
14089    /// The generic type corresponding to [`NodeSyncResponse`].
14090    pub type NodeSyncResponse = ();
14091
14092    /// The generic type corresponding to [`BufferCollectionCheckAllBuffersAllocatedResponse`].
14093    pub type BufferCollectionCheckAllBuffersAllocatedResponse = ();
14094
14095    /// The generic type corresponding to [`SecureMemAddSecureHeapPhysicalRangeResponse`].
14096    pub type SecureMemAddSecureHeapPhysicalRangeResponse = ();
14097
14098    /// The generic type corresponding to [`SecureMemDeleteSecureHeapPhysicalRangeResponse`].
14099    pub type SecureMemDeleteSecureHeapPhysicalRangeResponse = ();
14100
14101    /// The generic type corresponding to [`SecureMemModifySecureHeapPhysicalRangeResponse`].
14102    pub type SecureMemModifySecureHeapPhysicalRangeResponse = ();
14103
14104    /// The generic type corresponding to [`SecureMemZeroSubRangeResponse`].
14105    pub type SecureMemZeroSubRangeResponse = ();
14106}
14107
14108pub use self::natural::*;
14109
14110#[doc = " The max length in bytes of the `name` request field in\n [`fuchsia.sysmem2/Allocator.SetDebugClientInfo`] and\n [`fuchsia.sysmem2/Node.SetDebugClientInfo`].\n"]
14111pub const MAX_CLIENT_NAME_LENGTH: i32 = 256 as i32;
14112
14113#[doc = " The maximum size of\n [`fuchsia.sysmem2/BufferMemoryConstraints.permitted_heaps`].\n"]
14114pub const MAX_COUNT_BUFFER_MEMORY_CONSTRAINTS_PERMITTED_HEAPS: u32 = 64 as u32;
14115
14116#[doc = " The maximum size of [`fuchsia.sysmem2/ImageFormatConstraints.color_spaces`].\n"]
14117pub const MAX_COUNT_IMAGE_FORMAT_CONSTRAINTS_COLOR_SPACES: u32 = 32 as u32;
14118
14119#[doc = " The maximum size of\n [`fuchsia.sysmem2/ImageFormatConstraints.pixel_format_and_modifiers`].\n"]
14120pub const MAX_COUNT_PIXEL_FORMAT_AND_MODIFIERS: u32 = 64 as u32;
14121
14122pub const MAX_COUNT_IMAGE_FORMAT_CONSTRAINTS_REQUIRED_MAX_SIZE_LIST: u32 = 64 as u32;
14123
14124#[doc = " The maximum size of\n [`fuchsia.sysmem2/BufferCollectionConstraints.image_format_constraints`].\n"]
14125pub const MAX_COUNT_BUFFER_COLLECTION_CONSTRAINTS_IMAGE_FORMAT_CONSTRAINTS: u32 = 64 as u32;
14126
14127#[doc = " The maximum entries that can be in the\n [`fuchsia.sysmem2/BufferCollectionInfo.buffers`] field.\n"]
14128pub const MAX_COUNT_BUFFER_COLLECTION_INFO_BUFFERS: u32 = 128 as u32;
14129
14130pub const MAX_COUNT_DUPLICATES: u32 = 64 as u32;
14131
14132#[doc = " The maximum number of token children of an OR group that can be created per\n call to [`fuchsia.sysmem2/BufferCollectionTokenGroup.CreateChildrenSync`].\n\n Actually creating this many children isn\'t recommended in most typical\n scenarios, but isn\'t prevented, for testing reasons, and just in case an\n unusual scenario needs it. Mitigation of potentially high time complexity in\n sysmem will limit the actual number of group child combinations considered\n in aggregation attempts to a separate maximum that is not settable via\n sysmem protocols. The maximum number of total nodes in a sysmem token tree\n is limited to a separate maximum that is not settable via these protocols.\n"]
14133pub const MAX_COUNT_CREATE_CHILDREN: i32 = 64 as i32;
14134
14135pub const CPU_USAGE_READ: u32 = 1 as u32;
14136
14137pub const CPU_USAGE_READ_OFTEN: u32 = 2 as u32;
14138
14139pub const CPU_USAGE_WRITE: u32 = 4 as u32;
14140
14141pub const CPU_USAGE_WRITE_OFTEN: u32 = 8 as u32;
14142
14143pub const DISPLAY_USAGE_CURSOR: u32 = 2 as u32;
14144
14145pub const DISPLAY_USAGE_LAYER: u32 = 1 as u32;
14146
14147pub const MAX_HEAPS_COUNT: u32 = 32 as u32;
14148
14149pub const MAX_RANGES_COUNT: u32 = 128 as u32;
14150
14151pub const NONE_USAGE: u32 = 1 as u32;
14152
14153pub const NONE_USAGE_PERMIT_ALLOCATION: u32 = 2 as u32;
14154
14155/// The type corresponding to the SecureMem protocol.
14156#[doc = " SecureMem\n\n The client is sysmem.  The server is securemem driver.\n\n TEE - Trusted Execution Environment.\n\n REE - Rich Execution Environment.\n\n Enables sysmem to call the securemem driver to get any secure heaps\n configured via the TEE (or via the securemem driver), and set any physical\n secure heaps configured via sysmem.\n\n Presently, dynamically-allocated secure heaps are configured via sysmem, as\n it starts quite early during boot and can successfully reserve contiguous\n physical memory.  Presently, fixed-location secure heaps are configured via\n TEE, as the plumbing goes from the bootloader to the TEE.  However, this\n protocol intentionally doesn\'t care which heaps are dynamically-allocated\n and which are fixed-location.\n"]
14157#[derive(PartialEq, Debug)]
14158pub struct SecureMem;
14159
14160#[cfg(target_os = "fuchsia")]
14161impl ::fidl_next::HasTransport for SecureMem {
14162    type Transport = ::fidl_next::fuchsia::zx::Channel;
14163}
14164
14165pub mod secure_mem {
14166    pub mod prelude {
14167        pub use crate::{
14168            SecureMem, SecureMemClientHandler, SecureMemLocalClientHandler,
14169            SecureMemLocalServerHandler, SecureMemServerHandler, secure_mem,
14170        };
14171
14172        pub use crate::natural::Error;
14173
14174        pub use crate::natural::SecureMemAddSecureHeapPhysicalRangeRequest;
14175
14176        pub use crate::natural::SecureMemDeleteSecureHeapPhysicalRangeRequest;
14177
14178        pub use crate::natural::SecureMemGetPhysicalSecureHeapPropertiesRequest;
14179
14180        pub use crate::natural::SecureMemModifySecureHeapPhysicalRangeRequest;
14181
14182        pub use crate::natural::SecureMemZeroSubRangeRequest;
14183
14184        pub use crate::natural::SecureMemAddSecureHeapPhysicalRangeResponse;
14185
14186        pub use crate::natural::SecureMemDeleteSecureHeapPhysicalRangeResponse;
14187
14188        pub use crate::natural::SecureMemGetDynamicSecureHeapsResponse;
14189
14190        pub use crate::natural::SecureMemGetPhysicalSecureHeapPropertiesResponse;
14191
14192        pub use crate::natural::SecureMemGetPhysicalSecureHeapsResponse;
14193
14194        pub use crate::natural::SecureMemModifySecureHeapPhysicalRangeResponse;
14195
14196        pub use crate::natural::SecureMemZeroSubRangeResponse;
14197    }
14198
14199    pub struct GetPhysicalSecureHeaps;
14200
14201    impl ::fidl_next::Method for GetPhysicalSecureHeaps {
14202        const ORDINAL: u64 = 4067140791638717411;
14203        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14204            ::fidl_next::protocol::Flexibility::Flexible;
14205
14206        type Protocol = crate::SecureMem;
14207
14208        type Request = ::fidl_next::wire::EmptyMessageBody;
14209    }
14210
14211    impl ::fidl_next::TwoWayMethod for GetPhysicalSecureHeaps {
14212        type Response = ::fidl_next::wire::Result<
14213            'static,
14214            crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'static>,
14215            crate::wire::Error,
14216        >;
14217    }
14218
14219    impl<___R> ::fidl_next::Respond<___R> for GetPhysicalSecureHeaps {
14220        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14221
14222        fn respond(response: ___R) -> Self::Output {
14223            ::core::result::Result::Ok(response)
14224        }
14225    }
14226
14227    impl<___R> ::fidl_next::RespondErr<___R> for GetPhysicalSecureHeaps {
14228        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14229
14230        fn respond_err(response: ___R) -> Self::Output {
14231            ::core::result::Result::Err(response)
14232        }
14233    }
14234
14235    pub struct GetDynamicSecureHeaps;
14236
14237    impl ::fidl_next::Method for GetDynamicSecureHeaps {
14238        const ORDINAL: u64 = 1265657178863511604;
14239        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14240            ::fidl_next::protocol::Flexibility::Flexible;
14241
14242        type Protocol = crate::SecureMem;
14243
14244        type Request = ::fidl_next::wire::EmptyMessageBody;
14245    }
14246
14247    impl ::fidl_next::TwoWayMethod for GetDynamicSecureHeaps {
14248        type Response = ::fidl_next::wire::Result<
14249            'static,
14250            crate::wire::SecureMemGetDynamicSecureHeapsResponse<'static>,
14251            crate::wire::Error,
14252        >;
14253    }
14254
14255    impl<___R> ::fidl_next::Respond<___R> for GetDynamicSecureHeaps {
14256        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14257
14258        fn respond(response: ___R) -> Self::Output {
14259            ::core::result::Result::Ok(response)
14260        }
14261    }
14262
14263    impl<___R> ::fidl_next::RespondErr<___R> for GetDynamicSecureHeaps {
14264        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14265
14266        fn respond_err(response: ___R) -> Self::Output {
14267            ::core::result::Result::Err(response)
14268        }
14269    }
14270
14271    pub struct GetPhysicalSecureHeapProperties;
14272
14273    impl ::fidl_next::Method for GetPhysicalSecureHeapProperties {
14274        const ORDINAL: u64 = 895942034471897020;
14275        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14276            ::fidl_next::protocol::Flexibility::Flexible;
14277
14278        type Protocol = crate::SecureMem;
14279
14280        type Request = crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'static>;
14281    }
14282
14283    impl ::fidl_next::TwoWayMethod for GetPhysicalSecureHeapProperties {
14284        type Response = ::fidl_next::wire::Result<
14285            'static,
14286            crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'static>,
14287            crate::wire::Error,
14288        >;
14289    }
14290
14291    impl<___R> ::fidl_next::Respond<___R> for GetPhysicalSecureHeapProperties {
14292        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14293
14294        fn respond(response: ___R) -> Self::Output {
14295            ::core::result::Result::Ok(response)
14296        }
14297    }
14298
14299    impl<___R> ::fidl_next::RespondErr<___R> for GetPhysicalSecureHeapProperties {
14300        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14301
14302        fn respond_err(response: ___R) -> Self::Output {
14303            ::core::result::Result::Err(response)
14304        }
14305    }
14306
14307    pub struct AddSecureHeapPhysicalRange;
14308
14309    impl ::fidl_next::Method for AddSecureHeapPhysicalRange {
14310        const ORDINAL: u64 = 3888459953148993914;
14311        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14312            ::fidl_next::protocol::Flexibility::Flexible;
14313
14314        type Protocol = crate::SecureMem;
14315
14316        type Request = crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'static>;
14317    }
14318
14319    impl ::fidl_next::TwoWayMethod for AddSecureHeapPhysicalRange {
14320        type Response = ::fidl_next::wire::Result<
14321            'static,
14322            crate::wire::SecureMemAddSecureHeapPhysicalRangeResponse,
14323            crate::wire::Error,
14324        >;
14325    }
14326
14327    impl<___R> ::fidl_next::Respond<___R> for AddSecureHeapPhysicalRange {
14328        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14329
14330        fn respond(response: ___R) -> Self::Output {
14331            ::core::result::Result::Ok(response)
14332        }
14333    }
14334
14335    impl<___R> ::fidl_next::RespondErr<___R> for AddSecureHeapPhysicalRange {
14336        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14337
14338        fn respond_err(response: ___R) -> Self::Output {
14339            ::core::result::Result::Err(response)
14340        }
14341    }
14342
14343    pub struct DeleteSecureHeapPhysicalRange;
14344
14345    impl ::fidl_next::Method for DeleteSecureHeapPhysicalRange {
14346        const ORDINAL: u64 = 1056754671343258782;
14347        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14348            ::fidl_next::protocol::Flexibility::Flexible;
14349
14350        type Protocol = crate::SecureMem;
14351
14352        type Request = crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'static>;
14353    }
14354
14355    impl ::fidl_next::TwoWayMethod for DeleteSecureHeapPhysicalRange {
14356        type Response = ::fidl_next::wire::Result<
14357            'static,
14358            crate::wire::SecureMemDeleteSecureHeapPhysicalRangeResponse,
14359            crate::wire::Error,
14360        >;
14361    }
14362
14363    impl<___R> ::fidl_next::Respond<___R> for DeleteSecureHeapPhysicalRange {
14364        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14365
14366        fn respond(response: ___R) -> Self::Output {
14367            ::core::result::Result::Ok(response)
14368        }
14369    }
14370
14371    impl<___R> ::fidl_next::RespondErr<___R> for DeleteSecureHeapPhysicalRange {
14372        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14373
14374        fn respond_err(response: ___R) -> Self::Output {
14375            ::core::result::Result::Err(response)
14376        }
14377    }
14378
14379    pub struct ModifySecureHeapPhysicalRange;
14380
14381    impl ::fidl_next::Method for ModifySecureHeapPhysicalRange {
14382        const ORDINAL: u64 = 6969114310578042676;
14383        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14384            ::fidl_next::protocol::Flexibility::Flexible;
14385
14386        type Protocol = crate::SecureMem;
14387
14388        type Request = crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'static>;
14389    }
14390
14391    impl ::fidl_next::TwoWayMethod for ModifySecureHeapPhysicalRange {
14392        type Response = ::fidl_next::wire::Result<
14393            'static,
14394            crate::wire::SecureMemModifySecureHeapPhysicalRangeResponse,
14395            crate::wire::Error,
14396        >;
14397    }
14398
14399    impl<___R> ::fidl_next::Respond<___R> for ModifySecureHeapPhysicalRange {
14400        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14401
14402        fn respond(response: ___R) -> Self::Output {
14403            ::core::result::Result::Ok(response)
14404        }
14405    }
14406
14407    impl<___R> ::fidl_next::RespondErr<___R> for ModifySecureHeapPhysicalRange {
14408        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14409
14410        fn respond_err(response: ___R) -> Self::Output {
14411            ::core::result::Result::Err(response)
14412        }
14413    }
14414
14415    pub struct ZeroSubRange;
14416
14417    impl ::fidl_next::Method for ZeroSubRange {
14418        const ORDINAL: u64 = 6567857461132811493;
14419        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14420            ::fidl_next::protocol::Flexibility::Flexible;
14421
14422        type Protocol = crate::SecureMem;
14423
14424        type Request = crate::wire::SecureMemZeroSubRangeRequest<'static>;
14425    }
14426
14427    impl ::fidl_next::TwoWayMethod for ZeroSubRange {
14428        type Response = ::fidl_next::wire::Result<
14429            'static,
14430            crate::wire::SecureMemZeroSubRangeResponse,
14431            crate::wire::Error,
14432        >;
14433    }
14434
14435    impl<___R> ::fidl_next::Respond<___R> for ZeroSubRange {
14436        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14437
14438        fn respond(response: ___R) -> Self::Output {
14439            ::core::result::Result::Ok(response)
14440        }
14441    }
14442
14443    impl<___R> ::fidl_next::RespondErr<___R> for ZeroSubRange {
14444        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14445
14446        fn respond_err(response: ___R) -> Self::Output {
14447            ::core::result::Result::Err(response)
14448        }
14449    }
14450
14451    mod ___detail {
14452        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::SecureMem
14453        where
14454            ___T: ::fidl_next::Transport,
14455        {
14456            type Client = SecureMemClient<___T>;
14457            type Server = SecureMemServer<___T>;
14458        }
14459
14460        /// The client for the `SecureMem` protocol.
14461        #[repr(transparent)]
14462        pub struct SecureMemClient<___T: ::fidl_next::Transport> {
14463            #[allow(dead_code)]
14464            client: ::fidl_next::protocol::Client<___T>,
14465        }
14466
14467        impl<___T> SecureMemClient<___T>
14468        where
14469            ___T: ::fidl_next::Transport,
14470        {
14471            #[doc = " Gets the physical address and length of any secure heap whose physical\n range is configured via the TEE.\n\n Presently, these will be fixed physical addresses and lengths, with the\n location plumbed via the TEE.\n\n This is preferred over [\'fuchsia.hardware.sysmem.Sysmem/RegisterHeap\']\n when there isn\'t any special heap-specific per-VMO setup or teardown\n required.\n\n The physical range must be secured/protected by the TEE before the\n securemem driver responds to this request with success.\n\n Sysmem should only call this once.  Returning zero heaps is not a\n failure.\n\n Errors:\n  * PROTOCOL_DEVIATION - called more than once.\n  * UNSPECIFIED - generic internal error (such as in communication\n    with TEE which doesn\'t generate zx_status_t errors).\n  * other errors are allowed; any other errors should be treated the same\n    as UNSPECIFIED.\n"]
14472            pub fn get_physical_secure_heaps(
14473                &self,
14474            ) -> ::fidl_next::TwoWayFuture<'_, super::GetPhysicalSecureHeaps, ___T> {
14475                ::fidl_next::TwoWayFuture::from_untyped(
14476                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14477                        4067140791638717411,
14478                        <super::GetPhysicalSecureHeaps as ::fidl_next::Method>::FLEXIBILITY,
14479                        (),
14480                    ),
14481                )
14482            }
14483
14484            #[doc = " Gets information about any secure heaps whose physical pages are not\n configured by the TEE, but by sysmem.\n\n Sysmem should only call this once. Returning zero heaps is not a\n failure.\n\n Errors:\n  * PROTOCOL_DEVIATION - called more than once.\n  * UNSPECIFIED - generic internal error (such as in communication\n    with TEE which doesn\'t generate zx_status_t errors).\n  * other errors are allowed; any other errors should be treated the same\n    as UNSPECIFIED.\n"]
14485            pub fn get_dynamic_secure_heaps(
14486                &self,
14487            ) -> ::fidl_next::TwoWayFuture<'_, super::GetDynamicSecureHeaps, ___T> {
14488                ::fidl_next::TwoWayFuture::from_untyped(
14489                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14490                        1265657178863511604,
14491                        <super::GetDynamicSecureHeaps as ::fidl_next::Method>::FLEXIBILITY,
14492                        (),
14493                    ),
14494                )
14495            }
14496
14497            #[doc = " This request from sysmem to the securemem driver gets the properties of\n a protected/secure heap.\n\n This only handles heaps with a single contiguous physical extent.\n\n The heap\'s entire physical range is indicated in case this request needs\n some physical space to auto-detect how many ranges are REE-usable.  Any\n temporary HW protection ranges will be deleted before this request\n completes.\n\n Errors:\n  * UNSPECIFIED - generic internal error (such as in communication\n    with TEE which doesn\'t generate zx_status_t errors).\n  * other errors are allowed; any other errors should be treated the same\n    as UNSPECIFIED.\n"]
14498            pub fn get_physical_secure_heap_properties_with<___R>(
14499                &self,
14500                request: ___R,
14501            ) -> ::fidl_next::TwoWayFuture<'_, super::GetPhysicalSecureHeapProperties, ___T>
14502            where
14503                ___R: ::fidl_next::Encode<
14504                        crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'static>,
14505                        <___T as ::fidl_next::Transport>::SendBuffer,
14506                    >,
14507            {
14508                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14509                    895942034471897020,
14510                    <super::GetPhysicalSecureHeapProperties as ::fidl_next::Method>::FLEXIBILITY,
14511                    request,
14512                ))
14513            }
14514
14515            #[doc = " This request from sysmem to the securemem driver conveys a physical\n range to add, for a heap whose physical range(s) are set up via\n sysmem.\n\n Only sysmem can call this because only sysmem is handed the client end\n of a FIDL channel serving this protocol, via RegisterSecureMem().  The\n securemem driver is the server end of this protocol.\n\n The securemem driver must configure all the covered offsets as protected\n before responding to this message with success.\n\n On failure, the securemem driver must ensure the protected range was not\n created.\n\n Sysmem must only call this up to once if dynamic_protection_ranges\n false.\n\n If dynamic_protection_ranges is true, sysmem can call this multiple\n times as long as the current number of ranges never exceeds\n max_protected_range_count.\n\n The caller must not attempt to add a range that matches an\n already-existing range.  Added ranges can overlap each other as long as\n no two ranges match exactly.\n\n Errors:\n   * PROTOCOL_DEVIATION - called more than once when\n     !dynamic_protection_ranges.  Adding a heap that would cause overall\n     heap count to exceed max_protected_range_count. Unexpected heap, or\n     range that doesn\'t conform to protected_range_granularity. See log.\n   * UNSPECIFIED - generic internal error (such as in communication\n     with TEE which doesn\'t generate zx_status_t errors).\n   * other errors are possible, such as from communication failures or\n     server propagation of failures.\n"]
14516            pub fn add_secure_heap_physical_range_with<___R>(
14517                &self,
14518                request: ___R,
14519            ) -> ::fidl_next::TwoWayFuture<'_, super::AddSecureHeapPhysicalRange, ___T>
14520            where
14521                ___R: ::fidl_next::Encode<
14522                        crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'static>,
14523                        <___T as ::fidl_next::Transport>::SendBuffer,
14524                    >,
14525            {
14526                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14527                    3888459953148993914,
14528                    <super::AddSecureHeapPhysicalRange as ::fidl_next::Method>::FLEXIBILITY,
14529                    request,
14530                ))
14531            }
14532
14533            #[doc = " This request from sysmem to the securemem driver conveys a physical\n range to delete, for a heap whose physical range(s) are set up via\n sysmem.\n\n Only sysmem can call this because only sysmem is handed the client end\n of a FIDL channel serving this protocol, via RegisterSecureMem().  The\n securemem driver is the server end of this protocol.\n\n The securemem driver must configure all the covered offsets as not\n protected before responding to this message with success.\n\n On failure, the securemem driver must ensure the protected range was not\n deleted.\n\n Sysmem must not call this if dynamic_protection_ranges false.\n\n If dynamic_protection_ranges is true, sysmem can call this repeatedly,\n on various ranges that exist at the time of the call.\n\n If any portion of the range being deleted is not also covered by another\n protected range, then any ongoing DMA to any part of the entire range\n may be interrupted / may fail, potentially in a way that\'s disruptive to\n the entire system (bus lockup or similar, depending on device details).\n Therefore, the caller must ensure that no ongoing DMA is occurring to\n any portion of the range being deleted, unless the caller has other\n active ranges covering every block of the range being deleted.  Ongoing\n DMA to/from blocks outside the range being deleted is never impacted by\n the deletion.\n\n Errors:\n   * PROTOCOL_DEVIATION - called when !dynamic_protection_ranges.\n     Unexpected heap, or range that doesn\'t conform to\n     protected_range_granularity.\n   * UNSPECIFIED - generic internal error (such as in communication\n     with TEE which doesn\'t generate zx_status_t errors).\n   * NOT_FOUND - the specified range is not found.\n   * other errors are possible, such as from communication failures or\n     server propagation of failures.\n"]
14534            pub fn delete_secure_heap_physical_range_with<___R>(
14535                &self,
14536                request: ___R,
14537            ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteSecureHeapPhysicalRange, ___T>
14538            where
14539                ___R: ::fidl_next::Encode<
14540                        crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'static>,
14541                        <___T as ::fidl_next::Transport>::SendBuffer,
14542                    >,
14543            {
14544                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14545                    1056754671343258782,
14546                    <super::DeleteSecureHeapPhysicalRange as ::fidl_next::Method>::FLEXIBILITY,
14547                    request,
14548                ))
14549            }
14550
14551            #[doc = " This request from sysmem to the securemem driver conveys a physical\n range to modify and its new base and length, for a heap whose physical\n range(s) are set up via sysmem.\n\n Only sysmem can call this because only sysmem is handed the client end\n of a FIDL channel serving this protocol, via RegisterSecureMem().  The\n securemem driver is the server end of this protocol.\n\n The securemem driver must configure the range to cover only the new\n offsets before responding to this message with success.\n\n On failure, the securemem driver must ensure the range was not changed.\n\n Sysmem must not call this if dynamic_protection_ranges false.  Sysmem\n must not call this if !is_mod_protected_range_available.\n\n If dynamic_protection_ranges is true, sysmem can call this repeatedly,\n on various ranges that exist at the time of the call.\n\n The range must only be modified at one end or the other, but not both.\n If the range is getting shorter, and the un-covered blocks are not\n covered by other active ranges, any ongoing DMA to the entire range\n that\'s geting shorter may fail in a way that disrupts the entire system\n (bus lockup or similar), so the caller must ensure that no DMA is\n ongoing to any portion of a range that is getting shorter, unless the\n blocks being un-covered by the modification to this range are all\n covered by other active ranges, in which case no disruption to ongoing\n DMA will occur.\n\n If a range is modified to become <= zero length, the range is deleted.\n\n Errors:\n   * PROTOCOL_DEVIATION - called when !dynamic_protection_ranges.\n     Unexpected heap, or old_range or new_range that doesn\'t conform to\n     protected_range_granularity, or old_range and new_range differ in\n     both begin and end (disallowed).\n   * UNSPECIFIED - generic internal error (such as in communication\n     with TEE which doesn\'t generate zx_status_t errors).\n   * NOT_FOUND - the specified range is not found.\n   * other errors are possible, such as from communication failures or\n     server propagation of failures.\n"]
14552            pub fn modify_secure_heap_physical_range_with<___R>(
14553                &self,
14554                request: ___R,
14555            ) -> ::fidl_next::TwoWayFuture<'_, super::ModifySecureHeapPhysicalRange, ___T>
14556            where
14557                ___R: ::fidl_next::Encode<
14558                        crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'static>,
14559                        <___T as ::fidl_next::Transport>::SendBuffer,
14560                    >,
14561            {
14562                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14563                    6969114310578042676,
14564                    <super::ModifySecureHeapPhysicalRange as ::fidl_next::Method>::FLEXIBILITY,
14565                    request,
14566                ))
14567            }
14568
14569            #[doc = " Zero a sub-range of a currently-existing physical range added via\n AddSecureHeapPhysicalRange().  The sub-range must be fully covered by\n exactly one physical range, and must not overlap with any other\n physical range.\n\n is_covering_range_explicit - When true, the covering range must be one\n     of the ranges explicitly created via AddSecureHeapPhysicalRange(),\n     possibly modified since.  When false, the covering range must not\n     be one of the ranges explicitly created via\n     AddSecureHeapPhysicalRange(), but the covering range must exist as\n     a covering range not created via AddSecureHeapPhysicalRange().  The\n     covering range is typically the entire physical range (or a range\n     which covers even more) of a heap configured by the TEE and whose\n     configuration is conveyed to sysmem via GetPhysicalSecureHeaps().\n\n Ongoing DMA is not disrupted by this request.\n\n Errors:\n   * PROTOCOL_DEVIATION - called when !dynamic_protection_ranges.\n     Unexpected heap.\n   * UNSPECIFIED - generic internal error (such as in communication\n     with TEE which doesn\'t generate zx_status_t errors).\n   * other errors are possible, such as from communication failures or\n     server propagation of failures.\n"]
14570            pub fn zero_sub_range_with<___R>(
14571                &self,
14572                request: ___R,
14573            ) -> ::fidl_next::TwoWayFuture<'_, super::ZeroSubRange, ___T>
14574            where
14575                ___R: ::fidl_next::Encode<
14576                        crate::wire::SecureMemZeroSubRangeRequest<'static>,
14577                        <___T as ::fidl_next::Transport>::SendBuffer,
14578                    >,
14579            {
14580                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14581                    6567857461132811493,
14582                    <super::ZeroSubRange as ::fidl_next::Method>::FLEXIBILITY,
14583                    request,
14584                ))
14585            }
14586        }
14587
14588        /// The server for the `SecureMem` protocol.
14589        #[repr(transparent)]
14590        pub struct SecureMemServer<___T: ::fidl_next::Transport> {
14591            server: ::fidl_next::protocol::Server<___T>,
14592        }
14593
14594        impl<___T> SecureMemServer<___T> where ___T: ::fidl_next::Transport {}
14595    }
14596}
14597
14598#[diagnostic::on_unimplemented(
14599    note = "If {Self} implements the non-local SecureMemClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
14600)]
14601
14602/// A client handler for the SecureMem protocol.
14603///
14604/// See [`SecureMem`] for more details.
14605pub trait SecureMemLocalClientHandler<
14606    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14607    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14608>
14609{
14610    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14611        ::core::future::ready(())
14612    }
14613}
14614
14615impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for SecureMem
14616where
14617    ___H: SecureMemLocalClientHandler<___T>,
14618    ___T: ::fidl_next::Transport,
14619{
14620    async fn on_event(
14621        handler: &mut ___H,
14622        mut message: ::fidl_next::Message<___T>,
14623    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14624        match *message.header().ordinal {
14625            ordinal => {
14626                handler.on_unknown_interaction(ordinal).await;
14627                if ::core::matches!(
14628                    message.header().flexibility(),
14629                    ::fidl_next::protocol::Flexibility::Strict
14630                ) {
14631                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14632                } else {
14633                    Ok(())
14634                }
14635            }
14636        }
14637    }
14638}
14639
14640#[diagnostic::on_unimplemented(
14641    note = "If {Self} implements the non-local SecureMemServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
14642)]
14643
14644/// A server handler for the SecureMem protocol.
14645///
14646/// See [`SecureMem`] for more details.
14647pub trait SecureMemLocalServerHandler<
14648    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14649    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14650>
14651{
14652    #[doc = " Gets the physical address and length of any secure heap whose physical\n range is configured via the TEE.\n\n Presently, these will be fixed physical addresses and lengths, with the\n location plumbed via the TEE.\n\n This is preferred over [\'fuchsia.hardware.sysmem.Sysmem/RegisterHeap\']\n when there isn\'t any special heap-specific per-VMO setup or teardown\n required.\n\n The physical range must be secured/protected by the TEE before the\n securemem driver responds to this request with success.\n\n Sysmem should only call this once.  Returning zero heaps is not a\n failure.\n\n Errors:\n  * PROTOCOL_DEVIATION - called more than once.\n  * UNSPECIFIED - generic internal error (such as in communication\n    with TEE which doesn\'t generate zx_status_t errors).\n  * other errors are allowed; any other errors should be treated the same\n    as UNSPECIFIED.\n"]
14653    fn get_physical_secure_heaps(
14654        &mut self,
14655
14656        responder: ::fidl_next::Responder<secure_mem::GetPhysicalSecureHeaps, ___T>,
14657    ) -> impl ::core::future::Future<Output = ()>;
14658
14659    #[doc = " Gets information about any secure heaps whose physical pages are not\n configured by the TEE, but by sysmem.\n\n Sysmem should only call this once. Returning zero heaps is not a\n failure.\n\n Errors:\n  * PROTOCOL_DEVIATION - called more than once.\n  * UNSPECIFIED - generic internal error (such as in communication\n    with TEE which doesn\'t generate zx_status_t errors).\n  * other errors are allowed; any other errors should be treated the same\n    as UNSPECIFIED.\n"]
14660    fn get_dynamic_secure_heaps(
14661        &mut self,
14662
14663        responder: ::fidl_next::Responder<secure_mem::GetDynamicSecureHeaps, ___T>,
14664    ) -> impl ::core::future::Future<Output = ()>;
14665
14666    #[doc = " This request from sysmem to the securemem driver gets the properties of\n a protected/secure heap.\n\n This only handles heaps with a single contiguous physical extent.\n\n The heap\'s entire physical range is indicated in case this request needs\n some physical space to auto-detect how many ranges are REE-usable.  Any\n temporary HW protection ranges will be deleted before this request\n completes.\n\n Errors:\n  * UNSPECIFIED - generic internal error (such as in communication\n    with TEE which doesn\'t generate zx_status_t errors).\n  * other errors are allowed; any other errors should be treated the same\n    as UNSPECIFIED.\n"]
14667    fn get_physical_secure_heap_properties(
14668        &mut self,
14669
14670        request: ::fidl_next::Request<secure_mem::GetPhysicalSecureHeapProperties, ___T>,
14671
14672        responder: ::fidl_next::Responder<secure_mem::GetPhysicalSecureHeapProperties, ___T>,
14673    ) -> impl ::core::future::Future<Output = ()>;
14674
14675    #[doc = " This request from sysmem to the securemem driver conveys a physical\n range to add, for a heap whose physical range(s) are set up via\n sysmem.\n\n Only sysmem can call this because only sysmem is handed the client end\n of a FIDL channel serving this protocol, via RegisterSecureMem().  The\n securemem driver is the server end of this protocol.\n\n The securemem driver must configure all the covered offsets as protected\n before responding to this message with success.\n\n On failure, the securemem driver must ensure the protected range was not\n created.\n\n Sysmem must only call this up to once if dynamic_protection_ranges\n false.\n\n If dynamic_protection_ranges is true, sysmem can call this multiple\n times as long as the current number of ranges never exceeds\n max_protected_range_count.\n\n The caller must not attempt to add a range that matches an\n already-existing range.  Added ranges can overlap each other as long as\n no two ranges match exactly.\n\n Errors:\n   * PROTOCOL_DEVIATION - called more than once when\n     !dynamic_protection_ranges.  Adding a heap that would cause overall\n     heap count to exceed max_protected_range_count. Unexpected heap, or\n     range that doesn\'t conform to protected_range_granularity. See log.\n   * UNSPECIFIED - generic internal error (such as in communication\n     with TEE which doesn\'t generate zx_status_t errors).\n   * other errors are possible, such as from communication failures or\n     server propagation of failures.\n"]
14676    fn add_secure_heap_physical_range(
14677        &mut self,
14678
14679        request: ::fidl_next::Request<secure_mem::AddSecureHeapPhysicalRange, ___T>,
14680
14681        responder: ::fidl_next::Responder<secure_mem::AddSecureHeapPhysicalRange, ___T>,
14682    ) -> impl ::core::future::Future<Output = ()>;
14683
14684    #[doc = " This request from sysmem to the securemem driver conveys a physical\n range to delete, for a heap whose physical range(s) are set up via\n sysmem.\n\n Only sysmem can call this because only sysmem is handed the client end\n of a FIDL channel serving this protocol, via RegisterSecureMem().  The\n securemem driver is the server end of this protocol.\n\n The securemem driver must configure all the covered offsets as not\n protected before responding to this message with success.\n\n On failure, the securemem driver must ensure the protected range was not\n deleted.\n\n Sysmem must not call this if dynamic_protection_ranges false.\n\n If dynamic_protection_ranges is true, sysmem can call this repeatedly,\n on various ranges that exist at the time of the call.\n\n If any portion of the range being deleted is not also covered by another\n protected range, then any ongoing DMA to any part of the entire range\n may be interrupted / may fail, potentially in a way that\'s disruptive to\n the entire system (bus lockup or similar, depending on device details).\n Therefore, the caller must ensure that no ongoing DMA is occurring to\n any portion of the range being deleted, unless the caller has other\n active ranges covering every block of the range being deleted.  Ongoing\n DMA to/from blocks outside the range being deleted is never impacted by\n the deletion.\n\n Errors:\n   * PROTOCOL_DEVIATION - called when !dynamic_protection_ranges.\n     Unexpected heap, or range that doesn\'t conform to\n     protected_range_granularity.\n   * UNSPECIFIED - generic internal error (such as in communication\n     with TEE which doesn\'t generate zx_status_t errors).\n   * NOT_FOUND - the specified range is not found.\n   * other errors are possible, such as from communication failures or\n     server propagation of failures.\n"]
14685    fn delete_secure_heap_physical_range(
14686        &mut self,
14687
14688        request: ::fidl_next::Request<secure_mem::DeleteSecureHeapPhysicalRange, ___T>,
14689
14690        responder: ::fidl_next::Responder<secure_mem::DeleteSecureHeapPhysicalRange, ___T>,
14691    ) -> impl ::core::future::Future<Output = ()>;
14692
14693    #[doc = " This request from sysmem to the securemem driver conveys a physical\n range to modify and its new base and length, for a heap whose physical\n range(s) are set up via sysmem.\n\n Only sysmem can call this because only sysmem is handed the client end\n of a FIDL channel serving this protocol, via RegisterSecureMem().  The\n securemem driver is the server end of this protocol.\n\n The securemem driver must configure the range to cover only the new\n offsets before responding to this message with success.\n\n On failure, the securemem driver must ensure the range was not changed.\n\n Sysmem must not call this if dynamic_protection_ranges false.  Sysmem\n must not call this if !is_mod_protected_range_available.\n\n If dynamic_protection_ranges is true, sysmem can call this repeatedly,\n on various ranges that exist at the time of the call.\n\n The range must only be modified at one end or the other, but not both.\n If the range is getting shorter, and the un-covered blocks are not\n covered by other active ranges, any ongoing DMA to the entire range\n that\'s geting shorter may fail in a way that disrupts the entire system\n (bus lockup or similar), so the caller must ensure that no DMA is\n ongoing to any portion of a range that is getting shorter, unless the\n blocks being un-covered by the modification to this range are all\n covered by other active ranges, in which case no disruption to ongoing\n DMA will occur.\n\n If a range is modified to become <= zero length, the range is deleted.\n\n Errors:\n   * PROTOCOL_DEVIATION - called when !dynamic_protection_ranges.\n     Unexpected heap, or old_range or new_range that doesn\'t conform to\n     protected_range_granularity, or old_range and new_range differ in\n     both begin and end (disallowed).\n   * UNSPECIFIED - generic internal error (such as in communication\n     with TEE which doesn\'t generate zx_status_t errors).\n   * NOT_FOUND - the specified range is not found.\n   * other errors are possible, such as from communication failures or\n     server propagation of failures.\n"]
14694    fn modify_secure_heap_physical_range(
14695        &mut self,
14696
14697        request: ::fidl_next::Request<secure_mem::ModifySecureHeapPhysicalRange, ___T>,
14698
14699        responder: ::fidl_next::Responder<secure_mem::ModifySecureHeapPhysicalRange, ___T>,
14700    ) -> impl ::core::future::Future<Output = ()>;
14701
14702    #[doc = " Zero a sub-range of a currently-existing physical range added via\n AddSecureHeapPhysicalRange().  The sub-range must be fully covered by\n exactly one physical range, and must not overlap with any other\n physical range.\n\n is_covering_range_explicit - When true, the covering range must be one\n     of the ranges explicitly created via AddSecureHeapPhysicalRange(),\n     possibly modified since.  When false, the covering range must not\n     be one of the ranges explicitly created via\n     AddSecureHeapPhysicalRange(), but the covering range must exist as\n     a covering range not created via AddSecureHeapPhysicalRange().  The\n     covering range is typically the entire physical range (or a range\n     which covers even more) of a heap configured by the TEE and whose\n     configuration is conveyed to sysmem via GetPhysicalSecureHeaps().\n\n Ongoing DMA is not disrupted by this request.\n\n Errors:\n   * PROTOCOL_DEVIATION - called when !dynamic_protection_ranges.\n     Unexpected heap.\n   * UNSPECIFIED - generic internal error (such as in communication\n     with TEE which doesn\'t generate zx_status_t errors).\n   * other errors are possible, such as from communication failures or\n     server propagation of failures.\n"]
14703    fn zero_sub_range(
14704        &mut self,
14705
14706        request: ::fidl_next::Request<secure_mem::ZeroSubRange, ___T>,
14707
14708        responder: ::fidl_next::Responder<secure_mem::ZeroSubRange, ___T>,
14709    ) -> impl ::core::future::Future<Output = ()>;
14710
14711    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14712        ::core::future::ready(())
14713    }
14714}
14715
14716impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for SecureMem
14717where
14718    ___H: SecureMemLocalServerHandler<___T>,
14719    ___T: ::fidl_next::Transport,
14720    for<'de> crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>: ::fidl_next::Decode<
14721            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14722            Constraint = (),
14723        >,
14724    for<'de> crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'de>: ::fidl_next::Decode<
14725            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14726            Constraint = (),
14727        >,
14728    for<'de> crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>: ::fidl_next::Decode<
14729            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14730            Constraint = (),
14731        >,
14732    for<'de> crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'de>: ::fidl_next::Decode<
14733            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14734            Constraint = (),
14735        >,
14736    for<'de> crate::wire::SecureMemZeroSubRangeRequest<'de>: ::fidl_next::Decode<
14737            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14738            Constraint = (),
14739        >,
14740{
14741    async fn on_one_way(
14742        handler: &mut ___H,
14743        mut message: ::fidl_next::Message<___T>,
14744    ) -> ::core::result::Result<
14745        (),
14746        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14747    > {
14748        match *message.header().ordinal {
14749            ordinal => {
14750                handler.on_unknown_interaction(ordinal).await;
14751                if ::core::matches!(
14752                    message.header().flexibility(),
14753                    ::fidl_next::protocol::Flexibility::Strict
14754                ) {
14755                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14756                } else {
14757                    Ok(())
14758                }
14759            }
14760        }
14761    }
14762
14763    async fn on_two_way(
14764        handler: &mut ___H,
14765        mut message: ::fidl_next::Message<___T>,
14766        responder: ::fidl_next::protocol::Responder<___T>,
14767    ) -> ::core::result::Result<
14768        (),
14769        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14770    > {
14771        match *message.header().ordinal {
14772            4067140791638717411 => {
14773                let responder = ::fidl_next::Responder::from_untyped(responder);
14774
14775                handler.get_physical_secure_heaps(responder).await;
14776                Ok(())
14777            }
14778
14779            1265657178863511604 => {
14780                let responder = ::fidl_next::Responder::from_untyped(responder);
14781
14782                handler.get_dynamic_secure_heaps(responder).await;
14783                Ok(())
14784            }
14785
14786            895942034471897020 => {
14787                let responder = ::fidl_next::Responder::from_untyped(responder);
14788
14789                match ::fidl_next::AsDecoderExt::into_decoded(message) {
14790                    Ok(decoded) => {
14791                        handler
14792                            .get_physical_secure_heap_properties(
14793                                ::fidl_next::Request::from_decoded(decoded),
14794                                responder,
14795                            )
14796                            .await;
14797                        Ok(())
14798                    }
14799                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14800                        ordinal: 895942034471897020,
14801                        error,
14802                    }),
14803                }
14804            }
14805
14806            3888459953148993914 => {
14807                let responder = ::fidl_next::Responder::from_untyped(responder);
14808
14809                match ::fidl_next::AsDecoderExt::into_decoded(message) {
14810                    Ok(decoded) => {
14811                        handler
14812                            .add_secure_heap_physical_range(
14813                                ::fidl_next::Request::from_decoded(decoded),
14814                                responder,
14815                            )
14816                            .await;
14817                        Ok(())
14818                    }
14819                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14820                        ordinal: 3888459953148993914,
14821                        error,
14822                    }),
14823                }
14824            }
14825
14826            1056754671343258782 => {
14827                let responder = ::fidl_next::Responder::from_untyped(responder);
14828
14829                match ::fidl_next::AsDecoderExt::into_decoded(message) {
14830                    Ok(decoded) => {
14831                        handler
14832                            .delete_secure_heap_physical_range(
14833                                ::fidl_next::Request::from_decoded(decoded),
14834                                responder,
14835                            )
14836                            .await;
14837                        Ok(())
14838                    }
14839                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14840                        ordinal: 1056754671343258782,
14841                        error,
14842                    }),
14843                }
14844            }
14845
14846            6969114310578042676 => {
14847                let responder = ::fidl_next::Responder::from_untyped(responder);
14848
14849                match ::fidl_next::AsDecoderExt::into_decoded(message) {
14850                    Ok(decoded) => {
14851                        handler
14852                            .modify_secure_heap_physical_range(
14853                                ::fidl_next::Request::from_decoded(decoded),
14854                                responder,
14855                            )
14856                            .await;
14857                        Ok(())
14858                    }
14859                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14860                        ordinal: 6969114310578042676,
14861                        error,
14862                    }),
14863                }
14864            }
14865
14866            6567857461132811493 => {
14867                let responder = ::fidl_next::Responder::from_untyped(responder);
14868
14869                match ::fidl_next::AsDecoderExt::into_decoded(message) {
14870                    Ok(decoded) => {
14871                        handler
14872                            .zero_sub_range(::fidl_next::Request::from_decoded(decoded), responder)
14873                            .await;
14874                        Ok(())
14875                    }
14876                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14877                        ordinal: 6567857461132811493,
14878                        error,
14879                    }),
14880                }
14881            }
14882
14883            ordinal => {
14884                handler.on_unknown_interaction(ordinal).await;
14885                if ::core::matches!(
14886                    message.header().flexibility(),
14887                    ::fidl_next::protocol::Flexibility::Strict
14888                ) {
14889                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14890                } else {
14891                    responder
14892                        .respond_framework_error(
14893                            ordinal,
14894                            ::fidl_next::FrameworkError::UnknownMethod,
14895                        )
14896                        .expect("encoding a framework error should never fail")
14897                        .await?;
14898                    Ok(())
14899                }
14900            }
14901        }
14902    }
14903}
14904
14905/// A client handler for the SecureMem protocol.
14906///
14907/// See [`SecureMem`] for more details.
14908pub trait SecureMemClientHandler<
14909    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14910    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14911>
14912{
14913    fn on_unknown_interaction(
14914        &mut self,
14915        ordinal: u64,
14916    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14917        ::core::future::ready(())
14918    }
14919}
14920
14921impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for SecureMem
14922where
14923    ___H: SecureMemClientHandler<___T> + ::core::marker::Send,
14924    ___T: ::fidl_next::Transport,
14925{
14926    async fn on_event(
14927        handler: &mut ___H,
14928        mut message: ::fidl_next::Message<___T>,
14929    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14930        match *message.header().ordinal {
14931            ordinal => {
14932                handler.on_unknown_interaction(ordinal).await;
14933                if ::core::matches!(
14934                    message.header().flexibility(),
14935                    ::fidl_next::protocol::Flexibility::Strict
14936                ) {
14937                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14938                } else {
14939                    Ok(())
14940                }
14941            }
14942        }
14943    }
14944}
14945
14946/// A server handler for the SecureMem protocol.
14947///
14948/// See [`SecureMem`] for more details.
14949pub trait SecureMemServerHandler<
14950    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14951    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14952>
14953{
14954    #[doc = " Gets the physical address and length of any secure heap whose physical\n range is configured via the TEE.\n\n Presently, these will be fixed physical addresses and lengths, with the\n location plumbed via the TEE.\n\n This is preferred over [\'fuchsia.hardware.sysmem.Sysmem/RegisterHeap\']\n when there isn\'t any special heap-specific per-VMO setup or teardown\n required.\n\n The physical range must be secured/protected by the TEE before the\n securemem driver responds to this request with success.\n\n Sysmem should only call this once.  Returning zero heaps is not a\n failure.\n\n Errors:\n  * PROTOCOL_DEVIATION - called more than once.\n  * UNSPECIFIED - generic internal error (such as in communication\n    with TEE which doesn\'t generate zx_status_t errors).\n  * other errors are allowed; any other errors should be treated the same\n    as UNSPECIFIED.\n"]
14955    fn get_physical_secure_heaps(
14956        &mut self,
14957
14958        responder: ::fidl_next::Responder<secure_mem::GetPhysicalSecureHeaps, ___T>,
14959    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14960
14961    #[doc = " Gets information about any secure heaps whose physical pages are not\n configured by the TEE, but by sysmem.\n\n Sysmem should only call this once. Returning zero heaps is not a\n failure.\n\n Errors:\n  * PROTOCOL_DEVIATION - called more than once.\n  * UNSPECIFIED - generic internal error (such as in communication\n    with TEE which doesn\'t generate zx_status_t errors).\n  * other errors are allowed; any other errors should be treated the same\n    as UNSPECIFIED.\n"]
14962    fn get_dynamic_secure_heaps(
14963        &mut self,
14964
14965        responder: ::fidl_next::Responder<secure_mem::GetDynamicSecureHeaps, ___T>,
14966    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14967
14968    #[doc = " This request from sysmem to the securemem driver gets the properties of\n a protected/secure heap.\n\n This only handles heaps with a single contiguous physical extent.\n\n The heap\'s entire physical range is indicated in case this request needs\n some physical space to auto-detect how many ranges are REE-usable.  Any\n temporary HW protection ranges will be deleted before this request\n completes.\n\n Errors:\n  * UNSPECIFIED - generic internal error (such as in communication\n    with TEE which doesn\'t generate zx_status_t errors).\n  * other errors are allowed; any other errors should be treated the same\n    as UNSPECIFIED.\n"]
14969    fn get_physical_secure_heap_properties(
14970        &mut self,
14971
14972        request: ::fidl_next::Request<secure_mem::GetPhysicalSecureHeapProperties, ___T>,
14973
14974        responder: ::fidl_next::Responder<secure_mem::GetPhysicalSecureHeapProperties, ___T>,
14975    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14976
14977    #[doc = " This request from sysmem to the securemem driver conveys a physical\n range to add, for a heap whose physical range(s) are set up via\n sysmem.\n\n Only sysmem can call this because only sysmem is handed the client end\n of a FIDL channel serving this protocol, via RegisterSecureMem().  The\n securemem driver is the server end of this protocol.\n\n The securemem driver must configure all the covered offsets as protected\n before responding to this message with success.\n\n On failure, the securemem driver must ensure the protected range was not\n created.\n\n Sysmem must only call this up to once if dynamic_protection_ranges\n false.\n\n If dynamic_protection_ranges is true, sysmem can call this multiple\n times as long as the current number of ranges never exceeds\n max_protected_range_count.\n\n The caller must not attempt to add a range that matches an\n already-existing range.  Added ranges can overlap each other as long as\n no two ranges match exactly.\n\n Errors:\n   * PROTOCOL_DEVIATION - called more than once when\n     !dynamic_protection_ranges.  Adding a heap that would cause overall\n     heap count to exceed max_protected_range_count. Unexpected heap, or\n     range that doesn\'t conform to protected_range_granularity. See log.\n   * UNSPECIFIED - generic internal error (such as in communication\n     with TEE which doesn\'t generate zx_status_t errors).\n   * other errors are possible, such as from communication failures or\n     server propagation of failures.\n"]
14978    fn add_secure_heap_physical_range(
14979        &mut self,
14980
14981        request: ::fidl_next::Request<secure_mem::AddSecureHeapPhysicalRange, ___T>,
14982
14983        responder: ::fidl_next::Responder<secure_mem::AddSecureHeapPhysicalRange, ___T>,
14984    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14985
14986    #[doc = " This request from sysmem to the securemem driver conveys a physical\n range to delete, for a heap whose physical range(s) are set up via\n sysmem.\n\n Only sysmem can call this because only sysmem is handed the client end\n of a FIDL channel serving this protocol, via RegisterSecureMem().  The\n securemem driver is the server end of this protocol.\n\n The securemem driver must configure all the covered offsets as not\n protected before responding to this message with success.\n\n On failure, the securemem driver must ensure the protected range was not\n deleted.\n\n Sysmem must not call this if dynamic_protection_ranges false.\n\n If dynamic_protection_ranges is true, sysmem can call this repeatedly,\n on various ranges that exist at the time of the call.\n\n If any portion of the range being deleted is not also covered by another\n protected range, then any ongoing DMA to any part of the entire range\n may be interrupted / may fail, potentially in a way that\'s disruptive to\n the entire system (bus lockup or similar, depending on device details).\n Therefore, the caller must ensure that no ongoing DMA is occurring to\n any portion of the range being deleted, unless the caller has other\n active ranges covering every block of the range being deleted.  Ongoing\n DMA to/from blocks outside the range being deleted is never impacted by\n the deletion.\n\n Errors:\n   * PROTOCOL_DEVIATION - called when !dynamic_protection_ranges.\n     Unexpected heap, or range that doesn\'t conform to\n     protected_range_granularity.\n   * UNSPECIFIED - generic internal error (such as in communication\n     with TEE which doesn\'t generate zx_status_t errors).\n   * NOT_FOUND - the specified range is not found.\n   * other errors are possible, such as from communication failures or\n     server propagation of failures.\n"]
14987    fn delete_secure_heap_physical_range(
14988        &mut self,
14989
14990        request: ::fidl_next::Request<secure_mem::DeleteSecureHeapPhysicalRange, ___T>,
14991
14992        responder: ::fidl_next::Responder<secure_mem::DeleteSecureHeapPhysicalRange, ___T>,
14993    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14994
14995    #[doc = " This request from sysmem to the securemem driver conveys a physical\n range to modify and its new base and length, for a heap whose physical\n range(s) are set up via sysmem.\n\n Only sysmem can call this because only sysmem is handed the client end\n of a FIDL channel serving this protocol, via RegisterSecureMem().  The\n securemem driver is the server end of this protocol.\n\n The securemem driver must configure the range to cover only the new\n offsets before responding to this message with success.\n\n On failure, the securemem driver must ensure the range was not changed.\n\n Sysmem must not call this if dynamic_protection_ranges false.  Sysmem\n must not call this if !is_mod_protected_range_available.\n\n If dynamic_protection_ranges is true, sysmem can call this repeatedly,\n on various ranges that exist at the time of the call.\n\n The range must only be modified at one end or the other, but not both.\n If the range is getting shorter, and the un-covered blocks are not\n covered by other active ranges, any ongoing DMA to the entire range\n that\'s geting shorter may fail in a way that disrupts the entire system\n (bus lockup or similar), so the caller must ensure that no DMA is\n ongoing to any portion of a range that is getting shorter, unless the\n blocks being un-covered by the modification to this range are all\n covered by other active ranges, in which case no disruption to ongoing\n DMA will occur.\n\n If a range is modified to become <= zero length, the range is deleted.\n\n Errors:\n   * PROTOCOL_DEVIATION - called when !dynamic_protection_ranges.\n     Unexpected heap, or old_range or new_range that doesn\'t conform to\n     protected_range_granularity, or old_range and new_range differ in\n     both begin and end (disallowed).\n   * UNSPECIFIED - generic internal error (such as in communication\n     with TEE which doesn\'t generate zx_status_t errors).\n   * NOT_FOUND - the specified range is not found.\n   * other errors are possible, such as from communication failures or\n     server propagation of failures.\n"]
14996    fn modify_secure_heap_physical_range(
14997        &mut self,
14998
14999        request: ::fidl_next::Request<secure_mem::ModifySecureHeapPhysicalRange, ___T>,
15000
15001        responder: ::fidl_next::Responder<secure_mem::ModifySecureHeapPhysicalRange, ___T>,
15002    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15003
15004    #[doc = " Zero a sub-range of a currently-existing physical range added via\n AddSecureHeapPhysicalRange().  The sub-range must be fully covered by\n exactly one physical range, and must not overlap with any other\n physical range.\n\n is_covering_range_explicit - When true, the covering range must be one\n     of the ranges explicitly created via AddSecureHeapPhysicalRange(),\n     possibly modified since.  When false, the covering range must not\n     be one of the ranges explicitly created via\n     AddSecureHeapPhysicalRange(), but the covering range must exist as\n     a covering range not created via AddSecureHeapPhysicalRange().  The\n     covering range is typically the entire physical range (or a range\n     which covers even more) of a heap configured by the TEE and whose\n     configuration is conveyed to sysmem via GetPhysicalSecureHeaps().\n\n Ongoing DMA is not disrupted by this request.\n\n Errors:\n   * PROTOCOL_DEVIATION - called when !dynamic_protection_ranges.\n     Unexpected heap.\n   * UNSPECIFIED - generic internal error (such as in communication\n     with TEE which doesn\'t generate zx_status_t errors).\n   * other errors are possible, such as from communication failures or\n     server propagation of failures.\n"]
15005    fn zero_sub_range(
15006        &mut self,
15007
15008        request: ::fidl_next::Request<secure_mem::ZeroSubRange, ___T>,
15009
15010        responder: ::fidl_next::Responder<secure_mem::ZeroSubRange, ___T>,
15011    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15012
15013    fn on_unknown_interaction(
15014        &mut self,
15015        ordinal: u64,
15016    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15017        ::core::future::ready(())
15018    }
15019}
15020
15021impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for SecureMem
15022where
15023    ___H: SecureMemServerHandler<___T> + ::core::marker::Send,
15024    ___T: ::fidl_next::Transport,
15025    for<'de> crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>: ::fidl_next::Decode<
15026            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15027            Constraint = (),
15028        >,
15029    for<'de> crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'de>: ::fidl_next::Decode<
15030            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15031            Constraint = (),
15032        >,
15033    for<'de> crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>: ::fidl_next::Decode<
15034            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15035            Constraint = (),
15036        >,
15037    for<'de> crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'de>: ::fidl_next::Decode<
15038            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15039            Constraint = (),
15040        >,
15041    for<'de> crate::wire::SecureMemZeroSubRangeRequest<'de>: ::fidl_next::Decode<
15042            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15043            Constraint = (),
15044        >,
15045{
15046    async fn on_one_way(
15047        handler: &mut ___H,
15048        mut message: ::fidl_next::Message<___T>,
15049    ) -> ::core::result::Result<
15050        (),
15051        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15052    > {
15053        match *message.header().ordinal {
15054            ordinal => {
15055                handler.on_unknown_interaction(ordinal).await;
15056                if ::core::matches!(
15057                    message.header().flexibility(),
15058                    ::fidl_next::protocol::Flexibility::Strict
15059                ) {
15060                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15061                } else {
15062                    Ok(())
15063                }
15064            }
15065        }
15066    }
15067
15068    async fn on_two_way(
15069        handler: &mut ___H,
15070        mut message: ::fidl_next::Message<___T>,
15071        responder: ::fidl_next::protocol::Responder<___T>,
15072    ) -> ::core::result::Result<
15073        (),
15074        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15075    > {
15076        match *message.header().ordinal {
15077            4067140791638717411 => {
15078                let responder = ::fidl_next::Responder::from_untyped(responder);
15079
15080                handler.get_physical_secure_heaps(responder).await;
15081                Ok(())
15082            }
15083
15084            1265657178863511604 => {
15085                let responder = ::fidl_next::Responder::from_untyped(responder);
15086
15087                handler.get_dynamic_secure_heaps(responder).await;
15088                Ok(())
15089            }
15090
15091            895942034471897020 => {
15092                let responder = ::fidl_next::Responder::from_untyped(responder);
15093
15094                match ::fidl_next::AsDecoderExt::into_decoded(message) {
15095                    Ok(decoded) => {
15096                        handler
15097                            .get_physical_secure_heap_properties(
15098                                ::fidl_next::Request::from_decoded(decoded),
15099                                responder,
15100                            )
15101                            .await;
15102                        Ok(())
15103                    }
15104                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15105                        ordinal: 895942034471897020,
15106                        error,
15107                    }),
15108                }
15109            }
15110
15111            3888459953148993914 => {
15112                let responder = ::fidl_next::Responder::from_untyped(responder);
15113
15114                match ::fidl_next::AsDecoderExt::into_decoded(message) {
15115                    Ok(decoded) => {
15116                        handler
15117                            .add_secure_heap_physical_range(
15118                                ::fidl_next::Request::from_decoded(decoded),
15119                                responder,
15120                            )
15121                            .await;
15122                        Ok(())
15123                    }
15124                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15125                        ordinal: 3888459953148993914,
15126                        error,
15127                    }),
15128                }
15129            }
15130
15131            1056754671343258782 => {
15132                let responder = ::fidl_next::Responder::from_untyped(responder);
15133
15134                match ::fidl_next::AsDecoderExt::into_decoded(message) {
15135                    Ok(decoded) => {
15136                        handler
15137                            .delete_secure_heap_physical_range(
15138                                ::fidl_next::Request::from_decoded(decoded),
15139                                responder,
15140                            )
15141                            .await;
15142                        Ok(())
15143                    }
15144                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15145                        ordinal: 1056754671343258782,
15146                        error,
15147                    }),
15148                }
15149            }
15150
15151            6969114310578042676 => {
15152                let responder = ::fidl_next::Responder::from_untyped(responder);
15153
15154                match ::fidl_next::AsDecoderExt::into_decoded(message) {
15155                    Ok(decoded) => {
15156                        handler
15157                            .modify_secure_heap_physical_range(
15158                                ::fidl_next::Request::from_decoded(decoded),
15159                                responder,
15160                            )
15161                            .await;
15162                        Ok(())
15163                    }
15164                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15165                        ordinal: 6969114310578042676,
15166                        error,
15167                    }),
15168                }
15169            }
15170
15171            6567857461132811493 => {
15172                let responder = ::fidl_next::Responder::from_untyped(responder);
15173
15174                match ::fidl_next::AsDecoderExt::into_decoded(message) {
15175                    Ok(decoded) => {
15176                        handler
15177                            .zero_sub_range(::fidl_next::Request::from_decoded(decoded), responder)
15178                            .await;
15179                        Ok(())
15180                    }
15181                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15182                        ordinal: 6567857461132811493,
15183                        error,
15184                    }),
15185                }
15186            }
15187
15188            ordinal => {
15189                handler.on_unknown_interaction(ordinal).await;
15190                if ::core::matches!(
15191                    message.header().flexibility(),
15192                    ::fidl_next::protocol::Flexibility::Strict
15193                ) {
15194                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15195                } else {
15196                    responder
15197                        .respond_framework_error(
15198                            ordinal,
15199                            ::fidl_next::FrameworkError::UnknownMethod,
15200                        )
15201                        .expect("encoding a framework error should never fail")
15202                        .await?;
15203                    Ok(())
15204                }
15205            }
15206        }
15207    }
15208}
15209
15210impl<___T> SecureMemClientHandler<___T> for ::fidl_next::IgnoreEvents
15211where
15212    ___T: ::fidl_next::Transport,
15213{
15214    async fn on_unknown_interaction(&mut self, _: u64) {}
15215}
15216
15217impl<___H, ___T> SecureMemLocalClientHandler<___T> for ::fidl_next::Local<___H>
15218where
15219    ___H: SecureMemClientHandler<___T>,
15220    ___T: ::fidl_next::Transport,
15221{
15222    async fn on_unknown_interaction(&mut self, ordinal: u64) {
15223        ___H::on_unknown_interaction(&mut self.0, ordinal).await
15224    }
15225}
15226
15227impl<___H, ___T> SecureMemLocalServerHandler<___T> for ::fidl_next::Local<___H>
15228where
15229    ___H: SecureMemServerHandler<___T>,
15230    ___T: ::fidl_next::Transport,
15231{
15232    async fn get_physical_secure_heaps(
15233        &mut self,
15234
15235        responder: ::fidl_next::Responder<secure_mem::GetPhysicalSecureHeaps, ___T>,
15236    ) {
15237        ___H::get_physical_secure_heaps(&mut self.0, responder).await
15238    }
15239
15240    async fn get_dynamic_secure_heaps(
15241        &mut self,
15242
15243        responder: ::fidl_next::Responder<secure_mem::GetDynamicSecureHeaps, ___T>,
15244    ) {
15245        ___H::get_dynamic_secure_heaps(&mut self.0, responder).await
15246    }
15247
15248    async fn get_physical_secure_heap_properties(
15249        &mut self,
15250
15251        request: ::fidl_next::Request<secure_mem::GetPhysicalSecureHeapProperties, ___T>,
15252
15253        responder: ::fidl_next::Responder<secure_mem::GetPhysicalSecureHeapProperties, ___T>,
15254    ) {
15255        ___H::get_physical_secure_heap_properties(&mut self.0, request, responder).await
15256    }
15257
15258    async fn add_secure_heap_physical_range(
15259        &mut self,
15260
15261        request: ::fidl_next::Request<secure_mem::AddSecureHeapPhysicalRange, ___T>,
15262
15263        responder: ::fidl_next::Responder<secure_mem::AddSecureHeapPhysicalRange, ___T>,
15264    ) {
15265        ___H::add_secure_heap_physical_range(&mut self.0, request, responder).await
15266    }
15267
15268    async fn delete_secure_heap_physical_range(
15269        &mut self,
15270
15271        request: ::fidl_next::Request<secure_mem::DeleteSecureHeapPhysicalRange, ___T>,
15272
15273        responder: ::fidl_next::Responder<secure_mem::DeleteSecureHeapPhysicalRange, ___T>,
15274    ) {
15275        ___H::delete_secure_heap_physical_range(&mut self.0, request, responder).await
15276    }
15277
15278    async fn modify_secure_heap_physical_range(
15279        &mut self,
15280
15281        request: ::fidl_next::Request<secure_mem::ModifySecureHeapPhysicalRange, ___T>,
15282
15283        responder: ::fidl_next::Responder<secure_mem::ModifySecureHeapPhysicalRange, ___T>,
15284    ) {
15285        ___H::modify_secure_heap_physical_range(&mut self.0, request, responder).await
15286    }
15287
15288    async fn zero_sub_range(
15289        &mut self,
15290
15291        request: ::fidl_next::Request<secure_mem::ZeroSubRange, ___T>,
15292
15293        responder: ::fidl_next::Responder<secure_mem::ZeroSubRange, ___T>,
15294    ) {
15295        ___H::zero_sub_range(&mut self.0, request, responder).await
15296    }
15297
15298    async fn on_unknown_interaction(&mut self, ordinal: u64) {
15299        ___H::on_unknown_interaction(&mut self.0, ordinal).await
15300    }
15301}
15302
15303pub const VIDEO_USAGE_CAPTURE: u32 = 8 as u32;
15304
15305pub const VIDEO_USAGE_DECRYPTOR_OUTPUT: u32 = 16 as u32;
15306
15307pub const VIDEO_USAGE_HW_DECODER: u32 = 1 as u32;
15308
15309pub const VIDEO_USAGE_HW_DECODER_INTERNAL: u32 = 32 as u32;
15310
15311pub const VIDEO_USAGE_HW_ENCODER: u32 = 2 as u32;
15312
15313pub const VULKAN_BUFFER_USAGE_INDEX_BUFFER: u32 = 4194304 as u32;
15314
15315pub const VULKAN_BUFFER_USAGE_INDIRECT_BUFFER: u32 = 16777216 as u32;
15316
15317pub const VULKAN_BUFFER_USAGE_STORAGE_BUFFER: u32 = 2097152 as u32;
15318
15319pub const VULKAN_BUFFER_USAGE_STORAGE_TEXEL_BUFFER: u32 = 524288 as u32;
15320
15321pub const VULKAN_BUFFER_USAGE_TRANSFER_DST: u32 = 131072 as u32;
15322
15323pub const VULKAN_BUFFER_USAGE_TRANSFER_SRC: u32 = 65536 as u32;
15324
15325pub const VULKAN_BUFFER_USAGE_UNIFORM_BUFFER: u32 = 1048576 as u32;
15326
15327pub const VULKAN_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER: u32 = 262144 as u32;
15328
15329pub const VULKAN_BUFFER_USAGE_VERTEX_BUFFER: u32 = 8388608 as u32;
15330
15331pub const VULKAN_IMAGE_USAGE_COLOR_ATTACHMENT: u32 = 16 as u32;
15332
15333pub const VULKAN_IMAGE_USAGE_INPUT_ATTACHMENT: u32 = 128 as u32;
15334
15335pub const VULKAN_IMAGE_USAGE_SAMPLED: u32 = 4 as u32;
15336
15337pub const VULKAN_IMAGE_USAGE_STENCIL_ATTACHMENT: u32 = 32 as u32;
15338
15339pub const VULKAN_IMAGE_USAGE_STORAGE: u32 = 8 as u32;
15340
15341pub const VULKAN_IMAGE_USAGE_TRANSFER_DST: u32 = 2 as u32;
15342
15343pub const VULKAN_IMAGE_USAGE_TRANSFER_SRC: u32 = 1 as u32;
15344
15345pub const VULKAN_IMAGE_USAGE_TRANSIENT_ATTACHMENT: u32 = 64 as u32;