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    #[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"]
1579    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1580    #[repr(u32)]
1581    pub enum CoherencyDomain {
1582        Cpu = 0,
1583        Ram = 1,
1584        Inaccessible = 2,
1585        UnknownOrdinal_(u32) = 3,
1586    }
1587    impl ::std::convert::From<u32> for CoherencyDomain {
1588        fn from(value: u32) -> Self {
1589            match value {
1590                0 => Self::Cpu,
1591                1 => Self::Ram,
1592                2 => Self::Inaccessible,
1593
1594                _ => Self::UnknownOrdinal_(value),
1595            }
1596        }
1597    }
1598
1599    impl ::std::convert::From<CoherencyDomain> for u32 {
1600        fn from(value: CoherencyDomain) -> Self {
1601            match value {
1602                CoherencyDomain::Cpu => 0,
1603                CoherencyDomain::Ram => 1,
1604                CoherencyDomain::Inaccessible => 2,
1605
1606                CoherencyDomain::UnknownOrdinal_(value) => value,
1607            }
1608        }
1609    }
1610
1611    unsafe impl<___E> ::fidl_next::Encode<crate::wire::CoherencyDomain, ___E> for CoherencyDomain
1612    where
1613        ___E: ?Sized,
1614    {
1615        #[inline]
1616        fn encode(
1617            self,
1618            encoder: &mut ___E,
1619            out: &mut ::core::mem::MaybeUninit<crate::wire::CoherencyDomain>,
1620            _: (),
1621        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1622            ::fidl_next::Encode::encode(&self, encoder, out, ())
1623        }
1624    }
1625
1626    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::CoherencyDomain, ___E>
1627        for &'a CoherencyDomain
1628    where
1629        ___E: ?Sized,
1630    {
1631        #[inline]
1632        fn encode(
1633            self,
1634            encoder: &mut ___E,
1635            out: &mut ::core::mem::MaybeUninit<crate::wire::CoherencyDomain>,
1636            _: (),
1637        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1638            ::fidl_next::munge!(let crate::wire::CoherencyDomain { value } = out);
1639            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
1640                CoherencyDomain::Cpu => 0,
1641
1642                CoherencyDomain::Ram => 1,
1643
1644                CoherencyDomain::Inaccessible => 2,
1645
1646                CoherencyDomain::UnknownOrdinal_(value) => value,
1647            }));
1648
1649            Ok(())
1650        }
1651    }
1652
1653    impl ::core::convert::From<crate::wire::CoherencyDomain> for CoherencyDomain {
1654        fn from(wire: crate::wire::CoherencyDomain) -> Self {
1655            match u32::from(wire.value) {
1656                0 => Self::Cpu,
1657
1658                1 => Self::Ram,
1659
1660                2 => Self::Inaccessible,
1661
1662                value => Self::UnknownOrdinal_(value),
1663            }
1664        }
1665    }
1666
1667    impl ::fidl_next::FromWire<crate::wire::CoherencyDomain> for CoherencyDomain {
1668        #[inline]
1669        fn from_wire(wire: crate::wire::CoherencyDomain) -> Self {
1670            Self::from(wire)
1671        }
1672    }
1673
1674    impl ::fidl_next::FromWireRef<crate::wire::CoherencyDomain> for CoherencyDomain {
1675        #[inline]
1676        fn from_wire_ref(wire: &crate::wire::CoherencyDomain) -> Self {
1677            Self::from(*wire)
1678        }
1679    }
1680
1681    #[doc = " These are memory-related settings for all buffers of a buffer collection.\n"]
1682    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1683    pub struct BufferMemorySettings {
1684        pub size_bytes: ::core::option::Option<u64>,
1685
1686        pub is_physically_contiguous: ::core::option::Option<bool>,
1687
1688        pub is_secure: ::core::option::Option<bool>,
1689
1690        pub coherency_domain: ::core::option::Option<crate::natural::CoherencyDomain>,
1691
1692        pub heap: ::core::option::Option<crate::natural::Heap>,
1693
1694        pub raw_vmo_size: ::core::option::Option<u64>,
1695    }
1696
1697    impl BufferMemorySettings {
1698        fn __max_ordinal(&self) -> usize {
1699            if self.raw_vmo_size.is_some() {
1700                return 6;
1701            }
1702
1703            if self.heap.is_some() {
1704                return 5;
1705            }
1706
1707            if self.coherency_domain.is_some() {
1708                return 4;
1709            }
1710
1711            if self.is_secure.is_some() {
1712                return 3;
1713            }
1714
1715            if self.is_physically_contiguous.is_some() {
1716                return 2;
1717            }
1718
1719            if self.size_bytes.is_some() {
1720                return 1;
1721            }
1722
1723            0
1724        }
1725    }
1726
1727    unsafe impl<___E> ::fidl_next::Encode<crate::wire::BufferMemorySettings<'static>, ___E>
1728        for BufferMemorySettings
1729    where
1730        ___E: ::fidl_next::Encoder + ?Sized,
1731    {
1732        #[inline]
1733        fn encode(
1734            mut self,
1735            encoder: &mut ___E,
1736            out: &mut ::core::mem::MaybeUninit<crate::wire::BufferMemorySettings<'static>>,
1737            _: (),
1738        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1739            ::fidl_next::munge!(let crate::wire::BufferMemorySettings { table } = out);
1740
1741            let max_ord = self.__max_ordinal();
1742
1743            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1744            ::fidl_next::Wire::zero_padding(&mut out);
1745
1746            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1747                ::fidl_next::wire::Envelope,
1748            >(encoder, max_ord);
1749
1750            for i in 1..=max_ord {
1751                match i {
1752                    6 => {
1753                        if let Some(value) = self.raw_vmo_size.take() {
1754                            ::fidl_next::wire::Envelope::encode_value::<
1755                                ::fidl_next::wire::Uint64,
1756                                ___E,
1757                            >(
1758                                value, preallocated.encoder, &mut out, ()
1759                            )?;
1760                        } else {
1761                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1762                        }
1763                    }
1764
1765                    5 => {
1766                        if let Some(value) = self.heap.take() {
1767                            ::fidl_next::wire::Envelope::encode_value::<
1768                                crate::wire::Heap<'static>,
1769                                ___E,
1770                            >(
1771                                value, preallocated.encoder, &mut out, ()
1772                            )?;
1773                        } else {
1774                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1775                        }
1776                    }
1777
1778                    4 => {
1779                        if let Some(value) = self.coherency_domain.take() {
1780                            ::fidl_next::wire::Envelope::encode_value::<
1781                                crate::wire::CoherencyDomain,
1782                                ___E,
1783                            >(
1784                                value, preallocated.encoder, &mut out, ()
1785                            )?;
1786                        } else {
1787                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1788                        }
1789                    }
1790
1791                    3 => {
1792                        if let Some(value) = self.is_secure.take() {
1793                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1794                                value,
1795                                preallocated.encoder,
1796                                &mut out,
1797                                (),
1798                            )?;
1799                        } else {
1800                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1801                        }
1802                    }
1803
1804                    2 => {
1805                        if let Some(value) = self.is_physically_contiguous.take() {
1806                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1807                                value,
1808                                preallocated.encoder,
1809                                &mut out,
1810                                (),
1811                            )?;
1812                        } else {
1813                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1814                        }
1815                    }
1816
1817                    1 => {
1818                        if let Some(value) = self.size_bytes.take() {
1819                            ::fidl_next::wire::Envelope::encode_value::<
1820                                ::fidl_next::wire::Uint64,
1821                                ___E,
1822                            >(
1823                                value, preallocated.encoder, &mut out, ()
1824                            )?;
1825                        } else {
1826                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1827                        }
1828                    }
1829
1830                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1831                }
1832                unsafe {
1833                    preallocated.write_next(out.assume_init_ref());
1834                }
1835            }
1836
1837            ::fidl_next::wire::Table::encode_len(table, max_ord);
1838
1839            Ok(())
1840        }
1841    }
1842
1843    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::BufferMemorySettings<'static>, ___E>
1844        for &'a BufferMemorySettings
1845    where
1846        ___E: ::fidl_next::Encoder + ?Sized,
1847    {
1848        #[inline]
1849        fn encode(
1850            self,
1851            encoder: &mut ___E,
1852            out: &mut ::core::mem::MaybeUninit<crate::wire::BufferMemorySettings<'static>>,
1853            _: (),
1854        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1855            ::fidl_next::munge!(let crate::wire::BufferMemorySettings { table } = out);
1856
1857            let max_ord = self.__max_ordinal();
1858
1859            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1860            ::fidl_next::Wire::zero_padding(&mut out);
1861
1862            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1863                ::fidl_next::wire::Envelope,
1864            >(encoder, max_ord);
1865
1866            for i in 1..=max_ord {
1867                match i {
1868                    6 => {
1869                        if let Some(value) = &self.raw_vmo_size {
1870                            ::fidl_next::wire::Envelope::encode_value::<
1871                                ::fidl_next::wire::Uint64,
1872                                ___E,
1873                            >(
1874                                value, preallocated.encoder, &mut out, ()
1875                            )?;
1876                        } else {
1877                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1878                        }
1879                    }
1880
1881                    5 => {
1882                        if let Some(value) = &self.heap {
1883                            ::fidl_next::wire::Envelope::encode_value::<
1884                                crate::wire::Heap<'static>,
1885                                ___E,
1886                            >(
1887                                value, preallocated.encoder, &mut out, ()
1888                            )?;
1889                        } else {
1890                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1891                        }
1892                    }
1893
1894                    4 => {
1895                        if let Some(value) = &self.coherency_domain {
1896                            ::fidl_next::wire::Envelope::encode_value::<
1897                                crate::wire::CoherencyDomain,
1898                                ___E,
1899                            >(
1900                                value, preallocated.encoder, &mut out, ()
1901                            )?;
1902                        } else {
1903                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1904                        }
1905                    }
1906
1907                    3 => {
1908                        if let Some(value) = &self.is_secure {
1909                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1910                                value,
1911                                preallocated.encoder,
1912                                &mut out,
1913                                (),
1914                            )?;
1915                        } else {
1916                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1917                        }
1918                    }
1919
1920                    2 => {
1921                        if let Some(value) = &self.is_physically_contiguous {
1922                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
1923                                value,
1924                                preallocated.encoder,
1925                                &mut out,
1926                                (),
1927                            )?;
1928                        } else {
1929                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1930                        }
1931                    }
1932
1933                    1 => {
1934                        if let Some(value) = &self.size_bytes {
1935                            ::fidl_next::wire::Envelope::encode_value::<
1936                                ::fidl_next::wire::Uint64,
1937                                ___E,
1938                            >(
1939                                value, preallocated.encoder, &mut out, ()
1940                            )?;
1941                        } else {
1942                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1943                        }
1944                    }
1945
1946                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1947                }
1948                unsafe {
1949                    preallocated.write_next(out.assume_init_ref());
1950                }
1951            }
1952
1953            ::fidl_next::wire::Table::encode_len(table, max_ord);
1954
1955            Ok(())
1956        }
1957    }
1958
1959    impl<'de> ::fidl_next::FromWire<crate::wire::BufferMemorySettings<'de>> for BufferMemorySettings {
1960        #[inline]
1961        fn from_wire(wire_: crate::wire::BufferMemorySettings<'de>) -> Self {
1962            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1963
1964            let size_bytes = wire_.table.get(1);
1965
1966            let is_physically_contiguous = wire_.table.get(2);
1967
1968            let is_secure = wire_.table.get(3);
1969
1970            let coherency_domain = wire_.table.get(4);
1971
1972            let heap = wire_.table.get(5);
1973
1974            let raw_vmo_size = wire_.table.get(6);
1975
1976            Self {
1977                size_bytes: size_bytes.map(|envelope| {
1978                    ::fidl_next::FromWire::from_wire(unsafe {
1979                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
1980                    })
1981                }),
1982
1983                is_physically_contiguous: is_physically_contiguous.map(|envelope| {
1984                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1985                }),
1986
1987                is_secure: is_secure.map(|envelope| {
1988                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
1989                }),
1990
1991                coherency_domain: coherency_domain.map(|envelope| {
1992                    ::fidl_next::FromWire::from_wire(unsafe {
1993                        envelope.read_unchecked::<crate::wire::CoherencyDomain>()
1994                    })
1995                }),
1996
1997                heap: heap.map(|envelope| {
1998                    ::fidl_next::FromWire::from_wire(unsafe {
1999                        envelope.read_unchecked::<crate::wire::Heap<'de>>()
2000                    })
2001                }),
2002
2003                raw_vmo_size: raw_vmo_size.map(|envelope| {
2004                    ::fidl_next::FromWire::from_wire(unsafe {
2005                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
2006                    })
2007                }),
2008            }
2009        }
2010    }
2011
2012    impl<'de> ::fidl_next::FromWireRef<crate::wire::BufferMemorySettings<'de>>
2013        for BufferMemorySettings
2014    {
2015        #[inline]
2016        fn from_wire_ref(wire: &crate::wire::BufferMemorySettings<'de>) -> Self {
2017            Self {
2018                size_bytes: wire.table.get(1).map(|envelope| {
2019                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2020                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
2021                    })
2022                }),
2023
2024                is_physically_contiguous: wire.table.get(2).map(|envelope| {
2025                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2026                        envelope.deref_unchecked::<bool>()
2027                    })
2028                }),
2029
2030                is_secure: wire.table.get(3).map(|envelope| {
2031                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2032                        envelope.deref_unchecked::<bool>()
2033                    })
2034                }),
2035
2036                coherency_domain: wire.table.get(4).map(|envelope| {
2037                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2038                        envelope.deref_unchecked::<crate::wire::CoherencyDomain>()
2039                    })
2040                }),
2041
2042                heap: wire.table.get(5).map(|envelope| {
2043                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2044                        envelope.deref_unchecked::<crate::wire::Heap<'de>>()
2045                    })
2046                }),
2047
2048                raw_vmo_size: wire.table.get(6).map(|envelope| {
2049                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
2050                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
2051                    })
2052                }),
2053            }
2054        }
2055    }
2056
2057    #[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"]
2058    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2059    #[repr(u32)]
2060    pub enum Error {
2061        Invalid = 0,
2062        Unspecified = 1,
2063        ProtocolDeviation = 2,
2064        NotFound = 3,
2065        HandleAccessDenied = 4,
2066        NoMemory = 5,
2067        ConstraintsIntersectionEmpty = 6,
2068        Pending = 7,
2069        TooManyGroupChildCombinations = 8,
2070        NoMoreStrongVmoHandles = 9,
2071        UnknownOrdinal_(u32) = 10,
2072    }
2073    impl ::std::convert::From<u32> for Error {
2074        fn from(value: u32) -> Self {
2075            match value {
2076                0 => Self::Invalid,
2077                1 => Self::Unspecified,
2078                2 => Self::ProtocolDeviation,
2079                3 => Self::NotFound,
2080                4 => Self::HandleAccessDenied,
2081                5 => Self::NoMemory,
2082                6 => Self::ConstraintsIntersectionEmpty,
2083                7 => Self::Pending,
2084                8 => Self::TooManyGroupChildCombinations,
2085                9 => Self::NoMoreStrongVmoHandles,
2086
2087                _ => Self::UnknownOrdinal_(value),
2088            }
2089        }
2090    }
2091
2092    impl ::std::convert::From<Error> for u32 {
2093        fn from(value: Error) -> Self {
2094            match value {
2095                Error::Invalid => 0,
2096                Error::Unspecified => 1,
2097                Error::ProtocolDeviation => 2,
2098                Error::NotFound => 3,
2099                Error::HandleAccessDenied => 4,
2100                Error::NoMemory => 5,
2101                Error::ConstraintsIntersectionEmpty => 6,
2102                Error::Pending => 7,
2103                Error::TooManyGroupChildCombinations => 8,
2104                Error::NoMoreStrongVmoHandles => 9,
2105
2106                Error::UnknownOrdinal_(value) => value,
2107            }
2108        }
2109    }
2110
2111    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Error, ___E> for Error
2112    where
2113        ___E: ?Sized,
2114    {
2115        #[inline]
2116        fn encode(
2117            self,
2118            encoder: &mut ___E,
2119            out: &mut ::core::mem::MaybeUninit<crate::wire::Error>,
2120            _: (),
2121        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2122            ::fidl_next::Encode::encode(&self, encoder, out, ())
2123        }
2124    }
2125
2126    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Error, ___E> for &'a Error
2127    where
2128        ___E: ?Sized,
2129    {
2130        #[inline]
2131        fn encode(
2132            self,
2133            encoder: &mut ___E,
2134            out: &mut ::core::mem::MaybeUninit<crate::wire::Error>,
2135            _: (),
2136        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2137            ::fidl_next::munge!(let crate::wire::Error { value } = out);
2138            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
2139                Error::Invalid => 0,
2140
2141                Error::Unspecified => 1,
2142
2143                Error::ProtocolDeviation => 2,
2144
2145                Error::NotFound => 3,
2146
2147                Error::HandleAccessDenied => 4,
2148
2149                Error::NoMemory => 5,
2150
2151                Error::ConstraintsIntersectionEmpty => 6,
2152
2153                Error::Pending => 7,
2154
2155                Error::TooManyGroupChildCombinations => 8,
2156
2157                Error::NoMoreStrongVmoHandles => 9,
2158
2159                Error::UnknownOrdinal_(value) => value,
2160            }));
2161
2162            Ok(())
2163        }
2164    }
2165
2166    impl ::core::convert::From<crate::wire::Error> for Error {
2167        fn from(wire: crate::wire::Error) -> Self {
2168            match u32::from(wire.value) {
2169                0 => Self::Invalid,
2170
2171                1 => Self::Unspecified,
2172
2173                2 => Self::ProtocolDeviation,
2174
2175                3 => Self::NotFound,
2176
2177                4 => Self::HandleAccessDenied,
2178
2179                5 => Self::NoMemory,
2180
2181                6 => Self::ConstraintsIntersectionEmpty,
2182
2183                7 => Self::Pending,
2184
2185                8 => Self::TooManyGroupChildCombinations,
2186
2187                9 => Self::NoMoreStrongVmoHandles,
2188
2189                value => Self::UnknownOrdinal_(value),
2190            }
2191        }
2192    }
2193
2194    impl ::fidl_next::FromWire<crate::wire::Error> for Error {
2195        #[inline]
2196        fn from_wire(wire: crate::wire::Error) -> Self {
2197            Self::from(wire)
2198        }
2199    }
2200
2201    impl ::fidl_next::FromWireRef<crate::wire::Error> for Error {
2202        #[inline]
2203        fn from_wire_ref(wire: &crate::wire::Error) -> Self {
2204            Self::from(*wire)
2205        }
2206    }
2207
2208    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2209    pub struct PixelFormatAndModifier {
2210        pub pixel_format: ::fidl_next_common_fuchsia_images2::natural::PixelFormat,
2211
2212        pub pixel_format_modifier: ::fidl_next_common_fuchsia_images2::natural::PixelFormatModifier,
2213    }
2214
2215    unsafe impl<___E> ::fidl_next::Encode<crate::wire::PixelFormatAndModifier, ___E>
2216        for PixelFormatAndModifier
2217    where
2218        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2219    {
2220        #[inline]
2221        fn encode(
2222            self,
2223            encoder_: &mut ___E,
2224            out_: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormatAndModifier>,
2225            _: (),
2226        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2227            ::fidl_next::munge! {
2228                let crate::wire::PixelFormatAndModifier {
2229                    pixel_format,
2230                    pixel_format_modifier,
2231
2232                } = out_;
2233            }
2234
2235            ::fidl_next::Encode::encode(self.pixel_format, encoder_, pixel_format, ())?;
2236
2237            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pixel_format.as_mut_ptr()) };
2238
2239            ::fidl_next::Encode::encode(
2240                self.pixel_format_modifier,
2241                encoder_,
2242                pixel_format_modifier,
2243                (),
2244            )?;
2245
2246            let mut _field =
2247                unsafe { ::fidl_next::Slot::new_unchecked(pixel_format_modifier.as_mut_ptr()) };
2248
2249            Ok(())
2250        }
2251    }
2252
2253    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PixelFormatAndModifier, ___E>
2254        for &'a PixelFormatAndModifier
2255    where
2256        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2257    {
2258        #[inline]
2259        fn encode(
2260            self,
2261            encoder_: &mut ___E,
2262            out_: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormatAndModifier>,
2263            _: (),
2264        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2265            ::fidl_next::munge! {
2266                let crate::wire::PixelFormatAndModifier {
2267                    pixel_format,
2268                    pixel_format_modifier,
2269
2270                } = out_;
2271            }
2272
2273            ::fidl_next::Encode::encode(&self.pixel_format, encoder_, pixel_format, ())?;
2274
2275            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(pixel_format.as_mut_ptr()) };
2276
2277            ::fidl_next::Encode::encode(
2278                &self.pixel_format_modifier,
2279                encoder_,
2280                pixel_format_modifier,
2281                (),
2282            )?;
2283
2284            let mut _field =
2285                unsafe { ::fidl_next::Slot::new_unchecked(pixel_format_modifier.as_mut_ptr()) };
2286
2287            Ok(())
2288        }
2289    }
2290
2291    unsafe impl<___E>
2292        ::fidl_next::EncodeOption<
2293            ::fidl_next::wire::Box<'static, crate::wire::PixelFormatAndModifier>,
2294            ___E,
2295        > for PixelFormatAndModifier
2296    where
2297        ___E: ::fidl_next::Encoder + ?Sized,
2298        PixelFormatAndModifier: ::fidl_next::Encode<crate::wire::PixelFormatAndModifier, ___E>,
2299    {
2300        #[inline]
2301        fn encode_option(
2302            this: ::core::option::Option<Self>,
2303            encoder: &mut ___E,
2304            out: &mut ::core::mem::MaybeUninit<
2305                ::fidl_next::wire::Box<'static, crate::wire::PixelFormatAndModifier>,
2306            >,
2307            _: (),
2308        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2309            if let Some(inner) = this {
2310                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2311                ::fidl_next::wire::Box::encode_present(out);
2312            } else {
2313                ::fidl_next::wire::Box::encode_absent(out);
2314            }
2315
2316            Ok(())
2317        }
2318    }
2319
2320    unsafe impl<'a, ___E>
2321        ::fidl_next::EncodeOption<
2322            ::fidl_next::wire::Box<'static, crate::wire::PixelFormatAndModifier>,
2323            ___E,
2324        > for &'a PixelFormatAndModifier
2325    where
2326        ___E: ::fidl_next::Encoder + ?Sized,
2327        &'a PixelFormatAndModifier: ::fidl_next::Encode<crate::wire::PixelFormatAndModifier, ___E>,
2328    {
2329        #[inline]
2330        fn encode_option(
2331            this: ::core::option::Option<Self>,
2332            encoder: &mut ___E,
2333            out: &mut ::core::mem::MaybeUninit<
2334                ::fidl_next::wire::Box<'static, crate::wire::PixelFormatAndModifier>,
2335            >,
2336            _: (),
2337        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2338            if let Some(inner) = this {
2339                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2340                ::fidl_next::wire::Box::encode_present(out);
2341            } else {
2342                ::fidl_next::wire::Box::encode_absent(out);
2343            }
2344
2345            Ok(())
2346        }
2347    }
2348
2349    impl ::fidl_next::FromWire<crate::wire::PixelFormatAndModifier> for PixelFormatAndModifier {
2350        #[inline]
2351        fn from_wire(wire: crate::wire::PixelFormatAndModifier) -> Self {
2352            Self {
2353                pixel_format: ::fidl_next::FromWire::from_wire(wire.pixel_format),
2354
2355                pixel_format_modifier: ::fidl_next::FromWire::from_wire(wire.pixel_format_modifier),
2356            }
2357        }
2358    }
2359
2360    impl ::fidl_next::FromWireRef<crate::wire::PixelFormatAndModifier> for PixelFormatAndModifier {
2361        #[inline]
2362        fn from_wire_ref(wire: &crate::wire::PixelFormatAndModifier) -> Self {
2363            Self {
2364                pixel_format: ::fidl_next::FromWireRef::from_wire_ref(&wire.pixel_format),
2365
2366                pixel_format_modifier: ::fidl_next::FromWireRef::from_wire_ref(
2367                    &wire.pixel_format_modifier,
2368                ),
2369            }
2370        }
2371    }
2372
2373    #[doc = " Describes constraints on layout of image data in buffers.\n"]
2374    #[derive(Debug, Default, Clone, PartialEq)]
2375    pub struct ImageFormatConstraints {
2376        pub pixel_format:
2377            ::core::option::Option<::fidl_next_common_fuchsia_images2::natural::PixelFormat>,
2378
2379        pub pixel_format_modifier: ::core::option::Option<
2380            ::fidl_next_common_fuchsia_images2::natural::PixelFormatModifier,
2381        >,
2382
2383        pub color_spaces: ::core::option::Option<
2384            ::std::vec::Vec<::fidl_next_common_fuchsia_images2::natural::ColorSpace>,
2385        >,
2386
2387        pub min_size: ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
2388
2389        pub max_size: ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
2390
2391        pub min_bytes_per_row: ::core::option::Option<u32>,
2392
2393        pub max_bytes_per_row: ::core::option::Option<u32>,
2394
2395        pub max_width_times_height: ::core::option::Option<u64>,
2396
2397        pub size_alignment: ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
2398
2399        pub display_rect_alignment:
2400            ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
2401
2402        pub required_min_size:
2403            ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
2404
2405        pub required_max_size:
2406            ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
2407
2408        pub bytes_per_row_divisor: ::core::option::Option<u32>,
2409
2410        pub start_offset_divisor: ::core::option::Option<u32>,
2411
2412        pub pixel_format_and_modifiers:
2413            ::core::option::Option<::std::vec::Vec<crate::natural::PixelFormatAndModifier>>,
2414
2415        pub require_bytes_per_row_at_pixel_boundary: ::core::option::Option<bool>,
2416
2417        pub is_alpha_present: ::core::option::Option<bool>,
2418
2419        pub required_max_size_list: ::core::option::Option<
2420            ::std::vec::Vec<::fidl_next_common_fuchsia_math::natural::SizeU>,
2421        >,
2422
2423        pub pad_for_block_size:
2424            ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
2425
2426        pub pad_beyond_image_size_bytes: ::core::option::Option<u64>,
2427    }
2428
2429    impl ImageFormatConstraints {
2430        fn __max_ordinal(&self) -> usize {
2431            if self.pad_beyond_image_size_bytes.is_some() {
2432                return 20;
2433            }
2434
2435            if self.pad_for_block_size.is_some() {
2436                return 19;
2437            }
2438
2439            if self.required_max_size_list.is_some() {
2440                return 18;
2441            }
2442
2443            if self.is_alpha_present.is_some() {
2444                return 17;
2445            }
2446
2447            if self.require_bytes_per_row_at_pixel_boundary.is_some() {
2448                return 16;
2449            }
2450
2451            if self.pixel_format_and_modifiers.is_some() {
2452                return 15;
2453            }
2454
2455            if self.start_offset_divisor.is_some() {
2456                return 14;
2457            }
2458
2459            if self.bytes_per_row_divisor.is_some() {
2460                return 13;
2461            }
2462
2463            if self.required_max_size.is_some() {
2464                return 12;
2465            }
2466
2467            if self.required_min_size.is_some() {
2468                return 11;
2469            }
2470
2471            if self.display_rect_alignment.is_some() {
2472                return 10;
2473            }
2474
2475            if self.size_alignment.is_some() {
2476                return 9;
2477            }
2478
2479            if self.max_width_times_height.is_some() {
2480                return 8;
2481            }
2482
2483            if self.max_bytes_per_row.is_some() {
2484                return 7;
2485            }
2486
2487            if self.min_bytes_per_row.is_some() {
2488                return 6;
2489            }
2490
2491            if self.max_size.is_some() {
2492                return 5;
2493            }
2494
2495            if self.min_size.is_some() {
2496                return 4;
2497            }
2498
2499            if self.color_spaces.is_some() {
2500                return 3;
2501            }
2502
2503            if self.pixel_format_modifier.is_some() {
2504                return 2;
2505            }
2506
2507            if self.pixel_format.is_some() {
2508                return 1;
2509            }
2510
2511            0
2512        }
2513    }
2514
2515    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ImageFormatConstraints<'static>, ___E>
2516        for ImageFormatConstraints
2517    where
2518        ___E: ::fidl_next::Encoder + ?Sized,
2519    {
2520        #[inline]
2521        fn encode(
2522            mut self,
2523            encoder: &mut ___E,
2524            out: &mut ::core::mem::MaybeUninit<crate::wire::ImageFormatConstraints<'static>>,
2525            _: (),
2526        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2527            ::fidl_next::munge!(let crate::wire::ImageFormatConstraints { table } = out);
2528
2529            let max_ord = self.__max_ordinal();
2530
2531            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2532            ::fidl_next::Wire::zero_padding(&mut out);
2533
2534            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2535                ::fidl_next::wire::Envelope,
2536            >(encoder, max_ord);
2537
2538            for i in 1..=max_ord {
2539                match i {
2540                    20 => {
2541                        if let Some(value) = self.pad_beyond_image_size_bytes.take() {
2542                            ::fidl_next::wire::Envelope::encode_value::<
2543                                ::fidl_next::wire::Uint64,
2544                                ___E,
2545                            >(
2546                                value, preallocated.encoder, &mut out, ()
2547                            )?;
2548                        } else {
2549                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2550                        }
2551                    }
2552
2553                    19 => {
2554                        if let Some(value) = self.pad_for_block_size.take() {
2555                            ::fidl_next::wire::Envelope::encode_value::<
2556                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2557                                ___E,
2558                            >(
2559                                value, preallocated.encoder, &mut out, ()
2560                            )?;
2561                        } else {
2562                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2563                        }
2564                    }
2565
2566                    18 => {
2567                        if let Some(value) = self.required_max_size_list.take() {
2568                            ::fidl_next::wire::Envelope::encode_value::<
2569                                ::fidl_next::wire::Vector<
2570                                    'static,
2571                                    ::fidl_next_common_fuchsia_math::wire::SizeU,
2572                                >,
2573                                ___E,
2574                            >(
2575                                value, preallocated.encoder, &mut out, (64, ())
2576                            )?;
2577                        } else {
2578                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2579                        }
2580                    }
2581
2582                    17 => {
2583                        if let Some(value) = self.is_alpha_present.take() {
2584                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2585                                value,
2586                                preallocated.encoder,
2587                                &mut out,
2588                                (),
2589                            )?;
2590                        } else {
2591                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2592                        }
2593                    }
2594
2595                    16 => {
2596                        if let Some(value) = self.require_bytes_per_row_at_pixel_boundary.take() {
2597                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2598                                value,
2599                                preallocated.encoder,
2600                                &mut out,
2601                                (),
2602                            )?;
2603                        } else {
2604                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2605                        }
2606                    }
2607
2608                    15 => {
2609                        if let Some(value) = self.pixel_format_and_modifiers.take() {
2610                            ::fidl_next::wire::Envelope::encode_value::<
2611                                ::fidl_next::wire::Vector<
2612                                    'static,
2613                                    crate::wire::PixelFormatAndModifier,
2614                                >,
2615                                ___E,
2616                            >(
2617                                value, preallocated.encoder, &mut out, (64, ())
2618                            )?;
2619                        } else {
2620                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2621                        }
2622                    }
2623
2624                    14 => {
2625                        if let Some(value) = self.start_offset_divisor.take() {
2626                            ::fidl_next::wire::Envelope::encode_value::<
2627                                ::fidl_next::wire::Uint32,
2628                                ___E,
2629                            >(
2630                                value, preallocated.encoder, &mut out, ()
2631                            )?;
2632                        } else {
2633                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2634                        }
2635                    }
2636
2637                    13 => {
2638                        if let Some(value) = self.bytes_per_row_divisor.take() {
2639                            ::fidl_next::wire::Envelope::encode_value::<
2640                                ::fidl_next::wire::Uint32,
2641                                ___E,
2642                            >(
2643                                value, preallocated.encoder, &mut out, ()
2644                            )?;
2645                        } else {
2646                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2647                        }
2648                    }
2649
2650                    12 => {
2651                        if let Some(value) = self.required_max_size.take() {
2652                            ::fidl_next::wire::Envelope::encode_value::<
2653                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2654                                ___E,
2655                            >(
2656                                value, preallocated.encoder, &mut out, ()
2657                            )?;
2658                        } else {
2659                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2660                        }
2661                    }
2662
2663                    11 => {
2664                        if let Some(value) = self.required_min_size.take() {
2665                            ::fidl_next::wire::Envelope::encode_value::<
2666                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2667                                ___E,
2668                            >(
2669                                value, preallocated.encoder, &mut out, ()
2670                            )?;
2671                        } else {
2672                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2673                        }
2674                    }
2675
2676                    10 => {
2677                        if let Some(value) = self.display_rect_alignment.take() {
2678                            ::fidl_next::wire::Envelope::encode_value::<
2679                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2680                                ___E,
2681                            >(
2682                                value, preallocated.encoder, &mut out, ()
2683                            )?;
2684                        } else {
2685                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2686                        }
2687                    }
2688
2689                    9 => {
2690                        if let Some(value) = self.size_alignment.take() {
2691                            ::fidl_next::wire::Envelope::encode_value::<
2692                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2693                                ___E,
2694                            >(
2695                                value, preallocated.encoder, &mut out, ()
2696                            )?;
2697                        } else {
2698                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2699                        }
2700                    }
2701
2702                    8 => {
2703                        if let Some(value) = self.max_width_times_height.take() {
2704                            ::fidl_next::wire::Envelope::encode_value::<
2705                                ::fidl_next::wire::Uint64,
2706                                ___E,
2707                            >(
2708                                value, preallocated.encoder, &mut out, ()
2709                            )?;
2710                        } else {
2711                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2712                        }
2713                    }
2714
2715                    7 => {
2716                        if let Some(value) = self.max_bytes_per_row.take() {
2717                            ::fidl_next::wire::Envelope::encode_value::<
2718                                ::fidl_next::wire::Uint32,
2719                                ___E,
2720                            >(
2721                                value, preallocated.encoder, &mut out, ()
2722                            )?;
2723                        } else {
2724                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2725                        }
2726                    }
2727
2728                    6 => {
2729                        if let Some(value) = self.min_bytes_per_row.take() {
2730                            ::fidl_next::wire::Envelope::encode_value::<
2731                                ::fidl_next::wire::Uint32,
2732                                ___E,
2733                            >(
2734                                value, preallocated.encoder, &mut out, ()
2735                            )?;
2736                        } else {
2737                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2738                        }
2739                    }
2740
2741                    5 => {
2742                        if let Some(value) = self.max_size.take() {
2743                            ::fidl_next::wire::Envelope::encode_value::<
2744                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2745                                ___E,
2746                            >(
2747                                value, preallocated.encoder, &mut out, ()
2748                            )?;
2749                        } else {
2750                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2751                        }
2752                    }
2753
2754                    4 => {
2755                        if let Some(value) = self.min_size.take() {
2756                            ::fidl_next::wire::Envelope::encode_value::<
2757                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2758                                ___E,
2759                            >(
2760                                value, preallocated.encoder, &mut out, ()
2761                            )?;
2762                        } else {
2763                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2764                        }
2765                    }
2766
2767                    3 => {
2768                        if let Some(value) = self.color_spaces.take() {
2769                            ::fidl_next::wire::Envelope::encode_value::<
2770                                ::fidl_next::wire::Vector<
2771                                    'static,
2772                                    ::fidl_next_common_fuchsia_images2::wire::ColorSpace,
2773                                >,
2774                                ___E,
2775                            >(
2776                                value, preallocated.encoder, &mut out, (32, ())
2777                            )?;
2778                        } else {
2779                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2780                        }
2781                    }
2782
2783                    2 => {
2784                        if let Some(value) = self.pixel_format_modifier.take() {
2785                            ::fidl_next::wire::Envelope::encode_value::<
2786                                ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
2787                                ___E,
2788                            >(
2789                                value, preallocated.encoder, &mut out, ()
2790                            )?;
2791                        } else {
2792                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2793                        }
2794                    }
2795
2796                    1 => {
2797                        if let Some(value) = self.pixel_format.take() {
2798                            ::fidl_next::wire::Envelope::encode_value::<
2799                                ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
2800                                ___E,
2801                            >(
2802                                value, preallocated.encoder, &mut out, ()
2803                            )?;
2804                        } else {
2805                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2806                        }
2807                    }
2808
2809                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
2810                }
2811                unsafe {
2812                    preallocated.write_next(out.assume_init_ref());
2813                }
2814            }
2815
2816            ::fidl_next::wire::Table::encode_len(table, max_ord);
2817
2818            Ok(())
2819        }
2820    }
2821
2822    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ImageFormatConstraints<'static>, ___E>
2823        for &'a ImageFormatConstraints
2824    where
2825        ___E: ::fidl_next::Encoder + ?Sized,
2826    {
2827        #[inline]
2828        fn encode(
2829            self,
2830            encoder: &mut ___E,
2831            out: &mut ::core::mem::MaybeUninit<crate::wire::ImageFormatConstraints<'static>>,
2832            _: (),
2833        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2834            ::fidl_next::munge!(let crate::wire::ImageFormatConstraints { table } = out);
2835
2836            let max_ord = self.__max_ordinal();
2837
2838            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
2839            ::fidl_next::Wire::zero_padding(&mut out);
2840
2841            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
2842                ::fidl_next::wire::Envelope,
2843            >(encoder, max_ord);
2844
2845            for i in 1..=max_ord {
2846                match i {
2847                    20 => {
2848                        if let Some(value) = &self.pad_beyond_image_size_bytes {
2849                            ::fidl_next::wire::Envelope::encode_value::<
2850                                ::fidl_next::wire::Uint64,
2851                                ___E,
2852                            >(
2853                                value, preallocated.encoder, &mut out, ()
2854                            )?;
2855                        } else {
2856                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2857                        }
2858                    }
2859
2860                    19 => {
2861                        if let Some(value) = &self.pad_for_block_size {
2862                            ::fidl_next::wire::Envelope::encode_value::<
2863                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2864                                ___E,
2865                            >(
2866                                value, preallocated.encoder, &mut out, ()
2867                            )?;
2868                        } else {
2869                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2870                        }
2871                    }
2872
2873                    18 => {
2874                        if let Some(value) = &self.required_max_size_list {
2875                            ::fidl_next::wire::Envelope::encode_value::<
2876                                ::fidl_next::wire::Vector<
2877                                    'static,
2878                                    ::fidl_next_common_fuchsia_math::wire::SizeU,
2879                                >,
2880                                ___E,
2881                            >(
2882                                value, preallocated.encoder, &mut out, (64, ())
2883                            )?;
2884                        } else {
2885                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2886                        }
2887                    }
2888
2889                    17 => {
2890                        if let Some(value) = &self.is_alpha_present {
2891                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2892                                value,
2893                                preallocated.encoder,
2894                                &mut out,
2895                                (),
2896                            )?;
2897                        } else {
2898                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2899                        }
2900                    }
2901
2902                    16 => {
2903                        if let Some(value) = &self.require_bytes_per_row_at_pixel_boundary {
2904                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
2905                                value,
2906                                preallocated.encoder,
2907                                &mut out,
2908                                (),
2909                            )?;
2910                        } else {
2911                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2912                        }
2913                    }
2914
2915                    15 => {
2916                        if let Some(value) = &self.pixel_format_and_modifiers {
2917                            ::fidl_next::wire::Envelope::encode_value::<
2918                                ::fidl_next::wire::Vector<
2919                                    'static,
2920                                    crate::wire::PixelFormatAndModifier,
2921                                >,
2922                                ___E,
2923                            >(
2924                                value, preallocated.encoder, &mut out, (64, ())
2925                            )?;
2926                        } else {
2927                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2928                        }
2929                    }
2930
2931                    14 => {
2932                        if let Some(value) = &self.start_offset_divisor {
2933                            ::fidl_next::wire::Envelope::encode_value::<
2934                                ::fidl_next::wire::Uint32,
2935                                ___E,
2936                            >(
2937                                value, preallocated.encoder, &mut out, ()
2938                            )?;
2939                        } else {
2940                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2941                        }
2942                    }
2943
2944                    13 => {
2945                        if let Some(value) = &self.bytes_per_row_divisor {
2946                            ::fidl_next::wire::Envelope::encode_value::<
2947                                ::fidl_next::wire::Uint32,
2948                                ___E,
2949                            >(
2950                                value, preallocated.encoder, &mut out, ()
2951                            )?;
2952                        } else {
2953                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2954                        }
2955                    }
2956
2957                    12 => {
2958                        if let Some(value) = &self.required_max_size {
2959                            ::fidl_next::wire::Envelope::encode_value::<
2960                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2961                                ___E,
2962                            >(
2963                                value, preallocated.encoder, &mut out, ()
2964                            )?;
2965                        } else {
2966                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2967                        }
2968                    }
2969
2970                    11 => {
2971                        if let Some(value) = &self.required_min_size {
2972                            ::fidl_next::wire::Envelope::encode_value::<
2973                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2974                                ___E,
2975                            >(
2976                                value, preallocated.encoder, &mut out, ()
2977                            )?;
2978                        } else {
2979                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2980                        }
2981                    }
2982
2983                    10 => {
2984                        if let Some(value) = &self.display_rect_alignment {
2985                            ::fidl_next::wire::Envelope::encode_value::<
2986                                ::fidl_next_common_fuchsia_math::wire::SizeU,
2987                                ___E,
2988                            >(
2989                                value, preallocated.encoder, &mut out, ()
2990                            )?;
2991                        } else {
2992                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
2993                        }
2994                    }
2995
2996                    9 => {
2997                        if let Some(value) = &self.size_alignment {
2998                            ::fidl_next::wire::Envelope::encode_value::<
2999                                ::fidl_next_common_fuchsia_math::wire::SizeU,
3000                                ___E,
3001                            >(
3002                                value, preallocated.encoder, &mut out, ()
3003                            )?;
3004                        } else {
3005                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3006                        }
3007                    }
3008
3009                    8 => {
3010                        if let Some(value) = &self.max_width_times_height {
3011                            ::fidl_next::wire::Envelope::encode_value::<
3012                                ::fidl_next::wire::Uint64,
3013                                ___E,
3014                            >(
3015                                value, preallocated.encoder, &mut out, ()
3016                            )?;
3017                        } else {
3018                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3019                        }
3020                    }
3021
3022                    7 => {
3023                        if let Some(value) = &self.max_bytes_per_row {
3024                            ::fidl_next::wire::Envelope::encode_value::<
3025                                ::fidl_next::wire::Uint32,
3026                                ___E,
3027                            >(
3028                                value, preallocated.encoder, &mut out, ()
3029                            )?;
3030                        } else {
3031                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3032                        }
3033                    }
3034
3035                    6 => {
3036                        if let Some(value) = &self.min_bytes_per_row {
3037                            ::fidl_next::wire::Envelope::encode_value::<
3038                                ::fidl_next::wire::Uint32,
3039                                ___E,
3040                            >(
3041                                value, preallocated.encoder, &mut out, ()
3042                            )?;
3043                        } else {
3044                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3045                        }
3046                    }
3047
3048                    5 => {
3049                        if let Some(value) = &self.max_size {
3050                            ::fidl_next::wire::Envelope::encode_value::<
3051                                ::fidl_next_common_fuchsia_math::wire::SizeU,
3052                                ___E,
3053                            >(
3054                                value, preallocated.encoder, &mut out, ()
3055                            )?;
3056                        } else {
3057                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3058                        }
3059                    }
3060
3061                    4 => {
3062                        if let Some(value) = &self.min_size {
3063                            ::fidl_next::wire::Envelope::encode_value::<
3064                                ::fidl_next_common_fuchsia_math::wire::SizeU,
3065                                ___E,
3066                            >(
3067                                value, preallocated.encoder, &mut out, ()
3068                            )?;
3069                        } else {
3070                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3071                        }
3072                    }
3073
3074                    3 => {
3075                        if let Some(value) = &self.color_spaces {
3076                            ::fidl_next::wire::Envelope::encode_value::<
3077                                ::fidl_next::wire::Vector<
3078                                    'static,
3079                                    ::fidl_next_common_fuchsia_images2::wire::ColorSpace,
3080                                >,
3081                                ___E,
3082                            >(
3083                                value, preallocated.encoder, &mut out, (32, ())
3084                            )?;
3085                        } else {
3086                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3087                        }
3088                    }
3089
3090                    2 => {
3091                        if let Some(value) = &self.pixel_format_modifier {
3092                            ::fidl_next::wire::Envelope::encode_value::<
3093                                ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
3094                                ___E,
3095                            >(
3096                                value, preallocated.encoder, &mut out, ()
3097                            )?;
3098                        } else {
3099                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3100                        }
3101                    }
3102
3103                    1 => {
3104                        if let Some(value) = &self.pixel_format {
3105                            ::fidl_next::wire::Envelope::encode_value::<
3106                                ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
3107                                ___E,
3108                            >(
3109                                value, preallocated.encoder, &mut out, ()
3110                            )?;
3111                        } else {
3112                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3113                        }
3114                    }
3115
3116                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3117                }
3118                unsafe {
3119                    preallocated.write_next(out.assume_init_ref());
3120                }
3121            }
3122
3123            ::fidl_next::wire::Table::encode_len(table, max_ord);
3124
3125            Ok(())
3126        }
3127    }
3128
3129    impl<'de> ::fidl_next::FromWire<crate::wire::ImageFormatConstraints<'de>>
3130        for ImageFormatConstraints
3131    {
3132        #[inline]
3133        fn from_wire(wire_: crate::wire::ImageFormatConstraints<'de>) -> Self {
3134            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3135
3136            let pixel_format = wire_.table.get(1);
3137
3138            let pixel_format_modifier = wire_.table.get(2);
3139
3140            let color_spaces = wire_.table.get(3);
3141
3142            let min_size = wire_.table.get(4);
3143
3144            let max_size = wire_.table.get(5);
3145
3146            let min_bytes_per_row = wire_.table.get(6);
3147
3148            let max_bytes_per_row = wire_.table.get(7);
3149
3150            let max_width_times_height = wire_.table.get(8);
3151
3152            let size_alignment = wire_.table.get(9);
3153
3154            let display_rect_alignment = wire_.table.get(10);
3155
3156            let required_min_size = wire_.table.get(11);
3157
3158            let required_max_size = wire_.table.get(12);
3159
3160            let bytes_per_row_divisor = wire_.table.get(13);
3161
3162            let start_offset_divisor = wire_.table.get(14);
3163
3164            let pixel_format_and_modifiers = wire_.table.get(15);
3165
3166            let require_bytes_per_row_at_pixel_boundary = wire_.table.get(16);
3167
3168            let is_alpha_present = wire_.table.get(17);
3169
3170            let required_max_size_list = wire_.table.get(18);
3171
3172            let pad_for_block_size = wire_.table.get(19);
3173
3174            let pad_beyond_image_size_bytes = wire_.table.get(20);
3175
3176            Self {
3177
3178
3179                pixel_format: pixel_format.map(|envelope| ::fidl_next::FromWire::from_wire(
3180                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormat>() }
3181                )),
3182
3183
3184                pixel_format_modifier: pixel_format_modifier.map(|envelope| ::fidl_next::FromWire::from_wire(
3185                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>() }
3186                )),
3187
3188
3189                color_spaces: color_spaces.map(|envelope| ::fidl_next::FromWire::from_wire(
3190                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_images2::wire::ColorSpace>>() }
3191                )),
3192
3193
3194                min_size: min_size.map(|envelope| ::fidl_next::FromWire::from_wire(
3195                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3196                )),
3197
3198
3199                max_size: max_size.map(|envelope| ::fidl_next::FromWire::from_wire(
3200                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3201                )),
3202
3203
3204                min_bytes_per_row: min_bytes_per_row.map(|envelope| ::fidl_next::FromWire::from_wire(
3205                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() }
3206                )),
3207
3208
3209                max_bytes_per_row: max_bytes_per_row.map(|envelope| ::fidl_next::FromWire::from_wire(
3210                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() }
3211                )),
3212
3213
3214                max_width_times_height: max_width_times_height.map(|envelope| ::fidl_next::FromWire::from_wire(
3215                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() }
3216                )),
3217
3218
3219                size_alignment: size_alignment.map(|envelope| ::fidl_next::FromWire::from_wire(
3220                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3221                )),
3222
3223
3224                display_rect_alignment: display_rect_alignment.map(|envelope| ::fidl_next::FromWire::from_wire(
3225                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3226                )),
3227
3228
3229                required_min_size: required_min_size.map(|envelope| ::fidl_next::FromWire::from_wire(
3230                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3231                )),
3232
3233
3234                required_max_size: required_max_size.map(|envelope| ::fidl_next::FromWire::from_wire(
3235                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3236                )),
3237
3238
3239                bytes_per_row_divisor: bytes_per_row_divisor.map(|envelope| ::fidl_next::FromWire::from_wire(
3240                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() }
3241                )),
3242
3243
3244                start_offset_divisor: start_offset_divisor.map(|envelope| ::fidl_next::FromWire::from_wire(
3245                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() }
3246                )),
3247
3248
3249                pixel_format_and_modifiers: pixel_format_and_modifiers.map(|envelope| ::fidl_next::FromWire::from_wire(
3250                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::PixelFormatAndModifier>>() }
3251                )),
3252
3253
3254                require_bytes_per_row_at_pixel_boundary: require_bytes_per_row_at_pixel_boundary.map(|envelope| ::fidl_next::FromWire::from_wire(
3255                    unsafe { envelope.read_unchecked::<bool>() }
3256                )),
3257
3258
3259                is_alpha_present: is_alpha_present.map(|envelope| ::fidl_next::FromWire::from_wire(
3260                    unsafe { envelope.read_unchecked::<bool>() }
3261                )),
3262
3263
3264                required_max_size_list: required_max_size_list.map(|envelope| ::fidl_next::FromWire::from_wire(
3265                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_math::wire::SizeU>>() }
3266                )),
3267
3268
3269                pad_for_block_size: pad_for_block_size.map(|envelope| ::fidl_next::FromWire::from_wire(
3270                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3271                )),
3272
3273
3274                pad_beyond_image_size_bytes: pad_beyond_image_size_bytes.map(|envelope| ::fidl_next::FromWire::from_wire(
3275                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() }
3276                )),
3277
3278        }
3279        }
3280    }
3281
3282    impl<'de> ::fidl_next::FromWireRef<crate::wire::ImageFormatConstraints<'de>>
3283        for ImageFormatConstraints
3284    {
3285        #[inline]
3286        fn from_wire_ref(wire: &crate::wire::ImageFormatConstraints<'de>) -> Self {
3287            Self {
3288
3289
3290                pixel_format: wire.table.get(1)
3291                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3292                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormat>() }
3293                    )),
3294
3295
3296                pixel_format_modifier: wire.table.get(2)
3297                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3298                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>() }
3299                    )),
3300
3301
3302                color_spaces: wire.table.get(3)
3303                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3304                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_images2::wire::ColorSpace>>() }
3305                    )),
3306
3307
3308                min_size: wire.table.get(4)
3309                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3310                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3311                    )),
3312
3313
3314                max_size: wire.table.get(5)
3315                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3316                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3317                    )),
3318
3319
3320                min_bytes_per_row: wire.table.get(6)
3321                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3322                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint32>() }
3323                    )),
3324
3325
3326                max_bytes_per_row: wire.table.get(7)
3327                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3328                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint32>() }
3329                    )),
3330
3331
3332                max_width_times_height: wire.table.get(8)
3333                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3334                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint64>() }
3335                    )),
3336
3337
3338                size_alignment: wire.table.get(9)
3339                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3340                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3341                    )),
3342
3343
3344                display_rect_alignment: wire.table.get(10)
3345                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3346                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3347                    )),
3348
3349
3350                required_min_size: wire.table.get(11)
3351                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3352                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3353                    )),
3354
3355
3356                required_max_size: wire.table.get(12)
3357                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3358                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3359                    )),
3360
3361
3362                bytes_per_row_divisor: wire.table.get(13)
3363                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3364                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint32>() }
3365                    )),
3366
3367
3368                start_offset_divisor: wire.table.get(14)
3369                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3370                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint32>() }
3371                    )),
3372
3373
3374                pixel_format_and_modifiers: wire.table.get(15)
3375                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3376                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::PixelFormatAndModifier>>() }
3377                    )),
3378
3379
3380                require_bytes_per_row_at_pixel_boundary: wire.table.get(16)
3381                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3382                        unsafe { envelope.deref_unchecked::<bool>() }
3383                    )),
3384
3385
3386                is_alpha_present: wire.table.get(17)
3387                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3388                        unsafe { envelope.deref_unchecked::<bool>() }
3389                    )),
3390
3391
3392                required_max_size_list: wire.table.get(18)
3393                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3394                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_math::wire::SizeU>>() }
3395                    )),
3396
3397
3398                pad_for_block_size: wire.table.get(19)
3399                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3400                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>() }
3401                    )),
3402
3403
3404                pad_beyond_image_size_bytes: wire.table.get(20)
3405                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
3406                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint64>() }
3407                    )),
3408
3409        }
3410        }
3411    }
3412
3413    #[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"]
3414    #[derive(Debug, Default, Clone, PartialEq)]
3415    pub struct BufferCollectionConstraints {
3416        pub usage: ::core::option::Option<crate::natural::BufferUsage>,
3417
3418        pub min_buffer_count_for_camping: ::core::option::Option<u32>,
3419
3420        pub min_buffer_count_for_dedicated_slack: ::core::option::Option<u32>,
3421
3422        pub min_buffer_count_for_shared_slack: ::core::option::Option<u32>,
3423
3424        pub min_buffer_count: ::core::option::Option<u32>,
3425
3426        pub max_buffer_count: ::core::option::Option<u32>,
3427
3428        pub buffer_memory_constraints:
3429            ::core::option::Option<crate::natural::BufferMemoryConstraints>,
3430
3431        pub image_format_constraints:
3432            ::core::option::Option<::std::vec::Vec<crate::natural::ImageFormatConstraints>>,
3433    }
3434
3435    impl BufferCollectionConstraints {
3436        fn __max_ordinal(&self) -> usize {
3437            if self.image_format_constraints.is_some() {
3438                return 8;
3439            }
3440
3441            if self.buffer_memory_constraints.is_some() {
3442                return 7;
3443            }
3444
3445            if self.max_buffer_count.is_some() {
3446                return 6;
3447            }
3448
3449            if self.min_buffer_count.is_some() {
3450                return 5;
3451            }
3452
3453            if self.min_buffer_count_for_shared_slack.is_some() {
3454                return 4;
3455            }
3456
3457            if self.min_buffer_count_for_dedicated_slack.is_some() {
3458                return 3;
3459            }
3460
3461            if self.min_buffer_count_for_camping.is_some() {
3462                return 2;
3463            }
3464
3465            if self.usage.is_some() {
3466                return 1;
3467            }
3468
3469            0
3470        }
3471    }
3472
3473    unsafe impl<___E> ::fidl_next::Encode<crate::wire::BufferCollectionConstraints<'static>, ___E>
3474        for BufferCollectionConstraints
3475    where
3476        ___E: ::fidl_next::Encoder + ?Sized,
3477    {
3478        #[inline]
3479        fn encode(
3480            mut self,
3481            encoder: &mut ___E,
3482            out: &mut ::core::mem::MaybeUninit<crate::wire::BufferCollectionConstraints<'static>>,
3483            _: (),
3484        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3485            ::fidl_next::munge!(let crate::wire::BufferCollectionConstraints { table } = out);
3486
3487            let max_ord = self.__max_ordinal();
3488
3489            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3490            ::fidl_next::Wire::zero_padding(&mut out);
3491
3492            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3493                ::fidl_next::wire::Envelope,
3494            >(encoder, max_ord);
3495
3496            for i in 1..=max_ord {
3497                match i {
3498                    8 => {
3499                        if let Some(value) = self.image_format_constraints.take() {
3500                            ::fidl_next::wire::Envelope::encode_value::<
3501                                ::fidl_next::wire::Vector<
3502                                    'static,
3503                                    crate::wire::ImageFormatConstraints<'static>,
3504                                >,
3505                                ___E,
3506                            >(
3507                                value, preallocated.encoder, &mut out, (64, ())
3508                            )?;
3509                        } else {
3510                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3511                        }
3512                    }
3513
3514                    7 => {
3515                        if let Some(value) = self.buffer_memory_constraints.take() {
3516                            ::fidl_next::wire::Envelope::encode_value::<
3517                                crate::wire::BufferMemoryConstraints<'static>,
3518                                ___E,
3519                            >(
3520                                value, preallocated.encoder, &mut out, ()
3521                            )?;
3522                        } else {
3523                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3524                        }
3525                    }
3526
3527                    6 => {
3528                        if let Some(value) = self.max_buffer_count.take() {
3529                            ::fidl_next::wire::Envelope::encode_value::<
3530                                ::fidl_next::wire::Uint32,
3531                                ___E,
3532                            >(
3533                                value, preallocated.encoder, &mut out, ()
3534                            )?;
3535                        } else {
3536                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3537                        }
3538                    }
3539
3540                    5 => {
3541                        if let Some(value) = self.min_buffer_count.take() {
3542                            ::fidl_next::wire::Envelope::encode_value::<
3543                                ::fidl_next::wire::Uint32,
3544                                ___E,
3545                            >(
3546                                value, preallocated.encoder, &mut out, ()
3547                            )?;
3548                        } else {
3549                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3550                        }
3551                    }
3552
3553                    4 => {
3554                        if let Some(value) = self.min_buffer_count_for_shared_slack.take() {
3555                            ::fidl_next::wire::Envelope::encode_value::<
3556                                ::fidl_next::wire::Uint32,
3557                                ___E,
3558                            >(
3559                                value, preallocated.encoder, &mut out, ()
3560                            )?;
3561                        } else {
3562                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3563                        }
3564                    }
3565
3566                    3 => {
3567                        if let Some(value) = self.min_buffer_count_for_dedicated_slack.take() {
3568                            ::fidl_next::wire::Envelope::encode_value::<
3569                                ::fidl_next::wire::Uint32,
3570                                ___E,
3571                            >(
3572                                value, preallocated.encoder, &mut out, ()
3573                            )?;
3574                        } else {
3575                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3576                        }
3577                    }
3578
3579                    2 => {
3580                        if let Some(value) = self.min_buffer_count_for_camping.take() {
3581                            ::fidl_next::wire::Envelope::encode_value::<
3582                                ::fidl_next::wire::Uint32,
3583                                ___E,
3584                            >(
3585                                value, preallocated.encoder, &mut out, ()
3586                            )?;
3587                        } else {
3588                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3589                        }
3590                    }
3591
3592                    1 => {
3593                        if let Some(value) = self.usage.take() {
3594                            ::fidl_next::wire::Envelope::encode_value::<
3595                                crate::wire::BufferUsage<'static>,
3596                                ___E,
3597                            >(
3598                                value, preallocated.encoder, &mut out, ()
3599                            )?;
3600                        } else {
3601                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3602                        }
3603                    }
3604
3605                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3606                }
3607                unsafe {
3608                    preallocated.write_next(out.assume_init_ref());
3609                }
3610            }
3611
3612            ::fidl_next::wire::Table::encode_len(table, max_ord);
3613
3614            Ok(())
3615        }
3616    }
3617
3618    unsafe impl<'a, ___E>
3619        ::fidl_next::Encode<crate::wire::BufferCollectionConstraints<'static>, ___E>
3620        for &'a BufferCollectionConstraints
3621    where
3622        ___E: ::fidl_next::Encoder + ?Sized,
3623    {
3624        #[inline]
3625        fn encode(
3626            self,
3627            encoder: &mut ___E,
3628            out: &mut ::core::mem::MaybeUninit<crate::wire::BufferCollectionConstraints<'static>>,
3629            _: (),
3630        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3631            ::fidl_next::munge!(let crate::wire::BufferCollectionConstraints { table } = out);
3632
3633            let max_ord = self.__max_ordinal();
3634
3635            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3636            ::fidl_next::Wire::zero_padding(&mut out);
3637
3638            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3639                ::fidl_next::wire::Envelope,
3640            >(encoder, max_ord);
3641
3642            for i in 1..=max_ord {
3643                match i {
3644                    8 => {
3645                        if let Some(value) = &self.image_format_constraints {
3646                            ::fidl_next::wire::Envelope::encode_value::<
3647                                ::fidl_next::wire::Vector<
3648                                    'static,
3649                                    crate::wire::ImageFormatConstraints<'static>,
3650                                >,
3651                                ___E,
3652                            >(
3653                                value, preallocated.encoder, &mut out, (64, ())
3654                            )?;
3655                        } else {
3656                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3657                        }
3658                    }
3659
3660                    7 => {
3661                        if let Some(value) = &self.buffer_memory_constraints {
3662                            ::fidl_next::wire::Envelope::encode_value::<
3663                                crate::wire::BufferMemoryConstraints<'static>,
3664                                ___E,
3665                            >(
3666                                value, preallocated.encoder, &mut out, ()
3667                            )?;
3668                        } else {
3669                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3670                        }
3671                    }
3672
3673                    6 => {
3674                        if let Some(value) = &self.max_buffer_count {
3675                            ::fidl_next::wire::Envelope::encode_value::<
3676                                ::fidl_next::wire::Uint32,
3677                                ___E,
3678                            >(
3679                                value, preallocated.encoder, &mut out, ()
3680                            )?;
3681                        } else {
3682                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3683                        }
3684                    }
3685
3686                    5 => {
3687                        if let Some(value) = &self.min_buffer_count {
3688                            ::fidl_next::wire::Envelope::encode_value::<
3689                                ::fidl_next::wire::Uint32,
3690                                ___E,
3691                            >(
3692                                value, preallocated.encoder, &mut out, ()
3693                            )?;
3694                        } else {
3695                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3696                        }
3697                    }
3698
3699                    4 => {
3700                        if let Some(value) = &self.min_buffer_count_for_shared_slack {
3701                            ::fidl_next::wire::Envelope::encode_value::<
3702                                ::fidl_next::wire::Uint32,
3703                                ___E,
3704                            >(
3705                                value, preallocated.encoder, &mut out, ()
3706                            )?;
3707                        } else {
3708                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3709                        }
3710                    }
3711
3712                    3 => {
3713                        if let Some(value) = &self.min_buffer_count_for_dedicated_slack {
3714                            ::fidl_next::wire::Envelope::encode_value::<
3715                                ::fidl_next::wire::Uint32,
3716                                ___E,
3717                            >(
3718                                value, preallocated.encoder, &mut out, ()
3719                            )?;
3720                        } else {
3721                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3722                        }
3723                    }
3724
3725                    2 => {
3726                        if let Some(value) = &self.min_buffer_count_for_camping {
3727                            ::fidl_next::wire::Envelope::encode_value::<
3728                                ::fidl_next::wire::Uint32,
3729                                ___E,
3730                            >(
3731                                value, preallocated.encoder, &mut out, ()
3732                            )?;
3733                        } else {
3734                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3735                        }
3736                    }
3737
3738                    1 => {
3739                        if let Some(value) = &self.usage {
3740                            ::fidl_next::wire::Envelope::encode_value::<
3741                                crate::wire::BufferUsage<'static>,
3742                                ___E,
3743                            >(
3744                                value, preallocated.encoder, &mut out, ()
3745                            )?;
3746                        } else {
3747                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3748                        }
3749                    }
3750
3751                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3752                }
3753                unsafe {
3754                    preallocated.write_next(out.assume_init_ref());
3755                }
3756            }
3757
3758            ::fidl_next::wire::Table::encode_len(table, max_ord);
3759
3760            Ok(())
3761        }
3762    }
3763
3764    impl<'de> ::fidl_next::FromWire<crate::wire::BufferCollectionConstraints<'de>>
3765        for BufferCollectionConstraints
3766    {
3767        #[inline]
3768        fn from_wire(wire_: crate::wire::BufferCollectionConstraints<'de>) -> Self {
3769            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3770
3771            let usage = wire_.table.get(1);
3772
3773            let min_buffer_count_for_camping = wire_.table.get(2);
3774
3775            let min_buffer_count_for_dedicated_slack = wire_.table.get(3);
3776
3777            let min_buffer_count_for_shared_slack = wire_.table.get(4);
3778
3779            let min_buffer_count = wire_.table.get(5);
3780
3781            let max_buffer_count = wire_.table.get(6);
3782
3783            let buffer_memory_constraints = wire_.table.get(7);
3784
3785            let image_format_constraints = wire_.table.get(8);
3786
3787            Self {
3788                usage: usage.map(|envelope| {
3789                    ::fidl_next::FromWire::from_wire(unsafe {
3790                        envelope.read_unchecked::<crate::wire::BufferUsage<'de>>()
3791                    })
3792                }),
3793
3794                min_buffer_count_for_camping: min_buffer_count_for_camping.map(|envelope| {
3795                    ::fidl_next::FromWire::from_wire(unsafe {
3796                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3797                    })
3798                }),
3799
3800                min_buffer_count_for_dedicated_slack: min_buffer_count_for_dedicated_slack.map(
3801                    |envelope| {
3802                        ::fidl_next::FromWire::from_wire(unsafe {
3803                            envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3804                        })
3805                    },
3806                ),
3807
3808                min_buffer_count_for_shared_slack: min_buffer_count_for_shared_slack.map(
3809                    |envelope| {
3810                        ::fidl_next::FromWire::from_wire(unsafe {
3811                            envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3812                        })
3813                    },
3814                ),
3815
3816                min_buffer_count: min_buffer_count.map(|envelope| {
3817                    ::fidl_next::FromWire::from_wire(unsafe {
3818                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3819                    })
3820                }),
3821
3822                max_buffer_count: max_buffer_count.map(|envelope| {
3823                    ::fidl_next::FromWire::from_wire(unsafe {
3824                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
3825                    })
3826                }),
3827
3828                buffer_memory_constraints: buffer_memory_constraints.map(|envelope| {
3829                    ::fidl_next::FromWire::from_wire(unsafe {
3830                        envelope.read_unchecked::<crate::wire::BufferMemoryConstraints<'de>>()
3831                    })
3832                }),
3833
3834                image_format_constraints: image_format_constraints.map(|envelope| {
3835                    ::fidl_next::FromWire::from_wire(unsafe {
3836                        envelope.read_unchecked::<::fidl_next::wire::Vector<
3837                                'de,
3838                                crate::wire::ImageFormatConstraints<'de>,
3839                            >>()
3840                    })
3841                }),
3842            }
3843        }
3844    }
3845
3846    impl<'de> ::fidl_next::FromWireRef<crate::wire::BufferCollectionConstraints<'de>>
3847        for BufferCollectionConstraints
3848    {
3849        #[inline]
3850        fn from_wire_ref(wire: &crate::wire::BufferCollectionConstraints<'de>) -> Self {
3851            Self {
3852                usage: wire.table.get(1).map(|envelope| {
3853                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3854                        envelope.deref_unchecked::<crate::wire::BufferUsage<'de>>()
3855                    })
3856                }),
3857
3858                min_buffer_count_for_camping: wire.table.get(2).map(|envelope| {
3859                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3860                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3861                    })
3862                }),
3863
3864                min_buffer_count_for_dedicated_slack: wire.table.get(3).map(|envelope| {
3865                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3866                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3867                    })
3868                }),
3869
3870                min_buffer_count_for_shared_slack: wire.table.get(4).map(|envelope| {
3871                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3872                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3873                    })
3874                }),
3875
3876                min_buffer_count: wire.table.get(5).map(|envelope| {
3877                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3878                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3879                    })
3880                }),
3881
3882                max_buffer_count: wire.table.get(6).map(|envelope| {
3883                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3884                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
3885                    })
3886                }),
3887
3888                buffer_memory_constraints: wire.table.get(7).map(|envelope| {
3889                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3890                        envelope.deref_unchecked::<crate::wire::BufferMemoryConstraints<'de>>()
3891                    })
3892                }),
3893
3894                image_format_constraints: wire.table.get(8).map(|envelope| {
3895                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
3896                        envelope.deref_unchecked::<::fidl_next::wire::Vector<
3897                                'de,
3898                                crate::wire::ImageFormatConstraints<'de>,
3899                            >>()
3900                    })
3901                }),
3902            }
3903        }
3904    }
3905
3906    #[doc = " These settings and constraints apply to all the buffers in the collection.\n"]
3907    #[derive(Debug, Default, Clone, PartialEq)]
3908    pub struct SingleBufferSettings {
3909        pub buffer_settings: ::core::option::Option<crate::natural::BufferMemorySettings>,
3910
3911        pub image_format_constraints:
3912            ::core::option::Option<crate::natural::ImageFormatConstraints>,
3913    }
3914
3915    impl SingleBufferSettings {
3916        fn __max_ordinal(&self) -> usize {
3917            if self.image_format_constraints.is_some() {
3918                return 2;
3919            }
3920
3921            if self.buffer_settings.is_some() {
3922                return 1;
3923            }
3924
3925            0
3926        }
3927    }
3928
3929    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SingleBufferSettings<'static>, ___E>
3930        for SingleBufferSettings
3931    where
3932        ___E: ::fidl_next::Encoder + ?Sized,
3933    {
3934        #[inline]
3935        fn encode(
3936            mut self,
3937            encoder: &mut ___E,
3938            out: &mut ::core::mem::MaybeUninit<crate::wire::SingleBufferSettings<'static>>,
3939            _: (),
3940        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3941            ::fidl_next::munge!(let crate::wire::SingleBufferSettings { table } = out);
3942
3943            let max_ord = self.__max_ordinal();
3944
3945            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
3946            ::fidl_next::Wire::zero_padding(&mut out);
3947
3948            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
3949                ::fidl_next::wire::Envelope,
3950            >(encoder, max_ord);
3951
3952            for i in 1..=max_ord {
3953                match i {
3954                    2 => {
3955                        if let Some(value) = self.image_format_constraints.take() {
3956                            ::fidl_next::wire::Envelope::encode_value::<
3957                                crate::wire::ImageFormatConstraints<'static>,
3958                                ___E,
3959                            >(
3960                                value, preallocated.encoder, &mut out, ()
3961                            )?;
3962                        } else {
3963                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3964                        }
3965                    }
3966
3967                    1 => {
3968                        if let Some(value) = self.buffer_settings.take() {
3969                            ::fidl_next::wire::Envelope::encode_value::<
3970                                crate::wire::BufferMemorySettings<'static>,
3971                                ___E,
3972                            >(
3973                                value, preallocated.encoder, &mut out, ()
3974                            )?;
3975                        } else {
3976                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
3977                        }
3978                    }
3979
3980                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
3981                }
3982                unsafe {
3983                    preallocated.write_next(out.assume_init_ref());
3984                }
3985            }
3986
3987            ::fidl_next::wire::Table::encode_len(table, max_ord);
3988
3989            Ok(())
3990        }
3991    }
3992
3993    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SingleBufferSettings<'static>, ___E>
3994        for &'a SingleBufferSettings
3995    where
3996        ___E: ::fidl_next::Encoder + ?Sized,
3997    {
3998        #[inline]
3999        fn encode(
4000            self,
4001            encoder: &mut ___E,
4002            out: &mut ::core::mem::MaybeUninit<crate::wire::SingleBufferSettings<'static>>,
4003            _: (),
4004        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4005            ::fidl_next::munge!(let crate::wire::SingleBufferSettings { table } = out);
4006
4007            let max_ord = self.__max_ordinal();
4008
4009            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4010            ::fidl_next::Wire::zero_padding(&mut out);
4011
4012            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4013                ::fidl_next::wire::Envelope,
4014            >(encoder, max_ord);
4015
4016            for i in 1..=max_ord {
4017                match i {
4018                    2 => {
4019                        if let Some(value) = &self.image_format_constraints {
4020                            ::fidl_next::wire::Envelope::encode_value::<
4021                                crate::wire::ImageFormatConstraints<'static>,
4022                                ___E,
4023                            >(
4024                                value, preallocated.encoder, &mut out, ()
4025                            )?;
4026                        } else {
4027                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4028                        }
4029                    }
4030
4031                    1 => {
4032                        if let Some(value) = &self.buffer_settings {
4033                            ::fidl_next::wire::Envelope::encode_value::<
4034                                crate::wire::BufferMemorySettings<'static>,
4035                                ___E,
4036                            >(
4037                                value, preallocated.encoder, &mut out, ()
4038                            )?;
4039                        } else {
4040                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4041                        }
4042                    }
4043
4044                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4045                }
4046                unsafe {
4047                    preallocated.write_next(out.assume_init_ref());
4048                }
4049            }
4050
4051            ::fidl_next::wire::Table::encode_len(table, max_ord);
4052
4053            Ok(())
4054        }
4055    }
4056
4057    impl<'de> ::fidl_next::FromWire<crate::wire::SingleBufferSettings<'de>> for SingleBufferSettings {
4058        #[inline]
4059        fn from_wire(wire_: crate::wire::SingleBufferSettings<'de>) -> Self {
4060            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4061
4062            let buffer_settings = wire_.table.get(1);
4063
4064            let image_format_constraints = wire_.table.get(2);
4065
4066            Self {
4067                buffer_settings: buffer_settings.map(|envelope| {
4068                    ::fidl_next::FromWire::from_wire(unsafe {
4069                        envelope.read_unchecked::<crate::wire::BufferMemorySettings<'de>>()
4070                    })
4071                }),
4072
4073                image_format_constraints: image_format_constraints.map(|envelope| {
4074                    ::fidl_next::FromWire::from_wire(unsafe {
4075                        envelope.read_unchecked::<crate::wire::ImageFormatConstraints<'de>>()
4076                    })
4077                }),
4078            }
4079        }
4080    }
4081
4082    impl<'de> ::fidl_next::FromWireRef<crate::wire::SingleBufferSettings<'de>>
4083        for SingleBufferSettings
4084    {
4085        #[inline]
4086        fn from_wire_ref(wire: &crate::wire::SingleBufferSettings<'de>) -> Self {
4087            Self {
4088                buffer_settings: wire.table.get(1).map(|envelope| {
4089                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4090                        envelope.deref_unchecked::<crate::wire::BufferMemorySettings<'de>>()
4091                    })
4092                }),
4093
4094                image_format_constraints: wire.table.get(2).map(|envelope| {
4095                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4096                        envelope.deref_unchecked::<crate::wire::ImageFormatConstraints<'de>>()
4097                    })
4098                }),
4099            }
4100        }
4101    }
4102
4103    pub type NodeSyncResponse = ();
4104
4105    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4106    pub struct NodeSetNameRequest {
4107        pub priority: ::core::option::Option<u32>,
4108
4109        pub name: ::core::option::Option<::std::string::String>,
4110    }
4111
4112    impl NodeSetNameRequest {
4113        fn __max_ordinal(&self) -> usize {
4114            if self.name.is_some() {
4115                return 2;
4116            }
4117
4118            if self.priority.is_some() {
4119                return 1;
4120            }
4121
4122            0
4123        }
4124    }
4125
4126    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetNameRequest<'static>, ___E>
4127        for NodeSetNameRequest
4128    where
4129        ___E: ::fidl_next::Encoder + ?Sized,
4130    {
4131        #[inline]
4132        fn encode(
4133            mut self,
4134            encoder: &mut ___E,
4135            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetNameRequest<'static>>,
4136            _: (),
4137        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4138            ::fidl_next::munge!(let crate::wire::NodeSetNameRequest { table } = out);
4139
4140            let max_ord = self.__max_ordinal();
4141
4142            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4143            ::fidl_next::Wire::zero_padding(&mut out);
4144
4145            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4146                ::fidl_next::wire::Envelope,
4147            >(encoder, max_ord);
4148
4149            for i in 1..=max_ord {
4150                match i {
4151                    2 => {
4152                        if let Some(value) = self.name.take() {
4153                            ::fidl_next::wire::Envelope::encode_value::<
4154                                ::fidl_next::wire::String<'static>,
4155                                ___E,
4156                            >(
4157                                value, preallocated.encoder, &mut out, 64
4158                            )?;
4159                        } else {
4160                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4161                        }
4162                    }
4163
4164                    1 => {
4165                        if let Some(value) = self.priority.take() {
4166                            ::fidl_next::wire::Envelope::encode_value::<
4167                                ::fidl_next::wire::Uint32,
4168                                ___E,
4169                            >(
4170                                value, preallocated.encoder, &mut out, ()
4171                            )?;
4172                        } else {
4173                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4174                        }
4175                    }
4176
4177                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4178                }
4179                unsafe {
4180                    preallocated.write_next(out.assume_init_ref());
4181                }
4182            }
4183
4184            ::fidl_next::wire::Table::encode_len(table, max_ord);
4185
4186            Ok(())
4187        }
4188    }
4189
4190    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::NodeSetNameRequest<'static>, ___E>
4191        for &'a NodeSetNameRequest
4192    where
4193        ___E: ::fidl_next::Encoder + ?Sized,
4194    {
4195        #[inline]
4196        fn encode(
4197            self,
4198            encoder: &mut ___E,
4199            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetNameRequest<'static>>,
4200            _: (),
4201        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4202            ::fidl_next::munge!(let crate::wire::NodeSetNameRequest { table } = out);
4203
4204            let max_ord = self.__max_ordinal();
4205
4206            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4207            ::fidl_next::Wire::zero_padding(&mut out);
4208
4209            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4210                ::fidl_next::wire::Envelope,
4211            >(encoder, max_ord);
4212
4213            for i in 1..=max_ord {
4214                match i {
4215                    2 => {
4216                        if let Some(value) = &self.name {
4217                            ::fidl_next::wire::Envelope::encode_value::<
4218                                ::fidl_next::wire::String<'static>,
4219                                ___E,
4220                            >(
4221                                value, preallocated.encoder, &mut out, 64
4222                            )?;
4223                        } else {
4224                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4225                        }
4226                    }
4227
4228                    1 => {
4229                        if let Some(value) = &self.priority {
4230                            ::fidl_next::wire::Envelope::encode_value::<
4231                                ::fidl_next::wire::Uint32,
4232                                ___E,
4233                            >(
4234                                value, preallocated.encoder, &mut out, ()
4235                            )?;
4236                        } else {
4237                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4238                        }
4239                    }
4240
4241                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4242                }
4243                unsafe {
4244                    preallocated.write_next(out.assume_init_ref());
4245                }
4246            }
4247
4248            ::fidl_next::wire::Table::encode_len(table, max_ord);
4249
4250            Ok(())
4251        }
4252    }
4253
4254    impl<'de> ::fidl_next::FromWire<crate::wire::NodeSetNameRequest<'de>> for NodeSetNameRequest {
4255        #[inline]
4256        fn from_wire(wire_: crate::wire::NodeSetNameRequest<'de>) -> Self {
4257            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4258
4259            let priority = wire_.table.get(1);
4260
4261            let name = wire_.table.get(2);
4262
4263            Self {
4264                priority: priority.map(|envelope| {
4265                    ::fidl_next::FromWire::from_wire(unsafe {
4266                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
4267                    })
4268                }),
4269
4270                name: name.map(|envelope| {
4271                    ::fidl_next::FromWire::from_wire(unsafe {
4272                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
4273                    })
4274                }),
4275            }
4276        }
4277    }
4278
4279    impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeSetNameRequest<'de>> for NodeSetNameRequest {
4280        #[inline]
4281        fn from_wire_ref(wire: &crate::wire::NodeSetNameRequest<'de>) -> Self {
4282            Self {
4283                priority: wire.table.get(1).map(|envelope| {
4284                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4285                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
4286                    })
4287                }),
4288
4289                name: wire.table.get(2).map(|envelope| {
4290                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4291                        envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
4292                    })
4293                }),
4294            }
4295        }
4296    }
4297
4298    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4299    pub struct NodeSetDebugClientInfoRequest {
4300        pub name: ::core::option::Option<::std::string::String>,
4301
4302        pub id: ::core::option::Option<u64>,
4303    }
4304
4305    impl NodeSetDebugClientInfoRequest {
4306        fn __max_ordinal(&self) -> usize {
4307            if self.id.is_some() {
4308                return 2;
4309            }
4310
4311            if self.name.is_some() {
4312                return 1;
4313            }
4314
4315            0
4316        }
4317    }
4318
4319    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeSetDebugClientInfoRequest<'static>, ___E>
4320        for NodeSetDebugClientInfoRequest
4321    where
4322        ___E: ::fidl_next::Encoder + ?Sized,
4323    {
4324        #[inline]
4325        fn encode(
4326            mut self,
4327            encoder: &mut ___E,
4328            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetDebugClientInfoRequest<'static>>,
4329            _: (),
4330        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4331            ::fidl_next::munge!(let crate::wire::NodeSetDebugClientInfoRequest { table } = out);
4332
4333            let max_ord = self.__max_ordinal();
4334
4335            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4336            ::fidl_next::Wire::zero_padding(&mut out);
4337
4338            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4339                ::fidl_next::wire::Envelope,
4340            >(encoder, max_ord);
4341
4342            for i in 1..=max_ord {
4343                match i {
4344                    2 => {
4345                        if let Some(value) = self.id.take() {
4346                            ::fidl_next::wire::Envelope::encode_value::<
4347                                ::fidl_next::wire::Uint64,
4348                                ___E,
4349                            >(
4350                                value, preallocated.encoder, &mut out, ()
4351                            )?;
4352                        } else {
4353                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4354                        }
4355                    }
4356
4357                    1 => {
4358                        if let Some(value) = self.name.take() {
4359                            ::fidl_next::wire::Envelope::encode_value::<
4360                                ::fidl_next::wire::String<'static>,
4361                                ___E,
4362                            >(
4363                                value, preallocated.encoder, &mut out, 256
4364                            )?;
4365                        } else {
4366                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4367                        }
4368                    }
4369
4370                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4371                }
4372                unsafe {
4373                    preallocated.write_next(out.assume_init_ref());
4374                }
4375            }
4376
4377            ::fidl_next::wire::Table::encode_len(table, max_ord);
4378
4379            Ok(())
4380        }
4381    }
4382
4383    unsafe impl<'a, ___E>
4384        ::fidl_next::Encode<crate::wire::NodeSetDebugClientInfoRequest<'static>, ___E>
4385        for &'a NodeSetDebugClientInfoRequest
4386    where
4387        ___E: ::fidl_next::Encoder + ?Sized,
4388    {
4389        #[inline]
4390        fn encode(
4391            self,
4392            encoder: &mut ___E,
4393            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeSetDebugClientInfoRequest<'static>>,
4394            _: (),
4395        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4396            ::fidl_next::munge!(let crate::wire::NodeSetDebugClientInfoRequest { table } = out);
4397
4398            let max_ord = self.__max_ordinal();
4399
4400            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4401            ::fidl_next::Wire::zero_padding(&mut out);
4402
4403            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4404                ::fidl_next::wire::Envelope,
4405            >(encoder, max_ord);
4406
4407            for i in 1..=max_ord {
4408                match i {
4409                    2 => {
4410                        if let Some(value) = &self.id {
4411                            ::fidl_next::wire::Envelope::encode_value::<
4412                                ::fidl_next::wire::Uint64,
4413                                ___E,
4414                            >(
4415                                value, preallocated.encoder, &mut out, ()
4416                            )?;
4417                        } else {
4418                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4419                        }
4420                    }
4421
4422                    1 => {
4423                        if let Some(value) = &self.name {
4424                            ::fidl_next::wire::Envelope::encode_value::<
4425                                ::fidl_next::wire::String<'static>,
4426                                ___E,
4427                            >(
4428                                value, preallocated.encoder, &mut out, 256
4429                            )?;
4430                        } else {
4431                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4432                        }
4433                    }
4434
4435                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4436                }
4437                unsafe {
4438                    preallocated.write_next(out.assume_init_ref());
4439                }
4440            }
4441
4442            ::fidl_next::wire::Table::encode_len(table, max_ord);
4443
4444            Ok(())
4445        }
4446    }
4447
4448    impl<'de> ::fidl_next::FromWire<crate::wire::NodeSetDebugClientInfoRequest<'de>>
4449        for NodeSetDebugClientInfoRequest
4450    {
4451        #[inline]
4452        fn from_wire(wire_: crate::wire::NodeSetDebugClientInfoRequest<'de>) -> Self {
4453            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4454
4455            let name = wire_.table.get(1);
4456
4457            let id = wire_.table.get(2);
4458
4459            Self {
4460                name: name.map(|envelope| {
4461                    ::fidl_next::FromWire::from_wire(unsafe {
4462                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
4463                    })
4464                }),
4465
4466                id: id.map(|envelope| {
4467                    ::fidl_next::FromWire::from_wire(unsafe {
4468                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
4469                    })
4470                }),
4471            }
4472        }
4473    }
4474
4475    impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeSetDebugClientInfoRequest<'de>>
4476        for NodeSetDebugClientInfoRequest
4477    {
4478        #[inline]
4479        fn from_wire_ref(wire: &crate::wire::NodeSetDebugClientInfoRequest<'de>) -> Self {
4480            Self {
4481                name: wire.table.get(1).map(|envelope| {
4482                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4483                        envelope.deref_unchecked::<::fidl_next::wire::String<'de>>()
4484                    })
4485                }),
4486
4487                id: wire.table.get(2).map(|envelope| {
4488                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4489                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
4490                    })
4491                }),
4492            }
4493        }
4494    }
4495
4496    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4497    pub struct NodeSetDebugTimeoutLogDeadlineRequest {
4498        pub deadline: ::core::option::Option<i64>,
4499    }
4500
4501    impl NodeSetDebugTimeoutLogDeadlineRequest {
4502        fn __max_ordinal(&self) -> usize {
4503            if self.deadline.is_some() {
4504                return 1;
4505            }
4506
4507            0
4508        }
4509    }
4510
4511    unsafe impl<___E>
4512        ::fidl_next::Encode<crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'static>, ___E>
4513        for NodeSetDebugTimeoutLogDeadlineRequest
4514    where
4515        ___E: ::fidl_next::Encoder + ?Sized,
4516    {
4517        #[inline]
4518        fn encode(
4519            mut self,
4520            encoder: &mut ___E,
4521            out: &mut ::core::mem::MaybeUninit<
4522                crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'static>,
4523            >,
4524            _: (),
4525        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4526            ::fidl_next::munge!(let crate::wire::NodeSetDebugTimeoutLogDeadlineRequest { table } = out);
4527
4528            let max_ord = self.__max_ordinal();
4529
4530            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4531            ::fidl_next::Wire::zero_padding(&mut out);
4532
4533            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4534                ::fidl_next::wire::Envelope,
4535            >(encoder, max_ord);
4536
4537            for i in 1..=max_ord {
4538                match i {
4539                    1 => {
4540                        if let Some(value) = self.deadline.take() {
4541                            ::fidl_next::wire::Envelope::encode_value::<
4542                                ::fidl_next::wire::Int64,
4543                                ___E,
4544                            >(
4545                                value, preallocated.encoder, &mut out, ()
4546                            )?;
4547                        } else {
4548                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4549                        }
4550                    }
4551
4552                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4553                }
4554                unsafe {
4555                    preallocated.write_next(out.assume_init_ref());
4556                }
4557            }
4558
4559            ::fidl_next::wire::Table::encode_len(table, max_ord);
4560
4561            Ok(())
4562        }
4563    }
4564
4565    unsafe impl<'a, ___E>
4566        ::fidl_next::Encode<crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'static>, ___E>
4567        for &'a NodeSetDebugTimeoutLogDeadlineRequest
4568    where
4569        ___E: ::fidl_next::Encoder + ?Sized,
4570    {
4571        #[inline]
4572        fn encode(
4573            self,
4574            encoder: &mut ___E,
4575            out: &mut ::core::mem::MaybeUninit<
4576                crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'static>,
4577            >,
4578            _: (),
4579        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4580            ::fidl_next::munge!(let crate::wire::NodeSetDebugTimeoutLogDeadlineRequest { table } = out);
4581
4582            let max_ord = self.__max_ordinal();
4583
4584            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4585            ::fidl_next::Wire::zero_padding(&mut out);
4586
4587            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4588                ::fidl_next::wire::Envelope,
4589            >(encoder, max_ord);
4590
4591            for i in 1..=max_ord {
4592                match i {
4593                    1 => {
4594                        if let Some(value) = &self.deadline {
4595                            ::fidl_next::wire::Envelope::encode_value::<
4596                                ::fidl_next::wire::Int64,
4597                                ___E,
4598                            >(
4599                                value, preallocated.encoder, &mut out, ()
4600                            )?;
4601                        } else {
4602                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4603                        }
4604                    }
4605
4606                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4607                }
4608                unsafe {
4609                    preallocated.write_next(out.assume_init_ref());
4610                }
4611            }
4612
4613            ::fidl_next::wire::Table::encode_len(table, max_ord);
4614
4615            Ok(())
4616        }
4617    }
4618
4619    impl<'de> ::fidl_next::FromWire<crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'de>>
4620        for NodeSetDebugTimeoutLogDeadlineRequest
4621    {
4622        #[inline]
4623        fn from_wire(wire_: crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'de>) -> Self {
4624            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4625
4626            let deadline = wire_.table.get(1);
4627
4628            Self {
4629                deadline: deadline.map(|envelope| {
4630                    ::fidl_next::FromWire::from_wire(unsafe {
4631                        envelope.read_unchecked::<::fidl_next::wire::Int64>()
4632                    })
4633                }),
4634            }
4635        }
4636    }
4637
4638    impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'de>>
4639        for NodeSetDebugTimeoutLogDeadlineRequest
4640    {
4641        #[inline]
4642        fn from_wire_ref(wire: &crate::wire::NodeSetDebugTimeoutLogDeadlineRequest<'de>) -> Self {
4643            Self {
4644                deadline: wire.table.get(1).map(|envelope| {
4645                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4646                        envelope.deref_unchecked::<::fidl_next::wire::Int64>()
4647                    })
4648                }),
4649            }
4650        }
4651    }
4652
4653    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4654    pub struct NodeIsAlternateForResponse {
4655        pub is_alternate: ::core::option::Option<bool>,
4656    }
4657
4658    impl NodeIsAlternateForResponse {
4659        fn __max_ordinal(&self) -> usize {
4660            if self.is_alternate.is_some() {
4661                return 1;
4662            }
4663
4664            0
4665        }
4666    }
4667
4668    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeIsAlternateForResponse<'static>, ___E>
4669        for NodeIsAlternateForResponse
4670    where
4671        ___E: ::fidl_next::Encoder + ?Sized,
4672    {
4673        #[inline]
4674        fn encode(
4675            mut self,
4676            encoder: &mut ___E,
4677            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeIsAlternateForResponse<'static>>,
4678            _: (),
4679        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4680            ::fidl_next::munge!(let crate::wire::NodeIsAlternateForResponse { table } = out);
4681
4682            let max_ord = self.__max_ordinal();
4683
4684            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4685            ::fidl_next::Wire::zero_padding(&mut out);
4686
4687            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4688                ::fidl_next::wire::Envelope,
4689            >(encoder, max_ord);
4690
4691            for i in 1..=max_ord {
4692                match i {
4693                    1 => {
4694                        if let Some(value) = self.is_alternate.take() {
4695                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
4696                                value,
4697                                preallocated.encoder,
4698                                &mut out,
4699                                (),
4700                            )?;
4701                        } else {
4702                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4703                        }
4704                    }
4705
4706                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4707                }
4708                unsafe {
4709                    preallocated.write_next(out.assume_init_ref());
4710                }
4711            }
4712
4713            ::fidl_next::wire::Table::encode_len(table, max_ord);
4714
4715            Ok(())
4716        }
4717    }
4718
4719    unsafe impl<'a, ___E>
4720        ::fidl_next::Encode<crate::wire::NodeIsAlternateForResponse<'static>, ___E>
4721        for &'a NodeIsAlternateForResponse
4722    where
4723        ___E: ::fidl_next::Encoder + ?Sized,
4724    {
4725        #[inline]
4726        fn encode(
4727            self,
4728            encoder: &mut ___E,
4729            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeIsAlternateForResponse<'static>>,
4730            _: (),
4731        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4732            ::fidl_next::munge!(let crate::wire::NodeIsAlternateForResponse { table } = out);
4733
4734            let max_ord = self.__max_ordinal();
4735
4736            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4737            ::fidl_next::Wire::zero_padding(&mut out);
4738
4739            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4740                ::fidl_next::wire::Envelope,
4741            >(encoder, max_ord);
4742
4743            for i in 1..=max_ord {
4744                match i {
4745                    1 => {
4746                        if let Some(value) = &self.is_alternate {
4747                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
4748                                value,
4749                                preallocated.encoder,
4750                                &mut out,
4751                                (),
4752                            )?;
4753                        } else {
4754                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4755                        }
4756                    }
4757
4758                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4759                }
4760                unsafe {
4761                    preallocated.write_next(out.assume_init_ref());
4762                }
4763            }
4764
4765            ::fidl_next::wire::Table::encode_len(table, max_ord);
4766
4767            Ok(())
4768        }
4769    }
4770
4771    impl<'de> ::fidl_next::FromWire<crate::wire::NodeIsAlternateForResponse<'de>>
4772        for NodeIsAlternateForResponse
4773    {
4774        #[inline]
4775        fn from_wire(wire_: crate::wire::NodeIsAlternateForResponse<'de>) -> Self {
4776            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4777
4778            let is_alternate = wire_.table.get(1);
4779
4780            Self {
4781                is_alternate: is_alternate.map(|envelope| {
4782                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
4783                }),
4784            }
4785        }
4786    }
4787
4788    impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeIsAlternateForResponse<'de>>
4789        for NodeIsAlternateForResponse
4790    {
4791        #[inline]
4792        fn from_wire_ref(wire: &crate::wire::NodeIsAlternateForResponse<'de>) -> Self {
4793            Self {
4794                is_alternate: wire.table.get(1).map(|envelope| {
4795                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4796                        envelope.deref_unchecked::<bool>()
4797                    })
4798                }),
4799            }
4800        }
4801    }
4802
4803    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4804    pub struct NodeGetBufferCollectionIdResponse {
4805        pub buffer_collection_id: ::core::option::Option<u64>,
4806    }
4807
4808    impl NodeGetBufferCollectionIdResponse {
4809        fn __max_ordinal(&self) -> usize {
4810            if self.buffer_collection_id.is_some() {
4811                return 1;
4812            }
4813
4814            0
4815        }
4816    }
4817
4818    unsafe impl<___E>
4819        ::fidl_next::Encode<crate::wire::NodeGetBufferCollectionIdResponse<'static>, ___E>
4820        for NodeGetBufferCollectionIdResponse
4821    where
4822        ___E: ::fidl_next::Encoder + ?Sized,
4823    {
4824        #[inline]
4825        fn encode(
4826            mut self,
4827            encoder: &mut ___E,
4828            out: &mut ::core::mem::MaybeUninit<
4829                crate::wire::NodeGetBufferCollectionIdResponse<'static>,
4830            >,
4831            _: (),
4832        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4833            ::fidl_next::munge!(let crate::wire::NodeGetBufferCollectionIdResponse { table } = out);
4834
4835            let max_ord = self.__max_ordinal();
4836
4837            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4838            ::fidl_next::Wire::zero_padding(&mut out);
4839
4840            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4841                ::fidl_next::wire::Envelope,
4842            >(encoder, max_ord);
4843
4844            for i in 1..=max_ord {
4845                match i {
4846                    1 => {
4847                        if let Some(value) = self.buffer_collection_id.take() {
4848                            ::fidl_next::wire::Envelope::encode_value::<
4849                                ::fidl_next::wire::Uint64,
4850                                ___E,
4851                            >(
4852                                value, preallocated.encoder, &mut out, ()
4853                            )?;
4854                        } else {
4855                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4856                        }
4857                    }
4858
4859                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4860                }
4861                unsafe {
4862                    preallocated.write_next(out.assume_init_ref());
4863                }
4864            }
4865
4866            ::fidl_next::wire::Table::encode_len(table, max_ord);
4867
4868            Ok(())
4869        }
4870    }
4871
4872    unsafe impl<'a, ___E>
4873        ::fidl_next::Encode<crate::wire::NodeGetBufferCollectionIdResponse<'static>, ___E>
4874        for &'a NodeGetBufferCollectionIdResponse
4875    where
4876        ___E: ::fidl_next::Encoder + ?Sized,
4877    {
4878        #[inline]
4879        fn encode(
4880            self,
4881            encoder: &mut ___E,
4882            out: &mut ::core::mem::MaybeUninit<
4883                crate::wire::NodeGetBufferCollectionIdResponse<'static>,
4884            >,
4885            _: (),
4886        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4887            ::fidl_next::munge!(let crate::wire::NodeGetBufferCollectionIdResponse { table } = out);
4888
4889            let max_ord = self.__max_ordinal();
4890
4891            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4892            ::fidl_next::Wire::zero_padding(&mut out);
4893
4894            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
4895                ::fidl_next::wire::Envelope,
4896            >(encoder, max_ord);
4897
4898            for i in 1..=max_ord {
4899                match i {
4900                    1 => {
4901                        if let Some(value) = &self.buffer_collection_id {
4902                            ::fidl_next::wire::Envelope::encode_value::<
4903                                ::fidl_next::wire::Uint64,
4904                                ___E,
4905                            >(
4906                                value, preallocated.encoder, &mut out, ()
4907                            )?;
4908                        } else {
4909                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
4910                        }
4911                    }
4912
4913                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
4914                }
4915                unsafe {
4916                    preallocated.write_next(out.assume_init_ref());
4917                }
4918            }
4919
4920            ::fidl_next::wire::Table::encode_len(table, max_ord);
4921
4922            Ok(())
4923        }
4924    }
4925
4926    impl<'de> ::fidl_next::FromWire<crate::wire::NodeGetBufferCollectionIdResponse<'de>>
4927        for NodeGetBufferCollectionIdResponse
4928    {
4929        #[inline]
4930        fn from_wire(wire_: crate::wire::NodeGetBufferCollectionIdResponse<'de>) -> Self {
4931            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4932
4933            let buffer_collection_id = wire_.table.get(1);
4934
4935            Self {
4936                buffer_collection_id: buffer_collection_id.map(|envelope| {
4937                    ::fidl_next::FromWire::from_wire(unsafe {
4938                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
4939                    })
4940                }),
4941            }
4942        }
4943    }
4944
4945    impl<'de> ::fidl_next::FromWireRef<crate::wire::NodeGetBufferCollectionIdResponse<'de>>
4946        for NodeGetBufferCollectionIdResponse
4947    {
4948        #[inline]
4949        fn from_wire_ref(wire: &crate::wire::NodeGetBufferCollectionIdResponse<'de>) -> Self {
4950            Self {
4951                buffer_collection_id: wire.table.get(1).map(|envelope| {
4952                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4953                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
4954                    })
4955                }),
4956            }
4957        }
4958    }
4959
4960    pub type BufferCollectionCheckAllBuffersAllocatedResponse = ();
4961
4962    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
4963    pub struct BufferCollectionTokenDuplicateSyncRequest {
4964        pub rights_attenuation_masks:
4965            ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::Rights>>,
4966    }
4967
4968    impl BufferCollectionTokenDuplicateSyncRequest {
4969        fn __max_ordinal(&self) -> usize {
4970            if self.rights_attenuation_masks.is_some() {
4971                return 1;
4972            }
4973
4974            0
4975        }
4976    }
4977
4978    unsafe impl<___E>
4979        ::fidl_next::Encode<crate::wire::BufferCollectionTokenDuplicateSyncRequest<'static>, ___E>
4980        for BufferCollectionTokenDuplicateSyncRequest
4981    where
4982        ___E: ::fidl_next::Encoder + ?Sized,
4983    {
4984        #[inline]
4985        fn encode(
4986            mut self,
4987            encoder: &mut ___E,
4988            out: &mut ::core::mem::MaybeUninit<
4989                crate::wire::BufferCollectionTokenDuplicateSyncRequest<'static>,
4990            >,
4991            _: (),
4992        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4993            ::fidl_next::munge!(let crate::wire::BufferCollectionTokenDuplicateSyncRequest { table } = out);
4994
4995            let max_ord = self.__max_ordinal();
4996
4997            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
4998            ::fidl_next::Wire::zero_padding(&mut out);
4999
5000            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5001                ::fidl_next::wire::Envelope,
5002            >(encoder, max_ord);
5003
5004            for i in 1..=max_ord {
5005                match i {
5006                    1 => {
5007                        if let Some(value) = self.rights_attenuation_masks.take() {
5008                            ::fidl_next::wire::Envelope::encode_value::<
5009                                ::fidl_next::wire::Vector<
5010                                    'static,
5011                                    ::fidl_next::wire::fuchsia::Rights,
5012                                >,
5013                                ___E,
5014                            >(
5015                                value, preallocated.encoder, &mut out, (64, ())
5016                            )?;
5017                        } else {
5018                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5019                        }
5020                    }
5021
5022                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5023                }
5024                unsafe {
5025                    preallocated.write_next(out.assume_init_ref());
5026                }
5027            }
5028
5029            ::fidl_next::wire::Table::encode_len(table, max_ord);
5030
5031            Ok(())
5032        }
5033    }
5034
5035    unsafe impl<'a, ___E>
5036        ::fidl_next::Encode<crate::wire::BufferCollectionTokenDuplicateSyncRequest<'static>, ___E>
5037        for &'a BufferCollectionTokenDuplicateSyncRequest
5038    where
5039        ___E: ::fidl_next::Encoder + ?Sized,
5040    {
5041        #[inline]
5042        fn encode(
5043            self,
5044            encoder: &mut ___E,
5045            out: &mut ::core::mem::MaybeUninit<
5046                crate::wire::BufferCollectionTokenDuplicateSyncRequest<'static>,
5047            >,
5048            _: (),
5049        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5050            ::fidl_next::munge!(let crate::wire::BufferCollectionTokenDuplicateSyncRequest { table } = out);
5051
5052            let max_ord = self.__max_ordinal();
5053
5054            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5055            ::fidl_next::Wire::zero_padding(&mut out);
5056
5057            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5058                ::fidl_next::wire::Envelope,
5059            >(encoder, max_ord);
5060
5061            for i in 1..=max_ord {
5062                match i {
5063                    1 => {
5064                        if let Some(value) = &self.rights_attenuation_masks {
5065                            ::fidl_next::wire::Envelope::encode_value::<
5066                                ::fidl_next::wire::Vector<
5067                                    'static,
5068                                    ::fidl_next::wire::fuchsia::Rights,
5069                                >,
5070                                ___E,
5071                            >(
5072                                value, preallocated.encoder, &mut out, (64, ())
5073                            )?;
5074                        } else {
5075                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5076                        }
5077                    }
5078
5079                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5080                }
5081                unsafe {
5082                    preallocated.write_next(out.assume_init_ref());
5083                }
5084            }
5085
5086            ::fidl_next::wire::Table::encode_len(table, max_ord);
5087
5088            Ok(())
5089        }
5090    }
5091
5092    impl<'de> ::fidl_next::FromWire<crate::wire::BufferCollectionTokenDuplicateSyncRequest<'de>>
5093        for BufferCollectionTokenDuplicateSyncRequest
5094    {
5095        #[inline]
5096        fn from_wire(wire_: crate::wire::BufferCollectionTokenDuplicateSyncRequest<'de>) -> Self {
5097            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5098
5099            let rights_attenuation_masks = wire_.table.get(1);
5100
5101            Self {
5102
5103
5104                rights_attenuation_masks: rights_attenuation_masks.map(|envelope| ::fidl_next::FromWire::from_wire(
5105                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>>() }
5106                )),
5107
5108        }
5109        }
5110    }
5111
5112    impl<'de> ::fidl_next::FromWireRef<crate::wire::BufferCollectionTokenDuplicateSyncRequest<'de>>
5113        for BufferCollectionTokenDuplicateSyncRequest
5114    {
5115        #[inline]
5116        fn from_wire_ref(
5117            wire: &crate::wire::BufferCollectionTokenDuplicateSyncRequest<'de>,
5118        ) -> Self {
5119            Self {
5120
5121
5122                rights_attenuation_masks: wire.table.get(1)
5123                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5124                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>>() }
5125                    )),
5126
5127        }
5128        }
5129    }
5130
5131    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5132    pub struct BufferCollectionTokenGroupCreateChildrenSyncRequest {
5133        pub rights_attenuation_masks:
5134            ::core::option::Option<::std::vec::Vec<::fidl_next::fuchsia::zx::Rights>>,
5135    }
5136
5137    impl BufferCollectionTokenGroupCreateChildrenSyncRequest {
5138        fn __max_ordinal(&self) -> usize {
5139            if self.rights_attenuation_masks.is_some() {
5140                return 1;
5141            }
5142
5143            0
5144        }
5145    }
5146
5147    unsafe impl<___E>
5148        ::fidl_next::Encode<
5149            crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'static>,
5150            ___E,
5151        > for BufferCollectionTokenGroupCreateChildrenSyncRequest
5152    where
5153        ___E: ::fidl_next::Encoder + ?Sized,
5154    {
5155        #[inline]
5156        fn encode(
5157            mut self,
5158            encoder: &mut ___E,
5159            out: &mut ::core::mem::MaybeUninit<
5160                crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'static>,
5161            >,
5162            _: (),
5163        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5164            ::fidl_next::munge!(let crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest { table } = out);
5165
5166            let max_ord = self.__max_ordinal();
5167
5168            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5169            ::fidl_next::Wire::zero_padding(&mut out);
5170
5171            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5172                ::fidl_next::wire::Envelope,
5173            >(encoder, max_ord);
5174
5175            for i in 1..=max_ord {
5176                match i {
5177                    1 => {
5178                        if let Some(value) = self.rights_attenuation_masks.take() {
5179                            ::fidl_next::wire::Envelope::encode_value::<
5180                                ::fidl_next::wire::Vector<
5181                                    'static,
5182                                    ::fidl_next::wire::fuchsia::Rights,
5183                                >,
5184                                ___E,
5185                            >(
5186                                value, preallocated.encoder, &mut out, (64, ())
5187                            )?;
5188                        } else {
5189                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5190                        }
5191                    }
5192
5193                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5194                }
5195                unsafe {
5196                    preallocated.write_next(out.assume_init_ref());
5197                }
5198            }
5199
5200            ::fidl_next::wire::Table::encode_len(table, max_ord);
5201
5202            Ok(())
5203        }
5204    }
5205
5206    unsafe impl<'a, ___E>
5207        ::fidl_next::Encode<
5208            crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'static>,
5209            ___E,
5210        > for &'a BufferCollectionTokenGroupCreateChildrenSyncRequest
5211    where
5212        ___E: ::fidl_next::Encoder + ?Sized,
5213    {
5214        #[inline]
5215        fn encode(
5216            self,
5217            encoder: &mut ___E,
5218            out: &mut ::core::mem::MaybeUninit<
5219                crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'static>,
5220            >,
5221            _: (),
5222        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5223            ::fidl_next::munge!(let crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest { table } = out);
5224
5225            let max_ord = self.__max_ordinal();
5226
5227            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5228            ::fidl_next::Wire::zero_padding(&mut out);
5229
5230            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5231                ::fidl_next::wire::Envelope,
5232            >(encoder, max_ord);
5233
5234            for i in 1..=max_ord {
5235                match i {
5236                    1 => {
5237                        if let Some(value) = &self.rights_attenuation_masks {
5238                            ::fidl_next::wire::Envelope::encode_value::<
5239                                ::fidl_next::wire::Vector<
5240                                    'static,
5241                                    ::fidl_next::wire::fuchsia::Rights,
5242                                >,
5243                                ___E,
5244                            >(
5245                                value, preallocated.encoder, &mut out, (64, ())
5246                            )?;
5247                        } else {
5248                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5249                        }
5250                    }
5251
5252                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5253                }
5254                unsafe {
5255                    preallocated.write_next(out.assume_init_ref());
5256                }
5257            }
5258
5259            ::fidl_next::wire::Table::encode_len(table, max_ord);
5260
5261            Ok(())
5262        }
5263    }
5264
5265    impl<'de>
5266        ::fidl_next::FromWire<crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'de>>
5267        for BufferCollectionTokenGroupCreateChildrenSyncRequest
5268    {
5269        #[inline]
5270        fn from_wire(
5271            wire_: crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'de>,
5272        ) -> Self {
5273            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5274
5275            let rights_attenuation_masks = wire_.table.get(1);
5276
5277            Self {
5278
5279
5280                rights_attenuation_masks: rights_attenuation_masks.map(|envelope| ::fidl_next::FromWire::from_wire(
5281                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>>() }
5282                )),
5283
5284        }
5285        }
5286    }
5287
5288    impl<'de>
5289        ::fidl_next::FromWireRef<
5290            crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'de>,
5291        > for BufferCollectionTokenGroupCreateChildrenSyncRequest
5292    {
5293        #[inline]
5294        fn from_wire_ref(
5295            wire: &crate::wire::BufferCollectionTokenGroupCreateChildrenSyncRequest<'de>,
5296        ) -> Self {
5297            Self {
5298
5299
5300                rights_attenuation_masks: wire.table.get(1)
5301                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5302                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>>() }
5303                    )),
5304
5305        }
5306        }
5307    }
5308
5309    #[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"]
5310    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5311    pub struct FormatCostKey {
5312        pub pixel_format:
5313            ::core::option::Option<::fidl_next_common_fuchsia_images2::natural::PixelFormat>,
5314
5315        pub pixel_format_modifier: ::core::option::Option<
5316            ::fidl_next_common_fuchsia_images2::natural::PixelFormatModifier,
5317        >,
5318
5319        pub buffer_usage_bits: ::core::option::Option<crate::natural::BufferUsage>,
5320    }
5321
5322    impl FormatCostKey {
5323        fn __max_ordinal(&self) -> usize {
5324            if self.buffer_usage_bits.is_some() {
5325                return 3;
5326            }
5327
5328            if self.pixel_format_modifier.is_some() {
5329                return 2;
5330            }
5331
5332            if self.pixel_format.is_some() {
5333                return 1;
5334            }
5335
5336            0
5337        }
5338    }
5339
5340    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FormatCostKey<'static>, ___E> for FormatCostKey
5341    where
5342        ___E: ::fidl_next::Encoder + ?Sized,
5343    {
5344        #[inline]
5345        fn encode(
5346            mut self,
5347            encoder: &mut ___E,
5348            out: &mut ::core::mem::MaybeUninit<crate::wire::FormatCostKey<'static>>,
5349            _: (),
5350        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5351            ::fidl_next::munge!(let crate::wire::FormatCostKey { table } = out);
5352
5353            let max_ord = self.__max_ordinal();
5354
5355            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5356            ::fidl_next::Wire::zero_padding(&mut out);
5357
5358            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5359                ::fidl_next::wire::Envelope,
5360            >(encoder, max_ord);
5361
5362            for i in 1..=max_ord {
5363                match i {
5364                    3 => {
5365                        if let Some(value) = self.buffer_usage_bits.take() {
5366                            ::fidl_next::wire::Envelope::encode_value::<
5367                                crate::wire::BufferUsage<'static>,
5368                                ___E,
5369                            >(
5370                                value, preallocated.encoder, &mut out, ()
5371                            )?;
5372                        } else {
5373                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5374                        }
5375                    }
5376
5377                    2 => {
5378                        if let Some(value) = self.pixel_format_modifier.take() {
5379                            ::fidl_next::wire::Envelope::encode_value::<
5380                                ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
5381                                ___E,
5382                            >(
5383                                value, preallocated.encoder, &mut out, ()
5384                            )?;
5385                        } else {
5386                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5387                        }
5388                    }
5389
5390                    1 => {
5391                        if let Some(value) = self.pixel_format.take() {
5392                            ::fidl_next::wire::Envelope::encode_value::<
5393                                ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
5394                                ___E,
5395                            >(
5396                                value, preallocated.encoder, &mut out, ()
5397                            )?;
5398                        } else {
5399                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5400                        }
5401                    }
5402
5403                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5404                }
5405                unsafe {
5406                    preallocated.write_next(out.assume_init_ref());
5407                }
5408            }
5409
5410            ::fidl_next::wire::Table::encode_len(table, max_ord);
5411
5412            Ok(())
5413        }
5414    }
5415
5416    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FormatCostKey<'static>, ___E>
5417        for &'a FormatCostKey
5418    where
5419        ___E: ::fidl_next::Encoder + ?Sized,
5420    {
5421        #[inline]
5422        fn encode(
5423            self,
5424            encoder: &mut ___E,
5425            out: &mut ::core::mem::MaybeUninit<crate::wire::FormatCostKey<'static>>,
5426            _: (),
5427        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5428            ::fidl_next::munge!(let crate::wire::FormatCostKey { table } = out);
5429
5430            let max_ord = self.__max_ordinal();
5431
5432            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5433            ::fidl_next::Wire::zero_padding(&mut out);
5434
5435            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5436                ::fidl_next::wire::Envelope,
5437            >(encoder, max_ord);
5438
5439            for i in 1..=max_ord {
5440                match i {
5441                    3 => {
5442                        if let Some(value) = &self.buffer_usage_bits {
5443                            ::fidl_next::wire::Envelope::encode_value::<
5444                                crate::wire::BufferUsage<'static>,
5445                                ___E,
5446                            >(
5447                                value, preallocated.encoder, &mut out, ()
5448                            )?;
5449                        } else {
5450                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5451                        }
5452                    }
5453
5454                    2 => {
5455                        if let Some(value) = &self.pixel_format_modifier {
5456                            ::fidl_next::wire::Envelope::encode_value::<
5457                                ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
5458                                ___E,
5459                            >(
5460                                value, preallocated.encoder, &mut out, ()
5461                            )?;
5462                        } else {
5463                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5464                        }
5465                    }
5466
5467                    1 => {
5468                        if let Some(value) = &self.pixel_format {
5469                            ::fidl_next::wire::Envelope::encode_value::<
5470                                ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
5471                                ___E,
5472                            >(
5473                                value, preallocated.encoder, &mut out, ()
5474                            )?;
5475                        } else {
5476                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5477                        }
5478                    }
5479
5480                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5481                }
5482                unsafe {
5483                    preallocated.write_next(out.assume_init_ref());
5484                }
5485            }
5486
5487            ::fidl_next::wire::Table::encode_len(table, max_ord);
5488
5489            Ok(())
5490        }
5491    }
5492
5493    impl<'de> ::fidl_next::FromWire<crate::wire::FormatCostKey<'de>> for FormatCostKey {
5494        #[inline]
5495        fn from_wire(wire_: crate::wire::FormatCostKey<'de>) -> Self {
5496            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5497
5498            let pixel_format = wire_.table.get(1);
5499
5500            let pixel_format_modifier = wire_.table.get(2);
5501
5502            let buffer_usage_bits = wire_.table.get(3);
5503
5504            Self {
5505
5506
5507                pixel_format: pixel_format.map(|envelope| ::fidl_next::FromWire::from_wire(
5508                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormat>() }
5509                )),
5510
5511
5512                pixel_format_modifier: pixel_format_modifier.map(|envelope| ::fidl_next::FromWire::from_wire(
5513                    unsafe { envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>() }
5514                )),
5515
5516
5517                buffer_usage_bits: buffer_usage_bits.map(|envelope| ::fidl_next::FromWire::from_wire(
5518                    unsafe { envelope.read_unchecked::<crate::wire::BufferUsage<'de>>() }
5519                )),
5520
5521        }
5522        }
5523    }
5524
5525    impl<'de> ::fidl_next::FromWireRef<crate::wire::FormatCostKey<'de>> for FormatCostKey {
5526        #[inline]
5527        fn from_wire_ref(wire: &crate::wire::FormatCostKey<'de>) -> Self {
5528            Self {
5529
5530
5531                pixel_format: wire.table.get(1)
5532                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5533                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormat>() }
5534                    )),
5535
5536
5537                pixel_format_modifier: wire.table.get(2)
5538                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5539                        unsafe { envelope.deref_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>() }
5540                    )),
5541
5542
5543                buffer_usage_bits: wire.table.get(3)
5544                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5545                        unsafe { envelope.deref_unchecked::<crate::wire::BufferUsage<'de>>() }
5546                    )),
5547
5548        }
5549        }
5550    }
5551
5552    #[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"]
5553    #[derive(Debug, Default, Copy, Clone, PartialEq, PartialOrd)]
5554    pub struct FormatCostEntry {
5555        pub key: ::core::option::Option<crate::natural::FormatCostKey>,
5556
5557        pub cost: ::core::option::Option<f32>,
5558    }
5559
5560    impl FormatCostEntry {
5561        fn __max_ordinal(&self) -> usize {
5562            if self.cost.is_some() {
5563                return 2;
5564            }
5565
5566            if self.key.is_some() {
5567                return 1;
5568            }
5569
5570            0
5571        }
5572    }
5573
5574    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FormatCostEntry<'static>, ___E>
5575        for FormatCostEntry
5576    where
5577        ___E: ::fidl_next::Encoder + ?Sized,
5578    {
5579        #[inline]
5580        fn encode(
5581            mut self,
5582            encoder: &mut ___E,
5583            out: &mut ::core::mem::MaybeUninit<crate::wire::FormatCostEntry<'static>>,
5584            _: (),
5585        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5586            ::fidl_next::munge!(let crate::wire::FormatCostEntry { table } = out);
5587
5588            let max_ord = self.__max_ordinal();
5589
5590            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5591            ::fidl_next::Wire::zero_padding(&mut out);
5592
5593            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5594                ::fidl_next::wire::Envelope,
5595            >(encoder, max_ord);
5596
5597            for i in 1..=max_ord {
5598                match i {
5599                    2 => {
5600                        if let Some(value) = self.cost.take() {
5601                            ::fidl_next::wire::Envelope::encode_value::<
5602                                ::fidl_next::wire::Float32,
5603                                ___E,
5604                            >(
5605                                value, preallocated.encoder, &mut out, ()
5606                            )?;
5607                        } else {
5608                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5609                        }
5610                    }
5611
5612                    1 => {
5613                        if let Some(value) = self.key.take() {
5614                            ::fidl_next::wire::Envelope::encode_value::<
5615                                crate::wire::FormatCostKey<'static>,
5616                                ___E,
5617                            >(
5618                                value, preallocated.encoder, &mut out, ()
5619                            )?;
5620                        } else {
5621                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5622                        }
5623                    }
5624
5625                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5626                }
5627                unsafe {
5628                    preallocated.write_next(out.assume_init_ref());
5629                }
5630            }
5631
5632            ::fidl_next::wire::Table::encode_len(table, max_ord);
5633
5634            Ok(())
5635        }
5636    }
5637
5638    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FormatCostEntry<'static>, ___E>
5639        for &'a FormatCostEntry
5640    where
5641        ___E: ::fidl_next::Encoder + ?Sized,
5642    {
5643        #[inline]
5644        fn encode(
5645            self,
5646            encoder: &mut ___E,
5647            out: &mut ::core::mem::MaybeUninit<crate::wire::FormatCostEntry<'static>>,
5648            _: (),
5649        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5650            ::fidl_next::munge!(let crate::wire::FormatCostEntry { table } = out);
5651
5652            let max_ord = self.__max_ordinal();
5653
5654            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5655            ::fidl_next::Wire::zero_padding(&mut out);
5656
5657            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5658                ::fidl_next::wire::Envelope,
5659            >(encoder, max_ord);
5660
5661            for i in 1..=max_ord {
5662                match i {
5663                    2 => {
5664                        if let Some(value) = &self.cost {
5665                            ::fidl_next::wire::Envelope::encode_value::<
5666                                ::fidl_next::wire::Float32,
5667                                ___E,
5668                            >(
5669                                value, preallocated.encoder, &mut out, ()
5670                            )?;
5671                        } else {
5672                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5673                        }
5674                    }
5675
5676                    1 => {
5677                        if let Some(value) = &self.key {
5678                            ::fidl_next::wire::Envelope::encode_value::<
5679                                crate::wire::FormatCostKey<'static>,
5680                                ___E,
5681                            >(
5682                                value, preallocated.encoder, &mut out, ()
5683                            )?;
5684                        } else {
5685                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5686                        }
5687                    }
5688
5689                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5690                }
5691                unsafe {
5692                    preallocated.write_next(out.assume_init_ref());
5693                }
5694            }
5695
5696            ::fidl_next::wire::Table::encode_len(table, max_ord);
5697
5698            Ok(())
5699        }
5700    }
5701
5702    impl<'de> ::fidl_next::FromWire<crate::wire::FormatCostEntry<'de>> for FormatCostEntry {
5703        #[inline]
5704        fn from_wire(wire_: crate::wire::FormatCostEntry<'de>) -> Self {
5705            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5706
5707            let key = wire_.table.get(1);
5708
5709            let cost = wire_.table.get(2);
5710
5711            Self {
5712                key: key.map(|envelope| {
5713                    ::fidl_next::FromWire::from_wire(unsafe {
5714                        envelope.read_unchecked::<crate::wire::FormatCostKey<'de>>()
5715                    })
5716                }),
5717
5718                cost: cost.map(|envelope| {
5719                    ::fidl_next::FromWire::from_wire(unsafe {
5720                        envelope.read_unchecked::<::fidl_next::wire::Float32>()
5721                    })
5722                }),
5723            }
5724        }
5725    }
5726
5727    impl<'de> ::fidl_next::FromWireRef<crate::wire::FormatCostEntry<'de>> for FormatCostEntry {
5728        #[inline]
5729        fn from_wire_ref(wire: &crate::wire::FormatCostEntry<'de>) -> Self {
5730            Self {
5731                key: wire.table.get(1).map(|envelope| {
5732                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5733                        envelope.deref_unchecked::<crate::wire::FormatCostKey<'de>>()
5734                    })
5735                }),
5736
5737                cost: wire.table.get(2).map(|envelope| {
5738                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
5739                        envelope.deref_unchecked::<::fidl_next::wire::Float32>()
5740                    })
5741                }),
5742            }
5743        }
5744    }
5745
5746    #[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"]
5747    #[derive(Debug, Default, Clone, PartialEq, PartialOrd)]
5748    pub struct Config {
5749        pub format_costs: ::core::option::Option<::std::vec::Vec<crate::natural::FormatCostEntry>>,
5750    }
5751
5752    impl Config {
5753        fn __max_ordinal(&self) -> usize {
5754            if self.format_costs.is_some() {
5755                return 1;
5756            }
5757
5758            0
5759        }
5760    }
5761
5762    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Config<'static>, ___E> for Config
5763    where
5764        ___E: ::fidl_next::Encoder + ?Sized,
5765    {
5766        #[inline]
5767        fn encode(
5768            mut self,
5769            encoder: &mut ___E,
5770            out: &mut ::core::mem::MaybeUninit<crate::wire::Config<'static>>,
5771            _: (),
5772        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5773            ::fidl_next::munge!(let crate::wire::Config { table } = out);
5774
5775            let max_ord = self.__max_ordinal();
5776
5777            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5778            ::fidl_next::Wire::zero_padding(&mut out);
5779
5780            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5781                ::fidl_next::wire::Envelope,
5782            >(encoder, max_ord);
5783
5784            for i in 1..=max_ord {
5785                match i {
5786                    1 => {
5787                        if let Some(value) = self.format_costs.take() {
5788                            ::fidl_next::wire::Envelope::encode_value::<
5789                                ::fidl_next::wire::Vector<
5790                                    'static,
5791                                    crate::wire::FormatCostEntry<'static>,
5792                                >,
5793                                ___E,
5794                            >(
5795                                value, preallocated.encoder, &mut out, (4294967295, ())
5796                            )?;
5797                        } else {
5798                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5799                        }
5800                    }
5801
5802                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5803                }
5804                unsafe {
5805                    preallocated.write_next(out.assume_init_ref());
5806                }
5807            }
5808
5809            ::fidl_next::wire::Table::encode_len(table, max_ord);
5810
5811            Ok(())
5812        }
5813    }
5814
5815    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Config<'static>, ___E> for &'a Config
5816    where
5817        ___E: ::fidl_next::Encoder + ?Sized,
5818    {
5819        #[inline]
5820        fn encode(
5821            self,
5822            encoder: &mut ___E,
5823            out: &mut ::core::mem::MaybeUninit<crate::wire::Config<'static>>,
5824            _: (),
5825        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5826            ::fidl_next::munge!(let crate::wire::Config { table } = out);
5827
5828            let max_ord = self.__max_ordinal();
5829
5830            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5831            ::fidl_next::Wire::zero_padding(&mut out);
5832
5833            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5834                ::fidl_next::wire::Envelope,
5835            >(encoder, max_ord);
5836
5837            for i in 1..=max_ord {
5838                match i {
5839                    1 => {
5840                        if let Some(value) = &self.format_costs {
5841                            ::fidl_next::wire::Envelope::encode_value::<
5842                                ::fidl_next::wire::Vector<
5843                                    'static,
5844                                    crate::wire::FormatCostEntry<'static>,
5845                                >,
5846                                ___E,
5847                            >(
5848                                value, preallocated.encoder, &mut out, (4294967295, ())
5849                            )?;
5850                        } else {
5851                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5852                        }
5853                    }
5854
5855                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5856                }
5857                unsafe {
5858                    preallocated.write_next(out.assume_init_ref());
5859                }
5860            }
5861
5862            ::fidl_next::wire::Table::encode_len(table, max_ord);
5863
5864            Ok(())
5865        }
5866    }
5867
5868    impl<'de> ::fidl_next::FromWire<crate::wire::Config<'de>> for Config {
5869        #[inline]
5870        fn from_wire(wire_: crate::wire::Config<'de>) -> Self {
5871            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5872
5873            let format_costs = wire_.table.get(1);
5874
5875            Self {
5876
5877
5878                format_costs: format_costs.map(|envelope| ::fidl_next::FromWire::from_wire(
5879                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>() }
5880                )),
5881
5882        }
5883        }
5884    }
5885
5886    impl<'de> ::fidl_next::FromWireRef<crate::wire::Config<'de>> for Config {
5887        #[inline]
5888        fn from_wire_ref(wire: &crate::wire::Config<'de>) -> Self {
5889            Self {
5890
5891
5892                format_costs: wire.table.get(1)
5893                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
5894                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>() }
5895                    )),
5896
5897        }
5898        }
5899    }
5900
5901    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
5902    pub struct DynamicSecureHeap {
5903        pub heap: ::core::option::Option<crate::natural::Heap>,
5904    }
5905
5906    impl DynamicSecureHeap {
5907        fn __max_ordinal(&self) -> usize {
5908            if self.heap.is_some() {
5909                return 1;
5910            }
5911
5912            0
5913        }
5914    }
5915
5916    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DynamicSecureHeap<'static>, ___E>
5917        for DynamicSecureHeap
5918    where
5919        ___E: ::fidl_next::Encoder + ?Sized,
5920    {
5921        #[inline]
5922        fn encode(
5923            mut self,
5924            encoder: &mut ___E,
5925            out: &mut ::core::mem::MaybeUninit<crate::wire::DynamicSecureHeap<'static>>,
5926            _: (),
5927        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5928            ::fidl_next::munge!(let crate::wire::DynamicSecureHeap { table } = out);
5929
5930            let max_ord = self.__max_ordinal();
5931
5932            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5933            ::fidl_next::Wire::zero_padding(&mut out);
5934
5935            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5936                ::fidl_next::wire::Envelope,
5937            >(encoder, max_ord);
5938
5939            for i in 1..=max_ord {
5940                match i {
5941                    1 => {
5942                        if let Some(value) = self.heap.take() {
5943                            ::fidl_next::wire::Envelope::encode_value::<
5944                                crate::wire::Heap<'static>,
5945                                ___E,
5946                            >(
5947                                value, preallocated.encoder, &mut out, ()
5948                            )?;
5949                        } else {
5950                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
5951                        }
5952                    }
5953
5954                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
5955                }
5956                unsafe {
5957                    preallocated.write_next(out.assume_init_ref());
5958                }
5959            }
5960
5961            ::fidl_next::wire::Table::encode_len(table, max_ord);
5962
5963            Ok(())
5964        }
5965    }
5966
5967    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DynamicSecureHeap<'static>, ___E>
5968        for &'a DynamicSecureHeap
5969    where
5970        ___E: ::fidl_next::Encoder + ?Sized,
5971    {
5972        #[inline]
5973        fn encode(
5974            self,
5975            encoder: &mut ___E,
5976            out: &mut ::core::mem::MaybeUninit<crate::wire::DynamicSecureHeap<'static>>,
5977            _: (),
5978        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5979            ::fidl_next::munge!(let crate::wire::DynamicSecureHeap { table } = out);
5980
5981            let max_ord = self.__max_ordinal();
5982
5983            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
5984            ::fidl_next::Wire::zero_padding(&mut out);
5985
5986            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
5987                ::fidl_next::wire::Envelope,
5988            >(encoder, max_ord);
5989
5990            for i in 1..=max_ord {
5991                match i {
5992                    1 => {
5993                        if let Some(value) = &self.heap {
5994                            ::fidl_next::wire::Envelope::encode_value::<
5995                                crate::wire::Heap<'static>,
5996                                ___E,
5997                            >(
5998                                value, preallocated.encoder, &mut out, ()
5999                            )?;
6000                        } else {
6001                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6002                        }
6003                    }
6004
6005                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6006                }
6007                unsafe {
6008                    preallocated.write_next(out.assume_init_ref());
6009                }
6010            }
6011
6012            ::fidl_next::wire::Table::encode_len(table, max_ord);
6013
6014            Ok(())
6015        }
6016    }
6017
6018    impl<'de> ::fidl_next::FromWire<crate::wire::DynamicSecureHeap<'de>> for DynamicSecureHeap {
6019        #[inline]
6020        fn from_wire(wire_: crate::wire::DynamicSecureHeap<'de>) -> Self {
6021            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6022
6023            let heap = wire_.table.get(1);
6024
6025            Self {
6026                heap: heap.map(|envelope| {
6027                    ::fidl_next::FromWire::from_wire(unsafe {
6028                        envelope.read_unchecked::<crate::wire::Heap<'de>>()
6029                    })
6030                }),
6031            }
6032        }
6033    }
6034
6035    impl<'de> ::fidl_next::FromWireRef<crate::wire::DynamicSecureHeap<'de>> for DynamicSecureHeap {
6036        #[inline]
6037        fn from_wire_ref(wire: &crate::wire::DynamicSecureHeap<'de>) -> Self {
6038            Self {
6039                heap: wire.table.get(1).map(|envelope| {
6040                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6041                        envelope.deref_unchecked::<crate::wire::Heap<'de>>()
6042                    })
6043                }),
6044            }
6045        }
6046    }
6047
6048    #[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"]
6049    #[derive(Debug, Default, Clone, PartialEq, PartialOrd)]
6050    pub struct FormatCosts {
6051        pub format_costs: ::core::option::Option<::std::vec::Vec<crate::natural::FormatCostEntry>>,
6052    }
6053
6054    impl FormatCosts {
6055        fn __max_ordinal(&self) -> usize {
6056            if self.format_costs.is_some() {
6057                return 1;
6058            }
6059
6060            0
6061        }
6062    }
6063
6064    unsafe impl<___E> ::fidl_next::Encode<crate::wire::FormatCosts<'static>, ___E> for FormatCosts
6065    where
6066        ___E: ::fidl_next::Encoder + ?Sized,
6067    {
6068        #[inline]
6069        fn encode(
6070            mut self,
6071            encoder: &mut ___E,
6072            out: &mut ::core::mem::MaybeUninit<crate::wire::FormatCosts<'static>>,
6073            _: (),
6074        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6075            ::fidl_next::munge!(let crate::wire::FormatCosts { table } = out);
6076
6077            let max_ord = self.__max_ordinal();
6078
6079            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6080            ::fidl_next::Wire::zero_padding(&mut out);
6081
6082            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6083                ::fidl_next::wire::Envelope,
6084            >(encoder, max_ord);
6085
6086            for i in 1..=max_ord {
6087                match i {
6088                    1 => {
6089                        if let Some(value) = self.format_costs.take() {
6090                            ::fidl_next::wire::Envelope::encode_value::<
6091                                ::fidl_next::wire::Vector<
6092                                    'static,
6093                                    crate::wire::FormatCostEntry<'static>,
6094                                >,
6095                                ___E,
6096                            >(
6097                                value, preallocated.encoder, &mut out, (4294967295, ())
6098                            )?;
6099                        } else {
6100                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6101                        }
6102                    }
6103
6104                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6105                }
6106                unsafe {
6107                    preallocated.write_next(out.assume_init_ref());
6108                }
6109            }
6110
6111            ::fidl_next::wire::Table::encode_len(table, max_ord);
6112
6113            Ok(())
6114        }
6115    }
6116
6117    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::FormatCosts<'static>, ___E>
6118        for &'a FormatCosts
6119    where
6120        ___E: ::fidl_next::Encoder + ?Sized,
6121    {
6122        #[inline]
6123        fn encode(
6124            self,
6125            encoder: &mut ___E,
6126            out: &mut ::core::mem::MaybeUninit<crate::wire::FormatCosts<'static>>,
6127            _: (),
6128        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6129            ::fidl_next::munge!(let crate::wire::FormatCosts { table } = out);
6130
6131            let max_ord = self.__max_ordinal();
6132
6133            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6134            ::fidl_next::Wire::zero_padding(&mut out);
6135
6136            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6137                ::fidl_next::wire::Envelope,
6138            >(encoder, max_ord);
6139
6140            for i in 1..=max_ord {
6141                match i {
6142                    1 => {
6143                        if let Some(value) = &self.format_costs {
6144                            ::fidl_next::wire::Envelope::encode_value::<
6145                                ::fidl_next::wire::Vector<
6146                                    'static,
6147                                    crate::wire::FormatCostEntry<'static>,
6148                                >,
6149                                ___E,
6150                            >(
6151                                value, preallocated.encoder, &mut out, (4294967295, ())
6152                            )?;
6153                        } else {
6154                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6155                        }
6156                    }
6157
6158                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6159                }
6160                unsafe {
6161                    preallocated.write_next(out.assume_init_ref());
6162                }
6163            }
6164
6165            ::fidl_next::wire::Table::encode_len(table, max_ord);
6166
6167            Ok(())
6168        }
6169    }
6170
6171    impl<'de> ::fidl_next::FromWire<crate::wire::FormatCosts<'de>> for FormatCosts {
6172        #[inline]
6173        fn from_wire(wire_: crate::wire::FormatCosts<'de>) -> Self {
6174            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6175
6176            let format_costs = wire_.table.get(1);
6177
6178            Self {
6179
6180
6181                format_costs: format_costs.map(|envelope| ::fidl_next::FromWire::from_wire(
6182                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>() }
6183                )),
6184
6185        }
6186        }
6187    }
6188
6189    impl<'de> ::fidl_next::FromWireRef<crate::wire::FormatCosts<'de>> for FormatCosts {
6190        #[inline]
6191        fn from_wire_ref(wire: &crate::wire::FormatCosts<'de>) -> Self {
6192            Self {
6193
6194
6195                format_costs: wire.table.get(1)
6196                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
6197                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>() }
6198                    )),
6199
6200        }
6201        }
6202    }
6203
6204    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6205    pub struct SecureHeapRange {
6206        pub physical_address: ::core::option::Option<u64>,
6207
6208        pub size_bytes: ::core::option::Option<u64>,
6209    }
6210
6211    impl SecureHeapRange {
6212        fn __max_ordinal(&self) -> usize {
6213            if self.size_bytes.is_some() {
6214                return 2;
6215            }
6216
6217            if self.physical_address.is_some() {
6218                return 1;
6219            }
6220
6221            0
6222        }
6223    }
6224
6225    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SecureHeapRange<'static>, ___E>
6226        for SecureHeapRange
6227    where
6228        ___E: ::fidl_next::Encoder + ?Sized,
6229    {
6230        #[inline]
6231        fn encode(
6232            mut self,
6233            encoder: &mut ___E,
6234            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapRange<'static>>,
6235            _: (),
6236        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6237            ::fidl_next::munge!(let crate::wire::SecureHeapRange { table } = out);
6238
6239            let max_ord = self.__max_ordinal();
6240
6241            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6242            ::fidl_next::Wire::zero_padding(&mut out);
6243
6244            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6245                ::fidl_next::wire::Envelope,
6246            >(encoder, max_ord);
6247
6248            for i in 1..=max_ord {
6249                match i {
6250                    2 => {
6251                        if let Some(value) = self.size_bytes.take() {
6252                            ::fidl_next::wire::Envelope::encode_value::<
6253                                ::fidl_next::wire::Uint64,
6254                                ___E,
6255                            >(
6256                                value, preallocated.encoder, &mut out, ()
6257                            )?;
6258                        } else {
6259                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6260                        }
6261                    }
6262
6263                    1 => {
6264                        if let Some(value) = self.physical_address.take() {
6265                            ::fidl_next::wire::Envelope::encode_value::<
6266                                ::fidl_next::wire::Uint64,
6267                                ___E,
6268                            >(
6269                                value, preallocated.encoder, &mut out, ()
6270                            )?;
6271                        } else {
6272                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6273                        }
6274                    }
6275
6276                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6277                }
6278                unsafe {
6279                    preallocated.write_next(out.assume_init_ref());
6280                }
6281            }
6282
6283            ::fidl_next::wire::Table::encode_len(table, max_ord);
6284
6285            Ok(())
6286        }
6287    }
6288
6289    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SecureHeapRange<'static>, ___E>
6290        for &'a SecureHeapRange
6291    where
6292        ___E: ::fidl_next::Encoder + ?Sized,
6293    {
6294        #[inline]
6295        fn encode(
6296            self,
6297            encoder: &mut ___E,
6298            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapRange<'static>>,
6299            _: (),
6300        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6301            ::fidl_next::munge!(let crate::wire::SecureHeapRange { table } = out);
6302
6303            let max_ord = self.__max_ordinal();
6304
6305            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6306            ::fidl_next::Wire::zero_padding(&mut out);
6307
6308            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6309                ::fidl_next::wire::Envelope,
6310            >(encoder, max_ord);
6311
6312            for i in 1..=max_ord {
6313                match i {
6314                    2 => {
6315                        if let Some(value) = &self.size_bytes {
6316                            ::fidl_next::wire::Envelope::encode_value::<
6317                                ::fidl_next::wire::Uint64,
6318                                ___E,
6319                            >(
6320                                value, preallocated.encoder, &mut out, ()
6321                            )?;
6322                        } else {
6323                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6324                        }
6325                    }
6326
6327                    1 => {
6328                        if let Some(value) = &self.physical_address {
6329                            ::fidl_next::wire::Envelope::encode_value::<
6330                                ::fidl_next::wire::Uint64,
6331                                ___E,
6332                            >(
6333                                value, preallocated.encoder, &mut out, ()
6334                            )?;
6335                        } else {
6336                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6337                        }
6338                    }
6339
6340                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6341                }
6342                unsafe {
6343                    preallocated.write_next(out.assume_init_ref());
6344                }
6345            }
6346
6347            ::fidl_next::wire::Table::encode_len(table, max_ord);
6348
6349            Ok(())
6350        }
6351    }
6352
6353    impl<'de> ::fidl_next::FromWire<crate::wire::SecureHeapRange<'de>> for SecureHeapRange {
6354        #[inline]
6355        fn from_wire(wire_: crate::wire::SecureHeapRange<'de>) -> Self {
6356            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6357
6358            let physical_address = wire_.table.get(1);
6359
6360            let size_bytes = wire_.table.get(2);
6361
6362            Self {
6363                physical_address: physical_address.map(|envelope| {
6364                    ::fidl_next::FromWire::from_wire(unsafe {
6365                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6366                    })
6367                }),
6368
6369                size_bytes: size_bytes.map(|envelope| {
6370                    ::fidl_next::FromWire::from_wire(unsafe {
6371                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
6372                    })
6373                }),
6374            }
6375        }
6376    }
6377
6378    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureHeapRange<'de>> for SecureHeapRange {
6379        #[inline]
6380        fn from_wire_ref(wire: &crate::wire::SecureHeapRange<'de>) -> Self {
6381            Self {
6382                physical_address: wire.table.get(1).map(|envelope| {
6383                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6384                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6385                    })
6386                }),
6387
6388                size_bytes: wire.table.get(2).map(|envelope| {
6389                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6390                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
6391                    })
6392                }),
6393            }
6394        }
6395    }
6396
6397    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6398    pub struct SecureHeapAndRange {
6399        pub heap: ::core::option::Option<crate::natural::Heap>,
6400
6401        pub range: ::core::option::Option<crate::natural::SecureHeapRange>,
6402    }
6403
6404    impl SecureHeapAndRange {
6405        fn __max_ordinal(&self) -> usize {
6406            if self.range.is_some() {
6407                return 2;
6408            }
6409
6410            if self.heap.is_some() {
6411                return 1;
6412            }
6413
6414            0
6415        }
6416    }
6417
6418    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SecureHeapAndRange<'static>, ___E>
6419        for SecureHeapAndRange
6420    where
6421        ___E: ::fidl_next::Encoder + ?Sized,
6422    {
6423        #[inline]
6424        fn encode(
6425            mut self,
6426            encoder: &mut ___E,
6427            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapAndRange<'static>>,
6428            _: (),
6429        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6430            ::fidl_next::munge!(let crate::wire::SecureHeapAndRange { table } = out);
6431
6432            let max_ord = self.__max_ordinal();
6433
6434            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6435            ::fidl_next::Wire::zero_padding(&mut out);
6436
6437            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6438                ::fidl_next::wire::Envelope,
6439            >(encoder, max_ord);
6440
6441            for i in 1..=max_ord {
6442                match i {
6443                    2 => {
6444                        if let Some(value) = self.range.take() {
6445                            ::fidl_next::wire::Envelope::encode_value::<
6446                                crate::wire::SecureHeapRange<'static>,
6447                                ___E,
6448                            >(
6449                                value, preallocated.encoder, &mut out, ()
6450                            )?;
6451                        } else {
6452                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6453                        }
6454                    }
6455
6456                    1 => {
6457                        if let Some(value) = self.heap.take() {
6458                            ::fidl_next::wire::Envelope::encode_value::<
6459                                crate::wire::Heap<'static>,
6460                                ___E,
6461                            >(
6462                                value, preallocated.encoder, &mut out, ()
6463                            )?;
6464                        } else {
6465                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6466                        }
6467                    }
6468
6469                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6470                }
6471                unsafe {
6472                    preallocated.write_next(out.assume_init_ref());
6473                }
6474            }
6475
6476            ::fidl_next::wire::Table::encode_len(table, max_ord);
6477
6478            Ok(())
6479        }
6480    }
6481
6482    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SecureHeapAndRange<'static>, ___E>
6483        for &'a SecureHeapAndRange
6484    where
6485        ___E: ::fidl_next::Encoder + ?Sized,
6486    {
6487        #[inline]
6488        fn encode(
6489            self,
6490            encoder: &mut ___E,
6491            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapAndRange<'static>>,
6492            _: (),
6493        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6494            ::fidl_next::munge!(let crate::wire::SecureHeapAndRange { table } = out);
6495
6496            let max_ord = self.__max_ordinal();
6497
6498            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6499            ::fidl_next::Wire::zero_padding(&mut out);
6500
6501            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6502                ::fidl_next::wire::Envelope,
6503            >(encoder, max_ord);
6504
6505            for i in 1..=max_ord {
6506                match i {
6507                    2 => {
6508                        if let Some(value) = &self.range {
6509                            ::fidl_next::wire::Envelope::encode_value::<
6510                                crate::wire::SecureHeapRange<'static>,
6511                                ___E,
6512                            >(
6513                                value, preallocated.encoder, &mut out, ()
6514                            )?;
6515                        } else {
6516                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6517                        }
6518                    }
6519
6520                    1 => {
6521                        if let Some(value) = &self.heap {
6522                            ::fidl_next::wire::Envelope::encode_value::<
6523                                crate::wire::Heap<'static>,
6524                                ___E,
6525                            >(
6526                                value, preallocated.encoder, &mut out, ()
6527                            )?;
6528                        } else {
6529                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6530                        }
6531                    }
6532
6533                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6534                }
6535                unsafe {
6536                    preallocated.write_next(out.assume_init_ref());
6537                }
6538            }
6539
6540            ::fidl_next::wire::Table::encode_len(table, max_ord);
6541
6542            Ok(())
6543        }
6544    }
6545
6546    impl<'de> ::fidl_next::FromWire<crate::wire::SecureHeapAndRange<'de>> for SecureHeapAndRange {
6547        #[inline]
6548        fn from_wire(wire_: crate::wire::SecureHeapAndRange<'de>) -> Self {
6549            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6550
6551            let heap = wire_.table.get(1);
6552
6553            let range = wire_.table.get(2);
6554
6555            Self {
6556                heap: heap.map(|envelope| {
6557                    ::fidl_next::FromWire::from_wire(unsafe {
6558                        envelope.read_unchecked::<crate::wire::Heap<'de>>()
6559                    })
6560                }),
6561
6562                range: range.map(|envelope| {
6563                    ::fidl_next::FromWire::from_wire(unsafe {
6564                        envelope.read_unchecked::<crate::wire::SecureHeapRange<'de>>()
6565                    })
6566                }),
6567            }
6568        }
6569    }
6570
6571    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureHeapAndRange<'de>> for SecureHeapAndRange {
6572        #[inline]
6573        fn from_wire_ref(wire: &crate::wire::SecureHeapAndRange<'de>) -> Self {
6574            Self {
6575                heap: wire.table.get(1).map(|envelope| {
6576                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6577                        envelope.deref_unchecked::<crate::wire::Heap<'de>>()
6578                    })
6579                }),
6580
6581                range: wire.table.get(2).map(|envelope| {
6582                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6583                        envelope.deref_unchecked::<crate::wire::SecureHeapRange<'de>>()
6584                    })
6585                }),
6586            }
6587        }
6588    }
6589
6590    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6591    pub struct SecureHeapAndRangeModification {
6592        pub heap: ::core::option::Option<crate::natural::Heap>,
6593
6594        pub old_range: ::core::option::Option<crate::natural::SecureHeapRange>,
6595
6596        pub new_range: ::core::option::Option<crate::natural::SecureHeapRange>,
6597    }
6598
6599    impl SecureHeapAndRangeModification {
6600        fn __max_ordinal(&self) -> usize {
6601            if self.new_range.is_some() {
6602                return 3;
6603            }
6604
6605            if self.old_range.is_some() {
6606                return 2;
6607            }
6608
6609            if self.heap.is_some() {
6610                return 1;
6611            }
6612
6613            0
6614        }
6615    }
6616
6617    unsafe impl<___E>
6618        ::fidl_next::Encode<crate::wire::SecureHeapAndRangeModification<'static>, ___E>
6619        for SecureHeapAndRangeModification
6620    where
6621        ___E: ::fidl_next::Encoder + ?Sized,
6622    {
6623        #[inline]
6624        fn encode(
6625            mut self,
6626            encoder: &mut ___E,
6627            out: &mut ::core::mem::MaybeUninit<
6628                crate::wire::SecureHeapAndRangeModification<'static>,
6629            >,
6630            _: (),
6631        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6632            ::fidl_next::munge!(let crate::wire::SecureHeapAndRangeModification { table } = out);
6633
6634            let max_ord = self.__max_ordinal();
6635
6636            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6637            ::fidl_next::Wire::zero_padding(&mut out);
6638
6639            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6640                ::fidl_next::wire::Envelope,
6641            >(encoder, max_ord);
6642
6643            for i in 1..=max_ord {
6644                match i {
6645                    3 => {
6646                        if let Some(value) = self.new_range.take() {
6647                            ::fidl_next::wire::Envelope::encode_value::<
6648                                crate::wire::SecureHeapRange<'static>,
6649                                ___E,
6650                            >(
6651                                value, preallocated.encoder, &mut out, ()
6652                            )?;
6653                        } else {
6654                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6655                        }
6656                    }
6657
6658                    2 => {
6659                        if let Some(value) = self.old_range.take() {
6660                            ::fidl_next::wire::Envelope::encode_value::<
6661                                crate::wire::SecureHeapRange<'static>,
6662                                ___E,
6663                            >(
6664                                value, preallocated.encoder, &mut out, ()
6665                            )?;
6666                        } else {
6667                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6668                        }
6669                    }
6670
6671                    1 => {
6672                        if let Some(value) = self.heap.take() {
6673                            ::fidl_next::wire::Envelope::encode_value::<
6674                                crate::wire::Heap<'static>,
6675                                ___E,
6676                            >(
6677                                value, preallocated.encoder, &mut out, ()
6678                            )?;
6679                        } else {
6680                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6681                        }
6682                    }
6683
6684                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6685                }
6686                unsafe {
6687                    preallocated.write_next(out.assume_init_ref());
6688                }
6689            }
6690
6691            ::fidl_next::wire::Table::encode_len(table, max_ord);
6692
6693            Ok(())
6694        }
6695    }
6696
6697    unsafe impl<'a, ___E>
6698        ::fidl_next::Encode<crate::wire::SecureHeapAndRangeModification<'static>, ___E>
6699        for &'a SecureHeapAndRangeModification
6700    where
6701        ___E: ::fidl_next::Encoder + ?Sized,
6702    {
6703        #[inline]
6704        fn encode(
6705            self,
6706            encoder: &mut ___E,
6707            out: &mut ::core::mem::MaybeUninit<
6708                crate::wire::SecureHeapAndRangeModification<'static>,
6709            >,
6710            _: (),
6711        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6712            ::fidl_next::munge!(let crate::wire::SecureHeapAndRangeModification { table } = out);
6713
6714            let max_ord = self.__max_ordinal();
6715
6716            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6717            ::fidl_next::Wire::zero_padding(&mut out);
6718
6719            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6720                ::fidl_next::wire::Envelope,
6721            >(encoder, max_ord);
6722
6723            for i in 1..=max_ord {
6724                match i {
6725                    3 => {
6726                        if let Some(value) = &self.new_range {
6727                            ::fidl_next::wire::Envelope::encode_value::<
6728                                crate::wire::SecureHeapRange<'static>,
6729                                ___E,
6730                            >(
6731                                value, preallocated.encoder, &mut out, ()
6732                            )?;
6733                        } else {
6734                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6735                        }
6736                    }
6737
6738                    2 => {
6739                        if let Some(value) = &self.old_range {
6740                            ::fidl_next::wire::Envelope::encode_value::<
6741                                crate::wire::SecureHeapRange<'static>,
6742                                ___E,
6743                            >(
6744                                value, preallocated.encoder, &mut out, ()
6745                            )?;
6746                        } else {
6747                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6748                        }
6749                    }
6750
6751                    1 => {
6752                        if let Some(value) = &self.heap {
6753                            ::fidl_next::wire::Envelope::encode_value::<
6754                                crate::wire::Heap<'static>,
6755                                ___E,
6756                            >(
6757                                value, preallocated.encoder, &mut out, ()
6758                            )?;
6759                        } else {
6760                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6761                        }
6762                    }
6763
6764                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6765                }
6766                unsafe {
6767                    preallocated.write_next(out.assume_init_ref());
6768                }
6769            }
6770
6771            ::fidl_next::wire::Table::encode_len(table, max_ord);
6772
6773            Ok(())
6774        }
6775    }
6776
6777    impl<'de> ::fidl_next::FromWire<crate::wire::SecureHeapAndRangeModification<'de>>
6778        for SecureHeapAndRangeModification
6779    {
6780        #[inline]
6781        fn from_wire(wire_: crate::wire::SecureHeapAndRangeModification<'de>) -> Self {
6782            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6783
6784            let heap = wire_.table.get(1);
6785
6786            let old_range = wire_.table.get(2);
6787
6788            let new_range = wire_.table.get(3);
6789
6790            Self {
6791                heap: heap.map(|envelope| {
6792                    ::fidl_next::FromWire::from_wire(unsafe {
6793                        envelope.read_unchecked::<crate::wire::Heap<'de>>()
6794                    })
6795                }),
6796
6797                old_range: old_range.map(|envelope| {
6798                    ::fidl_next::FromWire::from_wire(unsafe {
6799                        envelope.read_unchecked::<crate::wire::SecureHeapRange<'de>>()
6800                    })
6801                }),
6802
6803                new_range: new_range.map(|envelope| {
6804                    ::fidl_next::FromWire::from_wire(unsafe {
6805                        envelope.read_unchecked::<crate::wire::SecureHeapRange<'de>>()
6806                    })
6807                }),
6808            }
6809        }
6810    }
6811
6812    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureHeapAndRangeModification<'de>>
6813        for SecureHeapAndRangeModification
6814    {
6815        #[inline]
6816        fn from_wire_ref(wire: &crate::wire::SecureHeapAndRangeModification<'de>) -> Self {
6817            Self {
6818                heap: wire.table.get(1).map(|envelope| {
6819                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6820                        envelope.deref_unchecked::<crate::wire::Heap<'de>>()
6821                    })
6822                }),
6823
6824                old_range: wire.table.get(2).map(|envelope| {
6825                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6826                        envelope.deref_unchecked::<crate::wire::SecureHeapRange<'de>>()
6827                    })
6828                }),
6829
6830                new_range: wire.table.get(3).map(|envelope| {
6831                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
6832                        envelope.deref_unchecked::<crate::wire::SecureHeapRange<'de>>()
6833                    })
6834                }),
6835            }
6836        }
6837    }
6838
6839    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
6840    pub struct SecureHeapAndRanges {
6841        pub heap: ::core::option::Option<crate::natural::Heap>,
6842
6843        pub ranges: ::core::option::Option<::std::vec::Vec<crate::natural::SecureHeapRange>>,
6844    }
6845
6846    impl SecureHeapAndRanges {
6847        fn __max_ordinal(&self) -> usize {
6848            if self.ranges.is_some() {
6849                return 2;
6850            }
6851
6852            if self.heap.is_some() {
6853                return 1;
6854            }
6855
6856            0
6857        }
6858    }
6859
6860    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SecureHeapAndRanges<'static>, ___E>
6861        for SecureHeapAndRanges
6862    where
6863        ___E: ::fidl_next::Encoder + ?Sized,
6864    {
6865        #[inline]
6866        fn encode(
6867            mut self,
6868            encoder: &mut ___E,
6869            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapAndRanges<'static>>,
6870            _: (),
6871        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6872            ::fidl_next::munge!(let crate::wire::SecureHeapAndRanges { table } = out);
6873
6874            let max_ord = self.__max_ordinal();
6875
6876            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6877            ::fidl_next::Wire::zero_padding(&mut out);
6878
6879            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6880                ::fidl_next::wire::Envelope,
6881            >(encoder, max_ord);
6882
6883            for i in 1..=max_ord {
6884                match i {
6885                    2 => {
6886                        if let Some(value) = self.ranges.take() {
6887                            ::fidl_next::wire::Envelope::encode_value::<
6888                                ::fidl_next::wire::Vector<
6889                                    'static,
6890                                    crate::wire::SecureHeapRange<'static>,
6891                                >,
6892                                ___E,
6893                            >(
6894                                value, preallocated.encoder, &mut out, (128, ())
6895                            )?;
6896                        } else {
6897                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6898                        }
6899                    }
6900
6901                    1 => {
6902                        if let Some(value) = self.heap.take() {
6903                            ::fidl_next::wire::Envelope::encode_value::<
6904                                crate::wire::Heap<'static>,
6905                                ___E,
6906                            >(
6907                                value, preallocated.encoder, &mut out, ()
6908                            )?;
6909                        } else {
6910                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6911                        }
6912                    }
6913
6914                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6915                }
6916                unsafe {
6917                    preallocated.write_next(out.assume_init_ref());
6918                }
6919            }
6920
6921            ::fidl_next::wire::Table::encode_len(table, max_ord);
6922
6923            Ok(())
6924        }
6925    }
6926
6927    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SecureHeapAndRanges<'static>, ___E>
6928        for &'a SecureHeapAndRanges
6929    where
6930        ___E: ::fidl_next::Encoder + ?Sized,
6931    {
6932        #[inline]
6933        fn encode(
6934            self,
6935            encoder: &mut ___E,
6936            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapAndRanges<'static>>,
6937            _: (),
6938        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6939            ::fidl_next::munge!(let crate::wire::SecureHeapAndRanges { table } = out);
6940
6941            let max_ord = self.__max_ordinal();
6942
6943            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
6944            ::fidl_next::Wire::zero_padding(&mut out);
6945
6946            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
6947                ::fidl_next::wire::Envelope,
6948            >(encoder, max_ord);
6949
6950            for i in 1..=max_ord {
6951                match i {
6952                    2 => {
6953                        if let Some(value) = &self.ranges {
6954                            ::fidl_next::wire::Envelope::encode_value::<
6955                                ::fidl_next::wire::Vector<
6956                                    'static,
6957                                    crate::wire::SecureHeapRange<'static>,
6958                                >,
6959                                ___E,
6960                            >(
6961                                value, preallocated.encoder, &mut out, (128, ())
6962                            )?;
6963                        } else {
6964                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6965                        }
6966                    }
6967
6968                    1 => {
6969                        if let Some(value) = &self.heap {
6970                            ::fidl_next::wire::Envelope::encode_value::<
6971                                crate::wire::Heap<'static>,
6972                                ___E,
6973                            >(
6974                                value, preallocated.encoder, &mut out, ()
6975                            )?;
6976                        } else {
6977                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
6978                        }
6979                    }
6980
6981                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
6982                }
6983                unsafe {
6984                    preallocated.write_next(out.assume_init_ref());
6985                }
6986            }
6987
6988            ::fidl_next::wire::Table::encode_len(table, max_ord);
6989
6990            Ok(())
6991        }
6992    }
6993
6994    impl<'de> ::fidl_next::FromWire<crate::wire::SecureHeapAndRanges<'de>> for SecureHeapAndRanges {
6995        #[inline]
6996        fn from_wire(wire_: crate::wire::SecureHeapAndRanges<'de>) -> Self {
6997            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
6998
6999            let heap = wire_.table.get(1);
7000
7001            let ranges = wire_.table.get(2);
7002
7003            Self {
7004
7005
7006                heap: heap.map(|envelope| ::fidl_next::FromWire::from_wire(
7007                    unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() }
7008                )),
7009
7010
7011                ranges: ranges.map(|envelope| ::fidl_next::FromWire::from_wire(
7012                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SecureHeapRange<'de>>>() }
7013                )),
7014
7015        }
7016        }
7017    }
7018
7019    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureHeapAndRanges<'de>> for SecureHeapAndRanges {
7020        #[inline]
7021        fn from_wire_ref(wire: &crate::wire::SecureHeapAndRanges<'de>) -> Self {
7022            Self {
7023
7024
7025                heap: wire.table.get(1)
7026                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
7027                        unsafe { envelope.deref_unchecked::<crate::wire::Heap<'de>>() }
7028                    )),
7029
7030
7031                ranges: wire.table.get(2)
7032                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
7033                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SecureHeapRange<'de>>>() }
7034                    )),
7035
7036        }
7037        }
7038    }
7039
7040    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7041    pub struct SecureHeapProperties {
7042        pub heap: ::core::option::Option<crate::natural::Heap>,
7043
7044        pub dynamic_protection_ranges: ::core::option::Option<bool>,
7045
7046        pub protected_range_granularity: ::core::option::Option<u32>,
7047
7048        pub max_protected_range_count: ::core::option::Option<u64>,
7049
7050        pub is_mod_protected_range_available: ::core::option::Option<bool>,
7051    }
7052
7053    impl SecureHeapProperties {
7054        fn __max_ordinal(&self) -> usize {
7055            if self.is_mod_protected_range_available.is_some() {
7056                return 5;
7057            }
7058
7059            if self.max_protected_range_count.is_some() {
7060                return 4;
7061            }
7062
7063            if self.protected_range_granularity.is_some() {
7064                return 3;
7065            }
7066
7067            if self.dynamic_protection_ranges.is_some() {
7068                return 2;
7069            }
7070
7071            if self.heap.is_some() {
7072                return 1;
7073            }
7074
7075            0
7076        }
7077    }
7078
7079    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SecureHeapProperties<'static>, ___E>
7080        for SecureHeapProperties
7081    where
7082        ___E: ::fidl_next::Encoder + ?Sized,
7083    {
7084        #[inline]
7085        fn encode(
7086            mut self,
7087            encoder: &mut ___E,
7088            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapProperties<'static>>,
7089            _: (),
7090        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7091            ::fidl_next::munge!(let crate::wire::SecureHeapProperties { table } = out);
7092
7093            let max_ord = self.__max_ordinal();
7094
7095            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7096            ::fidl_next::Wire::zero_padding(&mut out);
7097
7098            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7099                ::fidl_next::wire::Envelope,
7100            >(encoder, max_ord);
7101
7102            for i in 1..=max_ord {
7103                match i {
7104                    5 => {
7105                        if let Some(value) = self.is_mod_protected_range_available.take() {
7106                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
7107                                value,
7108                                preallocated.encoder,
7109                                &mut out,
7110                                (),
7111                            )?;
7112                        } else {
7113                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7114                        }
7115                    }
7116
7117                    4 => {
7118                        if let Some(value) = self.max_protected_range_count.take() {
7119                            ::fidl_next::wire::Envelope::encode_value::<
7120                                ::fidl_next::wire::Uint64,
7121                                ___E,
7122                            >(
7123                                value, preallocated.encoder, &mut out, ()
7124                            )?;
7125                        } else {
7126                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7127                        }
7128                    }
7129
7130                    3 => {
7131                        if let Some(value) = self.protected_range_granularity.take() {
7132                            ::fidl_next::wire::Envelope::encode_value::<
7133                                ::fidl_next::wire::Uint32,
7134                                ___E,
7135                            >(
7136                                value, preallocated.encoder, &mut out, ()
7137                            )?;
7138                        } else {
7139                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7140                        }
7141                    }
7142
7143                    2 => {
7144                        if let Some(value) = self.dynamic_protection_ranges.take() {
7145                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
7146                                value,
7147                                preallocated.encoder,
7148                                &mut out,
7149                                (),
7150                            )?;
7151                        } else {
7152                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7153                        }
7154                    }
7155
7156                    1 => {
7157                        if let Some(value) = self.heap.take() {
7158                            ::fidl_next::wire::Envelope::encode_value::<
7159                                crate::wire::Heap<'static>,
7160                                ___E,
7161                            >(
7162                                value, preallocated.encoder, &mut out, ()
7163                            )?;
7164                        } else {
7165                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7166                        }
7167                    }
7168
7169                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7170                }
7171                unsafe {
7172                    preallocated.write_next(out.assume_init_ref());
7173                }
7174            }
7175
7176            ::fidl_next::wire::Table::encode_len(table, max_ord);
7177
7178            Ok(())
7179        }
7180    }
7181
7182    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::SecureHeapProperties<'static>, ___E>
7183        for &'a SecureHeapProperties
7184    where
7185        ___E: ::fidl_next::Encoder + ?Sized,
7186    {
7187        #[inline]
7188        fn encode(
7189            self,
7190            encoder: &mut ___E,
7191            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureHeapProperties<'static>>,
7192            _: (),
7193        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7194            ::fidl_next::munge!(let crate::wire::SecureHeapProperties { table } = out);
7195
7196            let max_ord = self.__max_ordinal();
7197
7198            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7199            ::fidl_next::Wire::zero_padding(&mut out);
7200
7201            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7202                ::fidl_next::wire::Envelope,
7203            >(encoder, max_ord);
7204
7205            for i in 1..=max_ord {
7206                match i {
7207                    5 => {
7208                        if let Some(value) = &self.is_mod_protected_range_available {
7209                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
7210                                value,
7211                                preallocated.encoder,
7212                                &mut out,
7213                                (),
7214                            )?;
7215                        } else {
7216                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7217                        }
7218                    }
7219
7220                    4 => {
7221                        if let Some(value) = &self.max_protected_range_count {
7222                            ::fidl_next::wire::Envelope::encode_value::<
7223                                ::fidl_next::wire::Uint64,
7224                                ___E,
7225                            >(
7226                                value, preallocated.encoder, &mut out, ()
7227                            )?;
7228                        } else {
7229                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7230                        }
7231                    }
7232
7233                    3 => {
7234                        if let Some(value) = &self.protected_range_granularity {
7235                            ::fidl_next::wire::Envelope::encode_value::<
7236                                ::fidl_next::wire::Uint32,
7237                                ___E,
7238                            >(
7239                                value, preallocated.encoder, &mut out, ()
7240                            )?;
7241                        } else {
7242                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7243                        }
7244                    }
7245
7246                    2 => {
7247                        if let Some(value) = &self.dynamic_protection_ranges {
7248                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
7249                                value,
7250                                preallocated.encoder,
7251                                &mut out,
7252                                (),
7253                            )?;
7254                        } else {
7255                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7256                        }
7257                    }
7258
7259                    1 => {
7260                        if let Some(value) = &self.heap {
7261                            ::fidl_next::wire::Envelope::encode_value::<
7262                                crate::wire::Heap<'static>,
7263                                ___E,
7264                            >(
7265                                value, preallocated.encoder, &mut out, ()
7266                            )?;
7267                        } else {
7268                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7269                        }
7270                    }
7271
7272                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7273                }
7274                unsafe {
7275                    preallocated.write_next(out.assume_init_ref());
7276                }
7277            }
7278
7279            ::fidl_next::wire::Table::encode_len(table, max_ord);
7280
7281            Ok(())
7282        }
7283    }
7284
7285    impl<'de> ::fidl_next::FromWire<crate::wire::SecureHeapProperties<'de>> for SecureHeapProperties {
7286        #[inline]
7287        fn from_wire(wire_: crate::wire::SecureHeapProperties<'de>) -> Self {
7288            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7289
7290            let heap = wire_.table.get(1);
7291
7292            let dynamic_protection_ranges = wire_.table.get(2);
7293
7294            let protected_range_granularity = wire_.table.get(3);
7295
7296            let max_protected_range_count = wire_.table.get(4);
7297
7298            let is_mod_protected_range_available = wire_.table.get(5);
7299
7300            Self {
7301                heap: heap.map(|envelope| {
7302                    ::fidl_next::FromWire::from_wire(unsafe {
7303                        envelope.read_unchecked::<crate::wire::Heap<'de>>()
7304                    })
7305                }),
7306
7307                dynamic_protection_ranges: dynamic_protection_ranges.map(|envelope| {
7308                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
7309                }),
7310
7311                protected_range_granularity: protected_range_granularity.map(|envelope| {
7312                    ::fidl_next::FromWire::from_wire(unsafe {
7313                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
7314                    })
7315                }),
7316
7317                max_protected_range_count: max_protected_range_count.map(|envelope| {
7318                    ::fidl_next::FromWire::from_wire(unsafe {
7319                        envelope.read_unchecked::<::fidl_next::wire::Uint64>()
7320                    })
7321                }),
7322
7323                is_mod_protected_range_available: is_mod_protected_range_available.map(
7324                    |envelope| {
7325                        ::fidl_next::FromWire::from_wire(unsafe {
7326                            envelope.read_unchecked::<bool>()
7327                        })
7328                    },
7329                ),
7330            }
7331        }
7332    }
7333
7334    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureHeapProperties<'de>>
7335        for SecureHeapProperties
7336    {
7337        #[inline]
7338        fn from_wire_ref(wire: &crate::wire::SecureHeapProperties<'de>) -> Self {
7339            Self {
7340                heap: wire.table.get(1).map(|envelope| {
7341                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7342                        envelope.deref_unchecked::<crate::wire::Heap<'de>>()
7343                    })
7344                }),
7345
7346                dynamic_protection_ranges: wire.table.get(2).map(|envelope| {
7347                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7348                        envelope.deref_unchecked::<bool>()
7349                    })
7350                }),
7351
7352                protected_range_granularity: wire.table.get(3).map(|envelope| {
7353                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7354                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
7355                    })
7356                }),
7357
7358                max_protected_range_count: wire.table.get(4).map(|envelope| {
7359                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7360                        envelope.deref_unchecked::<::fidl_next::wire::Uint64>()
7361                    })
7362                }),
7363
7364                is_mod_protected_range_available: wire.table.get(5).map(|envelope| {
7365                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7366                        envelope.deref_unchecked::<bool>()
7367                    })
7368                }),
7369            }
7370        }
7371    }
7372
7373    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7374    pub struct SecureMemGetPhysicalSecureHeapsResponse {
7375        pub heaps: ::core::option::Option<::std::vec::Vec<crate::natural::SecureHeapAndRanges>>,
7376    }
7377
7378    impl SecureMemGetPhysicalSecureHeapsResponse {
7379        fn __max_ordinal(&self) -> usize {
7380            if self.heaps.is_some() {
7381                return 1;
7382            }
7383
7384            0
7385        }
7386    }
7387
7388    unsafe impl<___E>
7389        ::fidl_next::Encode<crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'static>, ___E>
7390        for SecureMemGetPhysicalSecureHeapsResponse
7391    where
7392        ___E: ::fidl_next::Encoder + ?Sized,
7393    {
7394        #[inline]
7395        fn encode(
7396            mut self,
7397            encoder: &mut ___E,
7398            out: &mut ::core::mem::MaybeUninit<
7399                crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'static>,
7400            >,
7401            _: (),
7402        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7403            ::fidl_next::munge!(let crate::wire::SecureMemGetPhysicalSecureHeapsResponse { table } = out);
7404
7405            let max_ord = self.__max_ordinal();
7406
7407            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7408            ::fidl_next::Wire::zero_padding(&mut out);
7409
7410            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7411                ::fidl_next::wire::Envelope,
7412            >(encoder, max_ord);
7413
7414            for i in 1..=max_ord {
7415                match i {
7416                    1 => {
7417                        if let Some(value) = self.heaps.take() {
7418                            ::fidl_next::wire::Envelope::encode_value::<
7419                                ::fidl_next::wire::Vector<
7420                                    'static,
7421                                    crate::wire::SecureHeapAndRanges<'static>,
7422                                >,
7423                                ___E,
7424                            >(
7425                                value, preallocated.encoder, &mut out, (32, ())
7426                            )?;
7427                        } else {
7428                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7429                        }
7430                    }
7431
7432                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7433                }
7434                unsafe {
7435                    preallocated.write_next(out.assume_init_ref());
7436                }
7437            }
7438
7439            ::fidl_next::wire::Table::encode_len(table, max_ord);
7440
7441            Ok(())
7442        }
7443    }
7444
7445    unsafe impl<'a, ___E>
7446        ::fidl_next::Encode<crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'static>, ___E>
7447        for &'a SecureMemGetPhysicalSecureHeapsResponse
7448    where
7449        ___E: ::fidl_next::Encoder + ?Sized,
7450    {
7451        #[inline]
7452        fn encode(
7453            self,
7454            encoder: &mut ___E,
7455            out: &mut ::core::mem::MaybeUninit<
7456                crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'static>,
7457            >,
7458            _: (),
7459        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7460            ::fidl_next::munge!(let crate::wire::SecureMemGetPhysicalSecureHeapsResponse { table } = out);
7461
7462            let max_ord = self.__max_ordinal();
7463
7464            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7465            ::fidl_next::Wire::zero_padding(&mut out);
7466
7467            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7468                ::fidl_next::wire::Envelope,
7469            >(encoder, max_ord);
7470
7471            for i in 1..=max_ord {
7472                match i {
7473                    1 => {
7474                        if let Some(value) = &self.heaps {
7475                            ::fidl_next::wire::Envelope::encode_value::<
7476                                ::fidl_next::wire::Vector<
7477                                    'static,
7478                                    crate::wire::SecureHeapAndRanges<'static>,
7479                                >,
7480                                ___E,
7481                            >(
7482                                value, preallocated.encoder, &mut out, (32, ())
7483                            )?;
7484                        } else {
7485                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7486                        }
7487                    }
7488
7489                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7490                }
7491                unsafe {
7492                    preallocated.write_next(out.assume_init_ref());
7493                }
7494            }
7495
7496            ::fidl_next::wire::Table::encode_len(table, max_ord);
7497
7498            Ok(())
7499        }
7500    }
7501
7502    impl<'de> ::fidl_next::FromWire<crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'de>>
7503        for SecureMemGetPhysicalSecureHeapsResponse
7504    {
7505        #[inline]
7506        fn from_wire(wire_: crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'de>) -> Self {
7507            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7508
7509            let heaps = wire_.table.get(1);
7510
7511            Self {
7512                heaps: heaps.map(|envelope| {
7513                    ::fidl_next::FromWire::from_wire(unsafe {
7514                        envelope.read_unchecked::<::fidl_next::wire::Vector<
7515                                'de,
7516                                crate::wire::SecureHeapAndRanges<'de>,
7517                            >>()
7518                    })
7519                }),
7520            }
7521        }
7522    }
7523
7524    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'de>>
7525        for SecureMemGetPhysicalSecureHeapsResponse
7526    {
7527        #[inline]
7528        fn from_wire_ref(wire: &crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'de>) -> Self {
7529            Self {
7530                heaps: wire.table.get(1).map(|envelope| {
7531                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7532                        envelope.deref_unchecked::<::fidl_next::wire::Vector<
7533                                'de,
7534                                crate::wire::SecureHeapAndRanges<'de>,
7535                            >>()
7536                    })
7537                }),
7538            }
7539        }
7540    }
7541
7542    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7543    pub struct SecureMemGetDynamicSecureHeapsResponse {
7544        pub heaps: ::core::option::Option<::std::vec::Vec<crate::natural::DynamicSecureHeap>>,
7545    }
7546
7547    impl SecureMemGetDynamicSecureHeapsResponse {
7548        fn __max_ordinal(&self) -> usize {
7549            if self.heaps.is_some() {
7550                return 1;
7551            }
7552
7553            0
7554        }
7555    }
7556
7557    unsafe impl<___E>
7558        ::fidl_next::Encode<crate::wire::SecureMemGetDynamicSecureHeapsResponse<'static>, ___E>
7559        for SecureMemGetDynamicSecureHeapsResponse
7560    where
7561        ___E: ::fidl_next::Encoder + ?Sized,
7562    {
7563        #[inline]
7564        fn encode(
7565            mut self,
7566            encoder: &mut ___E,
7567            out: &mut ::core::mem::MaybeUninit<
7568                crate::wire::SecureMemGetDynamicSecureHeapsResponse<'static>,
7569            >,
7570            _: (),
7571        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7572            ::fidl_next::munge!(let crate::wire::SecureMemGetDynamicSecureHeapsResponse { table } = out);
7573
7574            let max_ord = self.__max_ordinal();
7575
7576            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7577            ::fidl_next::Wire::zero_padding(&mut out);
7578
7579            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7580                ::fidl_next::wire::Envelope,
7581            >(encoder, max_ord);
7582
7583            for i in 1..=max_ord {
7584                match i {
7585                    1 => {
7586                        if let Some(value) = self.heaps.take() {
7587                            ::fidl_next::wire::Envelope::encode_value::<
7588                                ::fidl_next::wire::Vector<
7589                                    'static,
7590                                    crate::wire::DynamicSecureHeap<'static>,
7591                                >,
7592                                ___E,
7593                            >(
7594                                value, preallocated.encoder, &mut out, (32, ())
7595                            )?;
7596                        } else {
7597                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7598                        }
7599                    }
7600
7601                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7602                }
7603                unsafe {
7604                    preallocated.write_next(out.assume_init_ref());
7605                }
7606            }
7607
7608            ::fidl_next::wire::Table::encode_len(table, max_ord);
7609
7610            Ok(())
7611        }
7612    }
7613
7614    unsafe impl<'a, ___E>
7615        ::fidl_next::Encode<crate::wire::SecureMemGetDynamicSecureHeapsResponse<'static>, ___E>
7616        for &'a SecureMemGetDynamicSecureHeapsResponse
7617    where
7618        ___E: ::fidl_next::Encoder + ?Sized,
7619    {
7620        #[inline]
7621        fn encode(
7622            self,
7623            encoder: &mut ___E,
7624            out: &mut ::core::mem::MaybeUninit<
7625                crate::wire::SecureMemGetDynamicSecureHeapsResponse<'static>,
7626            >,
7627            _: (),
7628        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7629            ::fidl_next::munge!(let crate::wire::SecureMemGetDynamicSecureHeapsResponse { table } = out);
7630
7631            let max_ord = self.__max_ordinal();
7632
7633            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7634            ::fidl_next::Wire::zero_padding(&mut out);
7635
7636            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7637                ::fidl_next::wire::Envelope,
7638            >(encoder, max_ord);
7639
7640            for i in 1..=max_ord {
7641                match i {
7642                    1 => {
7643                        if let Some(value) = &self.heaps {
7644                            ::fidl_next::wire::Envelope::encode_value::<
7645                                ::fidl_next::wire::Vector<
7646                                    'static,
7647                                    crate::wire::DynamicSecureHeap<'static>,
7648                                >,
7649                                ___E,
7650                            >(
7651                                value, preallocated.encoder, &mut out, (32, ())
7652                            )?;
7653                        } else {
7654                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7655                        }
7656                    }
7657
7658                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7659                }
7660                unsafe {
7661                    preallocated.write_next(out.assume_init_ref());
7662                }
7663            }
7664
7665            ::fidl_next::wire::Table::encode_len(table, max_ord);
7666
7667            Ok(())
7668        }
7669    }
7670
7671    impl<'de> ::fidl_next::FromWire<crate::wire::SecureMemGetDynamicSecureHeapsResponse<'de>>
7672        for SecureMemGetDynamicSecureHeapsResponse
7673    {
7674        #[inline]
7675        fn from_wire(wire_: crate::wire::SecureMemGetDynamicSecureHeapsResponse<'de>) -> Self {
7676            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7677
7678            let heaps = wire_.table.get(1);
7679
7680            Self {
7681
7682
7683                heaps: heaps.map(|envelope| ::fidl_next::FromWire::from_wire(
7684                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::DynamicSecureHeap<'de>>>() }
7685                )),
7686
7687        }
7688        }
7689    }
7690
7691    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureMemGetDynamicSecureHeapsResponse<'de>>
7692        for SecureMemGetDynamicSecureHeapsResponse
7693    {
7694        #[inline]
7695        fn from_wire_ref(wire: &crate::wire::SecureMemGetDynamicSecureHeapsResponse<'de>) -> Self {
7696            Self {
7697
7698
7699                heaps: wire.table.get(1)
7700                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
7701                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::DynamicSecureHeap<'de>>>() }
7702                    )),
7703
7704        }
7705        }
7706    }
7707
7708    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7709    pub struct SecureMemGetPhysicalSecureHeapPropertiesRequest {
7710        pub entire_heap: ::core::option::Option<crate::natural::SecureHeapAndRange>,
7711    }
7712
7713    impl SecureMemGetPhysicalSecureHeapPropertiesRequest {
7714        fn __max_ordinal(&self) -> usize {
7715            if self.entire_heap.is_some() {
7716                return 1;
7717            }
7718
7719            0
7720        }
7721    }
7722
7723    unsafe impl<___E>
7724        ::fidl_next::Encode<
7725            crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'static>,
7726            ___E,
7727        > for SecureMemGetPhysicalSecureHeapPropertiesRequest
7728    where
7729        ___E: ::fidl_next::Encoder + ?Sized,
7730    {
7731        #[inline]
7732        fn encode(
7733            mut self,
7734            encoder: &mut ___E,
7735            out: &mut ::core::mem::MaybeUninit<
7736                crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'static>,
7737            >,
7738            _: (),
7739        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7740            ::fidl_next::munge!(let crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest { table } = out);
7741
7742            let max_ord = self.__max_ordinal();
7743
7744            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7745            ::fidl_next::Wire::zero_padding(&mut out);
7746
7747            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7748                ::fidl_next::wire::Envelope,
7749            >(encoder, max_ord);
7750
7751            for i in 1..=max_ord {
7752                match i {
7753                    1 => {
7754                        if let Some(value) = self.entire_heap.take() {
7755                            ::fidl_next::wire::Envelope::encode_value::<
7756                                crate::wire::SecureHeapAndRange<'static>,
7757                                ___E,
7758                            >(
7759                                value, preallocated.encoder, &mut out, ()
7760                            )?;
7761                        } else {
7762                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7763                        }
7764                    }
7765
7766                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7767                }
7768                unsafe {
7769                    preallocated.write_next(out.assume_init_ref());
7770                }
7771            }
7772
7773            ::fidl_next::wire::Table::encode_len(table, max_ord);
7774
7775            Ok(())
7776        }
7777    }
7778
7779    unsafe impl<'a, ___E>
7780        ::fidl_next::Encode<
7781            crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'static>,
7782            ___E,
7783        > for &'a SecureMemGetPhysicalSecureHeapPropertiesRequest
7784    where
7785        ___E: ::fidl_next::Encoder + ?Sized,
7786    {
7787        #[inline]
7788        fn encode(
7789            self,
7790            encoder: &mut ___E,
7791            out: &mut ::core::mem::MaybeUninit<
7792                crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'static>,
7793            >,
7794            _: (),
7795        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7796            ::fidl_next::munge!(let crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest { table } = out);
7797
7798            let max_ord = self.__max_ordinal();
7799
7800            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7801            ::fidl_next::Wire::zero_padding(&mut out);
7802
7803            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7804                ::fidl_next::wire::Envelope,
7805            >(encoder, max_ord);
7806
7807            for i in 1..=max_ord {
7808                match i {
7809                    1 => {
7810                        if let Some(value) = &self.entire_heap {
7811                            ::fidl_next::wire::Envelope::encode_value::<
7812                                crate::wire::SecureHeapAndRange<'static>,
7813                                ___E,
7814                            >(
7815                                value, preallocated.encoder, &mut out, ()
7816                            )?;
7817                        } else {
7818                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7819                        }
7820                    }
7821
7822                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7823                }
7824                unsafe {
7825                    preallocated.write_next(out.assume_init_ref());
7826                }
7827            }
7828
7829            ::fidl_next::wire::Table::encode_len(table, max_ord);
7830
7831            Ok(())
7832        }
7833    }
7834
7835    impl<'de>
7836        ::fidl_next::FromWire<crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>>
7837        for SecureMemGetPhysicalSecureHeapPropertiesRequest
7838    {
7839        #[inline]
7840        fn from_wire(
7841            wire_: crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>,
7842        ) -> Self {
7843            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
7844
7845            let entire_heap = wire_.table.get(1);
7846
7847            Self {
7848                entire_heap: entire_heap.map(|envelope| {
7849                    ::fidl_next::FromWire::from_wire(unsafe {
7850                        envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
7851                    })
7852                }),
7853            }
7854        }
7855    }
7856
7857    impl<'de>
7858        ::fidl_next::FromWireRef<crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>>
7859        for SecureMemGetPhysicalSecureHeapPropertiesRequest
7860    {
7861        #[inline]
7862        fn from_wire_ref(
7863            wire: &crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>,
7864        ) -> Self {
7865            Self {
7866                entire_heap: wire.table.get(1).map(|envelope| {
7867                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
7868                        envelope.deref_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
7869                    })
7870                }),
7871            }
7872        }
7873    }
7874
7875    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
7876    pub struct SecureMemGetPhysicalSecureHeapPropertiesResponse {
7877        pub properties: ::core::option::Option<crate::natural::SecureHeapProperties>,
7878    }
7879
7880    impl SecureMemGetPhysicalSecureHeapPropertiesResponse {
7881        fn __max_ordinal(&self) -> usize {
7882            if self.properties.is_some() {
7883                return 1;
7884            }
7885
7886            0
7887        }
7888    }
7889
7890    unsafe impl<___E>
7891        ::fidl_next::Encode<
7892            crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'static>,
7893            ___E,
7894        > for SecureMemGetPhysicalSecureHeapPropertiesResponse
7895    where
7896        ___E: ::fidl_next::Encoder + ?Sized,
7897    {
7898        #[inline]
7899        fn encode(
7900            mut self,
7901            encoder: &mut ___E,
7902            out: &mut ::core::mem::MaybeUninit<
7903                crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'static>,
7904            >,
7905            _: (),
7906        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7907            ::fidl_next::munge!(let crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse { table } = out);
7908
7909            let max_ord = self.__max_ordinal();
7910
7911            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7912            ::fidl_next::Wire::zero_padding(&mut out);
7913
7914            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7915                ::fidl_next::wire::Envelope,
7916            >(encoder, max_ord);
7917
7918            for i in 1..=max_ord {
7919                match i {
7920                    1 => {
7921                        if let Some(value) = self.properties.take() {
7922                            ::fidl_next::wire::Envelope::encode_value::<
7923                                crate::wire::SecureHeapProperties<'static>,
7924                                ___E,
7925                            >(
7926                                value, preallocated.encoder, &mut out, ()
7927                            )?;
7928                        } else {
7929                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7930                        }
7931                    }
7932
7933                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7934                }
7935                unsafe {
7936                    preallocated.write_next(out.assume_init_ref());
7937                }
7938            }
7939
7940            ::fidl_next::wire::Table::encode_len(table, max_ord);
7941
7942            Ok(())
7943        }
7944    }
7945
7946    unsafe impl<'a, ___E>
7947        ::fidl_next::Encode<
7948            crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'static>,
7949            ___E,
7950        > for &'a SecureMemGetPhysicalSecureHeapPropertiesResponse
7951    where
7952        ___E: ::fidl_next::Encoder + ?Sized,
7953    {
7954        #[inline]
7955        fn encode(
7956            self,
7957            encoder: &mut ___E,
7958            out: &mut ::core::mem::MaybeUninit<
7959                crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'static>,
7960            >,
7961            _: (),
7962        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7963            ::fidl_next::munge!(let crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse { table } = out);
7964
7965            let max_ord = self.__max_ordinal();
7966
7967            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
7968            ::fidl_next::Wire::zero_padding(&mut out);
7969
7970            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
7971                ::fidl_next::wire::Envelope,
7972            >(encoder, max_ord);
7973
7974            for i in 1..=max_ord {
7975                match i {
7976                    1 => {
7977                        if let Some(value) = &self.properties {
7978                            ::fidl_next::wire::Envelope::encode_value::<
7979                                crate::wire::SecureHeapProperties<'static>,
7980                                ___E,
7981                            >(
7982                                value, preallocated.encoder, &mut out, ()
7983                            )?;
7984                        } else {
7985                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
7986                        }
7987                    }
7988
7989                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
7990                }
7991                unsafe {
7992                    preallocated.write_next(out.assume_init_ref());
7993                }
7994            }
7995
7996            ::fidl_next::wire::Table::encode_len(table, max_ord);
7997
7998            Ok(())
7999        }
8000    }
8001
8002    impl<'de>
8003        ::fidl_next::FromWire<crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'de>>
8004        for SecureMemGetPhysicalSecureHeapPropertiesResponse
8005    {
8006        #[inline]
8007        fn from_wire(
8008            wire_: crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'de>,
8009        ) -> Self {
8010            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8011
8012            let properties = wire_.table.get(1);
8013
8014            Self {
8015                properties: properties.map(|envelope| {
8016                    ::fidl_next::FromWire::from_wire(unsafe {
8017                        envelope.read_unchecked::<crate::wire::SecureHeapProperties<'de>>()
8018                    })
8019                }),
8020            }
8021        }
8022    }
8023
8024    impl<'de>
8025        ::fidl_next::FromWireRef<crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'de>>
8026        for SecureMemGetPhysicalSecureHeapPropertiesResponse
8027    {
8028        #[inline]
8029        fn from_wire_ref(
8030            wire: &crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'de>,
8031        ) -> Self {
8032            Self {
8033                properties: wire.table.get(1).map(|envelope| {
8034                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8035                        envelope.deref_unchecked::<crate::wire::SecureHeapProperties<'de>>()
8036                    })
8037                }),
8038            }
8039        }
8040    }
8041
8042    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8043    pub struct SecureMemAddSecureHeapPhysicalRangeRequest {
8044        pub heap_range: ::core::option::Option<crate::natural::SecureHeapAndRange>,
8045    }
8046
8047    impl SecureMemAddSecureHeapPhysicalRangeRequest {
8048        fn __max_ordinal(&self) -> usize {
8049            if self.heap_range.is_some() {
8050                return 1;
8051            }
8052
8053            0
8054        }
8055    }
8056
8057    unsafe impl<___E>
8058        ::fidl_next::Encode<crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'static>, ___E>
8059        for SecureMemAddSecureHeapPhysicalRangeRequest
8060    where
8061        ___E: ::fidl_next::Encoder + ?Sized,
8062    {
8063        #[inline]
8064        fn encode(
8065            mut self,
8066            encoder: &mut ___E,
8067            out: &mut ::core::mem::MaybeUninit<
8068                crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'static>,
8069            >,
8070            _: (),
8071        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8072            ::fidl_next::munge!(let crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest { table } = out);
8073
8074            let max_ord = self.__max_ordinal();
8075
8076            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8077            ::fidl_next::Wire::zero_padding(&mut out);
8078
8079            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8080                ::fidl_next::wire::Envelope,
8081            >(encoder, max_ord);
8082
8083            for i in 1..=max_ord {
8084                match i {
8085                    1 => {
8086                        if let Some(value) = self.heap_range.take() {
8087                            ::fidl_next::wire::Envelope::encode_value::<
8088                                crate::wire::SecureHeapAndRange<'static>,
8089                                ___E,
8090                            >(
8091                                value, preallocated.encoder, &mut out, ()
8092                            )?;
8093                        } else {
8094                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8095                        }
8096                    }
8097
8098                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8099                }
8100                unsafe {
8101                    preallocated.write_next(out.assume_init_ref());
8102                }
8103            }
8104
8105            ::fidl_next::wire::Table::encode_len(table, max_ord);
8106
8107            Ok(())
8108        }
8109    }
8110
8111    unsafe impl<'a, ___E>
8112        ::fidl_next::Encode<crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'static>, ___E>
8113        for &'a SecureMemAddSecureHeapPhysicalRangeRequest
8114    where
8115        ___E: ::fidl_next::Encoder + ?Sized,
8116    {
8117        #[inline]
8118        fn encode(
8119            self,
8120            encoder: &mut ___E,
8121            out: &mut ::core::mem::MaybeUninit<
8122                crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'static>,
8123            >,
8124            _: (),
8125        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8126            ::fidl_next::munge!(let crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest { table } = out);
8127
8128            let max_ord = self.__max_ordinal();
8129
8130            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8131            ::fidl_next::Wire::zero_padding(&mut out);
8132
8133            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8134                ::fidl_next::wire::Envelope,
8135            >(encoder, max_ord);
8136
8137            for i in 1..=max_ord {
8138                match i {
8139                    1 => {
8140                        if let Some(value) = &self.heap_range {
8141                            ::fidl_next::wire::Envelope::encode_value::<
8142                                crate::wire::SecureHeapAndRange<'static>,
8143                                ___E,
8144                            >(
8145                                value, preallocated.encoder, &mut out, ()
8146                            )?;
8147                        } else {
8148                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8149                        }
8150                    }
8151
8152                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8153                }
8154                unsafe {
8155                    preallocated.write_next(out.assume_init_ref());
8156                }
8157            }
8158
8159            ::fidl_next::wire::Table::encode_len(table, max_ord);
8160
8161            Ok(())
8162        }
8163    }
8164
8165    impl<'de> ::fidl_next::FromWire<crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'de>>
8166        for SecureMemAddSecureHeapPhysicalRangeRequest
8167    {
8168        #[inline]
8169        fn from_wire(wire_: crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'de>) -> Self {
8170            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8171
8172            let heap_range = wire_.table.get(1);
8173
8174            Self {
8175                heap_range: heap_range.map(|envelope| {
8176                    ::fidl_next::FromWire::from_wire(unsafe {
8177                        envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
8178                    })
8179                }),
8180            }
8181        }
8182    }
8183
8184    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'de>>
8185        for SecureMemAddSecureHeapPhysicalRangeRequest
8186    {
8187        #[inline]
8188        fn from_wire_ref(
8189            wire: &crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'de>,
8190        ) -> Self {
8191            Self {
8192                heap_range: wire.table.get(1).map(|envelope| {
8193                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8194                        envelope.deref_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
8195                    })
8196                }),
8197            }
8198        }
8199    }
8200
8201    pub type SecureMemAddSecureHeapPhysicalRangeResponse = ();
8202
8203    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8204    pub struct SecureMemDeleteSecureHeapPhysicalRangeRequest {
8205        pub heap_range: ::core::option::Option<crate::natural::SecureHeapAndRange>,
8206    }
8207
8208    impl SecureMemDeleteSecureHeapPhysicalRangeRequest {
8209        fn __max_ordinal(&self) -> usize {
8210            if self.heap_range.is_some() {
8211                return 1;
8212            }
8213
8214            0
8215        }
8216    }
8217
8218    unsafe impl<___E>
8219        ::fidl_next::Encode<
8220            crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'static>,
8221            ___E,
8222        > for SecureMemDeleteSecureHeapPhysicalRangeRequest
8223    where
8224        ___E: ::fidl_next::Encoder + ?Sized,
8225    {
8226        #[inline]
8227        fn encode(
8228            mut self,
8229            encoder: &mut ___E,
8230            out: &mut ::core::mem::MaybeUninit<
8231                crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'static>,
8232            >,
8233            _: (),
8234        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8235            ::fidl_next::munge!(let crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest { table } = out);
8236
8237            let max_ord = self.__max_ordinal();
8238
8239            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8240            ::fidl_next::Wire::zero_padding(&mut out);
8241
8242            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8243                ::fidl_next::wire::Envelope,
8244            >(encoder, max_ord);
8245
8246            for i in 1..=max_ord {
8247                match i {
8248                    1 => {
8249                        if let Some(value) = self.heap_range.take() {
8250                            ::fidl_next::wire::Envelope::encode_value::<
8251                                crate::wire::SecureHeapAndRange<'static>,
8252                                ___E,
8253                            >(
8254                                value, preallocated.encoder, &mut out, ()
8255                            )?;
8256                        } else {
8257                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8258                        }
8259                    }
8260
8261                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8262                }
8263                unsafe {
8264                    preallocated.write_next(out.assume_init_ref());
8265                }
8266            }
8267
8268            ::fidl_next::wire::Table::encode_len(table, max_ord);
8269
8270            Ok(())
8271        }
8272    }
8273
8274    unsafe impl<'a, ___E>
8275        ::fidl_next::Encode<
8276            crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'static>,
8277            ___E,
8278        > for &'a SecureMemDeleteSecureHeapPhysicalRangeRequest
8279    where
8280        ___E: ::fidl_next::Encoder + ?Sized,
8281    {
8282        #[inline]
8283        fn encode(
8284            self,
8285            encoder: &mut ___E,
8286            out: &mut ::core::mem::MaybeUninit<
8287                crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'static>,
8288            >,
8289            _: (),
8290        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8291            ::fidl_next::munge!(let crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest { table } = out);
8292
8293            let max_ord = self.__max_ordinal();
8294
8295            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8296            ::fidl_next::Wire::zero_padding(&mut out);
8297
8298            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8299                ::fidl_next::wire::Envelope,
8300            >(encoder, max_ord);
8301
8302            for i in 1..=max_ord {
8303                match i {
8304                    1 => {
8305                        if let Some(value) = &self.heap_range {
8306                            ::fidl_next::wire::Envelope::encode_value::<
8307                                crate::wire::SecureHeapAndRange<'static>,
8308                                ___E,
8309                            >(
8310                                value, preallocated.encoder, &mut out, ()
8311                            )?;
8312                        } else {
8313                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8314                        }
8315                    }
8316
8317                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8318                }
8319                unsafe {
8320                    preallocated.write_next(out.assume_init_ref());
8321                }
8322            }
8323
8324            ::fidl_next::wire::Table::encode_len(table, max_ord);
8325
8326            Ok(())
8327        }
8328    }
8329
8330    impl<'de> ::fidl_next::FromWire<crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>>
8331        for SecureMemDeleteSecureHeapPhysicalRangeRequest
8332    {
8333        #[inline]
8334        fn from_wire(
8335            wire_: crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>,
8336        ) -> Self {
8337            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8338
8339            let heap_range = wire_.table.get(1);
8340
8341            Self {
8342                heap_range: heap_range.map(|envelope| {
8343                    ::fidl_next::FromWire::from_wire(unsafe {
8344                        envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
8345                    })
8346                }),
8347            }
8348        }
8349    }
8350
8351    impl<'de>
8352        ::fidl_next::FromWireRef<crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>>
8353        for SecureMemDeleteSecureHeapPhysicalRangeRequest
8354    {
8355        #[inline]
8356        fn from_wire_ref(
8357            wire: &crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>,
8358        ) -> Self {
8359            Self {
8360                heap_range: wire.table.get(1).map(|envelope| {
8361                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8362                        envelope.deref_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
8363                    })
8364                }),
8365            }
8366        }
8367    }
8368
8369    pub type SecureMemDeleteSecureHeapPhysicalRangeResponse = ();
8370
8371    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8372    pub struct SecureMemModifySecureHeapPhysicalRangeRequest {
8373        pub range_modification:
8374            ::core::option::Option<crate::natural::SecureHeapAndRangeModification>,
8375    }
8376
8377    impl SecureMemModifySecureHeapPhysicalRangeRequest {
8378        fn __max_ordinal(&self) -> usize {
8379            if self.range_modification.is_some() {
8380                return 1;
8381            }
8382
8383            0
8384        }
8385    }
8386
8387    unsafe impl<___E>
8388        ::fidl_next::Encode<
8389            crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'static>,
8390            ___E,
8391        > for SecureMemModifySecureHeapPhysicalRangeRequest
8392    where
8393        ___E: ::fidl_next::Encoder + ?Sized,
8394    {
8395        #[inline]
8396        fn encode(
8397            mut self,
8398            encoder: &mut ___E,
8399            out: &mut ::core::mem::MaybeUninit<
8400                crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'static>,
8401            >,
8402            _: (),
8403        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8404            ::fidl_next::munge!(let crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest { table } = out);
8405
8406            let max_ord = self.__max_ordinal();
8407
8408            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8409            ::fidl_next::Wire::zero_padding(&mut out);
8410
8411            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8412                ::fidl_next::wire::Envelope,
8413            >(encoder, max_ord);
8414
8415            for i in 1..=max_ord {
8416                match i {
8417                    1 => {
8418                        if let Some(value) = self.range_modification.take() {
8419                            ::fidl_next::wire::Envelope::encode_value::<
8420                                crate::wire::SecureHeapAndRangeModification<'static>,
8421                                ___E,
8422                            >(
8423                                value, preallocated.encoder, &mut out, ()
8424                            )?;
8425                        } else {
8426                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8427                        }
8428                    }
8429
8430                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8431                }
8432                unsafe {
8433                    preallocated.write_next(out.assume_init_ref());
8434                }
8435            }
8436
8437            ::fidl_next::wire::Table::encode_len(table, max_ord);
8438
8439            Ok(())
8440        }
8441    }
8442
8443    unsafe impl<'a, ___E>
8444        ::fidl_next::Encode<
8445            crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'static>,
8446            ___E,
8447        > for &'a SecureMemModifySecureHeapPhysicalRangeRequest
8448    where
8449        ___E: ::fidl_next::Encoder + ?Sized,
8450    {
8451        #[inline]
8452        fn encode(
8453            self,
8454            encoder: &mut ___E,
8455            out: &mut ::core::mem::MaybeUninit<
8456                crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'static>,
8457            >,
8458            _: (),
8459        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8460            ::fidl_next::munge!(let crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest { table } = out);
8461
8462            let max_ord = self.__max_ordinal();
8463
8464            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8465            ::fidl_next::Wire::zero_padding(&mut out);
8466
8467            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8468                ::fidl_next::wire::Envelope,
8469            >(encoder, max_ord);
8470
8471            for i in 1..=max_ord {
8472                match i {
8473                    1 => {
8474                        if let Some(value) = &self.range_modification {
8475                            ::fidl_next::wire::Envelope::encode_value::<
8476                                crate::wire::SecureHeapAndRangeModification<'static>,
8477                                ___E,
8478                            >(
8479                                value, preallocated.encoder, &mut out, ()
8480                            )?;
8481                        } else {
8482                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8483                        }
8484                    }
8485
8486                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8487                }
8488                unsafe {
8489                    preallocated.write_next(out.assume_init_ref());
8490                }
8491            }
8492
8493            ::fidl_next::wire::Table::encode_len(table, max_ord);
8494
8495            Ok(())
8496        }
8497    }
8498
8499    impl<'de> ::fidl_next::FromWire<crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'de>>
8500        for SecureMemModifySecureHeapPhysicalRangeRequest
8501    {
8502        #[inline]
8503        fn from_wire(
8504            wire_: crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'de>,
8505        ) -> Self {
8506            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8507
8508            let range_modification = wire_.table.get(1);
8509
8510            Self {
8511                range_modification: range_modification.map(|envelope| {
8512                    ::fidl_next::FromWire::from_wire(unsafe {
8513                        envelope
8514                            .read_unchecked::<crate::wire::SecureHeapAndRangeModification<'de>>()
8515                    })
8516                }),
8517            }
8518        }
8519    }
8520
8521    impl<'de>
8522        ::fidl_next::FromWireRef<crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'de>>
8523        for SecureMemModifySecureHeapPhysicalRangeRequest
8524    {
8525        #[inline]
8526        fn from_wire_ref(
8527            wire: &crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'de>,
8528        ) -> Self {
8529            Self {
8530                range_modification: wire.table.get(1).map(|envelope| {
8531                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8532                        envelope
8533                            .deref_unchecked::<crate::wire::SecureHeapAndRangeModification<'de>>()
8534                    })
8535                }),
8536            }
8537        }
8538    }
8539
8540    pub type SecureMemModifySecureHeapPhysicalRangeResponse = ();
8541
8542    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8543    pub struct SecureMemZeroSubRangeRequest {
8544        pub is_covering_range_explicit: ::core::option::Option<bool>,
8545
8546        pub heap_range: ::core::option::Option<crate::natural::SecureHeapAndRange>,
8547    }
8548
8549    impl SecureMemZeroSubRangeRequest {
8550        fn __max_ordinal(&self) -> usize {
8551            if self.heap_range.is_some() {
8552                return 2;
8553            }
8554
8555            if self.is_covering_range_explicit.is_some() {
8556                return 1;
8557            }
8558
8559            0
8560        }
8561    }
8562
8563    unsafe impl<___E> ::fidl_next::Encode<crate::wire::SecureMemZeroSubRangeRequest<'static>, ___E>
8564        for SecureMemZeroSubRangeRequest
8565    where
8566        ___E: ::fidl_next::Encoder + ?Sized,
8567    {
8568        #[inline]
8569        fn encode(
8570            mut self,
8571            encoder: &mut ___E,
8572            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureMemZeroSubRangeRequest<'static>>,
8573            _: (),
8574        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8575            ::fidl_next::munge!(let crate::wire::SecureMemZeroSubRangeRequest { table } = out);
8576
8577            let max_ord = self.__max_ordinal();
8578
8579            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8580            ::fidl_next::Wire::zero_padding(&mut out);
8581
8582            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8583                ::fidl_next::wire::Envelope,
8584            >(encoder, max_ord);
8585
8586            for i in 1..=max_ord {
8587                match i {
8588                    2 => {
8589                        if let Some(value) = self.heap_range.take() {
8590                            ::fidl_next::wire::Envelope::encode_value::<
8591                                crate::wire::SecureHeapAndRange<'static>,
8592                                ___E,
8593                            >(
8594                                value, preallocated.encoder, &mut out, ()
8595                            )?;
8596                        } else {
8597                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8598                        }
8599                    }
8600
8601                    1 => {
8602                        if let Some(value) = self.is_covering_range_explicit.take() {
8603                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
8604                                value,
8605                                preallocated.encoder,
8606                                &mut out,
8607                                (),
8608                            )?;
8609                        } else {
8610                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8611                        }
8612                    }
8613
8614                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8615                }
8616                unsafe {
8617                    preallocated.write_next(out.assume_init_ref());
8618                }
8619            }
8620
8621            ::fidl_next::wire::Table::encode_len(table, max_ord);
8622
8623            Ok(())
8624        }
8625    }
8626
8627    unsafe impl<'a, ___E>
8628        ::fidl_next::Encode<crate::wire::SecureMemZeroSubRangeRequest<'static>, ___E>
8629        for &'a SecureMemZeroSubRangeRequest
8630    where
8631        ___E: ::fidl_next::Encoder + ?Sized,
8632    {
8633        #[inline]
8634        fn encode(
8635            self,
8636            encoder: &mut ___E,
8637            out: &mut ::core::mem::MaybeUninit<crate::wire::SecureMemZeroSubRangeRequest<'static>>,
8638            _: (),
8639        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8640            ::fidl_next::munge!(let crate::wire::SecureMemZeroSubRangeRequest { table } = out);
8641
8642            let max_ord = self.__max_ordinal();
8643
8644            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
8645            ::fidl_next::Wire::zero_padding(&mut out);
8646
8647            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
8648                ::fidl_next::wire::Envelope,
8649            >(encoder, max_ord);
8650
8651            for i in 1..=max_ord {
8652                match i {
8653                    2 => {
8654                        if let Some(value) = &self.heap_range {
8655                            ::fidl_next::wire::Envelope::encode_value::<
8656                                crate::wire::SecureHeapAndRange<'static>,
8657                                ___E,
8658                            >(
8659                                value, preallocated.encoder, &mut out, ()
8660                            )?;
8661                        } else {
8662                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8663                        }
8664                    }
8665
8666                    1 => {
8667                        if let Some(value) = &self.is_covering_range_explicit {
8668                            ::fidl_next::wire::Envelope::encode_value::<bool, ___E>(
8669                                value,
8670                                preallocated.encoder,
8671                                &mut out,
8672                                (),
8673                            )?;
8674                        } else {
8675                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
8676                        }
8677                    }
8678
8679                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
8680                }
8681                unsafe {
8682                    preallocated.write_next(out.assume_init_ref());
8683                }
8684            }
8685
8686            ::fidl_next::wire::Table::encode_len(table, max_ord);
8687
8688            Ok(())
8689        }
8690    }
8691
8692    impl<'de> ::fidl_next::FromWire<crate::wire::SecureMemZeroSubRangeRequest<'de>>
8693        for SecureMemZeroSubRangeRequest
8694    {
8695        #[inline]
8696        fn from_wire(wire_: crate::wire::SecureMemZeroSubRangeRequest<'de>) -> Self {
8697            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
8698
8699            let is_covering_range_explicit = wire_.table.get(1);
8700
8701            let heap_range = wire_.table.get(2);
8702
8703            Self {
8704                is_covering_range_explicit: is_covering_range_explicit.map(|envelope| {
8705                    ::fidl_next::FromWire::from_wire(unsafe { envelope.read_unchecked::<bool>() })
8706                }),
8707
8708                heap_range: heap_range.map(|envelope| {
8709                    ::fidl_next::FromWire::from_wire(unsafe {
8710                        envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
8711                    })
8712                }),
8713            }
8714        }
8715    }
8716
8717    impl<'de> ::fidl_next::FromWireRef<crate::wire::SecureMemZeroSubRangeRequest<'de>>
8718        for SecureMemZeroSubRangeRequest
8719    {
8720        #[inline]
8721        fn from_wire_ref(wire: &crate::wire::SecureMemZeroSubRangeRequest<'de>) -> Self {
8722            Self {
8723                is_covering_range_explicit: wire.table.get(1).map(|envelope| {
8724                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8725                        envelope.deref_unchecked::<bool>()
8726                    })
8727                }),
8728
8729                heap_range: wire.table.get(2).map(|envelope| {
8730                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
8731                        envelope.deref_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
8732                    })
8733                }),
8734            }
8735        }
8736    }
8737
8738    pub type SecureMemZeroSubRangeResponse = ();
8739}
8740
8741pub mod wire {
8742
8743    /// The wire type corresponding to [`AllocatorValidateBufferCollectionTokenRequest`].
8744    #[repr(C)]
8745    pub struct AllocatorValidateBufferCollectionTokenRequest<'de> {
8746        pub(crate) table: ::fidl_next::wire::Table<'de>,
8747    }
8748
8749    impl<'de> Drop for AllocatorValidateBufferCollectionTokenRequest<'de> {
8750        fn drop(&mut self) {
8751            let _ = self
8752                .table
8753                .get(1)
8754                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
8755        }
8756    }
8757
8758    impl ::fidl_next::Constrained for AllocatorValidateBufferCollectionTokenRequest<'_> {
8759        type Constraint = ();
8760
8761        fn validate(
8762            _: ::fidl_next::Slot<'_, Self>,
8763            _: Self::Constraint,
8764        ) -> Result<(), ::fidl_next::ValidationError> {
8765            Ok(())
8766        }
8767    }
8768
8769    unsafe impl ::fidl_next::Wire for AllocatorValidateBufferCollectionTokenRequest<'static> {
8770        type Narrowed<'de> = AllocatorValidateBufferCollectionTokenRequest<'de>;
8771
8772        #[inline]
8773        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8774            ::fidl_next::munge!(let Self { table } = out);
8775            ::fidl_next::wire::Table::zero_padding(table);
8776        }
8777    }
8778
8779    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8780        for AllocatorValidateBufferCollectionTokenRequest<'de>
8781    where
8782        ___D: ::fidl_next::Decoder<'de> + ?Sized,
8783    {
8784        fn decode(
8785            slot: ::fidl_next::Slot<'_, Self>,
8786            decoder: &mut ___D,
8787            _: (),
8788        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8789            ::fidl_next::munge!(let Self { table } = slot);
8790
8791            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8792                match ordinal {
8793                    0 => unsafe { ::core::hint::unreachable_unchecked() },
8794
8795                    1 => {
8796                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
8797                            slot.as_mut(),
8798                            decoder,
8799                            (),
8800                        )?;
8801
8802                        Ok(())
8803                    }
8804
8805                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8806                }
8807            })
8808        }
8809    }
8810
8811    impl<'de> AllocatorValidateBufferCollectionTokenRequest<'de> {
8812        pub fn token_server_koid(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
8813            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8814        }
8815
8816        pub fn take_token_server_koid(
8817            &mut self,
8818        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
8819            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8820        }
8821    }
8822
8823    impl<'de> ::core::fmt::Debug for AllocatorValidateBufferCollectionTokenRequest<'de> {
8824        fn fmt(
8825            &self,
8826            f: &mut ::core::fmt::Formatter<'_>,
8827        ) -> ::core::result::Result<(), ::core::fmt::Error> {
8828            f.debug_struct("AllocatorValidateBufferCollectionTokenRequest")
8829                .field("token_server_koid", &self.token_server_koid())
8830                .finish()
8831        }
8832    }
8833
8834    impl<'de> ::fidl_next::IntoNatural for AllocatorValidateBufferCollectionTokenRequest<'de> {
8835        type Natural = crate::natural::AllocatorValidateBufferCollectionTokenRequest;
8836    }
8837
8838    /// The wire type corresponding to [`AllocatorValidateBufferCollectionTokenResponse`].
8839    #[repr(C)]
8840    pub struct AllocatorValidateBufferCollectionTokenResponse<'de> {
8841        pub(crate) table: ::fidl_next::wire::Table<'de>,
8842    }
8843
8844    impl<'de> Drop for AllocatorValidateBufferCollectionTokenResponse<'de> {
8845        fn drop(&mut self) {
8846            let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
8847        }
8848    }
8849
8850    impl ::fidl_next::Constrained for AllocatorValidateBufferCollectionTokenResponse<'_> {
8851        type Constraint = ();
8852
8853        fn validate(
8854            _: ::fidl_next::Slot<'_, Self>,
8855            _: Self::Constraint,
8856        ) -> Result<(), ::fidl_next::ValidationError> {
8857            Ok(())
8858        }
8859    }
8860
8861    unsafe impl ::fidl_next::Wire for AllocatorValidateBufferCollectionTokenResponse<'static> {
8862        type Narrowed<'de> = AllocatorValidateBufferCollectionTokenResponse<'de>;
8863
8864        #[inline]
8865        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8866            ::fidl_next::munge!(let Self { table } = out);
8867            ::fidl_next::wire::Table::zero_padding(table);
8868        }
8869    }
8870
8871    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
8872        for AllocatorValidateBufferCollectionTokenResponse<'de>
8873    where
8874        ___D: ::fidl_next::Decoder<'de> + ?Sized,
8875    {
8876        fn decode(
8877            slot: ::fidl_next::Slot<'_, Self>,
8878            decoder: &mut ___D,
8879            _: (),
8880        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8881            ::fidl_next::munge!(let Self { table } = slot);
8882
8883            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8884                match ordinal {
8885                    0 => unsafe { ::core::hint::unreachable_unchecked() },
8886
8887                    1 => {
8888                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
8889                            slot.as_mut(),
8890                            decoder,
8891                            (),
8892                        )?;
8893
8894                        Ok(())
8895                    }
8896
8897                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
8898                }
8899            })
8900        }
8901    }
8902
8903    impl<'de> AllocatorValidateBufferCollectionTokenResponse<'de> {
8904        pub fn is_known(&self) -> ::core::option::Option<&bool> {
8905            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8906        }
8907
8908        pub fn take_is_known(&mut self) -> ::core::option::Option<bool> {
8909            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
8910        }
8911    }
8912
8913    impl<'de> ::core::fmt::Debug for AllocatorValidateBufferCollectionTokenResponse<'de> {
8914        fn fmt(
8915            &self,
8916            f: &mut ::core::fmt::Formatter<'_>,
8917        ) -> ::core::result::Result<(), ::core::fmt::Error> {
8918            f.debug_struct("AllocatorValidateBufferCollectionTokenResponse")
8919                .field("is_known", &self.is_known())
8920                .finish()
8921        }
8922    }
8923
8924    impl<'de> ::fidl_next::IntoNatural for AllocatorValidateBufferCollectionTokenResponse<'de> {
8925        type Natural = crate::natural::AllocatorValidateBufferCollectionTokenResponse;
8926    }
8927
8928    /// The wire type corresponding to [`AllocatorSetDebugClientInfoRequest`].
8929    #[repr(C)]
8930    pub struct AllocatorSetDebugClientInfoRequest<'de> {
8931        pub(crate) table: ::fidl_next::wire::Table<'de>,
8932    }
8933
8934    impl<'de> Drop for AllocatorSetDebugClientInfoRequest<'de> {
8935        fn drop(&mut self) {
8936            let _ = self.table.get(1).map(|envelope| unsafe {
8937                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
8938            });
8939
8940            let _ = self
8941                .table
8942                .get(2)
8943                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
8944        }
8945    }
8946
8947    impl ::fidl_next::Constrained for AllocatorSetDebugClientInfoRequest<'_> {
8948        type Constraint = ();
8949
8950        fn validate(
8951            _: ::fidl_next::Slot<'_, Self>,
8952            _: Self::Constraint,
8953        ) -> Result<(), ::fidl_next::ValidationError> {
8954            Ok(())
8955        }
8956    }
8957
8958    unsafe impl ::fidl_next::Wire for AllocatorSetDebugClientInfoRequest<'static> {
8959        type Narrowed<'de> = AllocatorSetDebugClientInfoRequest<'de>;
8960
8961        #[inline]
8962        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8963            ::fidl_next::munge!(let Self { table } = out);
8964            ::fidl_next::wire::Table::zero_padding(table);
8965        }
8966    }
8967
8968    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for AllocatorSetDebugClientInfoRequest<'de>
8969    where
8970        ___D: ::fidl_next::Decoder<'de> + ?Sized,
8971    {
8972        fn decode(
8973            slot: ::fidl_next::Slot<'_, Self>,
8974            decoder: &mut ___D,
8975            _: (),
8976        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8977            ::fidl_next::munge!(let Self { table } = slot);
8978
8979            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8980                match ordinal {
8981                    0 => unsafe { ::core::hint::unreachable_unchecked() },
8982
8983                    1 => {
8984                        ::fidl_next::wire::Envelope::decode_as::<
8985                            ___D,
8986                            ::fidl_next::wire::String<'de>,
8987                        >(slot.as_mut(), decoder, 256)?;
8988
8989                        let value = unsafe {
8990                            slot.deref_unchecked()
8991                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
8992                        };
8993
8994                        if value.len() > 256 {
8995                            return Err(::fidl_next::DecodeError::VectorTooLong {
8996                                size: value.len() as u64,
8997                                limit: 256,
8998                            });
8999                        }
9000
9001                        Ok(())
9002                    }
9003
9004                    2 => {
9005                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9006                            slot.as_mut(),
9007                            decoder,
9008                            (),
9009                        )?;
9010
9011                        Ok(())
9012                    }
9013
9014                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9015                }
9016            })
9017        }
9018    }
9019
9020    impl<'de> AllocatorSetDebugClientInfoRequest<'de> {
9021        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
9022            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9023        }
9024
9025        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
9026            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9027        }
9028
9029        pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
9030            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9031        }
9032
9033        pub fn take_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
9034            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
9035        }
9036    }
9037
9038    impl<'de> ::core::fmt::Debug for AllocatorSetDebugClientInfoRequest<'de> {
9039        fn fmt(
9040            &self,
9041            f: &mut ::core::fmt::Formatter<'_>,
9042        ) -> ::core::result::Result<(), ::core::fmt::Error> {
9043            f.debug_struct("AllocatorSetDebugClientInfoRequest")
9044                .field("name", &self.name())
9045                .field("id", &self.id())
9046                .finish()
9047        }
9048    }
9049
9050    impl<'de> ::fidl_next::IntoNatural for AllocatorSetDebugClientInfoRequest<'de> {
9051        type Natural = crate::natural::AllocatorSetDebugClientInfoRequest;
9052    }
9053
9054    /// The wire type corresponding to [`BufferUsage`].
9055    #[repr(C)]
9056    pub struct BufferUsage<'de> {
9057        pub(crate) table: ::fidl_next::wire::Table<'de>,
9058    }
9059
9060    impl<'de> Drop for BufferUsage<'de> {
9061        fn drop(&mut self) {
9062            let _ = self
9063                .table
9064                .get(1)
9065                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9066
9067            let _ = self
9068                .table
9069                .get(2)
9070                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9071
9072            let _ = self
9073                .table
9074                .get(3)
9075                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9076
9077            let _ = self
9078                .table
9079                .get(4)
9080                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9081
9082            let _ = self
9083                .table
9084                .get(5)
9085                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
9086        }
9087    }
9088
9089    impl ::fidl_next::Constrained for BufferUsage<'_> {
9090        type Constraint = ();
9091
9092        fn validate(
9093            _: ::fidl_next::Slot<'_, Self>,
9094            _: Self::Constraint,
9095        ) -> Result<(), ::fidl_next::ValidationError> {
9096            Ok(())
9097        }
9098    }
9099
9100    unsafe impl ::fidl_next::Wire for BufferUsage<'static> {
9101        type Narrowed<'de> = BufferUsage<'de>;
9102
9103        #[inline]
9104        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9105            ::fidl_next::munge!(let Self { table } = out);
9106            ::fidl_next::wire::Table::zero_padding(table);
9107        }
9108    }
9109
9110    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BufferUsage<'de>
9111    where
9112        ___D: ::fidl_next::Decoder<'de> + ?Sized,
9113    {
9114        fn decode(
9115            slot: ::fidl_next::Slot<'_, Self>,
9116            decoder: &mut ___D,
9117            _: (),
9118        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9119            ::fidl_next::munge!(let Self { table } = slot);
9120
9121            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9122                match ordinal {
9123                    0 => unsafe { ::core::hint::unreachable_unchecked() },
9124
9125                    1 => {
9126                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
9127                            slot.as_mut(),
9128                            decoder,
9129                            (),
9130                        )?;
9131
9132                        Ok(())
9133                    }
9134
9135                    2 => {
9136                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
9137                            slot.as_mut(),
9138                            decoder,
9139                            (),
9140                        )?;
9141
9142                        Ok(())
9143                    }
9144
9145                    3 => {
9146                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
9147                            slot.as_mut(),
9148                            decoder,
9149                            (),
9150                        )?;
9151
9152                        Ok(())
9153                    }
9154
9155                    4 => {
9156                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
9157                            slot.as_mut(),
9158                            decoder,
9159                            (),
9160                        )?;
9161
9162                        Ok(())
9163                    }
9164
9165                    5 => {
9166                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
9167                            slot.as_mut(),
9168                            decoder,
9169                            (),
9170                        )?;
9171
9172                        Ok(())
9173                    }
9174
9175                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9176                }
9177            })
9178        }
9179    }
9180
9181    impl<'de> BufferUsage<'de> {
9182        pub fn none(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
9183            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9184        }
9185
9186        pub fn take_none(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
9187            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9188        }
9189
9190        pub fn cpu(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
9191            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9192        }
9193
9194        pub fn take_cpu(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
9195            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
9196        }
9197
9198        pub fn vulkan(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
9199            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
9200        }
9201
9202        pub fn take_vulkan(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
9203            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
9204        }
9205
9206        pub fn display(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
9207            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
9208        }
9209
9210        pub fn take_display(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
9211            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
9212        }
9213
9214        pub fn video(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
9215            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
9216        }
9217
9218        pub fn take_video(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
9219            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
9220        }
9221    }
9222
9223    impl<'de> ::core::fmt::Debug for BufferUsage<'de> {
9224        fn fmt(
9225            &self,
9226            f: &mut ::core::fmt::Formatter<'_>,
9227        ) -> ::core::result::Result<(), ::core::fmt::Error> {
9228            f.debug_struct("BufferUsage")
9229                .field("none", &self.none())
9230                .field("cpu", &self.cpu())
9231                .field("vulkan", &self.vulkan())
9232                .field("display", &self.display())
9233                .field("video", &self.video())
9234                .finish()
9235        }
9236    }
9237
9238    impl<'de> ::fidl_next::IntoNatural for BufferUsage<'de> {
9239        type Natural = crate::natural::BufferUsage;
9240    }
9241
9242    /// The wire type corresponding to [`Heap`].
9243    #[repr(C)]
9244    pub struct Heap<'de> {
9245        pub(crate) table: ::fidl_next::wire::Table<'de>,
9246    }
9247
9248    impl<'de> Drop for Heap<'de> {
9249        fn drop(&mut self) {
9250            let _ = self.table.get(1).map(|envelope| unsafe {
9251                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
9252            });
9253
9254            let _ = self
9255                .table
9256                .get(2)
9257                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
9258        }
9259    }
9260
9261    impl ::fidl_next::Constrained for Heap<'_> {
9262        type Constraint = ();
9263
9264        fn validate(
9265            _: ::fidl_next::Slot<'_, Self>,
9266            _: Self::Constraint,
9267        ) -> Result<(), ::fidl_next::ValidationError> {
9268            Ok(())
9269        }
9270    }
9271
9272    unsafe impl ::fidl_next::Wire for Heap<'static> {
9273        type Narrowed<'de> = Heap<'de>;
9274
9275        #[inline]
9276        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9277            ::fidl_next::munge!(let Self { table } = out);
9278            ::fidl_next::wire::Table::zero_padding(table);
9279        }
9280    }
9281
9282    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Heap<'de>
9283    where
9284        ___D: ::fidl_next::Decoder<'de> + ?Sized,
9285    {
9286        fn decode(
9287            slot: ::fidl_next::Slot<'_, Self>,
9288            decoder: &mut ___D,
9289            _: (),
9290        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9291            ::fidl_next::munge!(let Self { table } = slot);
9292
9293            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9294                match ordinal {
9295                    0 => unsafe { ::core::hint::unreachable_unchecked() },
9296
9297                    1 => {
9298                        ::fidl_next::wire::Envelope::decode_as::<
9299                            ___D,
9300                            ::fidl_next::wire::String<'de>,
9301                        >(slot.as_mut(), decoder, 128)?;
9302
9303                        let value = unsafe {
9304                            slot.deref_unchecked()
9305                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
9306                        };
9307
9308                        if value.len() > 128 {
9309                            return Err(::fidl_next::DecodeError::VectorTooLong {
9310                                size: value.len() as u64,
9311                                limit: 128,
9312                            });
9313                        }
9314
9315                        Ok(())
9316                    }
9317
9318                    2 => {
9319                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9320                            slot.as_mut(),
9321                            decoder,
9322                            (),
9323                        )?;
9324
9325                        Ok(())
9326                    }
9327
9328                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9329                }
9330            })
9331        }
9332    }
9333
9334    impl<'de> Heap<'de> {
9335        pub fn heap_type(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
9336            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9337        }
9338
9339        pub fn take_heap_type(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
9340            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9341        }
9342
9343        pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
9344            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9345        }
9346
9347        pub fn take_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
9348            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
9349        }
9350    }
9351
9352    impl<'de> ::core::fmt::Debug for Heap<'de> {
9353        fn fmt(
9354            &self,
9355            f: &mut ::core::fmt::Formatter<'_>,
9356        ) -> ::core::result::Result<(), ::core::fmt::Error> {
9357            f.debug_struct("Heap")
9358                .field("heap_type", &self.heap_type())
9359                .field("id", &self.id())
9360                .finish()
9361        }
9362    }
9363
9364    impl<'de> ::fidl_next::IntoNatural for Heap<'de> {
9365        type Natural = crate::natural::Heap;
9366    }
9367
9368    /// The wire type corresponding to [`BufferMemoryConstraints`].
9369    #[repr(C)]
9370    pub struct BufferMemoryConstraints<'de> {
9371        pub(crate) table: ::fidl_next::wire::Table<'de>,
9372    }
9373
9374    impl<'de> Drop for BufferMemoryConstraints<'de> {
9375        fn drop(&mut self) {
9376            let _ = self
9377                .table
9378                .get(1)
9379                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
9380
9381            let _ = self
9382                .table
9383                .get(2)
9384                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
9385
9386            let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9387
9388            let _ = self.table.get(4).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9389
9390            let _ = self.table.get(5).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9391
9392            let _ = self.table.get(6).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9393
9394            let _ = self.table.get(7).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9395
9396            let _ = self.table.get(8).map(|envelope| unsafe {
9397                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Heap<'de>>>()
9398            });
9399
9400            let _ = self
9401                .table
9402                .get(9)
9403                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
9404        }
9405    }
9406
9407    impl ::fidl_next::Constrained for BufferMemoryConstraints<'_> {
9408        type Constraint = ();
9409
9410        fn validate(
9411            _: ::fidl_next::Slot<'_, Self>,
9412            _: Self::Constraint,
9413        ) -> Result<(), ::fidl_next::ValidationError> {
9414            Ok(())
9415        }
9416    }
9417
9418    unsafe impl ::fidl_next::Wire for BufferMemoryConstraints<'static> {
9419        type Narrowed<'de> = BufferMemoryConstraints<'de>;
9420
9421        #[inline]
9422        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9423            ::fidl_next::munge!(let Self { table } = out);
9424            ::fidl_next::wire::Table::zero_padding(table);
9425        }
9426    }
9427
9428    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BufferMemoryConstraints<'de>
9429    where
9430        ___D: ::fidl_next::Decoder<'de> + ?Sized,
9431    {
9432        fn decode(
9433            slot: ::fidl_next::Slot<'_, Self>,
9434            decoder: &mut ___D,
9435            _: (),
9436        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9437            ::fidl_next::munge!(let Self { table } = slot);
9438
9439            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9440                match ordinal {
9441                    0 => unsafe { ::core::hint::unreachable_unchecked() },
9442
9443                    1 => {
9444                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9445                            slot.as_mut(),
9446                            decoder,
9447                            (),
9448                        )?;
9449
9450                        Ok(())
9451                    }
9452
9453                    2 => {
9454                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9455                            slot.as_mut(),
9456                            decoder,
9457                            (),
9458                        )?;
9459
9460                        Ok(())
9461                    }
9462
9463                    3 => {
9464                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
9465                            slot.as_mut(),
9466                            decoder,
9467                            (),
9468                        )?;
9469
9470                        Ok(())
9471                    }
9472
9473                    4 => {
9474                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
9475                            slot.as_mut(),
9476                            decoder,
9477                            (),
9478                        )?;
9479
9480                        Ok(())
9481                    }
9482
9483                    5 => {
9484                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
9485                            slot.as_mut(),
9486                            decoder,
9487                            (),
9488                        )?;
9489
9490                        Ok(())
9491                    }
9492
9493                    6 => {
9494                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
9495                            slot.as_mut(),
9496                            decoder,
9497                            (),
9498                        )?;
9499
9500                        Ok(())
9501                    }
9502
9503                    7 => {
9504                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
9505                            slot.as_mut(),
9506                            decoder,
9507                            (),
9508                        )?;
9509
9510                        Ok(())
9511                    }
9512
9513                    8 => {
9514                        ::fidl_next::wire::Envelope::decode_as::<
9515                            ___D,
9516                            ::fidl_next::wire::Vector<'de, crate::wire::Heap<'de>>,
9517                        >(slot.as_mut(), decoder, (64, ()))?;
9518
9519                        let value = unsafe {
9520                            slot
9521                                            .deref_unchecked()
9522                                            .deref_unchecked::<
9523                                                ::fidl_next::wire::Vector<'_, crate::wire::Heap<'_>>
9524                                            >()
9525                        };
9526
9527                        if value.len() > 64 {
9528                            return Err(::fidl_next::DecodeError::VectorTooLong {
9529                                size: value.len() as u64,
9530                                limit: 64,
9531                            });
9532                        }
9533
9534                        Ok(())
9535                    }
9536
9537                    9 => {
9538                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9539                            slot.as_mut(),
9540                            decoder,
9541                            (),
9542                        )?;
9543
9544                        Ok(())
9545                    }
9546
9547                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9548                }
9549            })
9550        }
9551    }
9552
9553    impl<'de> BufferMemoryConstraints<'de> {
9554        pub fn min_size_bytes(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
9555            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9556        }
9557
9558        pub fn take_min_size_bytes(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
9559            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9560        }
9561
9562        pub fn max_size_bytes(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
9563            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9564        }
9565
9566        pub fn take_max_size_bytes(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
9567            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
9568        }
9569
9570        pub fn physically_contiguous_required(&self) -> ::core::option::Option<&bool> {
9571            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
9572        }
9573
9574        pub fn take_physically_contiguous_required(&mut self) -> ::core::option::Option<bool> {
9575            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
9576        }
9577
9578        pub fn secure_required(&self) -> ::core::option::Option<&bool> {
9579            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
9580        }
9581
9582        pub fn take_secure_required(&mut self) -> ::core::option::Option<bool> {
9583            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
9584        }
9585
9586        pub fn cpu_domain_supported(&self) -> ::core::option::Option<&bool> {
9587            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
9588        }
9589
9590        pub fn take_cpu_domain_supported(&mut self) -> ::core::option::Option<bool> {
9591            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
9592        }
9593
9594        pub fn ram_domain_supported(&self) -> ::core::option::Option<&bool> {
9595            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
9596        }
9597
9598        pub fn take_ram_domain_supported(&mut self) -> ::core::option::Option<bool> {
9599            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
9600        }
9601
9602        pub fn inaccessible_domain_supported(&self) -> ::core::option::Option<&bool> {
9603            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
9604        }
9605
9606        pub fn take_inaccessible_domain_supported(&mut self) -> ::core::option::Option<bool> {
9607            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
9608        }
9609
9610        pub fn permitted_heaps(
9611            &self,
9612        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::Heap<'de>>>
9613        {
9614            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
9615        }
9616
9617        pub fn take_permitted_heaps(
9618            &mut self,
9619        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::Heap<'de>>>
9620        {
9621            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
9622        }
9623
9624        pub fn min_physical_base_alignment(
9625            &self,
9626        ) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
9627            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
9628        }
9629
9630        pub fn take_min_physical_base_alignment(
9631            &mut self,
9632        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
9633            unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
9634        }
9635    }
9636
9637    impl<'de> ::core::fmt::Debug for BufferMemoryConstraints<'de> {
9638        fn fmt(
9639            &self,
9640            f: &mut ::core::fmt::Formatter<'_>,
9641        ) -> ::core::result::Result<(), ::core::fmt::Error> {
9642            f.debug_struct("BufferMemoryConstraints")
9643                .field("min_size_bytes", &self.min_size_bytes())
9644                .field("max_size_bytes", &self.max_size_bytes())
9645                .field("physically_contiguous_required", &self.physically_contiguous_required())
9646                .field("secure_required", &self.secure_required())
9647                .field("cpu_domain_supported", &self.cpu_domain_supported())
9648                .field("ram_domain_supported", &self.ram_domain_supported())
9649                .field("inaccessible_domain_supported", &self.inaccessible_domain_supported())
9650                .field("permitted_heaps", &self.permitted_heaps())
9651                .field("min_physical_base_alignment", &self.min_physical_base_alignment())
9652                .finish()
9653        }
9654    }
9655
9656    impl<'de> ::fidl_next::IntoNatural for BufferMemoryConstraints<'de> {
9657        type Natural = crate::natural::BufferMemoryConstraints;
9658    }
9659
9660    /// The wire type corresponding to [`CoherencyDomain`].
9661    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
9662    #[repr(transparent)]
9663    pub struct CoherencyDomain {
9664        pub(crate) value: ::fidl_next::wire::Uint32,
9665    }
9666
9667    impl ::fidl_next::Constrained for CoherencyDomain {
9668        type Constraint = ();
9669
9670        fn validate(
9671            _: ::fidl_next::Slot<'_, Self>,
9672            _: Self::Constraint,
9673        ) -> Result<(), ::fidl_next::ValidationError> {
9674            Ok(())
9675        }
9676    }
9677
9678    unsafe impl ::fidl_next::Wire for CoherencyDomain {
9679        type Narrowed<'de> = Self;
9680
9681        #[inline]
9682        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9683            // Wire enums have no padding
9684        }
9685    }
9686
9687    impl CoherencyDomain {
9688        pub const CPU: CoherencyDomain = CoherencyDomain { value: ::fidl_next::wire::Uint32(0) };
9689
9690        pub const RAM: CoherencyDomain = CoherencyDomain { value: ::fidl_next::wire::Uint32(1) };
9691
9692        pub const INACCESSIBLE: CoherencyDomain =
9693            CoherencyDomain { value: ::fidl_next::wire::Uint32(2) };
9694    }
9695
9696    unsafe impl<___D> ::fidl_next::Decode<___D> for CoherencyDomain
9697    where
9698        ___D: ?Sized,
9699    {
9700        fn decode(
9701            slot: ::fidl_next::Slot<'_, Self>,
9702            _: &mut ___D,
9703            _: (),
9704        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9705            Ok(())
9706        }
9707    }
9708
9709    impl ::core::convert::From<crate::natural::CoherencyDomain> for CoherencyDomain {
9710        fn from(natural: crate::natural::CoherencyDomain) -> Self {
9711            match natural {
9712                crate::natural::CoherencyDomain::Cpu => CoherencyDomain::CPU,
9713
9714                crate::natural::CoherencyDomain::Ram => CoherencyDomain::RAM,
9715
9716                crate::natural::CoherencyDomain::Inaccessible => CoherencyDomain::INACCESSIBLE,
9717
9718                crate::natural::CoherencyDomain::UnknownOrdinal_(value) => {
9719                    CoherencyDomain { value: ::fidl_next::wire::Uint32::from(value) }
9720                }
9721            }
9722        }
9723    }
9724
9725    impl ::fidl_next::IntoNatural for CoherencyDomain {
9726        type Natural = crate::natural::CoherencyDomain;
9727    }
9728
9729    /// The wire type corresponding to [`BufferMemorySettings`].
9730    #[repr(C)]
9731    pub struct BufferMemorySettings<'de> {
9732        pub(crate) table: ::fidl_next::wire::Table<'de>,
9733    }
9734
9735    impl<'de> Drop for BufferMemorySettings<'de> {
9736        fn drop(&mut self) {
9737            let _ = self
9738                .table
9739                .get(1)
9740                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
9741
9742            let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9743
9744            let _ = self.table.get(3).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
9745
9746            let _ = self.table.get(4).map(|envelope| unsafe {
9747                envelope.read_unchecked::<crate::wire::CoherencyDomain>()
9748            });
9749
9750            let _ = self
9751                .table
9752                .get(5)
9753                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() });
9754
9755            let _ = self
9756                .table
9757                .get(6)
9758                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
9759        }
9760    }
9761
9762    impl ::fidl_next::Constrained for BufferMemorySettings<'_> {
9763        type Constraint = ();
9764
9765        fn validate(
9766            _: ::fidl_next::Slot<'_, Self>,
9767            _: Self::Constraint,
9768        ) -> Result<(), ::fidl_next::ValidationError> {
9769            Ok(())
9770        }
9771    }
9772
9773    unsafe impl ::fidl_next::Wire for BufferMemorySettings<'static> {
9774        type Narrowed<'de> = BufferMemorySettings<'de>;
9775
9776        #[inline]
9777        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9778            ::fidl_next::munge!(let Self { table } = out);
9779            ::fidl_next::wire::Table::zero_padding(table);
9780        }
9781    }
9782
9783    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BufferMemorySettings<'de>
9784    where
9785        ___D: ::fidl_next::Decoder<'de> + ?Sized,
9786    {
9787        fn decode(
9788            slot: ::fidl_next::Slot<'_, Self>,
9789            decoder: &mut ___D,
9790            _: (),
9791        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9792            ::fidl_next::munge!(let Self { table } = slot);
9793
9794            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
9795                match ordinal {
9796                    0 => unsafe { ::core::hint::unreachable_unchecked() },
9797
9798                    1 => {
9799                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9800                            slot.as_mut(),
9801                            decoder,
9802                            (),
9803                        )?;
9804
9805                        Ok(())
9806                    }
9807
9808                    2 => {
9809                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
9810                            slot.as_mut(),
9811                            decoder,
9812                            (),
9813                        )?;
9814
9815                        Ok(())
9816                    }
9817
9818                    3 => {
9819                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
9820                            slot.as_mut(),
9821                            decoder,
9822                            (),
9823                        )?;
9824
9825                        Ok(())
9826                    }
9827
9828                    4 => {
9829                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::CoherencyDomain>(
9830                            slot.as_mut(),
9831                            decoder,
9832                            (),
9833                        )?;
9834
9835                        Ok(())
9836                    }
9837
9838                    5 => {
9839                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Heap<'de>>(
9840                            slot.as_mut(),
9841                            decoder,
9842                            (),
9843                        )?;
9844
9845                        Ok(())
9846                    }
9847
9848                    6 => {
9849                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
9850                            slot.as_mut(),
9851                            decoder,
9852                            (),
9853                        )?;
9854
9855                        Ok(())
9856                    }
9857
9858                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
9859                }
9860            })
9861        }
9862    }
9863
9864    impl<'de> BufferMemorySettings<'de> {
9865        pub fn size_bytes(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
9866            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
9867        }
9868
9869        pub fn take_size_bytes(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
9870            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
9871        }
9872
9873        pub fn is_physically_contiguous(&self) -> ::core::option::Option<&bool> {
9874            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
9875        }
9876
9877        pub fn take_is_physically_contiguous(&mut self) -> ::core::option::Option<bool> {
9878            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
9879        }
9880
9881        pub fn is_secure(&self) -> ::core::option::Option<&bool> {
9882            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
9883        }
9884
9885        pub fn take_is_secure(&mut self) -> ::core::option::Option<bool> {
9886            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
9887        }
9888
9889        pub fn coherency_domain(&self) -> ::core::option::Option<&crate::wire::CoherencyDomain> {
9890            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
9891        }
9892
9893        pub fn take_coherency_domain(
9894            &mut self,
9895        ) -> ::core::option::Option<crate::wire::CoherencyDomain> {
9896            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
9897        }
9898
9899        pub fn heap(&self) -> ::core::option::Option<&crate::wire::Heap<'de>> {
9900            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
9901        }
9902
9903        pub fn take_heap(&mut self) -> ::core::option::Option<crate::wire::Heap<'de>> {
9904            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
9905        }
9906
9907        pub fn raw_vmo_size(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
9908            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
9909        }
9910
9911        pub fn take_raw_vmo_size(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
9912            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
9913        }
9914    }
9915
9916    impl<'de> ::core::fmt::Debug for BufferMemorySettings<'de> {
9917        fn fmt(
9918            &self,
9919            f: &mut ::core::fmt::Formatter<'_>,
9920        ) -> ::core::result::Result<(), ::core::fmt::Error> {
9921            f.debug_struct("BufferMemorySettings")
9922                .field("size_bytes", &self.size_bytes())
9923                .field("is_physically_contiguous", &self.is_physically_contiguous())
9924                .field("is_secure", &self.is_secure())
9925                .field("coherency_domain", &self.coherency_domain())
9926                .field("heap", &self.heap())
9927                .field("raw_vmo_size", &self.raw_vmo_size())
9928                .finish()
9929        }
9930    }
9931
9932    impl<'de> ::fidl_next::IntoNatural for BufferMemorySettings<'de> {
9933        type Natural = crate::natural::BufferMemorySettings;
9934    }
9935
9936    /// The wire type corresponding to [`Error`].
9937    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
9938    #[repr(transparent)]
9939    pub struct Error {
9940        pub(crate) value: ::fidl_next::wire::Uint32,
9941    }
9942
9943    impl ::fidl_next::Constrained for Error {
9944        type Constraint = ();
9945
9946        fn validate(
9947            _: ::fidl_next::Slot<'_, Self>,
9948            _: Self::Constraint,
9949        ) -> Result<(), ::fidl_next::ValidationError> {
9950            Ok(())
9951        }
9952    }
9953
9954    unsafe impl ::fidl_next::Wire for Error {
9955        type Narrowed<'de> = Self;
9956
9957        #[inline]
9958        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9959            // Wire enums have no padding
9960        }
9961    }
9962
9963    impl Error {
9964        pub const INVALID: Error = Error { value: ::fidl_next::wire::Uint32(0) };
9965
9966        pub const UNSPECIFIED: Error = Error { value: ::fidl_next::wire::Uint32(1) };
9967
9968        pub const PROTOCOL_DEVIATION: Error = Error { value: ::fidl_next::wire::Uint32(2) };
9969
9970        pub const NOT_FOUND: Error = Error { value: ::fidl_next::wire::Uint32(3) };
9971
9972        pub const HANDLE_ACCESS_DENIED: Error = Error { value: ::fidl_next::wire::Uint32(4) };
9973
9974        pub const NO_MEMORY: Error = Error { value: ::fidl_next::wire::Uint32(5) };
9975
9976        pub const CONSTRAINTS_INTERSECTION_EMPTY: Error =
9977            Error { value: ::fidl_next::wire::Uint32(6) };
9978
9979        pub const PENDING: Error = Error { value: ::fidl_next::wire::Uint32(7) };
9980
9981        pub const TOO_MANY_GROUP_CHILD_COMBINATIONS: Error =
9982            Error { value: ::fidl_next::wire::Uint32(8) };
9983
9984        pub const NO_MORE_STRONG_VMO_HANDLES: Error = Error { value: ::fidl_next::wire::Uint32(9) };
9985    }
9986
9987    unsafe impl<___D> ::fidl_next::Decode<___D> for Error
9988    where
9989        ___D: ?Sized,
9990    {
9991        fn decode(
9992            slot: ::fidl_next::Slot<'_, Self>,
9993            _: &mut ___D,
9994            _: (),
9995        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9996            Ok(())
9997        }
9998    }
9999
10000    impl ::core::convert::From<crate::natural::Error> for Error {
10001        fn from(natural: crate::natural::Error) -> Self {
10002            match natural {
10003                crate::natural::Error::Invalid => Error::INVALID,
10004
10005                crate::natural::Error::Unspecified => Error::UNSPECIFIED,
10006
10007                crate::natural::Error::ProtocolDeviation => Error::PROTOCOL_DEVIATION,
10008
10009                crate::natural::Error::NotFound => Error::NOT_FOUND,
10010
10011                crate::natural::Error::HandleAccessDenied => Error::HANDLE_ACCESS_DENIED,
10012
10013                crate::natural::Error::NoMemory => Error::NO_MEMORY,
10014
10015                crate::natural::Error::ConstraintsIntersectionEmpty => {
10016                    Error::CONSTRAINTS_INTERSECTION_EMPTY
10017                }
10018
10019                crate::natural::Error::Pending => Error::PENDING,
10020
10021                crate::natural::Error::TooManyGroupChildCombinations => {
10022                    Error::TOO_MANY_GROUP_CHILD_COMBINATIONS
10023                }
10024
10025                crate::natural::Error::NoMoreStrongVmoHandles => Error::NO_MORE_STRONG_VMO_HANDLES,
10026
10027                crate::natural::Error::UnknownOrdinal_(value) => {
10028                    Error { value: ::fidl_next::wire::Uint32::from(value) }
10029                }
10030            }
10031        }
10032    }
10033
10034    impl ::fidl_next::IntoNatural for Error {
10035        type Natural = crate::natural::Error;
10036    }
10037
10038    /// The wire type corresponding to [`PixelFormatAndModifier`].
10039    #[derive(Clone, Debug)]
10040    #[repr(C)]
10041    pub struct PixelFormatAndModifier {
10042        pub pixel_format: ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
10043
10044        pub pixel_format_modifier: ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
10045    }
10046
10047    static_assertions::const_assert_eq!(std::mem::size_of::<PixelFormatAndModifier>(), 16);
10048    static_assertions::const_assert_eq!(std::mem::align_of::<PixelFormatAndModifier>(), 8);
10049
10050    static_assertions::const_assert_eq!(
10051        std::mem::offset_of!(PixelFormatAndModifier, pixel_format),
10052        0
10053    );
10054
10055    static_assertions::const_assert_eq!(
10056        std::mem::offset_of!(PixelFormatAndModifier, pixel_format_modifier),
10057        8
10058    );
10059
10060    impl ::fidl_next::Constrained for PixelFormatAndModifier {
10061        type Constraint = ();
10062
10063        fn validate(
10064            _: ::fidl_next::Slot<'_, Self>,
10065            _: Self::Constraint,
10066        ) -> Result<(), ::fidl_next::ValidationError> {
10067            Ok(())
10068        }
10069    }
10070
10071    unsafe impl ::fidl_next::Wire for PixelFormatAndModifier {
10072        type Narrowed<'de> = PixelFormatAndModifier;
10073
10074        #[inline]
10075        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10076            ::fidl_next::munge! {
10077                let Self {
10078                    pixel_format,
10079                    pixel_format_modifier,
10080
10081                } = &mut *out_;
10082            }
10083
10084            ::fidl_next::Wire::zero_padding(pixel_format);
10085
10086            ::fidl_next::Wire::zero_padding(pixel_format_modifier);
10087
10088            unsafe {
10089                out_.as_mut_ptr().cast::<u8>().add(4).write_bytes(0, 4);
10090            }
10091        }
10092    }
10093
10094    unsafe impl<___D> ::fidl_next::Decode<___D> for PixelFormatAndModifier
10095    where
10096        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10097    {
10098        fn decode(
10099            slot_: ::fidl_next::Slot<'_, Self>,
10100            decoder_: &mut ___D,
10101            _: (),
10102        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10103            if slot_.as_bytes()[4..8] != [0u8; 4] {
10104                return Err(::fidl_next::DecodeError::InvalidPadding);
10105            }
10106
10107            ::fidl_next::munge! {
10108                let Self {
10109                    mut pixel_format,
10110                    mut pixel_format_modifier,
10111
10112                } = slot_;
10113            }
10114
10115            let _field = pixel_format.as_mut();
10116
10117            ::fidl_next::Decode::decode(pixel_format.as_mut(), decoder_, ())?;
10118
10119            let _field = pixel_format_modifier.as_mut();
10120
10121            ::fidl_next::Decode::decode(pixel_format_modifier.as_mut(), decoder_, ())?;
10122
10123            Ok(())
10124        }
10125    }
10126
10127    impl ::fidl_next::IntoNatural for PixelFormatAndModifier {
10128        type Natural = crate::natural::PixelFormatAndModifier;
10129    }
10130
10131    /// The wire type corresponding to [`ImageFormatConstraints`].
10132    #[repr(C)]
10133    pub struct ImageFormatConstraints<'de> {
10134        pub(crate) table: ::fidl_next::wire::Table<'de>,
10135    }
10136
10137    impl<'de> Drop for ImageFormatConstraints<'de> {
10138        fn drop(&mut self) {
10139            let _ = self.table.get(1).map(|envelope| unsafe {
10140                envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormat>()
10141            });
10142
10143            let _ = self.table.get(2)
10144                .map(|envelope| unsafe {
10145                    envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>()
10146                });
10147
10148            let _ = self.table.get(3).map(|envelope| unsafe {
10149                envelope.read_unchecked::<::fidl_next::wire::Vector<
10150                    'de,
10151                    ::fidl_next_common_fuchsia_images2::wire::ColorSpace,
10152                >>()
10153            });
10154
10155            let _ = self.table.get(4).map(|envelope| unsafe {
10156                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
10157            });
10158
10159            let _ = self.table.get(5).map(|envelope| unsafe {
10160                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
10161            });
10162
10163            let _ = self
10164                .table
10165                .get(6)
10166                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10167
10168            let _ = self
10169                .table
10170                .get(7)
10171                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10172
10173            let _ = self
10174                .table
10175                .get(8)
10176                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
10177
10178            let _ = self.table.get(9).map(|envelope| unsafe {
10179                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
10180            });
10181
10182            let _ = self.table.get(10).map(|envelope| unsafe {
10183                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
10184            });
10185
10186            let _ = self.table.get(11).map(|envelope| unsafe {
10187                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
10188            });
10189
10190            let _ = self.table.get(12).map(|envelope| unsafe {
10191                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
10192            });
10193
10194            let _ = self
10195                .table
10196                .get(13)
10197                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10198
10199            let _ = self
10200                .table
10201                .get(14)
10202                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10203
10204            let _ = self.table.get(15)
10205                .map(|envelope| unsafe {
10206                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::PixelFormatAndModifier>>()
10207                });
10208
10209            let _ = self.table.get(16).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
10210
10211            let _ = self.table.get(17).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
10212
10213            let _ = self.table.get(18)
10214                .map(|envelope| unsafe {
10215                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_math::wire::SizeU>>()
10216                });
10217
10218            let _ = self.table.get(19).map(|envelope| unsafe {
10219                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
10220            });
10221
10222            let _ = self
10223                .table
10224                .get(20)
10225                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
10226        }
10227    }
10228
10229    impl ::fidl_next::Constrained for ImageFormatConstraints<'_> {
10230        type Constraint = ();
10231
10232        fn validate(
10233            _: ::fidl_next::Slot<'_, Self>,
10234            _: Self::Constraint,
10235        ) -> Result<(), ::fidl_next::ValidationError> {
10236            Ok(())
10237        }
10238    }
10239
10240    unsafe impl ::fidl_next::Wire for ImageFormatConstraints<'static> {
10241        type Narrowed<'de> = ImageFormatConstraints<'de>;
10242
10243        #[inline]
10244        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10245            ::fidl_next::munge!(let Self { table } = out);
10246            ::fidl_next::wire::Table::zero_padding(table);
10247        }
10248    }
10249
10250    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ImageFormatConstraints<'de>
10251    where
10252        ___D: ::fidl_next::Decoder<'de> + ?Sized,
10253    {
10254        fn decode(
10255            slot: ::fidl_next::Slot<'_, Self>,
10256            decoder: &mut ___D,
10257            _: (),
10258        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10259            ::fidl_next::munge!(let Self { table } = slot);
10260
10261            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10262                match ordinal {
10263                    0 => unsafe { ::core::hint::unreachable_unchecked() },
10264
10265                    1 => {
10266                        ::fidl_next::wire::Envelope::decode_as::<
10267                            ___D,
10268                            ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
10269                        >(slot.as_mut(), decoder, ())?;
10270
10271                        Ok(())
10272                    }
10273
10274                    2 => {
10275                        ::fidl_next::wire::Envelope::decode_as::<
10276                            ___D,
10277                            ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
10278                        >(slot.as_mut(), decoder, ())?;
10279
10280                        Ok(())
10281                    }
10282
10283                    3 => {
10284                        ::fidl_next::wire::Envelope::decode_as::<
10285                            ___D,
10286                            ::fidl_next::wire::Vector<
10287                                'de,
10288                                ::fidl_next_common_fuchsia_images2::wire::ColorSpace,
10289                            >,
10290                        >(slot.as_mut(), decoder, (32, ()))?;
10291
10292                        let value = unsafe {
10293                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
10294                                '_,
10295                                ::fidl_next_common_fuchsia_images2::wire::ColorSpace,
10296                            >>()
10297                        };
10298
10299                        if value.len() > 32 {
10300                            return Err(::fidl_next::DecodeError::VectorTooLong {
10301                                size: value.len() as u64,
10302                                limit: 32,
10303                            });
10304                        }
10305
10306                        Ok(())
10307                    }
10308
10309                    4 => {
10310                        ::fidl_next::wire::Envelope::decode_as::<
10311                            ___D,
10312                            ::fidl_next_common_fuchsia_math::wire::SizeU,
10313                        >(slot.as_mut(), decoder, ())?;
10314
10315                        Ok(())
10316                    }
10317
10318                    5 => {
10319                        ::fidl_next::wire::Envelope::decode_as::<
10320                            ___D,
10321                            ::fidl_next_common_fuchsia_math::wire::SizeU,
10322                        >(slot.as_mut(), decoder, ())?;
10323
10324                        Ok(())
10325                    }
10326
10327                    6 => {
10328                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10329                            slot.as_mut(),
10330                            decoder,
10331                            (),
10332                        )?;
10333
10334                        Ok(())
10335                    }
10336
10337                    7 => {
10338                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10339                            slot.as_mut(),
10340                            decoder,
10341                            (),
10342                        )?;
10343
10344                        Ok(())
10345                    }
10346
10347                    8 => {
10348                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
10349                            slot.as_mut(),
10350                            decoder,
10351                            (),
10352                        )?;
10353
10354                        Ok(())
10355                    }
10356
10357                    9 => {
10358                        ::fidl_next::wire::Envelope::decode_as::<
10359                            ___D,
10360                            ::fidl_next_common_fuchsia_math::wire::SizeU,
10361                        >(slot.as_mut(), decoder, ())?;
10362
10363                        Ok(())
10364                    }
10365
10366                    10 => {
10367                        ::fidl_next::wire::Envelope::decode_as::<
10368                            ___D,
10369                            ::fidl_next_common_fuchsia_math::wire::SizeU,
10370                        >(slot.as_mut(), decoder, ())?;
10371
10372                        Ok(())
10373                    }
10374
10375                    11 => {
10376                        ::fidl_next::wire::Envelope::decode_as::<
10377                            ___D,
10378                            ::fidl_next_common_fuchsia_math::wire::SizeU,
10379                        >(slot.as_mut(), decoder, ())?;
10380
10381                        Ok(())
10382                    }
10383
10384                    12 => {
10385                        ::fidl_next::wire::Envelope::decode_as::<
10386                            ___D,
10387                            ::fidl_next_common_fuchsia_math::wire::SizeU,
10388                        >(slot.as_mut(), decoder, ())?;
10389
10390                        Ok(())
10391                    }
10392
10393                    13 => {
10394                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10395                            slot.as_mut(),
10396                            decoder,
10397                            (),
10398                        )?;
10399
10400                        Ok(())
10401                    }
10402
10403                    14 => {
10404                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10405                            slot.as_mut(),
10406                            decoder,
10407                            (),
10408                        )?;
10409
10410                        Ok(())
10411                    }
10412
10413                    15 => {
10414                        ::fidl_next::wire::Envelope::decode_as::<
10415                            ___D,
10416                            ::fidl_next::wire::Vector<'de, crate::wire::PixelFormatAndModifier>,
10417                        >(slot.as_mut(), decoder, (64, ()))?;
10418
10419                        let value = unsafe {
10420                            slot
10421                                            .deref_unchecked()
10422                                            .deref_unchecked::<
10423                                                ::fidl_next::wire::Vector<'_, crate::wire::PixelFormatAndModifier>
10424                                            >()
10425                        };
10426
10427                        if value.len() > 64 {
10428                            return Err(::fidl_next::DecodeError::VectorTooLong {
10429                                size: value.len() as u64,
10430                                limit: 64,
10431                            });
10432                        }
10433
10434                        Ok(())
10435                    }
10436
10437                    16 => {
10438                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
10439                            slot.as_mut(),
10440                            decoder,
10441                            (),
10442                        )?;
10443
10444                        Ok(())
10445                    }
10446
10447                    17 => {
10448                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
10449                            slot.as_mut(),
10450                            decoder,
10451                            (),
10452                        )?;
10453
10454                        Ok(())
10455                    }
10456
10457                    18 => {
10458                        ::fidl_next::wire::Envelope::decode_as::<
10459                            ___D,
10460                            ::fidl_next::wire::Vector<
10461                                'de,
10462                                ::fidl_next_common_fuchsia_math::wire::SizeU,
10463                            >,
10464                        >(slot.as_mut(), decoder, (64, ()))?;
10465
10466                        let value = unsafe {
10467                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
10468                                '_,
10469                                ::fidl_next_common_fuchsia_math::wire::SizeU,
10470                            >>()
10471                        };
10472
10473                        if value.len() > 64 {
10474                            return Err(::fidl_next::DecodeError::VectorTooLong {
10475                                size: value.len() as u64,
10476                                limit: 64,
10477                            });
10478                        }
10479
10480                        Ok(())
10481                    }
10482
10483                    19 => {
10484                        ::fidl_next::wire::Envelope::decode_as::<
10485                            ___D,
10486                            ::fidl_next_common_fuchsia_math::wire::SizeU,
10487                        >(slot.as_mut(), decoder, ())?;
10488
10489                        Ok(())
10490                    }
10491
10492                    20 => {
10493                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
10494                            slot.as_mut(),
10495                            decoder,
10496                            (),
10497                        )?;
10498
10499                        Ok(())
10500                    }
10501
10502                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10503                }
10504            })
10505        }
10506    }
10507
10508    impl<'de> ImageFormatConstraints<'de> {
10509        pub fn pixel_format(
10510            &self,
10511        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_images2::wire::PixelFormat>
10512        {
10513            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
10514        }
10515
10516        pub fn take_pixel_format(
10517            &mut self,
10518        ) -> ::core::option::Option<::fidl_next_common_fuchsia_images2::wire::PixelFormat> {
10519            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
10520        }
10521
10522        pub fn pixel_format_modifier(
10523            &self,
10524        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>
10525        {
10526            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
10527        }
10528
10529        pub fn take_pixel_format_modifier(
10530            &mut self,
10531        ) -> ::core::option::Option<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>
10532        {
10533            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
10534        }
10535
10536        pub fn color_spaces(
10537            &self,
10538        ) -> ::core::option::Option<
10539            &::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_images2::wire::ColorSpace>,
10540        > {
10541            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
10542        }
10543
10544        pub fn take_color_spaces(
10545            &mut self,
10546        ) -> ::core::option::Option<
10547            ::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_images2::wire::ColorSpace>,
10548        > {
10549            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
10550        }
10551
10552        pub fn min_size(
10553            &self,
10554        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10555            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
10556        }
10557
10558        pub fn take_min_size(
10559            &mut self,
10560        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10561            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
10562        }
10563
10564        pub fn max_size(
10565            &self,
10566        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10567            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
10568        }
10569
10570        pub fn take_max_size(
10571            &mut self,
10572        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10573            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
10574        }
10575
10576        pub fn min_bytes_per_row(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10577            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
10578        }
10579
10580        pub fn take_min_bytes_per_row(
10581            &mut self,
10582        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10583            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
10584        }
10585
10586        pub fn max_bytes_per_row(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10587            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
10588        }
10589
10590        pub fn take_max_bytes_per_row(
10591            &mut self,
10592        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10593            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
10594        }
10595
10596        pub fn max_width_times_height(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
10597            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
10598        }
10599
10600        pub fn take_max_width_times_height(
10601            &mut self,
10602        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
10603            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
10604        }
10605
10606        pub fn size_alignment(
10607            &self,
10608        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10609            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
10610        }
10611
10612        pub fn take_size_alignment(
10613            &mut self,
10614        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10615            unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
10616        }
10617
10618        pub fn display_rect_alignment(
10619            &self,
10620        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10621            unsafe { Some(self.table.get(10)?.deref_unchecked()) }
10622        }
10623
10624        pub fn take_display_rect_alignment(
10625            &mut self,
10626        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10627            unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
10628        }
10629
10630        pub fn required_min_size(
10631            &self,
10632        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10633            unsafe { Some(self.table.get(11)?.deref_unchecked()) }
10634        }
10635
10636        pub fn take_required_min_size(
10637            &mut self,
10638        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10639            unsafe { Some(self.table.get_mut(11)?.take_unchecked()) }
10640        }
10641
10642        pub fn required_max_size(
10643            &self,
10644        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10645            unsafe { Some(self.table.get(12)?.deref_unchecked()) }
10646        }
10647
10648        pub fn take_required_max_size(
10649            &mut self,
10650        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10651            unsafe { Some(self.table.get_mut(12)?.take_unchecked()) }
10652        }
10653
10654        pub fn bytes_per_row_divisor(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10655            unsafe { Some(self.table.get(13)?.deref_unchecked()) }
10656        }
10657
10658        pub fn take_bytes_per_row_divisor(
10659            &mut self,
10660        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10661            unsafe { Some(self.table.get_mut(13)?.take_unchecked()) }
10662        }
10663
10664        pub fn start_offset_divisor(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10665            unsafe { Some(self.table.get(14)?.deref_unchecked()) }
10666        }
10667
10668        pub fn take_start_offset_divisor(
10669            &mut self,
10670        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10671            unsafe { Some(self.table.get_mut(14)?.take_unchecked()) }
10672        }
10673
10674        pub fn pixel_format_and_modifiers(
10675            &self,
10676        ) -> ::core::option::Option<
10677            &::fidl_next::wire::Vector<'de, crate::wire::PixelFormatAndModifier>,
10678        > {
10679            unsafe { Some(self.table.get(15)?.deref_unchecked()) }
10680        }
10681
10682        pub fn take_pixel_format_and_modifiers(
10683            &mut self,
10684        ) -> ::core::option::Option<
10685            ::fidl_next::wire::Vector<'de, crate::wire::PixelFormatAndModifier>,
10686        > {
10687            unsafe { Some(self.table.get_mut(15)?.take_unchecked()) }
10688        }
10689
10690        pub fn require_bytes_per_row_at_pixel_boundary(&self) -> ::core::option::Option<&bool> {
10691            unsafe { Some(self.table.get(16)?.deref_unchecked()) }
10692        }
10693
10694        pub fn take_require_bytes_per_row_at_pixel_boundary(
10695            &mut self,
10696        ) -> ::core::option::Option<bool> {
10697            unsafe { Some(self.table.get_mut(16)?.take_unchecked()) }
10698        }
10699
10700        pub fn is_alpha_present(&self) -> ::core::option::Option<&bool> {
10701            unsafe { Some(self.table.get(17)?.deref_unchecked()) }
10702        }
10703
10704        pub fn take_is_alpha_present(&mut self) -> ::core::option::Option<bool> {
10705            unsafe { Some(self.table.get_mut(17)?.take_unchecked()) }
10706        }
10707
10708        pub fn required_max_size_list(
10709            &self,
10710        ) -> ::core::option::Option<
10711            &::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_math::wire::SizeU>,
10712        > {
10713            unsafe { Some(self.table.get(18)?.deref_unchecked()) }
10714        }
10715
10716        pub fn take_required_max_size_list(
10717            &mut self,
10718        ) -> ::core::option::Option<
10719            ::fidl_next::wire::Vector<'de, ::fidl_next_common_fuchsia_math::wire::SizeU>,
10720        > {
10721            unsafe { Some(self.table.get_mut(18)?.take_unchecked()) }
10722        }
10723
10724        pub fn pad_for_block_size(
10725            &self,
10726        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
10727            unsafe { Some(self.table.get(19)?.deref_unchecked()) }
10728        }
10729
10730        pub fn take_pad_for_block_size(
10731            &mut self,
10732        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
10733            unsafe { Some(self.table.get_mut(19)?.take_unchecked()) }
10734        }
10735
10736        pub fn pad_beyond_image_size_bytes(
10737            &self,
10738        ) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
10739            unsafe { Some(self.table.get(20)?.deref_unchecked()) }
10740        }
10741
10742        pub fn take_pad_beyond_image_size_bytes(
10743            &mut self,
10744        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
10745            unsafe { Some(self.table.get_mut(20)?.take_unchecked()) }
10746        }
10747    }
10748
10749    impl<'de> ::core::fmt::Debug for ImageFormatConstraints<'de> {
10750        fn fmt(
10751            &self,
10752            f: &mut ::core::fmt::Formatter<'_>,
10753        ) -> ::core::result::Result<(), ::core::fmt::Error> {
10754            f.debug_struct("ImageFormatConstraints")
10755                .field("pixel_format", &self.pixel_format())
10756                .field("pixel_format_modifier", &self.pixel_format_modifier())
10757                .field("color_spaces", &self.color_spaces())
10758                .field("min_size", &self.min_size())
10759                .field("max_size", &self.max_size())
10760                .field("min_bytes_per_row", &self.min_bytes_per_row())
10761                .field("max_bytes_per_row", &self.max_bytes_per_row())
10762                .field("max_width_times_height", &self.max_width_times_height())
10763                .field("size_alignment", &self.size_alignment())
10764                .field("display_rect_alignment", &self.display_rect_alignment())
10765                .field("required_min_size", &self.required_min_size())
10766                .field("required_max_size", &self.required_max_size())
10767                .field("bytes_per_row_divisor", &self.bytes_per_row_divisor())
10768                .field("start_offset_divisor", &self.start_offset_divisor())
10769                .field("pixel_format_and_modifiers", &self.pixel_format_and_modifiers())
10770                .field(
10771                    "require_bytes_per_row_at_pixel_boundary",
10772                    &self.require_bytes_per_row_at_pixel_boundary(),
10773                )
10774                .field("is_alpha_present", &self.is_alpha_present())
10775                .field("required_max_size_list", &self.required_max_size_list())
10776                .field("pad_for_block_size", &self.pad_for_block_size())
10777                .field("pad_beyond_image_size_bytes", &self.pad_beyond_image_size_bytes())
10778                .finish()
10779        }
10780    }
10781
10782    impl<'de> ::fidl_next::IntoNatural for ImageFormatConstraints<'de> {
10783        type Natural = crate::natural::ImageFormatConstraints;
10784    }
10785
10786    /// The wire type corresponding to [`BufferCollectionConstraints`].
10787    #[repr(C)]
10788    pub struct BufferCollectionConstraints<'de> {
10789        pub(crate) table: ::fidl_next::wire::Table<'de>,
10790    }
10791
10792    impl<'de> Drop for BufferCollectionConstraints<'de> {
10793        fn drop(&mut self) {
10794            let _ = self.table.get(1).map(|envelope| unsafe {
10795                envelope.read_unchecked::<crate::wire::BufferUsage<'de>>()
10796            });
10797
10798            let _ = self
10799                .table
10800                .get(2)
10801                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10802
10803            let _ = self
10804                .table
10805                .get(3)
10806                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10807
10808            let _ = self
10809                .table
10810                .get(4)
10811                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10812
10813            let _ = self
10814                .table
10815                .get(5)
10816                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10817
10818            let _ = self
10819                .table
10820                .get(6)
10821                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
10822
10823            let _ = self.table.get(7).map(|envelope| unsafe {
10824                envelope.read_unchecked::<crate::wire::BufferMemoryConstraints<'de>>()
10825            });
10826
10827            let _ = self.table.get(8)
10828                .map(|envelope| unsafe {
10829                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ImageFormatConstraints<'de>>>()
10830                });
10831        }
10832    }
10833
10834    impl ::fidl_next::Constrained for BufferCollectionConstraints<'_> {
10835        type Constraint = ();
10836
10837        fn validate(
10838            _: ::fidl_next::Slot<'_, Self>,
10839            _: Self::Constraint,
10840        ) -> Result<(), ::fidl_next::ValidationError> {
10841            Ok(())
10842        }
10843    }
10844
10845    unsafe impl ::fidl_next::Wire for BufferCollectionConstraints<'static> {
10846        type Narrowed<'de> = BufferCollectionConstraints<'de>;
10847
10848        #[inline]
10849        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10850            ::fidl_next::munge!(let Self { table } = out);
10851            ::fidl_next::wire::Table::zero_padding(table);
10852        }
10853    }
10854
10855    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BufferCollectionConstraints<'de>
10856    where
10857        ___D: ::fidl_next::Decoder<'de> + ?Sized,
10858    {
10859        fn decode(
10860            slot: ::fidl_next::Slot<'_, Self>,
10861            decoder: &mut ___D,
10862            _: (),
10863        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10864            ::fidl_next::munge!(let Self { table } = slot);
10865
10866            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10867                match ordinal {
10868                    0 => unsafe { ::core::hint::unreachable_unchecked() },
10869
10870                    1 => {
10871                        ::fidl_next::wire::Envelope::decode_as::<
10872                            ___D,
10873                            crate::wire::BufferUsage<'de>,
10874                        >(slot.as_mut(), decoder, ())?;
10875
10876                        Ok(())
10877                    }
10878
10879                    2 => {
10880                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10881                            slot.as_mut(),
10882                            decoder,
10883                            (),
10884                        )?;
10885
10886                        Ok(())
10887                    }
10888
10889                    3 => {
10890                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10891                            slot.as_mut(),
10892                            decoder,
10893                            (),
10894                        )?;
10895
10896                        Ok(())
10897                    }
10898
10899                    4 => {
10900                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10901                            slot.as_mut(),
10902                            decoder,
10903                            (),
10904                        )?;
10905
10906                        Ok(())
10907                    }
10908
10909                    5 => {
10910                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10911                            slot.as_mut(),
10912                            decoder,
10913                            (),
10914                        )?;
10915
10916                        Ok(())
10917                    }
10918
10919                    6 => {
10920                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
10921                            slot.as_mut(),
10922                            decoder,
10923                            (),
10924                        )?;
10925
10926                        Ok(())
10927                    }
10928
10929                    7 => {
10930                        ::fidl_next::wire::Envelope::decode_as::<
10931                            ___D,
10932                            crate::wire::BufferMemoryConstraints<'de>,
10933                        >(slot.as_mut(), decoder, ())?;
10934
10935                        Ok(())
10936                    }
10937
10938                    8 => {
10939                        ::fidl_next::wire::Envelope::decode_as::<
10940                            ___D,
10941                            ::fidl_next::wire::Vector<
10942                                'de,
10943                                crate::wire::ImageFormatConstraints<'de>,
10944                            >,
10945                        >(slot.as_mut(), decoder, (64, ()))?;
10946
10947                        let value = unsafe {
10948                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
10949                                '_,
10950                                crate::wire::ImageFormatConstraints<'_>,
10951                            >>()
10952                        };
10953
10954                        if value.len() > 64 {
10955                            return Err(::fidl_next::DecodeError::VectorTooLong {
10956                                size: value.len() as u64,
10957                                limit: 64,
10958                            });
10959                        }
10960
10961                        Ok(())
10962                    }
10963
10964                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
10965                }
10966            })
10967        }
10968    }
10969
10970    impl<'de> BufferCollectionConstraints<'de> {
10971        pub fn usage(&self) -> ::core::option::Option<&crate::wire::BufferUsage<'de>> {
10972            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
10973        }
10974
10975        pub fn take_usage(&mut self) -> ::core::option::Option<crate::wire::BufferUsage<'de>> {
10976            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
10977        }
10978
10979        pub fn min_buffer_count_for_camping(
10980            &self,
10981        ) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10982            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
10983        }
10984
10985        pub fn take_min_buffer_count_for_camping(
10986            &mut self,
10987        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
10988            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
10989        }
10990
10991        pub fn min_buffer_count_for_dedicated_slack(
10992            &self,
10993        ) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
10994            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
10995        }
10996
10997        pub fn take_min_buffer_count_for_dedicated_slack(
10998            &mut self,
10999        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
11000            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
11001        }
11002
11003        pub fn min_buffer_count_for_shared_slack(
11004            &self,
11005        ) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
11006            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
11007        }
11008
11009        pub fn take_min_buffer_count_for_shared_slack(
11010            &mut self,
11011        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
11012            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
11013        }
11014
11015        pub fn min_buffer_count(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
11016            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
11017        }
11018
11019        pub fn take_min_buffer_count(
11020            &mut self,
11021        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
11022            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
11023        }
11024
11025        pub fn max_buffer_count(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
11026            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
11027        }
11028
11029        pub fn take_max_buffer_count(
11030            &mut self,
11031        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
11032            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
11033        }
11034
11035        pub fn buffer_memory_constraints(
11036            &self,
11037        ) -> ::core::option::Option<&crate::wire::BufferMemoryConstraints<'de>> {
11038            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
11039        }
11040
11041        pub fn take_buffer_memory_constraints(
11042            &mut self,
11043        ) -> ::core::option::Option<crate::wire::BufferMemoryConstraints<'de>> {
11044            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
11045        }
11046
11047        pub fn image_format_constraints(
11048            &self,
11049        ) -> ::core::option::Option<
11050            &::fidl_next::wire::Vector<'de, crate::wire::ImageFormatConstraints<'de>>,
11051        > {
11052            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
11053        }
11054
11055        pub fn take_image_format_constraints(
11056            &mut self,
11057        ) -> ::core::option::Option<
11058            ::fidl_next::wire::Vector<'de, crate::wire::ImageFormatConstraints<'de>>,
11059        > {
11060            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
11061        }
11062    }
11063
11064    impl<'de> ::core::fmt::Debug for BufferCollectionConstraints<'de> {
11065        fn fmt(
11066            &self,
11067            f: &mut ::core::fmt::Formatter<'_>,
11068        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11069            f.debug_struct("BufferCollectionConstraints")
11070                .field("usage", &self.usage())
11071                .field("min_buffer_count_for_camping", &self.min_buffer_count_for_camping())
11072                .field(
11073                    "min_buffer_count_for_dedicated_slack",
11074                    &self.min_buffer_count_for_dedicated_slack(),
11075                )
11076                .field(
11077                    "min_buffer_count_for_shared_slack",
11078                    &self.min_buffer_count_for_shared_slack(),
11079                )
11080                .field("min_buffer_count", &self.min_buffer_count())
11081                .field("max_buffer_count", &self.max_buffer_count())
11082                .field("buffer_memory_constraints", &self.buffer_memory_constraints())
11083                .field("image_format_constraints", &self.image_format_constraints())
11084                .finish()
11085        }
11086    }
11087
11088    impl<'de> ::fidl_next::IntoNatural for BufferCollectionConstraints<'de> {
11089        type Natural = crate::natural::BufferCollectionConstraints;
11090    }
11091
11092    /// The wire type corresponding to [`SingleBufferSettings`].
11093    #[repr(C)]
11094    pub struct SingleBufferSettings<'de> {
11095        pub(crate) table: ::fidl_next::wire::Table<'de>,
11096    }
11097
11098    impl<'de> Drop for SingleBufferSettings<'de> {
11099        fn drop(&mut self) {
11100            let _ = self.table.get(1).map(|envelope| unsafe {
11101                envelope.read_unchecked::<crate::wire::BufferMemorySettings<'de>>()
11102            });
11103
11104            let _ = self.table.get(2).map(|envelope| unsafe {
11105                envelope.read_unchecked::<crate::wire::ImageFormatConstraints<'de>>()
11106            });
11107        }
11108    }
11109
11110    impl ::fidl_next::Constrained for SingleBufferSettings<'_> {
11111        type Constraint = ();
11112
11113        fn validate(
11114            _: ::fidl_next::Slot<'_, Self>,
11115            _: Self::Constraint,
11116        ) -> Result<(), ::fidl_next::ValidationError> {
11117            Ok(())
11118        }
11119    }
11120
11121    unsafe impl ::fidl_next::Wire for SingleBufferSettings<'static> {
11122        type Narrowed<'de> = SingleBufferSettings<'de>;
11123
11124        #[inline]
11125        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11126            ::fidl_next::munge!(let Self { table } = out);
11127            ::fidl_next::wire::Table::zero_padding(table);
11128        }
11129    }
11130
11131    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SingleBufferSettings<'de>
11132    where
11133        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11134    {
11135        fn decode(
11136            slot: ::fidl_next::Slot<'_, Self>,
11137            decoder: &mut ___D,
11138            _: (),
11139        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11140            ::fidl_next::munge!(let Self { table } = slot);
11141
11142            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11143                match ordinal {
11144                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11145
11146                    1 => {
11147                        ::fidl_next::wire::Envelope::decode_as::<
11148                            ___D,
11149                            crate::wire::BufferMemorySettings<'de>,
11150                        >(slot.as_mut(), decoder, ())?;
11151
11152                        Ok(())
11153                    }
11154
11155                    2 => {
11156                        ::fidl_next::wire::Envelope::decode_as::<
11157                            ___D,
11158                            crate::wire::ImageFormatConstraints<'de>,
11159                        >(slot.as_mut(), decoder, ())?;
11160
11161                        Ok(())
11162                    }
11163
11164                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11165                }
11166            })
11167        }
11168    }
11169
11170    impl<'de> SingleBufferSettings<'de> {
11171        pub fn buffer_settings(
11172            &self,
11173        ) -> ::core::option::Option<&crate::wire::BufferMemorySettings<'de>> {
11174            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11175        }
11176
11177        pub fn take_buffer_settings(
11178            &mut self,
11179        ) -> ::core::option::Option<crate::wire::BufferMemorySettings<'de>> {
11180            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11181        }
11182
11183        pub fn image_format_constraints(
11184            &self,
11185        ) -> ::core::option::Option<&crate::wire::ImageFormatConstraints<'de>> {
11186            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
11187        }
11188
11189        pub fn take_image_format_constraints(
11190            &mut self,
11191        ) -> ::core::option::Option<crate::wire::ImageFormatConstraints<'de>> {
11192            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
11193        }
11194    }
11195
11196    impl<'de> ::core::fmt::Debug for SingleBufferSettings<'de> {
11197        fn fmt(
11198            &self,
11199            f: &mut ::core::fmt::Formatter<'_>,
11200        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11201            f.debug_struct("SingleBufferSettings")
11202                .field("buffer_settings", &self.buffer_settings())
11203                .field("image_format_constraints", &self.image_format_constraints())
11204                .finish()
11205        }
11206    }
11207
11208    impl<'de> ::fidl_next::IntoNatural for SingleBufferSettings<'de> {
11209        type Natural = crate::natural::SingleBufferSettings;
11210    }
11211
11212    /// The wire type corresponding to [`NodeSyncResponse`].
11213    pub type NodeSyncResponse = ::fidl_next::wire::Unit;
11214
11215    /// The wire type corresponding to [`NodeSetNameRequest`].
11216    #[repr(C)]
11217    pub struct NodeSetNameRequest<'de> {
11218        pub(crate) table: ::fidl_next::wire::Table<'de>,
11219    }
11220
11221    impl<'de> Drop for NodeSetNameRequest<'de> {
11222        fn drop(&mut self) {
11223            let _ = self
11224                .table
11225                .get(1)
11226                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
11227
11228            let _ = self.table.get(2).map(|envelope| unsafe {
11229                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
11230            });
11231        }
11232    }
11233
11234    impl ::fidl_next::Constrained for NodeSetNameRequest<'_> {
11235        type Constraint = ();
11236
11237        fn validate(
11238            _: ::fidl_next::Slot<'_, Self>,
11239            _: Self::Constraint,
11240        ) -> Result<(), ::fidl_next::ValidationError> {
11241            Ok(())
11242        }
11243    }
11244
11245    unsafe impl ::fidl_next::Wire for NodeSetNameRequest<'static> {
11246        type Narrowed<'de> = NodeSetNameRequest<'de>;
11247
11248        #[inline]
11249        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11250            ::fidl_next::munge!(let Self { table } = out);
11251            ::fidl_next::wire::Table::zero_padding(table);
11252        }
11253    }
11254
11255    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetNameRequest<'de>
11256    where
11257        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11258    {
11259        fn decode(
11260            slot: ::fidl_next::Slot<'_, Self>,
11261            decoder: &mut ___D,
11262            _: (),
11263        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11264            ::fidl_next::munge!(let Self { table } = slot);
11265
11266            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11267                match ordinal {
11268                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11269
11270                    1 => {
11271                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
11272                            slot.as_mut(),
11273                            decoder,
11274                            (),
11275                        )?;
11276
11277                        Ok(())
11278                    }
11279
11280                    2 => {
11281                        ::fidl_next::wire::Envelope::decode_as::<
11282                            ___D,
11283                            ::fidl_next::wire::String<'de>,
11284                        >(slot.as_mut(), decoder, 64)?;
11285
11286                        let value = unsafe {
11287                            slot.deref_unchecked()
11288                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
11289                        };
11290
11291                        if value.len() > 64 {
11292                            return Err(::fidl_next::DecodeError::VectorTooLong {
11293                                size: value.len() as u64,
11294                                limit: 64,
11295                            });
11296                        }
11297
11298                        Ok(())
11299                    }
11300
11301                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11302                }
11303            })
11304        }
11305    }
11306
11307    impl<'de> NodeSetNameRequest<'de> {
11308        pub fn priority(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
11309            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11310        }
11311
11312        pub fn take_priority(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
11313            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11314        }
11315
11316        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
11317            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
11318        }
11319
11320        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
11321            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
11322        }
11323    }
11324
11325    impl<'de> ::core::fmt::Debug for NodeSetNameRequest<'de> {
11326        fn fmt(
11327            &self,
11328            f: &mut ::core::fmt::Formatter<'_>,
11329        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11330            f.debug_struct("NodeSetNameRequest")
11331                .field("priority", &self.priority())
11332                .field("name", &self.name())
11333                .finish()
11334        }
11335    }
11336
11337    impl<'de> ::fidl_next::IntoNatural for NodeSetNameRequest<'de> {
11338        type Natural = crate::natural::NodeSetNameRequest;
11339    }
11340
11341    /// The wire type corresponding to [`NodeSetDebugClientInfoRequest`].
11342    #[repr(C)]
11343    pub struct NodeSetDebugClientInfoRequest<'de> {
11344        pub(crate) table: ::fidl_next::wire::Table<'de>,
11345    }
11346
11347    impl<'de> Drop for NodeSetDebugClientInfoRequest<'de> {
11348        fn drop(&mut self) {
11349            let _ = self.table.get(1).map(|envelope| unsafe {
11350                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
11351            });
11352
11353            let _ = self
11354                .table
11355                .get(2)
11356                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
11357        }
11358    }
11359
11360    impl ::fidl_next::Constrained for NodeSetDebugClientInfoRequest<'_> {
11361        type Constraint = ();
11362
11363        fn validate(
11364            _: ::fidl_next::Slot<'_, Self>,
11365            _: Self::Constraint,
11366        ) -> Result<(), ::fidl_next::ValidationError> {
11367            Ok(())
11368        }
11369    }
11370
11371    unsafe impl ::fidl_next::Wire for NodeSetDebugClientInfoRequest<'static> {
11372        type Narrowed<'de> = NodeSetDebugClientInfoRequest<'de>;
11373
11374        #[inline]
11375        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11376            ::fidl_next::munge!(let Self { table } = out);
11377            ::fidl_next::wire::Table::zero_padding(table);
11378        }
11379    }
11380
11381    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetDebugClientInfoRequest<'de>
11382    where
11383        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11384    {
11385        fn decode(
11386            slot: ::fidl_next::Slot<'_, Self>,
11387            decoder: &mut ___D,
11388            _: (),
11389        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11390            ::fidl_next::munge!(let Self { table } = slot);
11391
11392            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11393                match ordinal {
11394                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11395
11396                    1 => {
11397                        ::fidl_next::wire::Envelope::decode_as::<
11398                            ___D,
11399                            ::fidl_next::wire::String<'de>,
11400                        >(slot.as_mut(), decoder, 256)?;
11401
11402                        let value = unsafe {
11403                            slot.deref_unchecked()
11404                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
11405                        };
11406
11407                        if value.len() > 256 {
11408                            return Err(::fidl_next::DecodeError::VectorTooLong {
11409                                size: value.len() as u64,
11410                                limit: 256,
11411                            });
11412                        }
11413
11414                        Ok(())
11415                    }
11416
11417                    2 => {
11418                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
11419                            slot.as_mut(),
11420                            decoder,
11421                            (),
11422                        )?;
11423
11424                        Ok(())
11425                    }
11426
11427                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11428                }
11429            })
11430        }
11431    }
11432
11433    impl<'de> NodeSetDebugClientInfoRequest<'de> {
11434        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
11435            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11436        }
11437
11438        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
11439            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11440        }
11441
11442        pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
11443            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
11444        }
11445
11446        pub fn take_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
11447            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
11448        }
11449    }
11450
11451    impl<'de> ::core::fmt::Debug for NodeSetDebugClientInfoRequest<'de> {
11452        fn fmt(
11453            &self,
11454            f: &mut ::core::fmt::Formatter<'_>,
11455        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11456            f.debug_struct("NodeSetDebugClientInfoRequest")
11457                .field("name", &self.name())
11458                .field("id", &self.id())
11459                .finish()
11460        }
11461    }
11462
11463    impl<'de> ::fidl_next::IntoNatural for NodeSetDebugClientInfoRequest<'de> {
11464        type Natural = crate::natural::NodeSetDebugClientInfoRequest;
11465    }
11466
11467    /// The wire type corresponding to [`NodeSetDebugTimeoutLogDeadlineRequest`].
11468    #[repr(C)]
11469    pub struct NodeSetDebugTimeoutLogDeadlineRequest<'de> {
11470        pub(crate) table: ::fidl_next::wire::Table<'de>,
11471    }
11472
11473    impl<'de> Drop for NodeSetDebugTimeoutLogDeadlineRequest<'de> {
11474        fn drop(&mut self) {
11475            let _ = self
11476                .table
11477                .get(1)
11478                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Int64>() });
11479        }
11480    }
11481
11482    impl ::fidl_next::Constrained for NodeSetDebugTimeoutLogDeadlineRequest<'_> {
11483        type Constraint = ();
11484
11485        fn validate(
11486            _: ::fidl_next::Slot<'_, Self>,
11487            _: Self::Constraint,
11488        ) -> Result<(), ::fidl_next::ValidationError> {
11489            Ok(())
11490        }
11491    }
11492
11493    unsafe impl ::fidl_next::Wire for NodeSetDebugTimeoutLogDeadlineRequest<'static> {
11494        type Narrowed<'de> = NodeSetDebugTimeoutLogDeadlineRequest<'de>;
11495
11496        #[inline]
11497        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11498            ::fidl_next::munge!(let Self { table } = out);
11499            ::fidl_next::wire::Table::zero_padding(table);
11500        }
11501    }
11502
11503    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeSetDebugTimeoutLogDeadlineRequest<'de>
11504    where
11505        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11506    {
11507        fn decode(
11508            slot: ::fidl_next::Slot<'_, Self>,
11509            decoder: &mut ___D,
11510            _: (),
11511        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11512            ::fidl_next::munge!(let Self { table } = slot);
11513
11514            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11515                match ordinal {
11516                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11517
11518                    1 => {
11519                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Int64>(
11520                            slot.as_mut(),
11521                            decoder,
11522                            (),
11523                        )?;
11524
11525                        Ok(())
11526                    }
11527
11528                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11529                }
11530            })
11531        }
11532    }
11533
11534    impl<'de> NodeSetDebugTimeoutLogDeadlineRequest<'de> {
11535        pub fn deadline(&self) -> ::core::option::Option<&::fidl_next::wire::Int64> {
11536            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11537        }
11538
11539        pub fn take_deadline(&mut self) -> ::core::option::Option<::fidl_next::wire::Int64> {
11540            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11541        }
11542    }
11543
11544    impl<'de> ::core::fmt::Debug for NodeSetDebugTimeoutLogDeadlineRequest<'de> {
11545        fn fmt(
11546            &self,
11547            f: &mut ::core::fmt::Formatter<'_>,
11548        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11549            f.debug_struct("NodeSetDebugTimeoutLogDeadlineRequest")
11550                .field("deadline", &self.deadline())
11551                .finish()
11552        }
11553    }
11554
11555    impl<'de> ::fidl_next::IntoNatural for NodeSetDebugTimeoutLogDeadlineRequest<'de> {
11556        type Natural = crate::natural::NodeSetDebugTimeoutLogDeadlineRequest;
11557    }
11558
11559    /// The wire type corresponding to [`NodeIsAlternateForResponse`].
11560    #[repr(C)]
11561    pub struct NodeIsAlternateForResponse<'de> {
11562        pub(crate) table: ::fidl_next::wire::Table<'de>,
11563    }
11564
11565    impl<'de> Drop for NodeIsAlternateForResponse<'de> {
11566        fn drop(&mut self) {
11567            let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
11568        }
11569    }
11570
11571    impl ::fidl_next::Constrained for NodeIsAlternateForResponse<'_> {
11572        type Constraint = ();
11573
11574        fn validate(
11575            _: ::fidl_next::Slot<'_, Self>,
11576            _: Self::Constraint,
11577        ) -> Result<(), ::fidl_next::ValidationError> {
11578            Ok(())
11579        }
11580    }
11581
11582    unsafe impl ::fidl_next::Wire for NodeIsAlternateForResponse<'static> {
11583        type Narrowed<'de> = NodeIsAlternateForResponse<'de>;
11584
11585        #[inline]
11586        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11587            ::fidl_next::munge!(let Self { table } = out);
11588            ::fidl_next::wire::Table::zero_padding(table);
11589        }
11590    }
11591
11592    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeIsAlternateForResponse<'de>
11593    where
11594        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11595    {
11596        fn decode(
11597            slot: ::fidl_next::Slot<'_, Self>,
11598            decoder: &mut ___D,
11599            _: (),
11600        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11601            ::fidl_next::munge!(let Self { table } = slot);
11602
11603            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11604                match ordinal {
11605                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11606
11607                    1 => {
11608                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
11609                            slot.as_mut(),
11610                            decoder,
11611                            (),
11612                        )?;
11613
11614                        Ok(())
11615                    }
11616
11617                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11618                }
11619            })
11620        }
11621    }
11622
11623    impl<'de> NodeIsAlternateForResponse<'de> {
11624        pub fn is_alternate(&self) -> ::core::option::Option<&bool> {
11625            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11626        }
11627
11628        pub fn take_is_alternate(&mut self) -> ::core::option::Option<bool> {
11629            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11630        }
11631    }
11632
11633    impl<'de> ::core::fmt::Debug for NodeIsAlternateForResponse<'de> {
11634        fn fmt(
11635            &self,
11636            f: &mut ::core::fmt::Formatter<'_>,
11637        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11638            f.debug_struct("NodeIsAlternateForResponse")
11639                .field("is_alternate", &self.is_alternate())
11640                .finish()
11641        }
11642    }
11643
11644    impl<'de> ::fidl_next::IntoNatural for NodeIsAlternateForResponse<'de> {
11645        type Natural = crate::natural::NodeIsAlternateForResponse;
11646    }
11647
11648    /// The wire type corresponding to [`NodeGetBufferCollectionIdResponse`].
11649    #[repr(C)]
11650    pub struct NodeGetBufferCollectionIdResponse<'de> {
11651        pub(crate) table: ::fidl_next::wire::Table<'de>,
11652    }
11653
11654    impl<'de> Drop for NodeGetBufferCollectionIdResponse<'de> {
11655        fn drop(&mut self) {
11656            let _ = self
11657                .table
11658                .get(1)
11659                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
11660        }
11661    }
11662
11663    impl ::fidl_next::Constrained for NodeGetBufferCollectionIdResponse<'_> {
11664        type Constraint = ();
11665
11666        fn validate(
11667            _: ::fidl_next::Slot<'_, Self>,
11668            _: Self::Constraint,
11669        ) -> Result<(), ::fidl_next::ValidationError> {
11670            Ok(())
11671        }
11672    }
11673
11674    unsafe impl ::fidl_next::Wire for NodeGetBufferCollectionIdResponse<'static> {
11675        type Narrowed<'de> = NodeGetBufferCollectionIdResponse<'de>;
11676
11677        #[inline]
11678        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11679            ::fidl_next::munge!(let Self { table } = out);
11680            ::fidl_next::wire::Table::zero_padding(table);
11681        }
11682    }
11683
11684    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeGetBufferCollectionIdResponse<'de>
11685    where
11686        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11687    {
11688        fn decode(
11689            slot: ::fidl_next::Slot<'_, Self>,
11690            decoder: &mut ___D,
11691            _: (),
11692        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11693            ::fidl_next::munge!(let Self { table } = slot);
11694
11695            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11696                match ordinal {
11697                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11698
11699                    1 => {
11700                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
11701                            slot.as_mut(),
11702                            decoder,
11703                            (),
11704                        )?;
11705
11706                        Ok(())
11707                    }
11708
11709                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11710                }
11711            })
11712        }
11713    }
11714
11715    impl<'de> NodeGetBufferCollectionIdResponse<'de> {
11716        pub fn buffer_collection_id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
11717            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11718        }
11719
11720        pub fn take_buffer_collection_id(
11721            &mut self,
11722        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
11723            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11724        }
11725    }
11726
11727    impl<'de> ::core::fmt::Debug for NodeGetBufferCollectionIdResponse<'de> {
11728        fn fmt(
11729            &self,
11730            f: &mut ::core::fmt::Formatter<'_>,
11731        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11732            f.debug_struct("NodeGetBufferCollectionIdResponse")
11733                .field("buffer_collection_id", &self.buffer_collection_id())
11734                .finish()
11735        }
11736    }
11737
11738    impl<'de> ::fidl_next::IntoNatural for NodeGetBufferCollectionIdResponse<'de> {
11739        type Natural = crate::natural::NodeGetBufferCollectionIdResponse;
11740    }
11741
11742    /// The wire type corresponding to [`BufferCollectionCheckAllBuffersAllocatedResponse`].
11743    pub type BufferCollectionCheckAllBuffersAllocatedResponse = ::fidl_next::wire::Unit;
11744
11745    /// The wire type corresponding to [`BufferCollectionTokenDuplicateSyncRequest`].
11746    #[repr(C)]
11747    pub struct BufferCollectionTokenDuplicateSyncRequest<'de> {
11748        pub(crate) table: ::fidl_next::wire::Table<'de>,
11749    }
11750
11751    impl<'de> Drop for BufferCollectionTokenDuplicateSyncRequest<'de> {
11752        fn drop(&mut self) {
11753            let _ = self.table.get(1)
11754                .map(|envelope| unsafe {
11755                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>>()
11756                });
11757        }
11758    }
11759
11760    impl ::fidl_next::Constrained for BufferCollectionTokenDuplicateSyncRequest<'_> {
11761        type Constraint = ();
11762
11763        fn validate(
11764            _: ::fidl_next::Slot<'_, Self>,
11765            _: Self::Constraint,
11766        ) -> Result<(), ::fidl_next::ValidationError> {
11767            Ok(())
11768        }
11769    }
11770
11771    unsafe impl ::fidl_next::Wire for BufferCollectionTokenDuplicateSyncRequest<'static> {
11772        type Narrowed<'de> = BufferCollectionTokenDuplicateSyncRequest<'de>;
11773
11774        #[inline]
11775        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11776            ::fidl_next::munge!(let Self { table } = out);
11777            ::fidl_next::wire::Table::zero_padding(table);
11778        }
11779    }
11780
11781    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for BufferCollectionTokenDuplicateSyncRequest<'de>
11782    where
11783        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11784    {
11785        fn decode(
11786            slot: ::fidl_next::Slot<'_, Self>,
11787            decoder: &mut ___D,
11788            _: (),
11789        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11790            ::fidl_next::munge!(let Self { table } = slot);
11791
11792            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11793                match ordinal {
11794                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11795
11796                    1 => {
11797                        ::fidl_next::wire::Envelope::decode_as::<
11798                            ___D,
11799                            ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>,
11800                        >(slot.as_mut(), decoder, (64, ()))?;
11801
11802                        let value = unsafe {
11803                            slot
11804                                            .deref_unchecked()
11805                                            .deref_unchecked::<
11806                                                ::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Rights>
11807                                            >()
11808                        };
11809
11810                        if value.len() > 64 {
11811                            return Err(::fidl_next::DecodeError::VectorTooLong {
11812                                size: value.len() as u64,
11813                                limit: 64,
11814                            });
11815                        }
11816
11817                        Ok(())
11818                    }
11819
11820                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11821                }
11822            })
11823        }
11824    }
11825
11826    impl<'de> BufferCollectionTokenDuplicateSyncRequest<'de> {
11827        pub fn rights_attenuation_masks(
11828            &self,
11829        ) -> ::core::option::Option<
11830            &::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>,
11831        > {
11832            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11833        }
11834
11835        pub fn take_rights_attenuation_masks(
11836            &mut self,
11837        ) -> ::core::option::Option<
11838            ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>,
11839        > {
11840            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11841        }
11842    }
11843
11844    impl<'de> ::core::fmt::Debug for BufferCollectionTokenDuplicateSyncRequest<'de> {
11845        fn fmt(
11846            &self,
11847            f: &mut ::core::fmt::Formatter<'_>,
11848        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11849            f.debug_struct("BufferCollectionTokenDuplicateSyncRequest")
11850                .field("rights_attenuation_masks", &self.rights_attenuation_masks())
11851                .finish()
11852        }
11853    }
11854
11855    impl<'de> ::fidl_next::IntoNatural for BufferCollectionTokenDuplicateSyncRequest<'de> {
11856        type Natural = crate::natural::BufferCollectionTokenDuplicateSyncRequest;
11857    }
11858
11859    /// The wire type corresponding to [`BufferCollectionTokenGroupCreateChildrenSyncRequest`].
11860    #[repr(C)]
11861    pub struct BufferCollectionTokenGroupCreateChildrenSyncRequest<'de> {
11862        pub(crate) table: ::fidl_next::wire::Table<'de>,
11863    }
11864
11865    impl<'de> Drop for BufferCollectionTokenGroupCreateChildrenSyncRequest<'de> {
11866        fn drop(&mut self) {
11867            let _ = self.table.get(1)
11868                .map(|envelope| unsafe {
11869                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>>()
11870                });
11871        }
11872    }
11873
11874    impl ::fidl_next::Constrained for BufferCollectionTokenGroupCreateChildrenSyncRequest<'_> {
11875        type Constraint = ();
11876
11877        fn validate(
11878            _: ::fidl_next::Slot<'_, Self>,
11879            _: Self::Constraint,
11880        ) -> Result<(), ::fidl_next::ValidationError> {
11881            Ok(())
11882        }
11883    }
11884
11885    unsafe impl ::fidl_next::Wire for BufferCollectionTokenGroupCreateChildrenSyncRequest<'static> {
11886        type Narrowed<'de> = BufferCollectionTokenGroupCreateChildrenSyncRequest<'de>;
11887
11888        #[inline]
11889        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11890            ::fidl_next::munge!(let Self { table } = out);
11891            ::fidl_next::wire::Table::zero_padding(table);
11892        }
11893    }
11894
11895    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
11896        for BufferCollectionTokenGroupCreateChildrenSyncRequest<'de>
11897    where
11898        ___D: ::fidl_next::Decoder<'de> + ?Sized,
11899    {
11900        fn decode(
11901            slot: ::fidl_next::Slot<'_, Self>,
11902            decoder: &mut ___D,
11903            _: (),
11904        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11905            ::fidl_next::munge!(let Self { table } = slot);
11906
11907            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
11908                match ordinal {
11909                    0 => unsafe { ::core::hint::unreachable_unchecked() },
11910
11911                    1 => {
11912                        ::fidl_next::wire::Envelope::decode_as::<
11913                            ___D,
11914                            ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>,
11915                        >(slot.as_mut(), decoder, (64, ()))?;
11916
11917                        let value = unsafe {
11918                            slot
11919                                            .deref_unchecked()
11920                                            .deref_unchecked::<
11921                                                ::fidl_next::wire::Vector<'_, ::fidl_next::wire::fuchsia::Rights>
11922                                            >()
11923                        };
11924
11925                        if value.len() > 64 {
11926                            return Err(::fidl_next::DecodeError::VectorTooLong {
11927                                size: value.len() as u64,
11928                                limit: 64,
11929                            });
11930                        }
11931
11932                        Ok(())
11933                    }
11934
11935                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
11936                }
11937            })
11938        }
11939    }
11940
11941    impl<'de> BufferCollectionTokenGroupCreateChildrenSyncRequest<'de> {
11942        pub fn rights_attenuation_masks(
11943            &self,
11944        ) -> ::core::option::Option<
11945            &::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>,
11946        > {
11947            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11948        }
11949
11950        pub fn take_rights_attenuation_masks(
11951            &mut self,
11952        ) -> ::core::option::Option<
11953            ::fidl_next::wire::Vector<'de, ::fidl_next::wire::fuchsia::Rights>,
11954        > {
11955            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
11956        }
11957    }
11958
11959    impl<'de> ::core::fmt::Debug for BufferCollectionTokenGroupCreateChildrenSyncRequest<'de> {
11960        fn fmt(
11961            &self,
11962            f: &mut ::core::fmt::Formatter<'_>,
11963        ) -> ::core::result::Result<(), ::core::fmt::Error> {
11964            f.debug_struct("BufferCollectionTokenGroupCreateChildrenSyncRequest")
11965                .field("rights_attenuation_masks", &self.rights_attenuation_masks())
11966                .finish()
11967        }
11968    }
11969
11970    impl<'de> ::fidl_next::IntoNatural for BufferCollectionTokenGroupCreateChildrenSyncRequest<'de> {
11971        type Natural = crate::natural::BufferCollectionTokenGroupCreateChildrenSyncRequest;
11972    }
11973
11974    /// The wire type corresponding to [`FormatCostKey`].
11975    #[repr(C)]
11976    pub struct FormatCostKey<'de> {
11977        pub(crate) table: ::fidl_next::wire::Table<'de>,
11978    }
11979
11980    impl<'de> Drop for FormatCostKey<'de> {
11981        fn drop(&mut self) {
11982            let _ = self.table.get(1).map(|envelope| unsafe {
11983                envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormat>()
11984            });
11985
11986            let _ = self.table.get(2)
11987                .map(|envelope| unsafe {
11988                    envelope.read_unchecked::<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>()
11989                });
11990
11991            let _ = self.table.get(3).map(|envelope| unsafe {
11992                envelope.read_unchecked::<crate::wire::BufferUsage<'de>>()
11993            });
11994        }
11995    }
11996
11997    impl ::fidl_next::Constrained for FormatCostKey<'_> {
11998        type Constraint = ();
11999
12000        fn validate(
12001            _: ::fidl_next::Slot<'_, Self>,
12002            _: Self::Constraint,
12003        ) -> Result<(), ::fidl_next::ValidationError> {
12004            Ok(())
12005        }
12006    }
12007
12008    unsafe impl ::fidl_next::Wire for FormatCostKey<'static> {
12009        type Narrowed<'de> = FormatCostKey<'de>;
12010
12011        #[inline]
12012        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12013            ::fidl_next::munge!(let Self { table } = out);
12014            ::fidl_next::wire::Table::zero_padding(table);
12015        }
12016    }
12017
12018    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FormatCostKey<'de>
12019    where
12020        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12021    {
12022        fn decode(
12023            slot: ::fidl_next::Slot<'_, Self>,
12024            decoder: &mut ___D,
12025            _: (),
12026        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12027            ::fidl_next::munge!(let Self { table } = slot);
12028
12029            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12030                match ordinal {
12031                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12032
12033                    1 => {
12034                        ::fidl_next::wire::Envelope::decode_as::<
12035                            ___D,
12036                            ::fidl_next_common_fuchsia_images2::wire::PixelFormat,
12037                        >(slot.as_mut(), decoder, ())?;
12038
12039                        Ok(())
12040                    }
12041
12042                    2 => {
12043                        ::fidl_next::wire::Envelope::decode_as::<
12044                            ___D,
12045                            ::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier,
12046                        >(slot.as_mut(), decoder, ())?;
12047
12048                        Ok(())
12049                    }
12050
12051                    3 => {
12052                        ::fidl_next::wire::Envelope::decode_as::<
12053                            ___D,
12054                            crate::wire::BufferUsage<'de>,
12055                        >(slot.as_mut(), decoder, ())?;
12056
12057                        Ok(())
12058                    }
12059
12060                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12061                }
12062            })
12063        }
12064    }
12065
12066    impl<'de> FormatCostKey<'de> {
12067        pub fn pixel_format(
12068            &self,
12069        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_images2::wire::PixelFormat>
12070        {
12071            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12072        }
12073
12074        pub fn take_pixel_format(
12075            &mut self,
12076        ) -> ::core::option::Option<::fidl_next_common_fuchsia_images2::wire::PixelFormat> {
12077            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12078        }
12079
12080        pub fn pixel_format_modifier(
12081            &self,
12082        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>
12083        {
12084            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
12085        }
12086
12087        pub fn take_pixel_format_modifier(
12088            &mut self,
12089        ) -> ::core::option::Option<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier>
12090        {
12091            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
12092        }
12093
12094        pub fn buffer_usage_bits(&self) -> ::core::option::Option<&crate::wire::BufferUsage<'de>> {
12095            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
12096        }
12097
12098        pub fn take_buffer_usage_bits(
12099            &mut self,
12100        ) -> ::core::option::Option<crate::wire::BufferUsage<'de>> {
12101            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
12102        }
12103    }
12104
12105    impl<'de> ::core::fmt::Debug for FormatCostKey<'de> {
12106        fn fmt(
12107            &self,
12108            f: &mut ::core::fmt::Formatter<'_>,
12109        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12110            f.debug_struct("FormatCostKey")
12111                .field("pixel_format", &self.pixel_format())
12112                .field("pixel_format_modifier", &self.pixel_format_modifier())
12113                .field("buffer_usage_bits", &self.buffer_usage_bits())
12114                .finish()
12115        }
12116    }
12117
12118    impl<'de> ::fidl_next::IntoNatural for FormatCostKey<'de> {
12119        type Natural = crate::natural::FormatCostKey;
12120    }
12121
12122    /// The wire type corresponding to [`FormatCostEntry`].
12123    #[repr(C)]
12124    pub struct FormatCostEntry<'de> {
12125        pub(crate) table: ::fidl_next::wire::Table<'de>,
12126    }
12127
12128    impl<'de> Drop for FormatCostEntry<'de> {
12129        fn drop(&mut self) {
12130            let _ = self.table.get(1).map(|envelope| unsafe {
12131                envelope.read_unchecked::<crate::wire::FormatCostKey<'de>>()
12132            });
12133
12134            let _ = self
12135                .table
12136                .get(2)
12137                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Float32>() });
12138        }
12139    }
12140
12141    impl ::fidl_next::Constrained for FormatCostEntry<'_> {
12142        type Constraint = ();
12143
12144        fn validate(
12145            _: ::fidl_next::Slot<'_, Self>,
12146            _: Self::Constraint,
12147        ) -> Result<(), ::fidl_next::ValidationError> {
12148            Ok(())
12149        }
12150    }
12151
12152    unsafe impl ::fidl_next::Wire for FormatCostEntry<'static> {
12153        type Narrowed<'de> = FormatCostEntry<'de>;
12154
12155        #[inline]
12156        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12157            ::fidl_next::munge!(let Self { table } = out);
12158            ::fidl_next::wire::Table::zero_padding(table);
12159        }
12160    }
12161
12162    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FormatCostEntry<'de>
12163    where
12164        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12165    {
12166        fn decode(
12167            slot: ::fidl_next::Slot<'_, Self>,
12168            decoder: &mut ___D,
12169            _: (),
12170        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12171            ::fidl_next::munge!(let Self { table } = slot);
12172
12173            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12174                match ordinal {
12175                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12176
12177                    1 => {
12178                        ::fidl_next::wire::Envelope::decode_as::<
12179                            ___D,
12180                            crate::wire::FormatCostKey<'de>,
12181                        >(slot.as_mut(), decoder, ())?;
12182
12183                        Ok(())
12184                    }
12185
12186                    2 => {
12187                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Float32>(
12188                            slot.as_mut(),
12189                            decoder,
12190                            (),
12191                        )?;
12192
12193                        Ok(())
12194                    }
12195
12196                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12197                }
12198            })
12199        }
12200    }
12201
12202    impl<'de> FormatCostEntry<'de> {
12203        pub fn key(&self) -> ::core::option::Option<&crate::wire::FormatCostKey<'de>> {
12204            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12205        }
12206
12207        pub fn take_key(&mut self) -> ::core::option::Option<crate::wire::FormatCostKey<'de>> {
12208            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12209        }
12210
12211        pub fn cost(&self) -> ::core::option::Option<&::fidl_next::wire::Float32> {
12212            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
12213        }
12214
12215        pub fn take_cost(&mut self) -> ::core::option::Option<::fidl_next::wire::Float32> {
12216            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
12217        }
12218    }
12219
12220    impl<'de> ::core::fmt::Debug for FormatCostEntry<'de> {
12221        fn fmt(
12222            &self,
12223            f: &mut ::core::fmt::Formatter<'_>,
12224        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12225            f.debug_struct("FormatCostEntry")
12226                .field("key", &self.key())
12227                .field("cost", &self.cost())
12228                .finish()
12229        }
12230    }
12231
12232    impl<'de> ::fidl_next::IntoNatural for FormatCostEntry<'de> {
12233        type Natural = crate::natural::FormatCostEntry;
12234    }
12235
12236    /// The wire type corresponding to [`Config`].
12237    #[repr(C)]
12238    pub struct Config<'de> {
12239        pub(crate) table: ::fidl_next::wire::Table<'de>,
12240    }
12241
12242    impl<'de> Drop for Config<'de> {
12243        fn drop(&mut self) {
12244            let _ = self.table.get(1)
12245                .map(|envelope| unsafe {
12246                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>()
12247                });
12248        }
12249    }
12250
12251    impl ::fidl_next::Constrained for Config<'_> {
12252        type Constraint = ();
12253
12254        fn validate(
12255            _: ::fidl_next::Slot<'_, Self>,
12256            _: Self::Constraint,
12257        ) -> Result<(), ::fidl_next::ValidationError> {
12258            Ok(())
12259        }
12260    }
12261
12262    unsafe impl ::fidl_next::Wire for Config<'static> {
12263        type Narrowed<'de> = Config<'de>;
12264
12265        #[inline]
12266        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12267            ::fidl_next::munge!(let Self { table } = out);
12268            ::fidl_next::wire::Table::zero_padding(table);
12269        }
12270    }
12271
12272    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Config<'de>
12273    where
12274        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12275    {
12276        fn decode(
12277            slot: ::fidl_next::Slot<'_, Self>,
12278            decoder: &mut ___D,
12279            _: (),
12280        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12281            ::fidl_next::munge!(let Self { table } = slot);
12282
12283            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12284                match ordinal {
12285                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12286
12287                    1 => {
12288                        ::fidl_next::wire::Envelope::decode_as::<
12289                            ___D,
12290                            ::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>,
12291                        >(slot.as_mut(), decoder, (4294967295, ()))?;
12292
12293                        Ok(())
12294                    }
12295
12296                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12297                }
12298            })
12299        }
12300    }
12301
12302    impl<'de> Config<'de> {
12303        pub fn format_costs(
12304            &self,
12305        ) -> ::core::option::Option<
12306            &::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>,
12307        > {
12308            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12309        }
12310
12311        pub fn take_format_costs(
12312            &mut self,
12313        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>
12314        {
12315            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12316        }
12317    }
12318
12319    impl<'de> ::core::fmt::Debug for Config<'de> {
12320        fn fmt(
12321            &self,
12322            f: &mut ::core::fmt::Formatter<'_>,
12323        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12324            f.debug_struct("Config").field("format_costs", &self.format_costs()).finish()
12325        }
12326    }
12327
12328    impl<'de> ::fidl_next::IntoNatural for Config<'de> {
12329        type Natural = crate::natural::Config;
12330    }
12331
12332    /// The wire type corresponding to [`DynamicSecureHeap`].
12333    #[repr(C)]
12334    pub struct DynamicSecureHeap<'de> {
12335        pub(crate) table: ::fidl_next::wire::Table<'de>,
12336    }
12337
12338    impl<'de> Drop for DynamicSecureHeap<'de> {
12339        fn drop(&mut self) {
12340            let _ = self
12341                .table
12342                .get(1)
12343                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() });
12344        }
12345    }
12346
12347    impl ::fidl_next::Constrained for DynamicSecureHeap<'_> {
12348        type Constraint = ();
12349
12350        fn validate(
12351            _: ::fidl_next::Slot<'_, Self>,
12352            _: Self::Constraint,
12353        ) -> Result<(), ::fidl_next::ValidationError> {
12354            Ok(())
12355        }
12356    }
12357
12358    unsafe impl ::fidl_next::Wire for DynamicSecureHeap<'static> {
12359        type Narrowed<'de> = DynamicSecureHeap<'de>;
12360
12361        #[inline]
12362        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12363            ::fidl_next::munge!(let Self { table } = out);
12364            ::fidl_next::wire::Table::zero_padding(table);
12365        }
12366    }
12367
12368    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DynamicSecureHeap<'de>
12369    where
12370        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12371    {
12372        fn decode(
12373            slot: ::fidl_next::Slot<'_, Self>,
12374            decoder: &mut ___D,
12375            _: (),
12376        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12377            ::fidl_next::munge!(let Self { table } = slot);
12378
12379            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12380                match ordinal {
12381                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12382
12383                    1 => {
12384                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Heap<'de>>(
12385                            slot.as_mut(),
12386                            decoder,
12387                            (),
12388                        )?;
12389
12390                        Ok(())
12391                    }
12392
12393                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12394                }
12395            })
12396        }
12397    }
12398
12399    impl<'de> DynamicSecureHeap<'de> {
12400        pub fn heap(&self) -> ::core::option::Option<&crate::wire::Heap<'de>> {
12401            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12402        }
12403
12404        pub fn take_heap(&mut self) -> ::core::option::Option<crate::wire::Heap<'de>> {
12405            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12406        }
12407    }
12408
12409    impl<'de> ::core::fmt::Debug for DynamicSecureHeap<'de> {
12410        fn fmt(
12411            &self,
12412            f: &mut ::core::fmt::Formatter<'_>,
12413        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12414            f.debug_struct("DynamicSecureHeap").field("heap", &self.heap()).finish()
12415        }
12416    }
12417
12418    impl<'de> ::fidl_next::IntoNatural for DynamicSecureHeap<'de> {
12419        type Natural = crate::natural::DynamicSecureHeap;
12420    }
12421
12422    /// The wire type corresponding to [`FormatCosts`].
12423    #[repr(C)]
12424    pub struct FormatCosts<'de> {
12425        pub(crate) table: ::fidl_next::wire::Table<'de>,
12426    }
12427
12428    impl<'de> Drop for FormatCosts<'de> {
12429        fn drop(&mut self) {
12430            let _ = self.table.get(1)
12431                .map(|envelope| unsafe {
12432                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>()
12433                });
12434        }
12435    }
12436
12437    impl ::fidl_next::Constrained for FormatCosts<'_> {
12438        type Constraint = ();
12439
12440        fn validate(
12441            _: ::fidl_next::Slot<'_, Self>,
12442            _: Self::Constraint,
12443        ) -> Result<(), ::fidl_next::ValidationError> {
12444            Ok(())
12445        }
12446    }
12447
12448    unsafe impl ::fidl_next::Wire for FormatCosts<'static> {
12449        type Narrowed<'de> = FormatCosts<'de>;
12450
12451        #[inline]
12452        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12453            ::fidl_next::munge!(let Self { table } = out);
12454            ::fidl_next::wire::Table::zero_padding(table);
12455        }
12456    }
12457
12458    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for FormatCosts<'de>
12459    where
12460        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12461    {
12462        fn decode(
12463            slot: ::fidl_next::Slot<'_, Self>,
12464            decoder: &mut ___D,
12465            _: (),
12466        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12467            ::fidl_next::munge!(let Self { table } = slot);
12468
12469            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12470                match ordinal {
12471                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12472
12473                    1 => {
12474                        ::fidl_next::wire::Envelope::decode_as::<
12475                            ___D,
12476                            ::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>,
12477                        >(slot.as_mut(), decoder, (4294967295, ()))?;
12478
12479                        Ok(())
12480                    }
12481
12482                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12483                }
12484            })
12485        }
12486    }
12487
12488    impl<'de> FormatCosts<'de> {
12489        pub fn format_costs(
12490            &self,
12491        ) -> ::core::option::Option<
12492            &::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>,
12493        > {
12494            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12495        }
12496
12497        pub fn take_format_costs(
12498            &mut self,
12499        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::FormatCostEntry<'de>>>
12500        {
12501            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12502        }
12503    }
12504
12505    impl<'de> ::core::fmt::Debug for FormatCosts<'de> {
12506        fn fmt(
12507            &self,
12508            f: &mut ::core::fmt::Formatter<'_>,
12509        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12510            f.debug_struct("FormatCosts").field("format_costs", &self.format_costs()).finish()
12511        }
12512    }
12513
12514    impl<'de> ::fidl_next::IntoNatural for FormatCosts<'de> {
12515        type Natural = crate::natural::FormatCosts;
12516    }
12517
12518    /// The wire type corresponding to [`SecureHeapRange`].
12519    #[repr(C)]
12520    pub struct SecureHeapRange<'de> {
12521        pub(crate) table: ::fidl_next::wire::Table<'de>,
12522    }
12523
12524    impl<'de> Drop for SecureHeapRange<'de> {
12525        fn drop(&mut self) {
12526            let _ = self
12527                .table
12528                .get(1)
12529                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
12530
12531            let _ = self
12532                .table
12533                .get(2)
12534                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
12535        }
12536    }
12537
12538    impl ::fidl_next::Constrained for SecureHeapRange<'_> {
12539        type Constraint = ();
12540
12541        fn validate(
12542            _: ::fidl_next::Slot<'_, Self>,
12543            _: Self::Constraint,
12544        ) -> Result<(), ::fidl_next::ValidationError> {
12545            Ok(())
12546        }
12547    }
12548
12549    unsafe impl ::fidl_next::Wire for SecureHeapRange<'static> {
12550        type Narrowed<'de> = SecureHeapRange<'de>;
12551
12552        #[inline]
12553        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12554            ::fidl_next::munge!(let Self { table } = out);
12555            ::fidl_next::wire::Table::zero_padding(table);
12556        }
12557    }
12558
12559    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureHeapRange<'de>
12560    where
12561        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12562    {
12563        fn decode(
12564            slot: ::fidl_next::Slot<'_, Self>,
12565            decoder: &mut ___D,
12566            _: (),
12567        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12568            ::fidl_next::munge!(let Self { table } = slot);
12569
12570            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12571                match ordinal {
12572                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12573
12574                    1 => {
12575                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
12576                            slot.as_mut(),
12577                            decoder,
12578                            (),
12579                        )?;
12580
12581                        Ok(())
12582                    }
12583
12584                    2 => {
12585                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
12586                            slot.as_mut(),
12587                            decoder,
12588                            (),
12589                        )?;
12590
12591                        Ok(())
12592                    }
12593
12594                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12595                }
12596            })
12597        }
12598    }
12599
12600    impl<'de> SecureHeapRange<'de> {
12601        pub fn physical_address(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
12602            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12603        }
12604
12605        pub fn take_physical_address(
12606            &mut self,
12607        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
12608            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12609        }
12610
12611        pub fn size_bytes(&self) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
12612            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
12613        }
12614
12615        pub fn take_size_bytes(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint64> {
12616            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
12617        }
12618    }
12619
12620    impl<'de> ::core::fmt::Debug for SecureHeapRange<'de> {
12621        fn fmt(
12622            &self,
12623            f: &mut ::core::fmt::Formatter<'_>,
12624        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12625            f.debug_struct("SecureHeapRange")
12626                .field("physical_address", &self.physical_address())
12627                .field("size_bytes", &self.size_bytes())
12628                .finish()
12629        }
12630    }
12631
12632    impl<'de> ::fidl_next::IntoNatural for SecureHeapRange<'de> {
12633        type Natural = crate::natural::SecureHeapRange;
12634    }
12635
12636    /// The wire type corresponding to [`SecureHeapAndRange`].
12637    #[repr(C)]
12638    pub struct SecureHeapAndRange<'de> {
12639        pub(crate) table: ::fidl_next::wire::Table<'de>,
12640    }
12641
12642    impl<'de> Drop for SecureHeapAndRange<'de> {
12643        fn drop(&mut self) {
12644            let _ = self
12645                .table
12646                .get(1)
12647                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() });
12648
12649            let _ = self.table.get(2).map(|envelope| unsafe {
12650                envelope.read_unchecked::<crate::wire::SecureHeapRange<'de>>()
12651            });
12652        }
12653    }
12654
12655    impl ::fidl_next::Constrained for SecureHeapAndRange<'_> {
12656        type Constraint = ();
12657
12658        fn validate(
12659            _: ::fidl_next::Slot<'_, Self>,
12660            _: Self::Constraint,
12661        ) -> Result<(), ::fidl_next::ValidationError> {
12662            Ok(())
12663        }
12664    }
12665
12666    unsafe impl ::fidl_next::Wire for SecureHeapAndRange<'static> {
12667        type Narrowed<'de> = SecureHeapAndRange<'de>;
12668
12669        #[inline]
12670        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12671            ::fidl_next::munge!(let Self { table } = out);
12672            ::fidl_next::wire::Table::zero_padding(table);
12673        }
12674    }
12675
12676    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureHeapAndRange<'de>
12677    where
12678        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12679    {
12680        fn decode(
12681            slot: ::fidl_next::Slot<'_, Self>,
12682            decoder: &mut ___D,
12683            _: (),
12684        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12685            ::fidl_next::munge!(let Self { table } = slot);
12686
12687            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12688                match ordinal {
12689                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12690
12691                    1 => {
12692                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Heap<'de>>(
12693                            slot.as_mut(),
12694                            decoder,
12695                            (),
12696                        )?;
12697
12698                        Ok(())
12699                    }
12700
12701                    2 => {
12702                        ::fidl_next::wire::Envelope::decode_as::<
12703                            ___D,
12704                            crate::wire::SecureHeapRange<'de>,
12705                        >(slot.as_mut(), decoder, ())?;
12706
12707                        Ok(())
12708                    }
12709
12710                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12711                }
12712            })
12713        }
12714    }
12715
12716    impl<'de> SecureHeapAndRange<'de> {
12717        pub fn heap(&self) -> ::core::option::Option<&crate::wire::Heap<'de>> {
12718            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12719        }
12720
12721        pub fn take_heap(&mut self) -> ::core::option::Option<crate::wire::Heap<'de>> {
12722            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12723        }
12724
12725        pub fn range(&self) -> ::core::option::Option<&crate::wire::SecureHeapRange<'de>> {
12726            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
12727        }
12728
12729        pub fn take_range(&mut self) -> ::core::option::Option<crate::wire::SecureHeapRange<'de>> {
12730            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
12731        }
12732    }
12733
12734    impl<'de> ::core::fmt::Debug for SecureHeapAndRange<'de> {
12735        fn fmt(
12736            &self,
12737            f: &mut ::core::fmt::Formatter<'_>,
12738        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12739            f.debug_struct("SecureHeapAndRange")
12740                .field("heap", &self.heap())
12741                .field("range", &self.range())
12742                .finish()
12743        }
12744    }
12745
12746    impl<'de> ::fidl_next::IntoNatural for SecureHeapAndRange<'de> {
12747        type Natural = crate::natural::SecureHeapAndRange;
12748    }
12749
12750    /// The wire type corresponding to [`SecureHeapAndRangeModification`].
12751    #[repr(C)]
12752    pub struct SecureHeapAndRangeModification<'de> {
12753        pub(crate) table: ::fidl_next::wire::Table<'de>,
12754    }
12755
12756    impl<'de> Drop for SecureHeapAndRangeModification<'de> {
12757        fn drop(&mut self) {
12758            let _ = self
12759                .table
12760                .get(1)
12761                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() });
12762
12763            let _ = self.table.get(2).map(|envelope| unsafe {
12764                envelope.read_unchecked::<crate::wire::SecureHeapRange<'de>>()
12765            });
12766
12767            let _ = self.table.get(3).map(|envelope| unsafe {
12768                envelope.read_unchecked::<crate::wire::SecureHeapRange<'de>>()
12769            });
12770        }
12771    }
12772
12773    impl ::fidl_next::Constrained for SecureHeapAndRangeModification<'_> {
12774        type Constraint = ();
12775
12776        fn validate(
12777            _: ::fidl_next::Slot<'_, Self>,
12778            _: Self::Constraint,
12779        ) -> Result<(), ::fidl_next::ValidationError> {
12780            Ok(())
12781        }
12782    }
12783
12784    unsafe impl ::fidl_next::Wire for SecureHeapAndRangeModification<'static> {
12785        type Narrowed<'de> = SecureHeapAndRangeModification<'de>;
12786
12787        #[inline]
12788        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12789            ::fidl_next::munge!(let Self { table } = out);
12790            ::fidl_next::wire::Table::zero_padding(table);
12791        }
12792    }
12793
12794    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureHeapAndRangeModification<'de>
12795    where
12796        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12797    {
12798        fn decode(
12799            slot: ::fidl_next::Slot<'_, Self>,
12800            decoder: &mut ___D,
12801            _: (),
12802        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12803            ::fidl_next::munge!(let Self { table } = slot);
12804
12805            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12806                match ordinal {
12807                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12808
12809                    1 => {
12810                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Heap<'de>>(
12811                            slot.as_mut(),
12812                            decoder,
12813                            (),
12814                        )?;
12815
12816                        Ok(())
12817                    }
12818
12819                    2 => {
12820                        ::fidl_next::wire::Envelope::decode_as::<
12821                            ___D,
12822                            crate::wire::SecureHeapRange<'de>,
12823                        >(slot.as_mut(), decoder, ())?;
12824
12825                        Ok(())
12826                    }
12827
12828                    3 => {
12829                        ::fidl_next::wire::Envelope::decode_as::<
12830                            ___D,
12831                            crate::wire::SecureHeapRange<'de>,
12832                        >(slot.as_mut(), decoder, ())?;
12833
12834                        Ok(())
12835                    }
12836
12837                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12838                }
12839            })
12840        }
12841    }
12842
12843    impl<'de> SecureHeapAndRangeModification<'de> {
12844        pub fn heap(&self) -> ::core::option::Option<&crate::wire::Heap<'de>> {
12845            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12846        }
12847
12848        pub fn take_heap(&mut self) -> ::core::option::Option<crate::wire::Heap<'de>> {
12849            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12850        }
12851
12852        pub fn old_range(&self) -> ::core::option::Option<&crate::wire::SecureHeapRange<'de>> {
12853            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
12854        }
12855
12856        pub fn take_old_range(
12857            &mut self,
12858        ) -> ::core::option::Option<crate::wire::SecureHeapRange<'de>> {
12859            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
12860        }
12861
12862        pub fn new_range(&self) -> ::core::option::Option<&crate::wire::SecureHeapRange<'de>> {
12863            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
12864        }
12865
12866        pub fn take_new_range(
12867            &mut self,
12868        ) -> ::core::option::Option<crate::wire::SecureHeapRange<'de>> {
12869            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
12870        }
12871    }
12872
12873    impl<'de> ::core::fmt::Debug for SecureHeapAndRangeModification<'de> {
12874        fn fmt(
12875            &self,
12876            f: &mut ::core::fmt::Formatter<'_>,
12877        ) -> ::core::result::Result<(), ::core::fmt::Error> {
12878            f.debug_struct("SecureHeapAndRangeModification")
12879                .field("heap", &self.heap())
12880                .field("old_range", &self.old_range())
12881                .field("new_range", &self.new_range())
12882                .finish()
12883        }
12884    }
12885
12886    impl<'de> ::fidl_next::IntoNatural for SecureHeapAndRangeModification<'de> {
12887        type Natural = crate::natural::SecureHeapAndRangeModification;
12888    }
12889
12890    /// The wire type corresponding to [`SecureHeapAndRanges`].
12891    #[repr(C)]
12892    pub struct SecureHeapAndRanges<'de> {
12893        pub(crate) table: ::fidl_next::wire::Table<'de>,
12894    }
12895
12896    impl<'de> Drop for SecureHeapAndRanges<'de> {
12897        fn drop(&mut self) {
12898            let _ = self
12899                .table
12900                .get(1)
12901                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() });
12902
12903            let _ = self.table.get(2)
12904                .map(|envelope| unsafe {
12905                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SecureHeapRange<'de>>>()
12906                });
12907        }
12908    }
12909
12910    impl ::fidl_next::Constrained for SecureHeapAndRanges<'_> {
12911        type Constraint = ();
12912
12913        fn validate(
12914            _: ::fidl_next::Slot<'_, Self>,
12915            _: Self::Constraint,
12916        ) -> Result<(), ::fidl_next::ValidationError> {
12917            Ok(())
12918        }
12919    }
12920
12921    unsafe impl ::fidl_next::Wire for SecureHeapAndRanges<'static> {
12922        type Narrowed<'de> = SecureHeapAndRanges<'de>;
12923
12924        #[inline]
12925        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12926            ::fidl_next::munge!(let Self { table } = out);
12927            ::fidl_next::wire::Table::zero_padding(table);
12928        }
12929    }
12930
12931    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureHeapAndRanges<'de>
12932    where
12933        ___D: ::fidl_next::Decoder<'de> + ?Sized,
12934    {
12935        fn decode(
12936            slot: ::fidl_next::Slot<'_, Self>,
12937            decoder: &mut ___D,
12938            _: (),
12939        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12940            ::fidl_next::munge!(let Self { table } = slot);
12941
12942            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
12943                match ordinal {
12944                    0 => unsafe { ::core::hint::unreachable_unchecked() },
12945
12946                    1 => {
12947                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Heap<'de>>(
12948                            slot.as_mut(),
12949                            decoder,
12950                            (),
12951                        )?;
12952
12953                        Ok(())
12954                    }
12955
12956                    2 => {
12957                        ::fidl_next::wire::Envelope::decode_as::<
12958                            ___D,
12959                            ::fidl_next::wire::Vector<'de, crate::wire::SecureHeapRange<'de>>,
12960                        >(slot.as_mut(), decoder, (128, ()))?;
12961
12962                        let value = unsafe {
12963                            slot
12964                                            .deref_unchecked()
12965                                            .deref_unchecked::<
12966                                                ::fidl_next::wire::Vector<'_, crate::wire::SecureHeapRange<'_>>
12967                                            >()
12968                        };
12969
12970                        if value.len() > 128 {
12971                            return Err(::fidl_next::DecodeError::VectorTooLong {
12972                                size: value.len() as u64,
12973                                limit: 128,
12974                            });
12975                        }
12976
12977                        Ok(())
12978                    }
12979
12980                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
12981                }
12982            })
12983        }
12984    }
12985
12986    impl<'de> SecureHeapAndRanges<'de> {
12987        pub fn heap(&self) -> ::core::option::Option<&crate::wire::Heap<'de>> {
12988            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
12989        }
12990
12991        pub fn take_heap(&mut self) -> ::core::option::Option<crate::wire::Heap<'de>> {
12992            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
12993        }
12994
12995        pub fn ranges(
12996            &self,
12997        ) -> ::core::option::Option<
12998            &::fidl_next::wire::Vector<'de, crate::wire::SecureHeapRange<'de>>,
12999        > {
13000            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13001        }
13002
13003        pub fn take_ranges(
13004            &mut self,
13005        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::SecureHeapRange<'de>>>
13006        {
13007            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
13008        }
13009    }
13010
13011    impl<'de> ::core::fmt::Debug for SecureHeapAndRanges<'de> {
13012        fn fmt(
13013            &self,
13014            f: &mut ::core::fmt::Formatter<'_>,
13015        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13016            f.debug_struct("SecureHeapAndRanges")
13017                .field("heap", &self.heap())
13018                .field("ranges", &self.ranges())
13019                .finish()
13020        }
13021    }
13022
13023    impl<'de> ::fidl_next::IntoNatural for SecureHeapAndRanges<'de> {
13024        type Natural = crate::natural::SecureHeapAndRanges;
13025    }
13026
13027    /// The wire type corresponding to [`SecureHeapProperties`].
13028    #[repr(C)]
13029    pub struct SecureHeapProperties<'de> {
13030        pub(crate) table: ::fidl_next::wire::Table<'de>,
13031    }
13032
13033    impl<'de> Drop for SecureHeapProperties<'de> {
13034        fn drop(&mut self) {
13035            let _ = self
13036                .table
13037                .get(1)
13038                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::Heap<'de>>() });
13039
13040            let _ = self.table.get(2).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
13041
13042            let _ = self
13043                .table
13044                .get(3)
13045                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
13046
13047            let _ = self
13048                .table
13049                .get(4)
13050                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint64>() });
13051
13052            let _ = self.table.get(5).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
13053        }
13054    }
13055
13056    impl ::fidl_next::Constrained for SecureHeapProperties<'_> {
13057        type Constraint = ();
13058
13059        fn validate(
13060            _: ::fidl_next::Slot<'_, Self>,
13061            _: Self::Constraint,
13062        ) -> Result<(), ::fidl_next::ValidationError> {
13063            Ok(())
13064        }
13065    }
13066
13067    unsafe impl ::fidl_next::Wire for SecureHeapProperties<'static> {
13068        type Narrowed<'de> = SecureHeapProperties<'de>;
13069
13070        #[inline]
13071        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13072            ::fidl_next::munge!(let Self { table } = out);
13073            ::fidl_next::wire::Table::zero_padding(table);
13074        }
13075    }
13076
13077    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureHeapProperties<'de>
13078    where
13079        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13080    {
13081        fn decode(
13082            slot: ::fidl_next::Slot<'_, Self>,
13083            decoder: &mut ___D,
13084            _: (),
13085        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13086            ::fidl_next::munge!(let Self { table } = slot);
13087
13088            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13089                match ordinal {
13090                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13091
13092                    1 => {
13093                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::Heap<'de>>(
13094                            slot.as_mut(),
13095                            decoder,
13096                            (),
13097                        )?;
13098
13099                        Ok(())
13100                    }
13101
13102                    2 => {
13103                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
13104                            slot.as_mut(),
13105                            decoder,
13106                            (),
13107                        )?;
13108
13109                        Ok(())
13110                    }
13111
13112                    3 => {
13113                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
13114                            slot.as_mut(),
13115                            decoder,
13116                            (),
13117                        )?;
13118
13119                        Ok(())
13120                    }
13121
13122                    4 => {
13123                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint64>(
13124                            slot.as_mut(),
13125                            decoder,
13126                            (),
13127                        )?;
13128
13129                        Ok(())
13130                    }
13131
13132                    5 => {
13133                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
13134                            slot.as_mut(),
13135                            decoder,
13136                            (),
13137                        )?;
13138
13139                        Ok(())
13140                    }
13141
13142                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13143                }
13144            })
13145        }
13146    }
13147
13148    impl<'de> SecureHeapProperties<'de> {
13149        pub fn heap(&self) -> ::core::option::Option<&crate::wire::Heap<'de>> {
13150            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13151        }
13152
13153        pub fn take_heap(&mut self) -> ::core::option::Option<crate::wire::Heap<'de>> {
13154            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13155        }
13156
13157        pub fn dynamic_protection_ranges(&self) -> ::core::option::Option<&bool> {
13158            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
13159        }
13160
13161        pub fn take_dynamic_protection_ranges(&mut self) -> ::core::option::Option<bool> {
13162            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
13163        }
13164
13165        pub fn protected_range_granularity(
13166            &self,
13167        ) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
13168            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
13169        }
13170
13171        pub fn take_protected_range_granularity(
13172            &mut self,
13173        ) -> ::core::option::Option<::fidl_next::wire::Uint32> {
13174            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
13175        }
13176
13177        pub fn max_protected_range_count(
13178            &self,
13179        ) -> ::core::option::Option<&::fidl_next::wire::Uint64> {
13180            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
13181        }
13182
13183        pub fn take_max_protected_range_count(
13184            &mut self,
13185        ) -> ::core::option::Option<::fidl_next::wire::Uint64> {
13186            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
13187        }
13188
13189        pub fn is_mod_protected_range_available(&self) -> ::core::option::Option<&bool> {
13190            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
13191        }
13192
13193        pub fn take_is_mod_protected_range_available(&mut self) -> ::core::option::Option<bool> {
13194            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
13195        }
13196    }
13197
13198    impl<'de> ::core::fmt::Debug for SecureHeapProperties<'de> {
13199        fn fmt(
13200            &self,
13201            f: &mut ::core::fmt::Formatter<'_>,
13202        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13203            f.debug_struct("SecureHeapProperties")
13204                .field("heap", &self.heap())
13205                .field("dynamic_protection_ranges", &self.dynamic_protection_ranges())
13206                .field("protected_range_granularity", &self.protected_range_granularity())
13207                .field("max_protected_range_count", &self.max_protected_range_count())
13208                .field("is_mod_protected_range_available", &self.is_mod_protected_range_available())
13209                .finish()
13210        }
13211    }
13212
13213    impl<'de> ::fidl_next::IntoNatural for SecureHeapProperties<'de> {
13214        type Natural = crate::natural::SecureHeapProperties;
13215    }
13216
13217    /// The wire type corresponding to [`SecureMemGetPhysicalSecureHeapsResponse`].
13218    #[repr(C)]
13219    pub struct SecureMemGetPhysicalSecureHeapsResponse<'de> {
13220        pub(crate) table: ::fidl_next::wire::Table<'de>,
13221    }
13222
13223    impl<'de> Drop for SecureMemGetPhysicalSecureHeapsResponse<'de> {
13224        fn drop(&mut self) {
13225            let _ = self.table.get(1)
13226                .map(|envelope| unsafe {
13227                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::SecureHeapAndRanges<'de>>>()
13228                });
13229        }
13230    }
13231
13232    impl ::fidl_next::Constrained for SecureMemGetPhysicalSecureHeapsResponse<'_> {
13233        type Constraint = ();
13234
13235        fn validate(
13236            _: ::fidl_next::Slot<'_, Self>,
13237            _: Self::Constraint,
13238        ) -> Result<(), ::fidl_next::ValidationError> {
13239            Ok(())
13240        }
13241    }
13242
13243    unsafe impl ::fidl_next::Wire for SecureMemGetPhysicalSecureHeapsResponse<'static> {
13244        type Narrowed<'de> = SecureMemGetPhysicalSecureHeapsResponse<'de>;
13245
13246        #[inline]
13247        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13248            ::fidl_next::munge!(let Self { table } = out);
13249            ::fidl_next::wire::Table::zero_padding(table);
13250        }
13251    }
13252
13253    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureMemGetPhysicalSecureHeapsResponse<'de>
13254    where
13255        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13256    {
13257        fn decode(
13258            slot: ::fidl_next::Slot<'_, Self>,
13259            decoder: &mut ___D,
13260            _: (),
13261        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13262            ::fidl_next::munge!(let Self { table } = slot);
13263
13264            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13265                match ordinal {
13266                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13267
13268                    1 => {
13269                        ::fidl_next::wire::Envelope::decode_as::<
13270                            ___D,
13271                            ::fidl_next::wire::Vector<'de, crate::wire::SecureHeapAndRanges<'de>>,
13272                        >(slot.as_mut(), decoder, (32, ()))?;
13273
13274                        let value = unsafe {
13275                            slot
13276                                            .deref_unchecked()
13277                                            .deref_unchecked::<
13278                                                ::fidl_next::wire::Vector<'_, crate::wire::SecureHeapAndRanges<'_>>
13279                                            >()
13280                        };
13281
13282                        if value.len() > 32 {
13283                            return Err(::fidl_next::DecodeError::VectorTooLong {
13284                                size: value.len() as u64,
13285                                limit: 32,
13286                            });
13287                        }
13288
13289                        Ok(())
13290                    }
13291
13292                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13293                }
13294            })
13295        }
13296    }
13297
13298    impl<'de> SecureMemGetPhysicalSecureHeapsResponse<'de> {
13299        pub fn heaps(
13300            &self,
13301        ) -> ::core::option::Option<
13302            &::fidl_next::wire::Vector<'de, crate::wire::SecureHeapAndRanges<'de>>,
13303        > {
13304            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13305        }
13306
13307        pub fn take_heaps(
13308            &mut self,
13309        ) -> ::core::option::Option<
13310            ::fidl_next::wire::Vector<'de, crate::wire::SecureHeapAndRanges<'de>>,
13311        > {
13312            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13313        }
13314    }
13315
13316    impl<'de> ::core::fmt::Debug for SecureMemGetPhysicalSecureHeapsResponse<'de> {
13317        fn fmt(
13318            &self,
13319            f: &mut ::core::fmt::Formatter<'_>,
13320        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13321            f.debug_struct("SecureMemGetPhysicalSecureHeapsResponse")
13322                .field("heaps", &self.heaps())
13323                .finish()
13324        }
13325    }
13326
13327    impl<'de> ::fidl_next::IntoNatural for SecureMemGetPhysicalSecureHeapsResponse<'de> {
13328        type Natural = crate::natural::SecureMemGetPhysicalSecureHeapsResponse;
13329    }
13330
13331    /// The wire type corresponding to [`SecureMemGetDynamicSecureHeapsResponse`].
13332    #[repr(C)]
13333    pub struct SecureMemGetDynamicSecureHeapsResponse<'de> {
13334        pub(crate) table: ::fidl_next::wire::Table<'de>,
13335    }
13336
13337    impl<'de> Drop for SecureMemGetDynamicSecureHeapsResponse<'de> {
13338        fn drop(&mut self) {
13339            let _ = self.table.get(1)
13340                .map(|envelope| unsafe {
13341                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::DynamicSecureHeap<'de>>>()
13342                });
13343        }
13344    }
13345
13346    impl ::fidl_next::Constrained for SecureMemGetDynamicSecureHeapsResponse<'_> {
13347        type Constraint = ();
13348
13349        fn validate(
13350            _: ::fidl_next::Slot<'_, Self>,
13351            _: Self::Constraint,
13352        ) -> Result<(), ::fidl_next::ValidationError> {
13353            Ok(())
13354        }
13355    }
13356
13357    unsafe impl ::fidl_next::Wire for SecureMemGetDynamicSecureHeapsResponse<'static> {
13358        type Narrowed<'de> = SecureMemGetDynamicSecureHeapsResponse<'de>;
13359
13360        #[inline]
13361        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13362            ::fidl_next::munge!(let Self { table } = out);
13363            ::fidl_next::wire::Table::zero_padding(table);
13364        }
13365    }
13366
13367    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureMemGetDynamicSecureHeapsResponse<'de>
13368    where
13369        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13370    {
13371        fn decode(
13372            slot: ::fidl_next::Slot<'_, Self>,
13373            decoder: &mut ___D,
13374            _: (),
13375        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13376            ::fidl_next::munge!(let Self { table } = slot);
13377
13378            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13379                match ordinal {
13380                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13381
13382                    1 => {
13383                        ::fidl_next::wire::Envelope::decode_as::<
13384                            ___D,
13385                            ::fidl_next::wire::Vector<'de, crate::wire::DynamicSecureHeap<'de>>,
13386                        >(slot.as_mut(), decoder, (32, ()))?;
13387
13388                        let value = unsafe {
13389                            slot
13390                                            .deref_unchecked()
13391                                            .deref_unchecked::<
13392                                                ::fidl_next::wire::Vector<'_, crate::wire::DynamicSecureHeap<'_>>
13393                                            >()
13394                        };
13395
13396                        if value.len() > 32 {
13397                            return Err(::fidl_next::DecodeError::VectorTooLong {
13398                                size: value.len() as u64,
13399                                limit: 32,
13400                            });
13401                        }
13402
13403                        Ok(())
13404                    }
13405
13406                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13407                }
13408            })
13409        }
13410    }
13411
13412    impl<'de> SecureMemGetDynamicSecureHeapsResponse<'de> {
13413        pub fn heaps(
13414            &self,
13415        ) -> ::core::option::Option<
13416            &::fidl_next::wire::Vector<'de, crate::wire::DynamicSecureHeap<'de>>,
13417        > {
13418            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13419        }
13420
13421        pub fn take_heaps(
13422            &mut self,
13423        ) -> ::core::option::Option<
13424            ::fidl_next::wire::Vector<'de, crate::wire::DynamicSecureHeap<'de>>,
13425        > {
13426            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13427        }
13428    }
13429
13430    impl<'de> ::core::fmt::Debug for SecureMemGetDynamicSecureHeapsResponse<'de> {
13431        fn fmt(
13432            &self,
13433            f: &mut ::core::fmt::Formatter<'_>,
13434        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13435            f.debug_struct("SecureMemGetDynamicSecureHeapsResponse")
13436                .field("heaps", &self.heaps())
13437                .finish()
13438        }
13439    }
13440
13441    impl<'de> ::fidl_next::IntoNatural for SecureMemGetDynamicSecureHeapsResponse<'de> {
13442        type Natural = crate::natural::SecureMemGetDynamicSecureHeapsResponse;
13443    }
13444
13445    /// The wire type corresponding to [`SecureMemGetPhysicalSecureHeapPropertiesRequest`].
13446    #[repr(C)]
13447    pub struct SecureMemGetPhysicalSecureHeapPropertiesRequest<'de> {
13448        pub(crate) table: ::fidl_next::wire::Table<'de>,
13449    }
13450
13451    impl<'de> Drop for SecureMemGetPhysicalSecureHeapPropertiesRequest<'de> {
13452        fn drop(&mut self) {
13453            let _ = self.table.get(1).map(|envelope| unsafe {
13454                envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
13455            });
13456        }
13457    }
13458
13459    impl ::fidl_next::Constrained for SecureMemGetPhysicalSecureHeapPropertiesRequest<'_> {
13460        type Constraint = ();
13461
13462        fn validate(
13463            _: ::fidl_next::Slot<'_, Self>,
13464            _: Self::Constraint,
13465        ) -> Result<(), ::fidl_next::ValidationError> {
13466            Ok(())
13467        }
13468    }
13469
13470    unsafe impl ::fidl_next::Wire for SecureMemGetPhysicalSecureHeapPropertiesRequest<'static> {
13471        type Narrowed<'de> = SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>;
13472
13473        #[inline]
13474        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13475            ::fidl_next::munge!(let Self { table } = out);
13476            ::fidl_next::wire::Table::zero_padding(table);
13477        }
13478    }
13479
13480    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
13481        for SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>
13482    where
13483        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13484    {
13485        fn decode(
13486            slot: ::fidl_next::Slot<'_, Self>,
13487            decoder: &mut ___D,
13488            _: (),
13489        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13490            ::fidl_next::munge!(let Self { table } = slot);
13491
13492            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13493                match ordinal {
13494                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13495
13496                    1 => {
13497                        ::fidl_next::wire::Envelope::decode_as::<
13498                            ___D,
13499                            crate::wire::SecureHeapAndRange<'de>,
13500                        >(slot.as_mut(), decoder, ())?;
13501
13502                        Ok(())
13503                    }
13504
13505                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13506                }
13507            })
13508        }
13509    }
13510
13511    impl<'de> SecureMemGetPhysicalSecureHeapPropertiesRequest<'de> {
13512        pub fn entire_heap(&self) -> ::core::option::Option<&crate::wire::SecureHeapAndRange<'de>> {
13513            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13514        }
13515
13516        pub fn take_entire_heap(
13517            &mut self,
13518        ) -> ::core::option::Option<crate::wire::SecureHeapAndRange<'de>> {
13519            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13520        }
13521    }
13522
13523    impl<'de> ::core::fmt::Debug for SecureMemGetPhysicalSecureHeapPropertiesRequest<'de> {
13524        fn fmt(
13525            &self,
13526            f: &mut ::core::fmt::Formatter<'_>,
13527        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13528            f.debug_struct("SecureMemGetPhysicalSecureHeapPropertiesRequest")
13529                .field("entire_heap", &self.entire_heap())
13530                .finish()
13531        }
13532    }
13533
13534    impl<'de> ::fidl_next::IntoNatural for SecureMemGetPhysicalSecureHeapPropertiesRequest<'de> {
13535        type Natural = crate::natural::SecureMemGetPhysicalSecureHeapPropertiesRequest;
13536    }
13537
13538    /// The wire type corresponding to [`SecureMemGetPhysicalSecureHeapPropertiesResponse`].
13539    #[repr(C)]
13540    pub struct SecureMemGetPhysicalSecureHeapPropertiesResponse<'de> {
13541        pub(crate) table: ::fidl_next::wire::Table<'de>,
13542    }
13543
13544    impl<'de> Drop for SecureMemGetPhysicalSecureHeapPropertiesResponse<'de> {
13545        fn drop(&mut self) {
13546            let _ = self.table.get(1).map(|envelope| unsafe {
13547                envelope.read_unchecked::<crate::wire::SecureHeapProperties<'de>>()
13548            });
13549        }
13550    }
13551
13552    impl ::fidl_next::Constrained for SecureMemGetPhysicalSecureHeapPropertiesResponse<'_> {
13553        type Constraint = ();
13554
13555        fn validate(
13556            _: ::fidl_next::Slot<'_, Self>,
13557            _: Self::Constraint,
13558        ) -> Result<(), ::fidl_next::ValidationError> {
13559            Ok(())
13560        }
13561    }
13562
13563    unsafe impl ::fidl_next::Wire for SecureMemGetPhysicalSecureHeapPropertiesResponse<'static> {
13564        type Narrowed<'de> = SecureMemGetPhysicalSecureHeapPropertiesResponse<'de>;
13565
13566        #[inline]
13567        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13568            ::fidl_next::munge!(let Self { table } = out);
13569            ::fidl_next::wire::Table::zero_padding(table);
13570        }
13571    }
13572
13573    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
13574        for SecureMemGetPhysicalSecureHeapPropertiesResponse<'de>
13575    where
13576        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13577    {
13578        fn decode(
13579            slot: ::fidl_next::Slot<'_, Self>,
13580            decoder: &mut ___D,
13581            _: (),
13582        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13583            ::fidl_next::munge!(let Self { table } = slot);
13584
13585            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13586                match ordinal {
13587                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13588
13589                    1 => {
13590                        ::fidl_next::wire::Envelope::decode_as::<
13591                            ___D,
13592                            crate::wire::SecureHeapProperties<'de>,
13593                        >(slot.as_mut(), decoder, ())?;
13594
13595                        Ok(())
13596                    }
13597
13598                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13599                }
13600            })
13601        }
13602    }
13603
13604    impl<'de> SecureMemGetPhysicalSecureHeapPropertiesResponse<'de> {
13605        pub fn properties(
13606            &self,
13607        ) -> ::core::option::Option<&crate::wire::SecureHeapProperties<'de>> {
13608            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13609        }
13610
13611        pub fn take_properties(
13612            &mut self,
13613        ) -> ::core::option::Option<crate::wire::SecureHeapProperties<'de>> {
13614            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13615        }
13616    }
13617
13618    impl<'de> ::core::fmt::Debug for SecureMemGetPhysicalSecureHeapPropertiesResponse<'de> {
13619        fn fmt(
13620            &self,
13621            f: &mut ::core::fmt::Formatter<'_>,
13622        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13623            f.debug_struct("SecureMemGetPhysicalSecureHeapPropertiesResponse")
13624                .field("properties", &self.properties())
13625                .finish()
13626        }
13627    }
13628
13629    impl<'de> ::fidl_next::IntoNatural for SecureMemGetPhysicalSecureHeapPropertiesResponse<'de> {
13630        type Natural = crate::natural::SecureMemGetPhysicalSecureHeapPropertiesResponse;
13631    }
13632
13633    /// The wire type corresponding to [`SecureMemAddSecureHeapPhysicalRangeRequest`].
13634    #[repr(C)]
13635    pub struct SecureMemAddSecureHeapPhysicalRangeRequest<'de> {
13636        pub(crate) table: ::fidl_next::wire::Table<'de>,
13637    }
13638
13639    impl<'de> Drop for SecureMemAddSecureHeapPhysicalRangeRequest<'de> {
13640        fn drop(&mut self) {
13641            let _ = self.table.get(1).map(|envelope| unsafe {
13642                envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
13643            });
13644        }
13645    }
13646
13647    impl ::fidl_next::Constrained for SecureMemAddSecureHeapPhysicalRangeRequest<'_> {
13648        type Constraint = ();
13649
13650        fn validate(
13651            _: ::fidl_next::Slot<'_, Self>,
13652            _: Self::Constraint,
13653        ) -> Result<(), ::fidl_next::ValidationError> {
13654            Ok(())
13655        }
13656    }
13657
13658    unsafe impl ::fidl_next::Wire for SecureMemAddSecureHeapPhysicalRangeRequest<'static> {
13659        type Narrowed<'de> = SecureMemAddSecureHeapPhysicalRangeRequest<'de>;
13660
13661        #[inline]
13662        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13663            ::fidl_next::munge!(let Self { table } = out);
13664            ::fidl_next::wire::Table::zero_padding(table);
13665        }
13666    }
13667
13668    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureMemAddSecureHeapPhysicalRangeRequest<'de>
13669    where
13670        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13671    {
13672        fn decode(
13673            slot: ::fidl_next::Slot<'_, Self>,
13674            decoder: &mut ___D,
13675            _: (),
13676        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13677            ::fidl_next::munge!(let Self { table } = slot);
13678
13679            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13680                match ordinal {
13681                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13682
13683                    1 => {
13684                        ::fidl_next::wire::Envelope::decode_as::<
13685                            ___D,
13686                            crate::wire::SecureHeapAndRange<'de>,
13687                        >(slot.as_mut(), decoder, ())?;
13688
13689                        Ok(())
13690                    }
13691
13692                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13693                }
13694            })
13695        }
13696    }
13697
13698    impl<'de> SecureMemAddSecureHeapPhysicalRangeRequest<'de> {
13699        pub fn heap_range(&self) -> ::core::option::Option<&crate::wire::SecureHeapAndRange<'de>> {
13700            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13701        }
13702
13703        pub fn take_heap_range(
13704            &mut self,
13705        ) -> ::core::option::Option<crate::wire::SecureHeapAndRange<'de>> {
13706            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13707        }
13708    }
13709
13710    impl<'de> ::core::fmt::Debug for SecureMemAddSecureHeapPhysicalRangeRequest<'de> {
13711        fn fmt(
13712            &self,
13713            f: &mut ::core::fmt::Formatter<'_>,
13714        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13715            f.debug_struct("SecureMemAddSecureHeapPhysicalRangeRequest")
13716                .field("heap_range", &self.heap_range())
13717                .finish()
13718        }
13719    }
13720
13721    impl<'de> ::fidl_next::IntoNatural for SecureMemAddSecureHeapPhysicalRangeRequest<'de> {
13722        type Natural = crate::natural::SecureMemAddSecureHeapPhysicalRangeRequest;
13723    }
13724
13725    /// The wire type corresponding to [`SecureMemAddSecureHeapPhysicalRangeResponse`].
13726    pub type SecureMemAddSecureHeapPhysicalRangeResponse = ::fidl_next::wire::Unit;
13727
13728    /// The wire type corresponding to [`SecureMemDeleteSecureHeapPhysicalRangeRequest`].
13729    #[repr(C)]
13730    pub struct SecureMemDeleteSecureHeapPhysicalRangeRequest<'de> {
13731        pub(crate) table: ::fidl_next::wire::Table<'de>,
13732    }
13733
13734    impl<'de> Drop for SecureMemDeleteSecureHeapPhysicalRangeRequest<'de> {
13735        fn drop(&mut self) {
13736            let _ = self.table.get(1).map(|envelope| unsafe {
13737                envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
13738            });
13739        }
13740    }
13741
13742    impl ::fidl_next::Constrained for SecureMemDeleteSecureHeapPhysicalRangeRequest<'_> {
13743        type Constraint = ();
13744
13745        fn validate(
13746            _: ::fidl_next::Slot<'_, Self>,
13747            _: Self::Constraint,
13748        ) -> Result<(), ::fidl_next::ValidationError> {
13749            Ok(())
13750        }
13751    }
13752
13753    unsafe impl ::fidl_next::Wire for SecureMemDeleteSecureHeapPhysicalRangeRequest<'static> {
13754        type Narrowed<'de> = SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>;
13755
13756        #[inline]
13757        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13758            ::fidl_next::munge!(let Self { table } = out);
13759            ::fidl_next::wire::Table::zero_padding(table);
13760        }
13761    }
13762
13763    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
13764        for SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>
13765    where
13766        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13767    {
13768        fn decode(
13769            slot: ::fidl_next::Slot<'_, Self>,
13770            decoder: &mut ___D,
13771            _: (),
13772        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13773            ::fidl_next::munge!(let Self { table } = slot);
13774
13775            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13776                match ordinal {
13777                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13778
13779                    1 => {
13780                        ::fidl_next::wire::Envelope::decode_as::<
13781                            ___D,
13782                            crate::wire::SecureHeapAndRange<'de>,
13783                        >(slot.as_mut(), decoder, ())?;
13784
13785                        Ok(())
13786                    }
13787
13788                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13789                }
13790            })
13791        }
13792    }
13793
13794    impl<'de> SecureMemDeleteSecureHeapPhysicalRangeRequest<'de> {
13795        pub fn heap_range(&self) -> ::core::option::Option<&crate::wire::SecureHeapAndRange<'de>> {
13796            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13797        }
13798
13799        pub fn take_heap_range(
13800            &mut self,
13801        ) -> ::core::option::Option<crate::wire::SecureHeapAndRange<'de>> {
13802            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13803        }
13804    }
13805
13806    impl<'de> ::core::fmt::Debug for SecureMemDeleteSecureHeapPhysicalRangeRequest<'de> {
13807        fn fmt(
13808            &self,
13809            f: &mut ::core::fmt::Formatter<'_>,
13810        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13811            f.debug_struct("SecureMemDeleteSecureHeapPhysicalRangeRequest")
13812                .field("heap_range", &self.heap_range())
13813                .finish()
13814        }
13815    }
13816
13817    impl<'de> ::fidl_next::IntoNatural for SecureMemDeleteSecureHeapPhysicalRangeRequest<'de> {
13818        type Natural = crate::natural::SecureMemDeleteSecureHeapPhysicalRangeRequest;
13819    }
13820
13821    /// The wire type corresponding to [`SecureMemDeleteSecureHeapPhysicalRangeResponse`].
13822    pub type SecureMemDeleteSecureHeapPhysicalRangeResponse = ::fidl_next::wire::Unit;
13823
13824    /// The wire type corresponding to [`SecureMemModifySecureHeapPhysicalRangeRequest`].
13825    #[repr(C)]
13826    pub struct SecureMemModifySecureHeapPhysicalRangeRequest<'de> {
13827        pub(crate) table: ::fidl_next::wire::Table<'de>,
13828    }
13829
13830    impl<'de> Drop for SecureMemModifySecureHeapPhysicalRangeRequest<'de> {
13831        fn drop(&mut self) {
13832            let _ = self.table.get(1).map(|envelope| unsafe {
13833                envelope.read_unchecked::<crate::wire::SecureHeapAndRangeModification<'de>>()
13834            });
13835        }
13836    }
13837
13838    impl ::fidl_next::Constrained for SecureMemModifySecureHeapPhysicalRangeRequest<'_> {
13839        type Constraint = ();
13840
13841        fn validate(
13842            _: ::fidl_next::Slot<'_, Self>,
13843            _: Self::Constraint,
13844        ) -> Result<(), ::fidl_next::ValidationError> {
13845            Ok(())
13846        }
13847    }
13848
13849    unsafe impl ::fidl_next::Wire for SecureMemModifySecureHeapPhysicalRangeRequest<'static> {
13850        type Narrowed<'de> = SecureMemModifySecureHeapPhysicalRangeRequest<'de>;
13851
13852        #[inline]
13853        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13854            ::fidl_next::munge!(let Self { table } = out);
13855            ::fidl_next::wire::Table::zero_padding(table);
13856        }
13857    }
13858
13859    unsafe impl<'de, ___D> ::fidl_next::Decode<___D>
13860        for SecureMemModifySecureHeapPhysicalRangeRequest<'de>
13861    where
13862        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13863    {
13864        fn decode(
13865            slot: ::fidl_next::Slot<'_, Self>,
13866            decoder: &mut ___D,
13867            _: (),
13868        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13869            ::fidl_next::munge!(let Self { table } = slot);
13870
13871            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13872                match ordinal {
13873                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13874
13875                    1 => {
13876                        ::fidl_next::wire::Envelope::decode_as::<
13877                            ___D,
13878                            crate::wire::SecureHeapAndRangeModification<'de>,
13879                        >(slot.as_mut(), decoder, ())?;
13880
13881                        Ok(())
13882                    }
13883
13884                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13885                }
13886            })
13887        }
13888    }
13889
13890    impl<'de> SecureMemModifySecureHeapPhysicalRangeRequest<'de> {
13891        pub fn range_modification(
13892            &self,
13893        ) -> ::core::option::Option<&crate::wire::SecureHeapAndRangeModification<'de>> {
13894            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
13895        }
13896
13897        pub fn take_range_modification(
13898            &mut self,
13899        ) -> ::core::option::Option<crate::wire::SecureHeapAndRangeModification<'de>> {
13900            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
13901        }
13902    }
13903
13904    impl<'de> ::core::fmt::Debug for SecureMemModifySecureHeapPhysicalRangeRequest<'de> {
13905        fn fmt(
13906            &self,
13907            f: &mut ::core::fmt::Formatter<'_>,
13908        ) -> ::core::result::Result<(), ::core::fmt::Error> {
13909            f.debug_struct("SecureMemModifySecureHeapPhysicalRangeRequest")
13910                .field("range_modification", &self.range_modification())
13911                .finish()
13912        }
13913    }
13914
13915    impl<'de> ::fidl_next::IntoNatural for SecureMemModifySecureHeapPhysicalRangeRequest<'de> {
13916        type Natural = crate::natural::SecureMemModifySecureHeapPhysicalRangeRequest;
13917    }
13918
13919    /// The wire type corresponding to [`SecureMemModifySecureHeapPhysicalRangeResponse`].
13920    pub type SecureMemModifySecureHeapPhysicalRangeResponse = ::fidl_next::wire::Unit;
13921
13922    /// The wire type corresponding to [`SecureMemZeroSubRangeRequest`].
13923    #[repr(C)]
13924    pub struct SecureMemZeroSubRangeRequest<'de> {
13925        pub(crate) table: ::fidl_next::wire::Table<'de>,
13926    }
13927
13928    impl<'de> Drop for SecureMemZeroSubRangeRequest<'de> {
13929        fn drop(&mut self) {
13930            let _ = self.table.get(1).map(|envelope| unsafe { envelope.read_unchecked::<bool>() });
13931
13932            let _ = self.table.get(2).map(|envelope| unsafe {
13933                envelope.read_unchecked::<crate::wire::SecureHeapAndRange<'de>>()
13934            });
13935        }
13936    }
13937
13938    impl ::fidl_next::Constrained for SecureMemZeroSubRangeRequest<'_> {
13939        type Constraint = ();
13940
13941        fn validate(
13942            _: ::fidl_next::Slot<'_, Self>,
13943            _: Self::Constraint,
13944        ) -> Result<(), ::fidl_next::ValidationError> {
13945            Ok(())
13946        }
13947    }
13948
13949    unsafe impl ::fidl_next::Wire for SecureMemZeroSubRangeRequest<'static> {
13950        type Narrowed<'de> = SecureMemZeroSubRangeRequest<'de>;
13951
13952        #[inline]
13953        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13954            ::fidl_next::munge!(let Self { table } = out);
13955            ::fidl_next::wire::Table::zero_padding(table);
13956        }
13957    }
13958
13959    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for SecureMemZeroSubRangeRequest<'de>
13960    where
13961        ___D: ::fidl_next::Decoder<'de> + ?Sized,
13962    {
13963        fn decode(
13964            slot: ::fidl_next::Slot<'_, Self>,
13965            decoder: &mut ___D,
13966            _: (),
13967        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
13968            ::fidl_next::munge!(let Self { table } = slot);
13969
13970            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
13971                match ordinal {
13972                    0 => unsafe { ::core::hint::unreachable_unchecked() },
13973
13974                    1 => {
13975                        ::fidl_next::wire::Envelope::decode_as::<___D, bool>(
13976                            slot.as_mut(),
13977                            decoder,
13978                            (),
13979                        )?;
13980
13981                        Ok(())
13982                    }
13983
13984                    2 => {
13985                        ::fidl_next::wire::Envelope::decode_as::<
13986                            ___D,
13987                            crate::wire::SecureHeapAndRange<'de>,
13988                        >(slot.as_mut(), decoder, ())?;
13989
13990                        Ok(())
13991                    }
13992
13993                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
13994                }
13995            })
13996        }
13997    }
13998
13999    impl<'de> SecureMemZeroSubRangeRequest<'de> {
14000        pub fn is_covering_range_explicit(&self) -> ::core::option::Option<&bool> {
14001            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
14002        }
14003
14004        pub fn take_is_covering_range_explicit(&mut self) -> ::core::option::Option<bool> {
14005            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
14006        }
14007
14008        pub fn heap_range(&self) -> ::core::option::Option<&crate::wire::SecureHeapAndRange<'de>> {
14009            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
14010        }
14011
14012        pub fn take_heap_range(
14013            &mut self,
14014        ) -> ::core::option::Option<crate::wire::SecureHeapAndRange<'de>> {
14015            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
14016        }
14017    }
14018
14019    impl<'de> ::core::fmt::Debug for SecureMemZeroSubRangeRequest<'de> {
14020        fn fmt(
14021            &self,
14022            f: &mut ::core::fmt::Formatter<'_>,
14023        ) -> ::core::result::Result<(), ::core::fmt::Error> {
14024            f.debug_struct("SecureMemZeroSubRangeRequest")
14025                .field("is_covering_range_explicit", &self.is_covering_range_explicit())
14026                .field("heap_range", &self.heap_range())
14027                .finish()
14028        }
14029    }
14030
14031    impl<'de> ::fidl_next::IntoNatural for SecureMemZeroSubRangeRequest<'de> {
14032        type Natural = crate::natural::SecureMemZeroSubRangeRequest;
14033    }
14034
14035    /// The wire type corresponding to [`SecureMemZeroSubRangeResponse`].
14036    pub type SecureMemZeroSubRangeResponse = ::fidl_next::wire::Unit;
14037}
14038
14039pub mod wire_optional {}
14040
14041pub mod generic {
14042
14043    /// The generic type corresponding to [`PixelFormatAndModifier`].
14044    pub struct PixelFormatAndModifier<T0, T1> {
14045        pub pixel_format: T0,
14046
14047        pub pixel_format_modifier: T1,
14048    }
14049
14050    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::PixelFormatAndModifier, ___E>
14051        for PixelFormatAndModifier<T0, T1>
14052    where
14053        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
14054        T0: ::fidl_next::Encode<::fidl_next_common_fuchsia_images2::wire::PixelFormat, ___E>,
14055        T1: ::fidl_next::Encode<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier, ___E>,
14056    {
14057        #[inline]
14058        fn encode(
14059            self,
14060            encoder_: &mut ___E,
14061            out_: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormatAndModifier>,
14062            _: (),
14063        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
14064            ::fidl_next::munge! {
14065                let crate::wire::PixelFormatAndModifier {
14066                    pixel_format,
14067                    pixel_format_modifier,
14068
14069                } = out_;
14070            }
14071
14072            ::fidl_next::Encode::encode(self.pixel_format, encoder_, pixel_format, ())?;
14073
14074            ::fidl_next::Encode::encode(
14075                self.pixel_format_modifier,
14076                encoder_,
14077                pixel_format_modifier,
14078                (),
14079            )?;
14080
14081            Ok(())
14082        }
14083    }
14084
14085    unsafe impl<'a, ___E, T0, T1> ::fidl_next::Encode<crate::wire::PixelFormatAndModifier, ___E>
14086        for &'a PixelFormatAndModifier<T0, T1>
14087    where
14088        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
14089        &'a T0: ::fidl_next::Encode<::fidl_next_common_fuchsia_images2::wire::PixelFormat, ___E>,
14090        &'a T1: ::fidl_next::Encode<::fidl_next_common_fuchsia_images2::wire::PixelFormatModifier, ___E>,
14091    {
14092        #[inline]
14093        fn encode(
14094            self,
14095            encoder_: &mut ___E,
14096            out_: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormatAndModifier>,
14097            _: (),
14098        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
14099            ::fidl_next::munge! {
14100                let crate::wire::PixelFormatAndModifier {
14101                    pixel_format,
14102                    pixel_format_modifier,
14103
14104                } = out_;
14105            }
14106
14107            ::fidl_next::Encode::encode(&self.pixel_format, encoder_, pixel_format, ())?;
14108
14109            ::fidl_next::Encode::encode(
14110                &self.pixel_format_modifier,
14111                encoder_,
14112                pixel_format_modifier,
14113                (),
14114            )?;
14115
14116            Ok(())
14117        }
14118    }
14119
14120    /// The generic type corresponding to [`NodeSyncResponse`].
14121    pub type NodeSyncResponse = ();
14122
14123    /// The generic type corresponding to [`BufferCollectionCheckAllBuffersAllocatedResponse`].
14124    pub type BufferCollectionCheckAllBuffersAllocatedResponse = ();
14125
14126    /// The generic type corresponding to [`SecureMemAddSecureHeapPhysicalRangeResponse`].
14127    pub type SecureMemAddSecureHeapPhysicalRangeResponse = ();
14128
14129    /// The generic type corresponding to [`SecureMemDeleteSecureHeapPhysicalRangeResponse`].
14130    pub type SecureMemDeleteSecureHeapPhysicalRangeResponse = ();
14131
14132    /// The generic type corresponding to [`SecureMemModifySecureHeapPhysicalRangeResponse`].
14133    pub type SecureMemModifySecureHeapPhysicalRangeResponse = ();
14134
14135    /// The generic type corresponding to [`SecureMemZeroSubRangeResponse`].
14136    pub type SecureMemZeroSubRangeResponse = ();
14137}
14138
14139pub use self::natural::*;
14140
14141#[doc = " The max length in bytes of the `name` request field in\n [`fuchsia.sysmem2/Allocator.SetDebugClientInfo`] and\n [`fuchsia.sysmem2/Node.SetDebugClientInfo`].\n"]
14142pub const MAX_CLIENT_NAME_LENGTH: i32 = 256 as i32;
14143
14144#[doc = " The maximum size of\n [`fuchsia.sysmem2/BufferMemoryConstraints.permitted_heaps`].\n"]
14145pub const MAX_COUNT_BUFFER_MEMORY_CONSTRAINTS_PERMITTED_HEAPS: u32 = 64 as u32;
14146
14147#[doc = " The maximum size of [`fuchsia.sysmem2/ImageFormatConstraints.color_spaces`].\n"]
14148pub const MAX_COUNT_IMAGE_FORMAT_CONSTRAINTS_COLOR_SPACES: u32 = 32 as u32;
14149
14150#[doc = " The maximum size of\n [`fuchsia.sysmem2/ImageFormatConstraints.pixel_format_and_modifiers`].\n"]
14151pub const MAX_COUNT_PIXEL_FORMAT_AND_MODIFIERS: u32 = 64 as u32;
14152
14153pub const MAX_COUNT_IMAGE_FORMAT_CONSTRAINTS_REQUIRED_MAX_SIZE_LIST: u32 = 64 as u32;
14154
14155#[doc = " The maximum size of\n [`fuchsia.sysmem2/BufferCollectionConstraints.image_format_constraints`].\n"]
14156pub const MAX_COUNT_BUFFER_COLLECTION_CONSTRAINTS_IMAGE_FORMAT_CONSTRAINTS: u32 = 64 as u32;
14157
14158#[doc = " The maximum entries that can be in the\n [`fuchsia.sysmem2/BufferCollectionInfo.buffers`] field.\n"]
14159pub const MAX_COUNT_BUFFER_COLLECTION_INFO_BUFFERS: u32 = 128 as u32;
14160
14161pub const MAX_COUNT_DUPLICATES: u32 = 64 as u32;
14162
14163#[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"]
14164pub const MAX_COUNT_CREATE_CHILDREN: i32 = 64 as i32;
14165
14166pub const CPU_USAGE_READ: u32 = 1 as u32;
14167
14168pub const CPU_USAGE_READ_OFTEN: u32 = 2 as u32;
14169
14170pub const CPU_USAGE_WRITE: u32 = 4 as u32;
14171
14172pub const CPU_USAGE_WRITE_OFTEN: u32 = 8 as u32;
14173
14174pub const DISPLAY_USAGE_CURSOR: u32 = 2 as u32;
14175
14176pub const DISPLAY_USAGE_LAYER: u32 = 1 as u32;
14177
14178pub const MAX_HEAPS_COUNT: u32 = 32 as u32;
14179
14180pub const MAX_RANGES_COUNT: u32 = 128 as u32;
14181
14182pub const NONE_USAGE: u32 = 1 as u32;
14183
14184pub const NONE_USAGE_PERMIT_ALLOCATION: u32 = 2 as u32;
14185
14186/// The type corresponding to the SecureMem protocol.
14187#[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"]
14188#[derive(PartialEq, Debug)]
14189pub struct SecureMem;
14190
14191#[cfg(target_os = "fuchsia")]
14192impl ::fidl_next::HasTransport for SecureMem {
14193    type Transport = ::fidl_next::fuchsia::zx::Channel;
14194}
14195
14196pub mod secure_mem {
14197    pub mod prelude {
14198        pub use crate::{
14199            SecureMem, SecureMemClientHandler, SecureMemLocalClientHandler,
14200            SecureMemLocalServerHandler, SecureMemServerHandler, secure_mem,
14201        };
14202
14203        pub use crate::natural::Error;
14204
14205        pub use crate::natural::SecureMemAddSecureHeapPhysicalRangeRequest;
14206
14207        pub use crate::natural::SecureMemDeleteSecureHeapPhysicalRangeRequest;
14208
14209        pub use crate::natural::SecureMemGetPhysicalSecureHeapPropertiesRequest;
14210
14211        pub use crate::natural::SecureMemModifySecureHeapPhysicalRangeRequest;
14212
14213        pub use crate::natural::SecureMemZeroSubRangeRequest;
14214
14215        pub use crate::natural::SecureMemAddSecureHeapPhysicalRangeResponse;
14216
14217        pub use crate::natural::SecureMemDeleteSecureHeapPhysicalRangeResponse;
14218
14219        pub use crate::natural::SecureMemGetDynamicSecureHeapsResponse;
14220
14221        pub use crate::natural::SecureMemGetPhysicalSecureHeapPropertiesResponse;
14222
14223        pub use crate::natural::SecureMemGetPhysicalSecureHeapsResponse;
14224
14225        pub use crate::natural::SecureMemModifySecureHeapPhysicalRangeResponse;
14226
14227        pub use crate::natural::SecureMemZeroSubRangeResponse;
14228    }
14229
14230    pub struct GetPhysicalSecureHeaps;
14231
14232    impl ::fidl_next::Method for GetPhysicalSecureHeaps {
14233        const ORDINAL: u64 = 4067140791638717411;
14234        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14235            ::fidl_next::protocol::Flexibility::Flexible;
14236
14237        type Protocol = crate::SecureMem;
14238
14239        type Request = ::fidl_next::wire::EmptyMessageBody;
14240    }
14241
14242    impl ::fidl_next::TwoWayMethod for GetPhysicalSecureHeaps {
14243        type Response = ::fidl_next::wire::Result<
14244            'static,
14245            crate::wire::SecureMemGetPhysicalSecureHeapsResponse<'static>,
14246            crate::wire::Error,
14247        >;
14248    }
14249
14250    impl<___R> ::fidl_next::Respond<___R> for GetPhysicalSecureHeaps {
14251        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14252
14253        fn respond(response: ___R) -> Self::Output {
14254            ::core::result::Result::Ok(response)
14255        }
14256    }
14257
14258    impl<___R> ::fidl_next::RespondErr<___R> for GetPhysicalSecureHeaps {
14259        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14260
14261        fn respond_err(response: ___R) -> Self::Output {
14262            ::core::result::Result::Err(response)
14263        }
14264    }
14265
14266    pub struct GetDynamicSecureHeaps;
14267
14268    impl ::fidl_next::Method for GetDynamicSecureHeaps {
14269        const ORDINAL: u64 = 1265657178863511604;
14270        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14271            ::fidl_next::protocol::Flexibility::Flexible;
14272
14273        type Protocol = crate::SecureMem;
14274
14275        type Request = ::fidl_next::wire::EmptyMessageBody;
14276    }
14277
14278    impl ::fidl_next::TwoWayMethod for GetDynamicSecureHeaps {
14279        type Response = ::fidl_next::wire::Result<
14280            'static,
14281            crate::wire::SecureMemGetDynamicSecureHeapsResponse<'static>,
14282            crate::wire::Error,
14283        >;
14284    }
14285
14286    impl<___R> ::fidl_next::Respond<___R> for GetDynamicSecureHeaps {
14287        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14288
14289        fn respond(response: ___R) -> Self::Output {
14290            ::core::result::Result::Ok(response)
14291        }
14292    }
14293
14294    impl<___R> ::fidl_next::RespondErr<___R> for GetDynamicSecureHeaps {
14295        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14296
14297        fn respond_err(response: ___R) -> Self::Output {
14298            ::core::result::Result::Err(response)
14299        }
14300    }
14301
14302    pub struct GetPhysicalSecureHeapProperties;
14303
14304    impl ::fidl_next::Method for GetPhysicalSecureHeapProperties {
14305        const ORDINAL: u64 = 895942034471897020;
14306        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14307            ::fidl_next::protocol::Flexibility::Flexible;
14308
14309        type Protocol = crate::SecureMem;
14310
14311        type Request = crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'static>;
14312    }
14313
14314    impl ::fidl_next::TwoWayMethod for GetPhysicalSecureHeapProperties {
14315        type Response = ::fidl_next::wire::Result<
14316            'static,
14317            crate::wire::SecureMemGetPhysicalSecureHeapPropertiesResponse<'static>,
14318            crate::wire::Error,
14319        >;
14320    }
14321
14322    impl<___R> ::fidl_next::Respond<___R> for GetPhysicalSecureHeapProperties {
14323        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14324
14325        fn respond(response: ___R) -> Self::Output {
14326            ::core::result::Result::Ok(response)
14327        }
14328    }
14329
14330    impl<___R> ::fidl_next::RespondErr<___R> for GetPhysicalSecureHeapProperties {
14331        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14332
14333        fn respond_err(response: ___R) -> Self::Output {
14334            ::core::result::Result::Err(response)
14335        }
14336    }
14337
14338    pub struct AddSecureHeapPhysicalRange;
14339
14340    impl ::fidl_next::Method for AddSecureHeapPhysicalRange {
14341        const ORDINAL: u64 = 3888459953148993914;
14342        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14343            ::fidl_next::protocol::Flexibility::Flexible;
14344
14345        type Protocol = crate::SecureMem;
14346
14347        type Request = crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'static>;
14348    }
14349
14350    impl ::fidl_next::TwoWayMethod for AddSecureHeapPhysicalRange {
14351        type Response = ::fidl_next::wire::Result<
14352            'static,
14353            crate::wire::SecureMemAddSecureHeapPhysicalRangeResponse,
14354            crate::wire::Error,
14355        >;
14356    }
14357
14358    impl<___R> ::fidl_next::Respond<___R> for AddSecureHeapPhysicalRange {
14359        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14360
14361        fn respond(response: ___R) -> Self::Output {
14362            ::core::result::Result::Ok(response)
14363        }
14364    }
14365
14366    impl<___R> ::fidl_next::RespondErr<___R> for AddSecureHeapPhysicalRange {
14367        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14368
14369        fn respond_err(response: ___R) -> Self::Output {
14370            ::core::result::Result::Err(response)
14371        }
14372    }
14373
14374    pub struct DeleteSecureHeapPhysicalRange;
14375
14376    impl ::fidl_next::Method for DeleteSecureHeapPhysicalRange {
14377        const ORDINAL: u64 = 1056754671343258782;
14378        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14379            ::fidl_next::protocol::Flexibility::Flexible;
14380
14381        type Protocol = crate::SecureMem;
14382
14383        type Request = crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'static>;
14384    }
14385
14386    impl ::fidl_next::TwoWayMethod for DeleteSecureHeapPhysicalRange {
14387        type Response = ::fidl_next::wire::Result<
14388            'static,
14389            crate::wire::SecureMemDeleteSecureHeapPhysicalRangeResponse,
14390            crate::wire::Error,
14391        >;
14392    }
14393
14394    impl<___R> ::fidl_next::Respond<___R> for DeleteSecureHeapPhysicalRange {
14395        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14396
14397        fn respond(response: ___R) -> Self::Output {
14398            ::core::result::Result::Ok(response)
14399        }
14400    }
14401
14402    impl<___R> ::fidl_next::RespondErr<___R> for DeleteSecureHeapPhysicalRange {
14403        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14404
14405        fn respond_err(response: ___R) -> Self::Output {
14406            ::core::result::Result::Err(response)
14407        }
14408    }
14409
14410    pub struct ModifySecureHeapPhysicalRange;
14411
14412    impl ::fidl_next::Method for ModifySecureHeapPhysicalRange {
14413        const ORDINAL: u64 = 6969114310578042676;
14414        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14415            ::fidl_next::protocol::Flexibility::Flexible;
14416
14417        type Protocol = crate::SecureMem;
14418
14419        type Request = crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'static>;
14420    }
14421
14422    impl ::fidl_next::TwoWayMethod for ModifySecureHeapPhysicalRange {
14423        type Response = ::fidl_next::wire::Result<
14424            'static,
14425            crate::wire::SecureMemModifySecureHeapPhysicalRangeResponse,
14426            crate::wire::Error,
14427        >;
14428    }
14429
14430    impl<___R> ::fidl_next::Respond<___R> for ModifySecureHeapPhysicalRange {
14431        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14432
14433        fn respond(response: ___R) -> Self::Output {
14434            ::core::result::Result::Ok(response)
14435        }
14436    }
14437
14438    impl<___R> ::fidl_next::RespondErr<___R> for ModifySecureHeapPhysicalRange {
14439        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14440
14441        fn respond_err(response: ___R) -> Self::Output {
14442            ::core::result::Result::Err(response)
14443        }
14444    }
14445
14446    pub struct ZeroSubRange;
14447
14448    impl ::fidl_next::Method for ZeroSubRange {
14449        const ORDINAL: u64 = 6567857461132811493;
14450        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
14451            ::fidl_next::protocol::Flexibility::Flexible;
14452
14453        type Protocol = crate::SecureMem;
14454
14455        type Request = crate::wire::SecureMemZeroSubRangeRequest<'static>;
14456    }
14457
14458    impl ::fidl_next::TwoWayMethod for ZeroSubRange {
14459        type Response = ::fidl_next::wire::Result<
14460            'static,
14461            crate::wire::SecureMemZeroSubRangeResponse,
14462            crate::wire::Error,
14463        >;
14464    }
14465
14466    impl<___R> ::fidl_next::Respond<___R> for ZeroSubRange {
14467        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
14468
14469        fn respond(response: ___R) -> Self::Output {
14470            ::core::result::Result::Ok(response)
14471        }
14472    }
14473
14474    impl<___R> ::fidl_next::RespondErr<___R> for ZeroSubRange {
14475        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
14476
14477        fn respond_err(response: ___R) -> Self::Output {
14478            ::core::result::Result::Err(response)
14479        }
14480    }
14481
14482    mod ___detail {
14483        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::SecureMem
14484        where
14485            ___T: ::fidl_next::Transport,
14486        {
14487            type Client = SecureMemClient<___T>;
14488            type Server = SecureMemServer<___T>;
14489        }
14490
14491        /// The client for the `SecureMem` protocol.
14492        #[repr(transparent)]
14493        pub struct SecureMemClient<___T: ::fidl_next::Transport> {
14494            #[allow(dead_code)]
14495            client: ::fidl_next::protocol::Client<___T>,
14496        }
14497
14498        impl<___T> SecureMemClient<___T>
14499        where
14500            ___T: ::fidl_next::Transport,
14501        {
14502            #[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"]
14503            pub fn get_physical_secure_heaps(
14504                &self,
14505            ) -> ::fidl_next::TwoWayFuture<'_, super::GetPhysicalSecureHeaps, ___T> {
14506                ::fidl_next::TwoWayFuture::from_untyped(
14507                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14508                        4067140791638717411,
14509                        <super::GetPhysicalSecureHeaps as ::fidl_next::Method>::FLEXIBILITY,
14510                        (),
14511                    ),
14512                )
14513            }
14514
14515            #[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"]
14516            pub fn get_dynamic_secure_heaps(
14517                &self,
14518            ) -> ::fidl_next::TwoWayFuture<'_, super::GetDynamicSecureHeaps, ___T> {
14519                ::fidl_next::TwoWayFuture::from_untyped(
14520                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
14521                        1265657178863511604,
14522                        <super::GetDynamicSecureHeaps as ::fidl_next::Method>::FLEXIBILITY,
14523                        (),
14524                    ),
14525                )
14526            }
14527
14528            #[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"]
14529            pub fn get_physical_secure_heap_properties_with<___R>(
14530                &self,
14531                request: ___R,
14532            ) -> ::fidl_next::TwoWayFuture<'_, super::GetPhysicalSecureHeapProperties, ___T>
14533            where
14534                ___R: ::fidl_next::Encode<
14535                        crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'static>,
14536                        <___T as ::fidl_next::Transport>::SendBuffer,
14537                    >,
14538            {
14539                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14540                    895942034471897020,
14541                    <super::GetPhysicalSecureHeapProperties as ::fidl_next::Method>::FLEXIBILITY,
14542                    request,
14543                ))
14544            }
14545
14546            #[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"]
14547            pub fn add_secure_heap_physical_range_with<___R>(
14548                &self,
14549                request: ___R,
14550            ) -> ::fidl_next::TwoWayFuture<'_, super::AddSecureHeapPhysicalRange, ___T>
14551            where
14552                ___R: ::fidl_next::Encode<
14553                        crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'static>,
14554                        <___T as ::fidl_next::Transport>::SendBuffer,
14555                    >,
14556            {
14557                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14558                    3888459953148993914,
14559                    <super::AddSecureHeapPhysicalRange as ::fidl_next::Method>::FLEXIBILITY,
14560                    request,
14561                ))
14562            }
14563
14564            #[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"]
14565            pub fn delete_secure_heap_physical_range_with<___R>(
14566                &self,
14567                request: ___R,
14568            ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteSecureHeapPhysicalRange, ___T>
14569            where
14570                ___R: ::fidl_next::Encode<
14571                        crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'static>,
14572                        <___T as ::fidl_next::Transport>::SendBuffer,
14573                    >,
14574            {
14575                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14576                    1056754671343258782,
14577                    <super::DeleteSecureHeapPhysicalRange as ::fidl_next::Method>::FLEXIBILITY,
14578                    request,
14579                ))
14580            }
14581
14582            #[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"]
14583            pub fn modify_secure_heap_physical_range_with<___R>(
14584                &self,
14585                request: ___R,
14586            ) -> ::fidl_next::TwoWayFuture<'_, super::ModifySecureHeapPhysicalRange, ___T>
14587            where
14588                ___R: ::fidl_next::Encode<
14589                        crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'static>,
14590                        <___T as ::fidl_next::Transport>::SendBuffer,
14591                    >,
14592            {
14593                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14594                    6969114310578042676,
14595                    <super::ModifySecureHeapPhysicalRange as ::fidl_next::Method>::FLEXIBILITY,
14596                    request,
14597                ))
14598            }
14599
14600            #[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"]
14601            pub fn zero_sub_range_with<___R>(
14602                &self,
14603                request: ___R,
14604            ) -> ::fidl_next::TwoWayFuture<'_, super::ZeroSubRange, ___T>
14605            where
14606                ___R: ::fidl_next::Encode<
14607                        crate::wire::SecureMemZeroSubRangeRequest<'static>,
14608                        <___T as ::fidl_next::Transport>::SendBuffer,
14609                    >,
14610            {
14611                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
14612                    6567857461132811493,
14613                    <super::ZeroSubRange as ::fidl_next::Method>::FLEXIBILITY,
14614                    request,
14615                ))
14616            }
14617        }
14618
14619        /// The server for the `SecureMem` protocol.
14620        #[repr(transparent)]
14621        pub struct SecureMemServer<___T: ::fidl_next::Transport> {
14622            server: ::fidl_next::protocol::Server<___T>,
14623        }
14624
14625        impl<___T> SecureMemServer<___T> where ___T: ::fidl_next::Transport {}
14626    }
14627}
14628
14629#[diagnostic::on_unimplemented(
14630    note = "If {Self} implements the non-local SecureMemClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
14631)]
14632
14633/// A client handler for the SecureMem protocol.
14634///
14635/// See [`SecureMem`] for more details.
14636pub trait SecureMemLocalClientHandler<
14637    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14638    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14639>
14640{
14641    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14642        ::core::future::ready(())
14643    }
14644}
14645
14646impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for SecureMem
14647where
14648    ___H: SecureMemLocalClientHandler<___T>,
14649    ___T: ::fidl_next::Transport,
14650{
14651    async fn on_event(
14652        handler: &mut ___H,
14653        mut message: ::fidl_next::Message<___T>,
14654    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14655        match *message.header().ordinal {
14656            ordinal => {
14657                handler.on_unknown_interaction(ordinal).await;
14658                if ::core::matches!(
14659                    message.header().flexibility(),
14660                    ::fidl_next::protocol::Flexibility::Strict
14661                ) {
14662                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14663                } else {
14664                    Ok(())
14665                }
14666            }
14667        }
14668    }
14669}
14670
14671#[diagnostic::on_unimplemented(
14672    note = "If {Self} implements the non-local SecureMemServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
14673)]
14674
14675/// A server handler for the SecureMem protocol.
14676///
14677/// See [`SecureMem`] for more details.
14678pub trait SecureMemLocalServerHandler<
14679    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14680    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14681>
14682{
14683    #[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"]
14684    fn get_physical_secure_heaps(
14685        &mut self,
14686
14687        responder: ::fidl_next::Responder<secure_mem::GetPhysicalSecureHeaps, ___T>,
14688    ) -> impl ::core::future::Future<Output = ()>;
14689
14690    #[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"]
14691    fn get_dynamic_secure_heaps(
14692        &mut self,
14693
14694        responder: ::fidl_next::Responder<secure_mem::GetDynamicSecureHeaps, ___T>,
14695    ) -> impl ::core::future::Future<Output = ()>;
14696
14697    #[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"]
14698    fn get_physical_secure_heap_properties(
14699        &mut self,
14700
14701        request: ::fidl_next::Request<secure_mem::GetPhysicalSecureHeapProperties, ___T>,
14702
14703        responder: ::fidl_next::Responder<secure_mem::GetPhysicalSecureHeapProperties, ___T>,
14704    ) -> impl ::core::future::Future<Output = ()>;
14705
14706    #[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"]
14707    fn add_secure_heap_physical_range(
14708        &mut self,
14709
14710        request: ::fidl_next::Request<secure_mem::AddSecureHeapPhysicalRange, ___T>,
14711
14712        responder: ::fidl_next::Responder<secure_mem::AddSecureHeapPhysicalRange, ___T>,
14713    ) -> impl ::core::future::Future<Output = ()>;
14714
14715    #[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"]
14716    fn delete_secure_heap_physical_range(
14717        &mut self,
14718
14719        request: ::fidl_next::Request<secure_mem::DeleteSecureHeapPhysicalRange, ___T>,
14720
14721        responder: ::fidl_next::Responder<secure_mem::DeleteSecureHeapPhysicalRange, ___T>,
14722    ) -> impl ::core::future::Future<Output = ()>;
14723
14724    #[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"]
14725    fn modify_secure_heap_physical_range(
14726        &mut self,
14727
14728        request: ::fidl_next::Request<secure_mem::ModifySecureHeapPhysicalRange, ___T>,
14729
14730        responder: ::fidl_next::Responder<secure_mem::ModifySecureHeapPhysicalRange, ___T>,
14731    ) -> impl ::core::future::Future<Output = ()>;
14732
14733    #[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"]
14734    fn zero_sub_range(
14735        &mut self,
14736
14737        request: ::fidl_next::Request<secure_mem::ZeroSubRange, ___T>,
14738
14739        responder: ::fidl_next::Responder<secure_mem::ZeroSubRange, ___T>,
14740    ) -> impl ::core::future::Future<Output = ()>;
14741
14742    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
14743        ::core::future::ready(())
14744    }
14745}
14746
14747impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for SecureMem
14748where
14749    ___H: SecureMemLocalServerHandler<___T>,
14750    ___T: ::fidl_next::Transport,
14751    for<'de> crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>: ::fidl_next::Decode<
14752            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14753            Constraint = (),
14754        >,
14755    for<'de> crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'de>: ::fidl_next::Decode<
14756            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14757            Constraint = (),
14758        >,
14759    for<'de> crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>: ::fidl_next::Decode<
14760            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14761            Constraint = (),
14762        >,
14763    for<'de> crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'de>: ::fidl_next::Decode<
14764            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14765            Constraint = (),
14766        >,
14767    for<'de> crate::wire::SecureMemZeroSubRangeRequest<'de>: ::fidl_next::Decode<
14768            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
14769            Constraint = (),
14770        >,
14771{
14772    async fn on_one_way(
14773        handler: &mut ___H,
14774        mut message: ::fidl_next::Message<___T>,
14775    ) -> ::core::result::Result<
14776        (),
14777        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14778    > {
14779        match *message.header().ordinal {
14780            ordinal => {
14781                handler.on_unknown_interaction(ordinal).await;
14782                if ::core::matches!(
14783                    message.header().flexibility(),
14784                    ::fidl_next::protocol::Flexibility::Strict
14785                ) {
14786                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14787                } else {
14788                    Ok(())
14789                }
14790            }
14791        }
14792    }
14793
14794    async fn on_two_way(
14795        handler: &mut ___H,
14796        mut message: ::fidl_next::Message<___T>,
14797        responder: ::fidl_next::protocol::Responder<___T>,
14798    ) -> ::core::result::Result<
14799        (),
14800        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
14801    > {
14802        match *message.header().ordinal {
14803            4067140791638717411 => {
14804                let responder = ::fidl_next::Responder::from_untyped(responder);
14805
14806                handler.get_physical_secure_heaps(responder).await;
14807                Ok(())
14808            }
14809
14810            1265657178863511604 => {
14811                let responder = ::fidl_next::Responder::from_untyped(responder);
14812
14813                handler.get_dynamic_secure_heaps(responder).await;
14814                Ok(())
14815            }
14816
14817            895942034471897020 => {
14818                let responder = ::fidl_next::Responder::from_untyped(responder);
14819
14820                match ::fidl_next::AsDecoderExt::into_decoded(message) {
14821                    Ok(decoded) => {
14822                        handler
14823                            .get_physical_secure_heap_properties(
14824                                ::fidl_next::Request::from_decoded(decoded),
14825                                responder,
14826                            )
14827                            .await;
14828                        Ok(())
14829                    }
14830                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14831                        ordinal: 895942034471897020,
14832                        error,
14833                    }),
14834                }
14835            }
14836
14837            3888459953148993914 => {
14838                let responder = ::fidl_next::Responder::from_untyped(responder);
14839
14840                match ::fidl_next::AsDecoderExt::into_decoded(message) {
14841                    Ok(decoded) => {
14842                        handler
14843                            .add_secure_heap_physical_range(
14844                                ::fidl_next::Request::from_decoded(decoded),
14845                                responder,
14846                            )
14847                            .await;
14848                        Ok(())
14849                    }
14850                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14851                        ordinal: 3888459953148993914,
14852                        error,
14853                    }),
14854                }
14855            }
14856
14857            1056754671343258782 => {
14858                let responder = ::fidl_next::Responder::from_untyped(responder);
14859
14860                match ::fidl_next::AsDecoderExt::into_decoded(message) {
14861                    Ok(decoded) => {
14862                        handler
14863                            .delete_secure_heap_physical_range(
14864                                ::fidl_next::Request::from_decoded(decoded),
14865                                responder,
14866                            )
14867                            .await;
14868                        Ok(())
14869                    }
14870                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14871                        ordinal: 1056754671343258782,
14872                        error,
14873                    }),
14874                }
14875            }
14876
14877            6969114310578042676 => {
14878                let responder = ::fidl_next::Responder::from_untyped(responder);
14879
14880                match ::fidl_next::AsDecoderExt::into_decoded(message) {
14881                    Ok(decoded) => {
14882                        handler
14883                            .modify_secure_heap_physical_range(
14884                                ::fidl_next::Request::from_decoded(decoded),
14885                                responder,
14886                            )
14887                            .await;
14888                        Ok(())
14889                    }
14890                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14891                        ordinal: 6969114310578042676,
14892                        error,
14893                    }),
14894                }
14895            }
14896
14897            6567857461132811493 => {
14898                let responder = ::fidl_next::Responder::from_untyped(responder);
14899
14900                match ::fidl_next::AsDecoderExt::into_decoded(message) {
14901                    Ok(decoded) => {
14902                        handler
14903                            .zero_sub_range(::fidl_next::Request::from_decoded(decoded), responder)
14904                            .await;
14905                        Ok(())
14906                    }
14907                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
14908                        ordinal: 6567857461132811493,
14909                        error,
14910                    }),
14911                }
14912            }
14913
14914            ordinal => {
14915                handler.on_unknown_interaction(ordinal).await;
14916                if ::core::matches!(
14917                    message.header().flexibility(),
14918                    ::fidl_next::protocol::Flexibility::Strict
14919                ) {
14920                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14921                } else {
14922                    responder
14923                        .respond_framework_error(
14924                            ordinal,
14925                            ::fidl_next::FrameworkError::UnknownMethod,
14926                        )
14927                        .expect("encoding a framework error should never fail")
14928                        .await?;
14929                    Ok(())
14930                }
14931            }
14932        }
14933    }
14934}
14935
14936/// A client handler for the SecureMem protocol.
14937///
14938/// See [`SecureMem`] for more details.
14939pub trait SecureMemClientHandler<
14940    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14941    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14942>
14943{
14944    fn on_unknown_interaction(
14945        &mut self,
14946        ordinal: u64,
14947    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
14948        ::core::future::ready(())
14949    }
14950}
14951
14952impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for SecureMem
14953where
14954    ___H: SecureMemClientHandler<___T> + ::core::marker::Send,
14955    ___T: ::fidl_next::Transport,
14956{
14957    async fn on_event(
14958        handler: &mut ___H,
14959        mut message: ::fidl_next::Message<___T>,
14960    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
14961        match *message.header().ordinal {
14962            ordinal => {
14963                handler.on_unknown_interaction(ordinal).await;
14964                if ::core::matches!(
14965                    message.header().flexibility(),
14966                    ::fidl_next::protocol::Flexibility::Strict
14967                ) {
14968                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
14969                } else {
14970                    Ok(())
14971                }
14972            }
14973        }
14974    }
14975}
14976
14977/// A server handler for the SecureMem protocol.
14978///
14979/// See [`SecureMem`] for more details.
14980pub trait SecureMemServerHandler<
14981    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
14982    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
14983>
14984{
14985    #[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"]
14986    fn get_physical_secure_heaps(
14987        &mut self,
14988
14989        responder: ::fidl_next::Responder<secure_mem::GetPhysicalSecureHeaps, ___T>,
14990    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14991
14992    #[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"]
14993    fn get_dynamic_secure_heaps(
14994        &mut self,
14995
14996        responder: ::fidl_next::Responder<secure_mem::GetDynamicSecureHeaps, ___T>,
14997    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
14998
14999    #[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"]
15000    fn get_physical_secure_heap_properties(
15001        &mut self,
15002
15003        request: ::fidl_next::Request<secure_mem::GetPhysicalSecureHeapProperties, ___T>,
15004
15005        responder: ::fidl_next::Responder<secure_mem::GetPhysicalSecureHeapProperties, ___T>,
15006    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15007
15008    #[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"]
15009    fn add_secure_heap_physical_range(
15010        &mut self,
15011
15012        request: ::fidl_next::Request<secure_mem::AddSecureHeapPhysicalRange, ___T>,
15013
15014        responder: ::fidl_next::Responder<secure_mem::AddSecureHeapPhysicalRange, ___T>,
15015    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15016
15017    #[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"]
15018    fn delete_secure_heap_physical_range(
15019        &mut self,
15020
15021        request: ::fidl_next::Request<secure_mem::DeleteSecureHeapPhysicalRange, ___T>,
15022
15023        responder: ::fidl_next::Responder<secure_mem::DeleteSecureHeapPhysicalRange, ___T>,
15024    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15025
15026    #[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"]
15027    fn modify_secure_heap_physical_range(
15028        &mut self,
15029
15030        request: ::fidl_next::Request<secure_mem::ModifySecureHeapPhysicalRange, ___T>,
15031
15032        responder: ::fidl_next::Responder<secure_mem::ModifySecureHeapPhysicalRange, ___T>,
15033    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15034
15035    #[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"]
15036    fn zero_sub_range(
15037        &mut self,
15038
15039        request: ::fidl_next::Request<secure_mem::ZeroSubRange, ___T>,
15040
15041        responder: ::fidl_next::Responder<secure_mem::ZeroSubRange, ___T>,
15042    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
15043
15044    fn on_unknown_interaction(
15045        &mut self,
15046        ordinal: u64,
15047    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
15048        ::core::future::ready(())
15049    }
15050}
15051
15052impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for SecureMem
15053where
15054    ___H: SecureMemServerHandler<___T> + ::core::marker::Send,
15055    ___T: ::fidl_next::Transport,
15056    for<'de> crate::wire::SecureMemGetPhysicalSecureHeapPropertiesRequest<'de>: ::fidl_next::Decode<
15057            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15058            Constraint = (),
15059        >,
15060    for<'de> crate::wire::SecureMemAddSecureHeapPhysicalRangeRequest<'de>: ::fidl_next::Decode<
15061            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15062            Constraint = (),
15063        >,
15064    for<'de> crate::wire::SecureMemDeleteSecureHeapPhysicalRangeRequest<'de>: ::fidl_next::Decode<
15065            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15066            Constraint = (),
15067        >,
15068    for<'de> crate::wire::SecureMemModifySecureHeapPhysicalRangeRequest<'de>: ::fidl_next::Decode<
15069            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15070            Constraint = (),
15071        >,
15072    for<'de> crate::wire::SecureMemZeroSubRangeRequest<'de>: ::fidl_next::Decode<
15073            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
15074            Constraint = (),
15075        >,
15076{
15077    async fn on_one_way(
15078        handler: &mut ___H,
15079        mut message: ::fidl_next::Message<___T>,
15080    ) -> ::core::result::Result<
15081        (),
15082        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15083    > {
15084        match *message.header().ordinal {
15085            ordinal => {
15086                handler.on_unknown_interaction(ordinal).await;
15087                if ::core::matches!(
15088                    message.header().flexibility(),
15089                    ::fidl_next::protocol::Flexibility::Strict
15090                ) {
15091                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15092                } else {
15093                    Ok(())
15094                }
15095            }
15096        }
15097    }
15098
15099    async fn on_two_way(
15100        handler: &mut ___H,
15101        mut message: ::fidl_next::Message<___T>,
15102        responder: ::fidl_next::protocol::Responder<___T>,
15103    ) -> ::core::result::Result<
15104        (),
15105        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
15106    > {
15107        match *message.header().ordinal {
15108            4067140791638717411 => {
15109                let responder = ::fidl_next::Responder::from_untyped(responder);
15110
15111                handler.get_physical_secure_heaps(responder).await;
15112                Ok(())
15113            }
15114
15115            1265657178863511604 => {
15116                let responder = ::fidl_next::Responder::from_untyped(responder);
15117
15118                handler.get_dynamic_secure_heaps(responder).await;
15119                Ok(())
15120            }
15121
15122            895942034471897020 => {
15123                let responder = ::fidl_next::Responder::from_untyped(responder);
15124
15125                match ::fidl_next::AsDecoderExt::into_decoded(message) {
15126                    Ok(decoded) => {
15127                        handler
15128                            .get_physical_secure_heap_properties(
15129                                ::fidl_next::Request::from_decoded(decoded),
15130                                responder,
15131                            )
15132                            .await;
15133                        Ok(())
15134                    }
15135                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15136                        ordinal: 895942034471897020,
15137                        error,
15138                    }),
15139                }
15140            }
15141
15142            3888459953148993914 => {
15143                let responder = ::fidl_next::Responder::from_untyped(responder);
15144
15145                match ::fidl_next::AsDecoderExt::into_decoded(message) {
15146                    Ok(decoded) => {
15147                        handler
15148                            .add_secure_heap_physical_range(
15149                                ::fidl_next::Request::from_decoded(decoded),
15150                                responder,
15151                            )
15152                            .await;
15153                        Ok(())
15154                    }
15155                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15156                        ordinal: 3888459953148993914,
15157                        error,
15158                    }),
15159                }
15160            }
15161
15162            1056754671343258782 => {
15163                let responder = ::fidl_next::Responder::from_untyped(responder);
15164
15165                match ::fidl_next::AsDecoderExt::into_decoded(message) {
15166                    Ok(decoded) => {
15167                        handler
15168                            .delete_secure_heap_physical_range(
15169                                ::fidl_next::Request::from_decoded(decoded),
15170                                responder,
15171                            )
15172                            .await;
15173                        Ok(())
15174                    }
15175                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15176                        ordinal: 1056754671343258782,
15177                        error,
15178                    }),
15179                }
15180            }
15181
15182            6969114310578042676 => {
15183                let responder = ::fidl_next::Responder::from_untyped(responder);
15184
15185                match ::fidl_next::AsDecoderExt::into_decoded(message) {
15186                    Ok(decoded) => {
15187                        handler
15188                            .modify_secure_heap_physical_range(
15189                                ::fidl_next::Request::from_decoded(decoded),
15190                                responder,
15191                            )
15192                            .await;
15193                        Ok(())
15194                    }
15195                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15196                        ordinal: 6969114310578042676,
15197                        error,
15198                    }),
15199                }
15200            }
15201
15202            6567857461132811493 => {
15203                let responder = ::fidl_next::Responder::from_untyped(responder);
15204
15205                match ::fidl_next::AsDecoderExt::into_decoded(message) {
15206                    Ok(decoded) => {
15207                        handler
15208                            .zero_sub_range(::fidl_next::Request::from_decoded(decoded), responder)
15209                            .await;
15210                        Ok(())
15211                    }
15212                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
15213                        ordinal: 6567857461132811493,
15214                        error,
15215                    }),
15216                }
15217            }
15218
15219            ordinal => {
15220                handler.on_unknown_interaction(ordinal).await;
15221                if ::core::matches!(
15222                    message.header().flexibility(),
15223                    ::fidl_next::protocol::Flexibility::Strict
15224                ) {
15225                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
15226                } else {
15227                    responder
15228                        .respond_framework_error(
15229                            ordinal,
15230                            ::fidl_next::FrameworkError::UnknownMethod,
15231                        )
15232                        .expect("encoding a framework error should never fail")
15233                        .await?;
15234                    Ok(())
15235                }
15236            }
15237        }
15238    }
15239}
15240
15241impl<___T> SecureMemClientHandler<___T> for ::fidl_next::IgnoreEvents
15242where
15243    ___T: ::fidl_next::Transport,
15244{
15245    async fn on_unknown_interaction(&mut self, _: u64) {}
15246}
15247
15248impl<___H, ___T> SecureMemLocalClientHandler<___T> for ::fidl_next::Local<___H>
15249where
15250    ___H: SecureMemClientHandler<___T>,
15251    ___T: ::fidl_next::Transport,
15252{
15253    async fn on_unknown_interaction(&mut self, ordinal: u64) {
15254        ___H::on_unknown_interaction(&mut self.0, ordinal).await
15255    }
15256}
15257
15258impl<___H, ___T> SecureMemLocalServerHandler<___T> for ::fidl_next::Local<___H>
15259where
15260    ___H: SecureMemServerHandler<___T>,
15261    ___T: ::fidl_next::Transport,
15262{
15263    async fn get_physical_secure_heaps(
15264        &mut self,
15265
15266        responder: ::fidl_next::Responder<secure_mem::GetPhysicalSecureHeaps, ___T>,
15267    ) {
15268        ___H::get_physical_secure_heaps(&mut self.0, responder).await
15269    }
15270
15271    async fn get_dynamic_secure_heaps(
15272        &mut self,
15273
15274        responder: ::fidl_next::Responder<secure_mem::GetDynamicSecureHeaps, ___T>,
15275    ) {
15276        ___H::get_dynamic_secure_heaps(&mut self.0, responder).await
15277    }
15278
15279    async fn get_physical_secure_heap_properties(
15280        &mut self,
15281
15282        request: ::fidl_next::Request<secure_mem::GetPhysicalSecureHeapProperties, ___T>,
15283
15284        responder: ::fidl_next::Responder<secure_mem::GetPhysicalSecureHeapProperties, ___T>,
15285    ) {
15286        ___H::get_physical_secure_heap_properties(&mut self.0, request, responder).await
15287    }
15288
15289    async fn add_secure_heap_physical_range(
15290        &mut self,
15291
15292        request: ::fidl_next::Request<secure_mem::AddSecureHeapPhysicalRange, ___T>,
15293
15294        responder: ::fidl_next::Responder<secure_mem::AddSecureHeapPhysicalRange, ___T>,
15295    ) {
15296        ___H::add_secure_heap_physical_range(&mut self.0, request, responder).await
15297    }
15298
15299    async fn delete_secure_heap_physical_range(
15300        &mut self,
15301
15302        request: ::fidl_next::Request<secure_mem::DeleteSecureHeapPhysicalRange, ___T>,
15303
15304        responder: ::fidl_next::Responder<secure_mem::DeleteSecureHeapPhysicalRange, ___T>,
15305    ) {
15306        ___H::delete_secure_heap_physical_range(&mut self.0, request, responder).await
15307    }
15308
15309    async fn modify_secure_heap_physical_range(
15310        &mut self,
15311
15312        request: ::fidl_next::Request<secure_mem::ModifySecureHeapPhysicalRange, ___T>,
15313
15314        responder: ::fidl_next::Responder<secure_mem::ModifySecureHeapPhysicalRange, ___T>,
15315    ) {
15316        ___H::modify_secure_heap_physical_range(&mut self.0, request, responder).await
15317    }
15318
15319    async fn zero_sub_range(
15320        &mut self,
15321
15322        request: ::fidl_next::Request<secure_mem::ZeroSubRange, ___T>,
15323
15324        responder: ::fidl_next::Responder<secure_mem::ZeroSubRange, ___T>,
15325    ) {
15326        ___H::zero_sub_range(&mut self.0, request, responder).await
15327    }
15328
15329    async fn on_unknown_interaction(&mut self, ordinal: u64) {
15330        ___H::on_unknown_interaction(&mut self.0, ordinal).await
15331    }
15332}
15333
15334pub const VIDEO_USAGE_CAPTURE: u32 = 8 as u32;
15335
15336pub const VIDEO_USAGE_DECRYPTOR_OUTPUT: u32 = 16 as u32;
15337
15338pub const VIDEO_USAGE_HW_DECODER: u32 = 1 as u32;
15339
15340pub const VIDEO_USAGE_HW_DECODER_INTERNAL: u32 = 32 as u32;
15341
15342pub const VIDEO_USAGE_HW_ENCODER: u32 = 2 as u32;
15343
15344pub const VULKAN_BUFFER_USAGE_INDEX_BUFFER: u32 = 4194304 as u32;
15345
15346pub const VULKAN_BUFFER_USAGE_INDIRECT_BUFFER: u32 = 16777216 as u32;
15347
15348pub const VULKAN_BUFFER_USAGE_STORAGE_BUFFER: u32 = 2097152 as u32;
15349
15350pub const VULKAN_BUFFER_USAGE_STORAGE_TEXEL_BUFFER: u32 = 524288 as u32;
15351
15352pub const VULKAN_BUFFER_USAGE_TRANSFER_DST: u32 = 131072 as u32;
15353
15354pub const VULKAN_BUFFER_USAGE_TRANSFER_SRC: u32 = 65536 as u32;
15355
15356pub const VULKAN_BUFFER_USAGE_UNIFORM_BUFFER: u32 = 1048576 as u32;
15357
15358pub const VULKAN_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER: u32 = 262144 as u32;
15359
15360pub const VULKAN_BUFFER_USAGE_VERTEX_BUFFER: u32 = 8388608 as u32;
15361
15362pub const VULKAN_IMAGE_USAGE_COLOR_ATTACHMENT: u32 = 16 as u32;
15363
15364pub const VULKAN_IMAGE_USAGE_INPUT_ATTACHMENT: u32 = 128 as u32;
15365
15366pub const VULKAN_IMAGE_USAGE_SAMPLED: u32 = 4 as u32;
15367
15368pub const VULKAN_IMAGE_USAGE_STENCIL_ATTACHMENT: u32 = 32 as u32;
15369
15370pub const VULKAN_IMAGE_USAGE_STORAGE: u32 = 8 as u32;
15371
15372pub const VULKAN_IMAGE_USAGE_TRANSFER_DST: u32 = 2 as u32;
15373
15374pub const VULKAN_IMAGE_USAGE_TRANSFER_SRC: u32 = 1 as u32;
15375
15376pub const VULKAN_IMAGE_USAGE_TRANSIENT_ATTACHMENT: u32 = 64 as u32;