Skip to main content

fidl_next_common_fuchsia_images2/
fidl_next_common_fuchsia_images2.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    #[doc = " Expresses the color space used to interpret video pixel values.\n\n This list has a separate entry for each variant of a color space standard.\n\n For this reason, should we ever add support for the RGB variant of 709, for\n example, we\'d add a separate entry to this list for that variant.  Similarly\n for the RGB variants of 2020 or 2100.  Similarly for the YcCbcCrc variant of\n 2020.  Similarly for the ICtCp variant of 2100.\n\n See ImageFormatIsSupportedColorSpaceForPixelFormat() for whether a\n combination of `PixelFormat` and `ColorSpace` is potentially supported.\n\n Generally, a `ColorSpace` is not supported for any `PixelFormat` whose\n bits-per-sample isn\'t compatible with the color space\'s spec, nor for any\n `PixelFormat` which is a mismatch in terms of RGB vs. YUV.\n\n The \"limited range\" in comments below refers to where black and white are\n defined to be (and simimlar for chroma), but should not be interpreted as\n guaranteeing that there won\'t be values outside the nominal \"limited range\".\n In other words, \"limited range\" doesn\'t necessarily mean there won\'t be any\n values below black or above white, or outside the \"limited\" chroma range.\n For \"full range\", black is 0 and white is the max possible/permitted numeric\n value (and similar for chroma).\n"]
8    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9    #[repr(u32)]
10    pub enum ColorSpace {
11        Invalid = 0,
12        Srgb = 1,
13        Rec601Ntsc = 2,
14        Rec601NtscFullRange = 3,
15        Rec601Pal = 4,
16        Rec601PalFullRange = 5,
17        Rec709 = 6,
18        Rec2020 = 7,
19        Rec2100 = 8,
20        Passthrough = 9,
21        DoNotCare = 4294967294,
22        UnknownOrdinal_(u32) = 4294967295,
23    }
24    impl ::std::convert::From<u32> for ColorSpace {
25        fn from(value: u32) -> Self {
26            match value {
27                0 => Self::Invalid,
28                1 => Self::Srgb,
29                2 => Self::Rec601Ntsc,
30                3 => Self::Rec601NtscFullRange,
31                4 => Self::Rec601Pal,
32                5 => Self::Rec601PalFullRange,
33                6 => Self::Rec709,
34                7 => Self::Rec2020,
35                8 => Self::Rec2100,
36                9 => Self::Passthrough,
37                4294967294 => Self::DoNotCare,
38
39                _ => Self::UnknownOrdinal_(value),
40            }
41        }
42    }
43
44    impl ::std::convert::From<ColorSpace> for u32 {
45        fn from(value: ColorSpace) -> Self {
46            match value {
47                ColorSpace::Invalid => 0,
48                ColorSpace::Srgb => 1,
49                ColorSpace::Rec601Ntsc => 2,
50                ColorSpace::Rec601NtscFullRange => 3,
51                ColorSpace::Rec601Pal => 4,
52                ColorSpace::Rec601PalFullRange => 5,
53                ColorSpace::Rec709 => 6,
54                ColorSpace::Rec2020 => 7,
55                ColorSpace::Rec2100 => 8,
56                ColorSpace::Passthrough => 9,
57                ColorSpace::DoNotCare => 4294967294,
58
59                ColorSpace::UnknownOrdinal_(value) => value,
60            }
61        }
62    }
63
64    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ColorSpace, ___E> for ColorSpace
65    where
66        ___E: ?Sized,
67    {
68        #[inline]
69        fn encode(
70            self,
71            encoder: &mut ___E,
72            out: &mut ::core::mem::MaybeUninit<crate::wire::ColorSpace>,
73            _: (),
74        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
75            ::fidl_next::Encode::encode(&self, encoder, out, ())
76        }
77    }
78
79    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ColorSpace, ___E> for &'a ColorSpace
80    where
81        ___E: ?Sized,
82    {
83        #[inline]
84        fn encode(
85            self,
86            encoder: &mut ___E,
87            out: &mut ::core::mem::MaybeUninit<crate::wire::ColorSpace>,
88            _: (),
89        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
90            ::fidl_next::munge!(let crate::wire::ColorSpace { value } = out);
91            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
92                ColorSpace::Invalid => 0,
93
94                ColorSpace::Srgb => 1,
95
96                ColorSpace::Rec601Ntsc => 2,
97
98                ColorSpace::Rec601NtscFullRange => 3,
99
100                ColorSpace::Rec601Pal => 4,
101
102                ColorSpace::Rec601PalFullRange => 5,
103
104                ColorSpace::Rec709 => 6,
105
106                ColorSpace::Rec2020 => 7,
107
108                ColorSpace::Rec2100 => 8,
109
110                ColorSpace::Passthrough => 9,
111
112                ColorSpace::DoNotCare => 4294967294,
113
114                ColorSpace::UnknownOrdinal_(value) => value,
115            }));
116
117            Ok(())
118        }
119    }
120
121    impl ::core::convert::From<crate::wire::ColorSpace> for ColorSpace {
122        fn from(wire: crate::wire::ColorSpace) -> Self {
123            match u32::from(wire.value) {
124                0 => Self::Invalid,
125
126                1 => Self::Srgb,
127
128                2 => Self::Rec601Ntsc,
129
130                3 => Self::Rec601NtscFullRange,
131
132                4 => Self::Rec601Pal,
133
134                5 => Self::Rec601PalFullRange,
135
136                6 => Self::Rec709,
137
138                7 => Self::Rec2020,
139
140                8 => Self::Rec2100,
141
142                9 => Self::Passthrough,
143
144                4294967294 => Self::DoNotCare,
145
146                value => Self::UnknownOrdinal_(value),
147            }
148        }
149    }
150
151    impl ::fidl_next::FromWire<crate::wire::ColorSpace> for ColorSpace {
152        #[inline]
153        fn from_wire(wire: crate::wire::ColorSpace) -> Self {
154            Self::from(wire)
155        }
156    }
157
158    impl ::fidl_next::FromWireRef<crate::wire::ColorSpace> for ColorSpace {
159        #[inline]
160        fn from_wire_ref(wire: &crate::wire::ColorSpace) -> Self {
161            Self::from(*wire)
162        }
163    }
164
165    #[doc = " Expresses the manner in which video pixels are encoded.\n\n The ordering of the channels in the format name reflects the actual layout\n of the channel.\n\n Each of these values is opinionated re. the color spaces that should be\n contained within (in contrast with Vulkan).\n"]
166    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
167    #[repr(u32)]
168    pub enum PixelFormat {
169        Invalid = 0,
170        R8G8B8A8 = 1,
171        R8G8B8X8 = 119,
172        B8G8R8A8 = 101,
173        B8G8R8X8 = 120,
174        I420 = 102,
175        M420 = 103,
176        Nv12 = 104,
177        Yuy2 = 105,
178        Mjpeg = 106,
179        Yv12 = 107,
180        B8G8R8 = 108,
181        R5G6B5 = 109,
182        R3G3B2 = 110,
183        R2G2B2X2 = 111,
184        L8 = 112,
185        R8 = 113,
186        R8G8 = 114,
187        A2R10G10B10 = 115,
188        A2B10G10R10 = 116,
189        P010 = 117,
190        R8G8B8 = 118,
191        DoNotCare = 4294967294,
192        UnknownOrdinal_(u32) = 4294967295,
193    }
194    impl ::std::convert::From<u32> for PixelFormat {
195        fn from(value: u32) -> Self {
196            match value {
197                0 => Self::Invalid,
198                1 => Self::R8G8B8A8,
199                119 => Self::R8G8B8X8,
200                101 => Self::B8G8R8A8,
201                120 => Self::B8G8R8X8,
202                102 => Self::I420,
203                103 => Self::M420,
204                104 => Self::Nv12,
205                105 => Self::Yuy2,
206                106 => Self::Mjpeg,
207                107 => Self::Yv12,
208                108 => Self::B8G8R8,
209                109 => Self::R5G6B5,
210                110 => Self::R3G3B2,
211                111 => Self::R2G2B2X2,
212                112 => Self::L8,
213                113 => Self::R8,
214                114 => Self::R8G8,
215                115 => Self::A2R10G10B10,
216                116 => Self::A2B10G10R10,
217                117 => Self::P010,
218                118 => Self::R8G8B8,
219                4294967294 => Self::DoNotCare,
220
221                _ => Self::UnknownOrdinal_(value),
222            }
223        }
224    }
225
226    impl ::std::convert::From<PixelFormat> for u32 {
227        fn from(value: PixelFormat) -> Self {
228            match value {
229                PixelFormat::Invalid => 0,
230                PixelFormat::R8G8B8A8 => 1,
231                PixelFormat::R8G8B8X8 => 119,
232                PixelFormat::B8G8R8A8 => 101,
233                PixelFormat::B8G8R8X8 => 120,
234                PixelFormat::I420 => 102,
235                PixelFormat::M420 => 103,
236                PixelFormat::Nv12 => 104,
237                PixelFormat::Yuy2 => 105,
238                PixelFormat::Mjpeg => 106,
239                PixelFormat::Yv12 => 107,
240                PixelFormat::B8G8R8 => 108,
241                PixelFormat::R5G6B5 => 109,
242                PixelFormat::R3G3B2 => 110,
243                PixelFormat::R2G2B2X2 => 111,
244                PixelFormat::L8 => 112,
245                PixelFormat::R8 => 113,
246                PixelFormat::R8G8 => 114,
247                PixelFormat::A2R10G10B10 => 115,
248                PixelFormat::A2B10G10R10 => 116,
249                PixelFormat::P010 => 117,
250                PixelFormat::R8G8B8 => 118,
251                PixelFormat::DoNotCare => 4294967294,
252
253                PixelFormat::UnknownOrdinal_(value) => value,
254            }
255        }
256    }
257
258    unsafe impl<___E> ::fidl_next::Encode<crate::wire::PixelFormat, ___E> for PixelFormat
259    where
260        ___E: ?Sized,
261    {
262        #[inline]
263        fn encode(
264            self,
265            encoder: &mut ___E,
266            out: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormat>,
267            _: (),
268        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
269            ::fidl_next::Encode::encode(&self, encoder, out, ())
270        }
271    }
272
273    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PixelFormat, ___E> for &'a PixelFormat
274    where
275        ___E: ?Sized,
276    {
277        #[inline]
278        fn encode(
279            self,
280            encoder: &mut ___E,
281            out: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormat>,
282            _: (),
283        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
284            ::fidl_next::munge!(let crate::wire::PixelFormat { value } = out);
285            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
286                PixelFormat::Invalid => 0,
287
288                PixelFormat::R8G8B8A8 => 1,
289
290                PixelFormat::R8G8B8X8 => 119,
291
292                PixelFormat::B8G8R8A8 => 101,
293
294                PixelFormat::B8G8R8X8 => 120,
295
296                PixelFormat::I420 => 102,
297
298                PixelFormat::M420 => 103,
299
300                PixelFormat::Nv12 => 104,
301
302                PixelFormat::Yuy2 => 105,
303
304                PixelFormat::Mjpeg => 106,
305
306                PixelFormat::Yv12 => 107,
307
308                PixelFormat::B8G8R8 => 108,
309
310                PixelFormat::R5G6B5 => 109,
311
312                PixelFormat::R3G3B2 => 110,
313
314                PixelFormat::R2G2B2X2 => 111,
315
316                PixelFormat::L8 => 112,
317
318                PixelFormat::R8 => 113,
319
320                PixelFormat::R8G8 => 114,
321
322                PixelFormat::A2R10G10B10 => 115,
323
324                PixelFormat::A2B10G10R10 => 116,
325
326                PixelFormat::P010 => 117,
327
328                PixelFormat::R8G8B8 => 118,
329
330                PixelFormat::DoNotCare => 4294967294,
331
332                PixelFormat::UnknownOrdinal_(value) => value,
333            }));
334
335            Ok(())
336        }
337    }
338
339    impl ::core::convert::From<crate::wire::PixelFormat> for PixelFormat {
340        fn from(wire: crate::wire::PixelFormat) -> Self {
341            match u32::from(wire.value) {
342                0 => Self::Invalid,
343
344                1 => Self::R8G8B8A8,
345
346                119 => Self::R8G8B8X8,
347
348                101 => Self::B8G8R8A8,
349
350                120 => Self::B8G8R8X8,
351
352                102 => Self::I420,
353
354                103 => Self::M420,
355
356                104 => Self::Nv12,
357
358                105 => Self::Yuy2,
359
360                106 => Self::Mjpeg,
361
362                107 => Self::Yv12,
363
364                108 => Self::B8G8R8,
365
366                109 => Self::R5G6B5,
367
368                110 => Self::R3G3B2,
369
370                111 => Self::R2G2B2X2,
371
372                112 => Self::L8,
373
374                113 => Self::R8,
375
376                114 => Self::R8G8,
377
378                115 => Self::A2R10G10B10,
379
380                116 => Self::A2B10G10R10,
381
382                117 => Self::P010,
383
384                118 => Self::R8G8B8,
385
386                4294967294 => Self::DoNotCare,
387
388                value => Self::UnknownOrdinal_(value),
389            }
390        }
391    }
392
393    impl ::fidl_next::FromWire<crate::wire::PixelFormat> for PixelFormat {
394        #[inline]
395        fn from_wire(wire: crate::wire::PixelFormat) -> Self {
396            Self::from(wire)
397        }
398    }
399
400    impl ::fidl_next::FromWireRef<crate::wire::PixelFormat> for PixelFormat {
401        #[inline]
402        fn from_wire_ref(wire: &crate::wire::PixelFormat) -> Self {
403            Self::from(*wire)
404        }
405    }
406
407    #[doc = " The upper 8 bits are a vendor code. The lower 56 bits are vendor-defined.\n\n The defined `PixelFormatModifier` values are specific, complete, and valid\n values (except for `INVALID` and `DO_NOT_CARE` which have their own\n meanings).\n\n Some other valid or potentially-valid `pixel_format_modifier` values are not\n defined as a `PixelFormatModifier` value, typically because the value isn\'t\n used in practice (or potentially is newly used but not yet defined in\n `PixelFormatModifier`). It is permitted to specify such a value as a\n `PixelFormatModifier` value in a `pixel_format_modifier` field, despite the\n lack of corresponding defined `PixelFormatModifier` value. If such a value\n is used outside test code, please consider adding it as a defined value in\n `PixelFormatModifier`. All such values must conform to the upper 8 bits\n vendor code (don\'t define/use values outside the/an appropriate vendor\n code).\n\n The separately-defined `FORMAT_MODIFIER_*` uint64 values are vendor-specific\n bit field values, not complete valid values on their own. These uint64\n values can be used to help create or interpret a `PixelFormatModifier` value\n in terms of vendor-specific bitfields.\n\n When the `pixel_format_modifier` is set to a supported value (excluding\n `DO_NOT_CARE`, `INVALID`, `LINEAR`), the arrangement of pixel data otherwise\n specified by the `pixel_format` field is \"modified\", typically to allow for\n some combination of tiling, compression (typically lossless, typically for\n memory bandwidth reduction not framebuffer size reduction), transaction\n elimination, dirt tracking, but typically not modifying the bit depth of the\n `pixel_format`. In some cases there\'s a per-image or per-tile header\n involved, or similar. The `pixel_format` field often still needs to be set\n to a valid supported value that works in combination with the\n `pixel_format_modifier`, and that `pixel_format` value can also contribute\n to the overall meaning of the `ImageFormat`. In other words, the \"modifier\"\n part of the name is more accurate than \"override\" would be.\n"]
408    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
409    #[repr(u64)]
410    pub enum PixelFormatModifier {
411        DoNotCare = 72057594037927934,
412        Invalid = 72057594037927935,
413        Linear = 0,
414        IntelI915XTiled = 72057594037927937,
415        IntelI915YTiled = 72057594037927938,
416        IntelI915YfTiled = 72057594037927939,
417        IntelI915YTiledCcs = 72057594054705154,
418        IntelI915YfTiledCcs = 72057594054705155,
419        ArmAfbc16X16 = 576460752303423489,
420        ArmAfbc32X8 = 576460752303423490,
421        ArmLinearTe = 576460752303427584,
422        ArmAfbc16X16Te = 576460752303427585,
423        ArmAfbc32X8Te = 576460752303427586,
424        ArmAfbc16X16YuvTiledHeader = 576460752303431697,
425        ArmAfbc16X16SplitBlockSparseYuv = 576460752303423601,
426        ArmAfbc16X16SplitBlockSparseYuvTe = 576460752303427697,
427        ArmAfbc16X16SplitBlockSparseYuvTiledHeader = 576460752303431793,
428        ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader = 576460752303435889,
429        GoogleGoldfishOptimal = 7421932185906577409,
430        PvrFbcdc8X8V14 = 10520408729537478690,
431        PvrFbcdc16X4V14 = 10520408729537478695,
432        UnknownOrdinal_(u64) = 10520408729537478696,
433    }
434    impl ::std::convert::From<u64> for PixelFormatModifier {
435        fn from(value: u64) -> Self {
436            match value {
437                72057594037927934 => Self::DoNotCare,
438                72057594037927935 => Self::Invalid,
439                0 => Self::Linear,
440                72057594037927937 => Self::IntelI915XTiled,
441                72057594037927938 => Self::IntelI915YTiled,
442                72057594037927939 => Self::IntelI915YfTiled,
443                72057594054705154 => Self::IntelI915YTiledCcs,
444                72057594054705155 => Self::IntelI915YfTiledCcs,
445                576460752303423489 => Self::ArmAfbc16X16,
446                576460752303423490 => Self::ArmAfbc32X8,
447                576460752303427584 => Self::ArmLinearTe,
448                576460752303427585 => Self::ArmAfbc16X16Te,
449                576460752303427586 => Self::ArmAfbc32X8Te,
450                576460752303431697 => Self::ArmAfbc16X16YuvTiledHeader,
451                576460752303423601 => Self::ArmAfbc16X16SplitBlockSparseYuv,
452                576460752303427697 => Self::ArmAfbc16X16SplitBlockSparseYuvTe,
453                576460752303431793 => Self::ArmAfbc16X16SplitBlockSparseYuvTiledHeader,
454                576460752303435889 => Self::ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader,
455                7421932185906577409 => Self::GoogleGoldfishOptimal,
456                10520408729537478690 => Self::PvrFbcdc8X8V14,
457                10520408729537478695 => Self::PvrFbcdc16X4V14,
458
459                _ => Self::UnknownOrdinal_(value),
460            }
461        }
462    }
463
464    impl ::std::convert::From<PixelFormatModifier> for u64 {
465        fn from(value: PixelFormatModifier) -> Self {
466            match value {
467                PixelFormatModifier::DoNotCare => 72057594037927934,
468                PixelFormatModifier::Invalid => 72057594037927935,
469                PixelFormatModifier::Linear => 0,
470                PixelFormatModifier::IntelI915XTiled => 72057594037927937,
471                PixelFormatModifier::IntelI915YTiled => 72057594037927938,
472                PixelFormatModifier::IntelI915YfTiled => 72057594037927939,
473                PixelFormatModifier::IntelI915YTiledCcs => 72057594054705154,
474                PixelFormatModifier::IntelI915YfTiledCcs => 72057594054705155,
475                PixelFormatModifier::ArmAfbc16X16 => 576460752303423489,
476                PixelFormatModifier::ArmAfbc32X8 => 576460752303423490,
477                PixelFormatModifier::ArmLinearTe => 576460752303427584,
478                PixelFormatModifier::ArmAfbc16X16Te => 576460752303427585,
479                PixelFormatModifier::ArmAfbc32X8Te => 576460752303427586,
480                PixelFormatModifier::ArmAfbc16X16YuvTiledHeader => 576460752303431697,
481                PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuv => 576460752303423601,
482                PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTe => 576460752303427697,
483                PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTiledHeader => {
484                    576460752303431793
485                }
486                PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader => {
487                    576460752303435889
488                }
489                PixelFormatModifier::GoogleGoldfishOptimal => 7421932185906577409,
490                PixelFormatModifier::PvrFbcdc8X8V14 => 10520408729537478690,
491                PixelFormatModifier::PvrFbcdc16X4V14 => 10520408729537478695,
492
493                PixelFormatModifier::UnknownOrdinal_(value) => value,
494            }
495        }
496    }
497
498    unsafe impl<___E> ::fidl_next::Encode<crate::wire::PixelFormatModifier, ___E>
499        for PixelFormatModifier
500    where
501        ___E: ?Sized,
502    {
503        #[inline]
504        fn encode(
505            self,
506            encoder: &mut ___E,
507            out: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormatModifier>,
508            _: (),
509        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
510            ::fidl_next::Encode::encode(&self, encoder, out, ())
511        }
512    }
513
514    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::PixelFormatModifier, ___E>
515        for &'a PixelFormatModifier
516    where
517        ___E: ?Sized,
518    {
519        #[inline]
520        fn encode(
521            self,
522            encoder: &mut ___E,
523            out: &mut ::core::mem::MaybeUninit<crate::wire::PixelFormatModifier>,
524            _: (),
525        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
526            ::fidl_next::munge!(let crate::wire::PixelFormatModifier { value } = out);
527            let _ = value.write(::fidl_next::wire::Uint64::from(match *self {
528                PixelFormatModifier::DoNotCare => 72057594037927934,
529
530                PixelFormatModifier::Invalid => 72057594037927935,
531
532                PixelFormatModifier::Linear => 0,
533
534                PixelFormatModifier::IntelI915XTiled => 72057594037927937,
535
536                PixelFormatModifier::IntelI915YTiled => 72057594037927938,
537
538                PixelFormatModifier::IntelI915YfTiled => 72057594037927939,
539
540                PixelFormatModifier::IntelI915YTiledCcs => 72057594054705154,
541
542                PixelFormatModifier::IntelI915YfTiledCcs => 72057594054705155,
543
544                PixelFormatModifier::ArmAfbc16X16 => 576460752303423489,
545
546                PixelFormatModifier::ArmAfbc32X8 => 576460752303423490,
547
548                PixelFormatModifier::ArmLinearTe => 576460752303427584,
549
550                PixelFormatModifier::ArmAfbc16X16Te => 576460752303427585,
551
552                PixelFormatModifier::ArmAfbc32X8Te => 576460752303427586,
553
554                PixelFormatModifier::ArmAfbc16X16YuvTiledHeader => 576460752303431697,
555
556                PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuv => 576460752303423601,
557
558                PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTe => 576460752303427697,
559
560                PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTiledHeader => {
561                    576460752303431793
562                }
563
564                PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader => {
565                    576460752303435889
566                }
567
568                PixelFormatModifier::GoogleGoldfishOptimal => 7421932185906577409,
569
570                PixelFormatModifier::PvrFbcdc8X8V14 => 10520408729537478690,
571
572                PixelFormatModifier::PvrFbcdc16X4V14 => 10520408729537478695,
573
574                PixelFormatModifier::UnknownOrdinal_(value) => value,
575            }));
576
577            Ok(())
578        }
579    }
580
581    impl ::core::convert::From<crate::wire::PixelFormatModifier> for PixelFormatModifier {
582        fn from(wire: crate::wire::PixelFormatModifier) -> Self {
583            match u64::from(wire.value) {
584                72057594037927934 => Self::DoNotCare,
585
586                72057594037927935 => Self::Invalid,
587
588                0 => Self::Linear,
589
590                72057594037927937 => Self::IntelI915XTiled,
591
592                72057594037927938 => Self::IntelI915YTiled,
593
594                72057594037927939 => Self::IntelI915YfTiled,
595
596                72057594054705154 => Self::IntelI915YTiledCcs,
597
598                72057594054705155 => Self::IntelI915YfTiledCcs,
599
600                576460752303423489 => Self::ArmAfbc16X16,
601
602                576460752303423490 => Self::ArmAfbc32X8,
603
604                576460752303427584 => Self::ArmLinearTe,
605
606                576460752303427585 => Self::ArmAfbc16X16Te,
607
608                576460752303427586 => Self::ArmAfbc32X8Te,
609
610                576460752303431697 => Self::ArmAfbc16X16YuvTiledHeader,
611
612                576460752303423601 => Self::ArmAfbc16X16SplitBlockSparseYuv,
613
614                576460752303427697 => Self::ArmAfbc16X16SplitBlockSparseYuvTe,
615
616                576460752303431793 => Self::ArmAfbc16X16SplitBlockSparseYuvTiledHeader,
617
618                576460752303435889 => Self::ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader,
619
620                7421932185906577409 => Self::GoogleGoldfishOptimal,
621
622                10520408729537478690 => Self::PvrFbcdc8X8V14,
623
624                10520408729537478695 => Self::PvrFbcdc16X4V14,
625
626                value => Self::UnknownOrdinal_(value),
627            }
628        }
629    }
630
631    impl ::fidl_next::FromWire<crate::wire::PixelFormatModifier> for PixelFormatModifier {
632        #[inline]
633        fn from_wire(wire: crate::wire::PixelFormatModifier) -> Self {
634            Self::from(wire)
635        }
636    }
637
638    impl ::fidl_next::FromWireRef<crate::wire::PixelFormatModifier> for PixelFormatModifier {
639        #[inline]
640        fn from_wire_ref(wire: &crate::wire::PixelFormatModifier) -> Self {
641            Self::from(*wire)
642        }
643    }
644
645    #[doc = " Describes the format of images.\n"]
646    #[derive(Debug, Default, Clone, PartialEq)]
647    pub struct ImageFormat {
648        pub pixel_format: ::core::option::Option<crate::natural::PixelFormat>,
649
650        pub pixel_format_modifier: ::core::option::Option<crate::natural::PixelFormatModifier>,
651
652        pub color_space: ::core::option::Option<crate::natural::ColorSpace>,
653
654        pub size: ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
655
656        pub bytes_per_row: ::core::option::Option<u32>,
657
658        pub display_rect: ::core::option::Option<::fidl_next_common_fuchsia_math::natural::RectU>,
659
660        pub valid_size: ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
661
662        pub pixel_aspect_ratio:
663            ::core::option::Option<::fidl_next_common_fuchsia_math::natural::SizeU>,
664    }
665
666    impl ImageFormat {
667        fn __max_ordinal(&self) -> usize {
668            if self.pixel_aspect_ratio.is_some() {
669                return 8;
670            }
671
672            if self.valid_size.is_some() {
673                return 7;
674            }
675
676            if self.display_rect.is_some() {
677                return 6;
678            }
679
680            if self.bytes_per_row.is_some() {
681                return 5;
682            }
683
684            if self.size.is_some() {
685                return 4;
686            }
687
688            if self.color_space.is_some() {
689                return 3;
690            }
691
692            if self.pixel_format_modifier.is_some() {
693                return 2;
694            }
695
696            if self.pixel_format.is_some() {
697                return 1;
698            }
699
700            0
701        }
702    }
703
704    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ImageFormat<'static>, ___E> for ImageFormat
705    where
706        ___E: ::fidl_next::Encoder + ?Sized,
707    {
708        #[inline]
709        fn encode(
710            mut self,
711            encoder: &mut ___E,
712            out: &mut ::core::mem::MaybeUninit<crate::wire::ImageFormat<'static>>,
713            _: (),
714        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
715            ::fidl_next::munge!(let crate::wire::ImageFormat { table } = out);
716
717            let max_ord = self.__max_ordinal();
718
719            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
720            ::fidl_next::Wire::zero_padding(&mut out);
721
722            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
723                ::fidl_next::wire::Envelope,
724            >(encoder, max_ord);
725
726            for i in 1..=max_ord {
727                match i {
728                    8 => {
729                        if let Some(value) = self.pixel_aspect_ratio.take() {
730                            ::fidl_next::wire::Envelope::encode_value::<
731                                ::fidl_next_common_fuchsia_math::wire::SizeU,
732                                ___E,
733                            >(
734                                value, preallocated.encoder, &mut out, ()
735                            )?;
736                        } else {
737                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
738                        }
739                    }
740
741                    7 => {
742                        if let Some(value) = self.valid_size.take() {
743                            ::fidl_next::wire::Envelope::encode_value::<
744                                ::fidl_next_common_fuchsia_math::wire::SizeU,
745                                ___E,
746                            >(
747                                value, preallocated.encoder, &mut out, ()
748                            )?;
749                        } else {
750                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
751                        }
752                    }
753
754                    6 => {
755                        if let Some(value) = self.display_rect.take() {
756                            ::fidl_next::wire::Envelope::encode_value::<
757                                ::fidl_next_common_fuchsia_math::wire::RectU,
758                                ___E,
759                            >(
760                                value, preallocated.encoder, &mut out, ()
761                            )?;
762                        } else {
763                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
764                        }
765                    }
766
767                    5 => {
768                        if let Some(value) = self.bytes_per_row.take() {
769                            ::fidl_next::wire::Envelope::encode_value::<
770                                ::fidl_next::wire::Uint32,
771                                ___E,
772                            >(
773                                value, preallocated.encoder, &mut out, ()
774                            )?;
775                        } else {
776                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
777                        }
778                    }
779
780                    4 => {
781                        if let Some(value) = self.size.take() {
782                            ::fidl_next::wire::Envelope::encode_value::<
783                                ::fidl_next_common_fuchsia_math::wire::SizeU,
784                                ___E,
785                            >(
786                                value, preallocated.encoder, &mut out, ()
787                            )?;
788                        } else {
789                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
790                        }
791                    }
792
793                    3 => {
794                        if let Some(value) = self.color_space.take() {
795                            ::fidl_next::wire::Envelope::encode_value::<
796                                crate::wire::ColorSpace,
797                                ___E,
798                            >(
799                                value, preallocated.encoder, &mut out, ()
800                            )?;
801                        } else {
802                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
803                        }
804                    }
805
806                    2 => {
807                        if let Some(value) = self.pixel_format_modifier.take() {
808                            ::fidl_next::wire::Envelope::encode_value::<
809                                crate::wire::PixelFormatModifier,
810                                ___E,
811                            >(
812                                value, preallocated.encoder, &mut out, ()
813                            )?;
814                        } else {
815                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
816                        }
817                    }
818
819                    1 => {
820                        if let Some(value) = self.pixel_format.take() {
821                            ::fidl_next::wire::Envelope::encode_value::<
822                                crate::wire::PixelFormat,
823                                ___E,
824                            >(
825                                value, preallocated.encoder, &mut out, ()
826                            )?;
827                        } else {
828                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
829                        }
830                    }
831
832                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
833                }
834                unsafe {
835                    preallocated.write_next(out.assume_init_ref());
836                }
837            }
838
839            ::fidl_next::wire::Table::encode_len(table, max_ord);
840
841            Ok(())
842        }
843    }
844
845    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ImageFormat<'static>, ___E>
846        for &'a ImageFormat
847    where
848        ___E: ::fidl_next::Encoder + ?Sized,
849    {
850        #[inline]
851        fn encode(
852            self,
853            encoder: &mut ___E,
854            out: &mut ::core::mem::MaybeUninit<crate::wire::ImageFormat<'static>>,
855            _: (),
856        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
857            ::fidl_next::munge!(let crate::wire::ImageFormat { table } = out);
858
859            let max_ord = self.__max_ordinal();
860
861            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
862            ::fidl_next::Wire::zero_padding(&mut out);
863
864            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
865                ::fidl_next::wire::Envelope,
866            >(encoder, max_ord);
867
868            for i in 1..=max_ord {
869                match i {
870                    8 => {
871                        if let Some(value) = &self.pixel_aspect_ratio {
872                            ::fidl_next::wire::Envelope::encode_value::<
873                                ::fidl_next_common_fuchsia_math::wire::SizeU,
874                                ___E,
875                            >(
876                                value, preallocated.encoder, &mut out, ()
877                            )?;
878                        } else {
879                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
880                        }
881                    }
882
883                    7 => {
884                        if let Some(value) = &self.valid_size {
885                            ::fidl_next::wire::Envelope::encode_value::<
886                                ::fidl_next_common_fuchsia_math::wire::SizeU,
887                                ___E,
888                            >(
889                                value, preallocated.encoder, &mut out, ()
890                            )?;
891                        } else {
892                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
893                        }
894                    }
895
896                    6 => {
897                        if let Some(value) = &self.display_rect {
898                            ::fidl_next::wire::Envelope::encode_value::<
899                                ::fidl_next_common_fuchsia_math::wire::RectU,
900                                ___E,
901                            >(
902                                value, preallocated.encoder, &mut out, ()
903                            )?;
904                        } else {
905                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
906                        }
907                    }
908
909                    5 => {
910                        if let Some(value) = &self.bytes_per_row {
911                            ::fidl_next::wire::Envelope::encode_value::<
912                                ::fidl_next::wire::Uint32,
913                                ___E,
914                            >(
915                                value, preallocated.encoder, &mut out, ()
916                            )?;
917                        } else {
918                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
919                        }
920                    }
921
922                    4 => {
923                        if let Some(value) = &self.size {
924                            ::fidl_next::wire::Envelope::encode_value::<
925                                ::fidl_next_common_fuchsia_math::wire::SizeU,
926                                ___E,
927                            >(
928                                value, preallocated.encoder, &mut out, ()
929                            )?;
930                        } else {
931                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
932                        }
933                    }
934
935                    3 => {
936                        if let Some(value) = &self.color_space {
937                            ::fidl_next::wire::Envelope::encode_value::<
938                                crate::wire::ColorSpace,
939                                ___E,
940                            >(
941                                value, preallocated.encoder, &mut out, ()
942                            )?;
943                        } else {
944                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
945                        }
946                    }
947
948                    2 => {
949                        if let Some(value) = &self.pixel_format_modifier {
950                            ::fidl_next::wire::Envelope::encode_value::<
951                                crate::wire::PixelFormatModifier,
952                                ___E,
953                            >(
954                                value, preallocated.encoder, &mut out, ()
955                            )?;
956                        } else {
957                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
958                        }
959                    }
960
961                    1 => {
962                        if let Some(value) = &self.pixel_format {
963                            ::fidl_next::wire::Envelope::encode_value::<
964                                crate::wire::PixelFormat,
965                                ___E,
966                            >(
967                                value, preallocated.encoder, &mut out, ()
968                            )?;
969                        } else {
970                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
971                        }
972                    }
973
974                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
975                }
976                unsafe {
977                    preallocated.write_next(out.assume_init_ref());
978                }
979            }
980
981            ::fidl_next::wire::Table::encode_len(table, max_ord);
982
983            Ok(())
984        }
985    }
986
987    impl<'de> ::fidl_next::FromWire<crate::wire::ImageFormat<'de>> for ImageFormat {
988        #[inline]
989        fn from_wire(wire_: crate::wire::ImageFormat<'de>) -> Self {
990            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
991
992            let pixel_format = wire_.table.get(1);
993
994            let pixel_format_modifier = wire_.table.get(2);
995
996            let color_space = wire_.table.get(3);
997
998            let size = wire_.table.get(4);
999
1000            let bytes_per_row = wire_.table.get(5);
1001
1002            let display_rect = wire_.table.get(6);
1003
1004            let valid_size = wire_.table.get(7);
1005
1006            let pixel_aspect_ratio = wire_.table.get(8);
1007
1008            Self {
1009                pixel_format: pixel_format.map(|envelope| {
1010                    ::fidl_next::FromWire::from_wire(unsafe {
1011                        envelope.read_unchecked::<crate::wire::PixelFormat>()
1012                    })
1013                }),
1014
1015                pixel_format_modifier: pixel_format_modifier.map(|envelope| {
1016                    ::fidl_next::FromWire::from_wire(unsafe {
1017                        envelope.read_unchecked::<crate::wire::PixelFormatModifier>()
1018                    })
1019                }),
1020
1021                color_space: color_space.map(|envelope| {
1022                    ::fidl_next::FromWire::from_wire(unsafe {
1023                        envelope.read_unchecked::<crate::wire::ColorSpace>()
1024                    })
1025                }),
1026
1027                size: size.map(|envelope| {
1028                    ::fidl_next::FromWire::from_wire(unsafe {
1029                        envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1030                    })
1031                }),
1032
1033                bytes_per_row: bytes_per_row.map(|envelope| {
1034                    ::fidl_next::FromWire::from_wire(unsafe {
1035                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
1036                    })
1037                }),
1038
1039                display_rect: display_rect.map(|envelope| {
1040                    ::fidl_next::FromWire::from_wire(unsafe {
1041                        envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::RectU>()
1042                    })
1043                }),
1044
1045                valid_size: valid_size.map(|envelope| {
1046                    ::fidl_next::FromWire::from_wire(unsafe {
1047                        envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1048                    })
1049                }),
1050
1051                pixel_aspect_ratio: pixel_aspect_ratio.map(|envelope| {
1052                    ::fidl_next::FromWire::from_wire(unsafe {
1053                        envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1054                    })
1055                }),
1056            }
1057        }
1058    }
1059
1060    impl<'de> ::fidl_next::FromWireRef<crate::wire::ImageFormat<'de>> for ImageFormat {
1061        #[inline]
1062        fn from_wire_ref(wire: &crate::wire::ImageFormat<'de>) -> Self {
1063            Self {
1064                pixel_format: wire.table.get(1).map(|envelope| {
1065                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1066                        envelope.deref_unchecked::<crate::wire::PixelFormat>()
1067                    })
1068                }),
1069
1070                pixel_format_modifier: wire.table.get(2).map(|envelope| {
1071                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1072                        envelope.deref_unchecked::<crate::wire::PixelFormatModifier>()
1073                    })
1074                }),
1075
1076                color_space: wire.table.get(3).map(|envelope| {
1077                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1078                        envelope.deref_unchecked::<crate::wire::ColorSpace>()
1079                    })
1080                }),
1081
1082                size: wire.table.get(4).map(|envelope| {
1083                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1084                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1085                    })
1086                }),
1087
1088                bytes_per_row: wire.table.get(5).map(|envelope| {
1089                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1090                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
1091                    })
1092                }),
1093
1094                display_rect: wire.table.get(6).map(|envelope| {
1095                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1096                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::RectU>()
1097                    })
1098                }),
1099
1100                valid_size: wire.table.get(7).map(|envelope| {
1101                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1102                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1103                    })
1104                }),
1105
1106                pixel_aspect_ratio: wire.table.get(8).map(|envelope| {
1107                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
1108                        envelope.deref_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1109                    })
1110                }),
1111            }
1112        }
1113    }
1114}
1115
1116pub mod wire {
1117
1118    /// The wire type corresponding to [`ColorSpace`].
1119    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1120    #[repr(transparent)]
1121    pub struct ColorSpace {
1122        pub(crate) value: ::fidl_next::wire::Uint32,
1123    }
1124
1125    impl ::fidl_next::Constrained for ColorSpace {
1126        type Constraint = ();
1127
1128        fn validate(
1129            _: ::fidl_next::Slot<'_, Self>,
1130            _: Self::Constraint,
1131        ) -> Result<(), ::fidl_next::ValidationError> {
1132            Ok(())
1133        }
1134    }
1135
1136    unsafe impl ::fidl_next::Wire for ColorSpace {
1137        type Narrowed<'de> = Self;
1138
1139        #[inline]
1140        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1141            // Wire enums have no padding
1142        }
1143    }
1144
1145    impl ColorSpace {
1146        pub const INVALID: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(0) };
1147
1148        pub const SRGB: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(1) };
1149
1150        pub const REC601_NTSC: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(2) };
1151
1152        pub const REC601_NTSC_FULL_RANGE: ColorSpace =
1153            ColorSpace { value: ::fidl_next::wire::Uint32(3) };
1154
1155        pub const REC601_PAL: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(4) };
1156
1157        pub const REC601_PAL_FULL_RANGE: ColorSpace =
1158            ColorSpace { value: ::fidl_next::wire::Uint32(5) };
1159
1160        pub const REC709: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(6) };
1161
1162        pub const REC2020: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(7) };
1163
1164        pub const REC2100: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(8) };
1165
1166        pub const PASSTHROUGH: ColorSpace = ColorSpace { value: ::fidl_next::wire::Uint32(9) };
1167
1168        pub const DO_NOT_CARE: ColorSpace =
1169            ColorSpace { value: ::fidl_next::wire::Uint32(4294967294) };
1170    }
1171
1172    unsafe impl<___D> ::fidl_next::Decode<___D> for ColorSpace
1173    where
1174        ___D: ?Sized,
1175    {
1176        fn decode(
1177            slot: ::fidl_next::Slot<'_, Self>,
1178            _: &mut ___D,
1179            _: (),
1180        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1181            Ok(())
1182        }
1183    }
1184
1185    impl ::core::convert::From<crate::natural::ColorSpace> for ColorSpace {
1186        fn from(natural: crate::natural::ColorSpace) -> Self {
1187            match natural {
1188                crate::natural::ColorSpace::Invalid => ColorSpace::INVALID,
1189
1190                crate::natural::ColorSpace::Srgb => ColorSpace::SRGB,
1191
1192                crate::natural::ColorSpace::Rec601Ntsc => ColorSpace::REC601_NTSC,
1193
1194                crate::natural::ColorSpace::Rec601NtscFullRange => {
1195                    ColorSpace::REC601_NTSC_FULL_RANGE
1196                }
1197
1198                crate::natural::ColorSpace::Rec601Pal => ColorSpace::REC601_PAL,
1199
1200                crate::natural::ColorSpace::Rec601PalFullRange => ColorSpace::REC601_PAL_FULL_RANGE,
1201
1202                crate::natural::ColorSpace::Rec709 => ColorSpace::REC709,
1203
1204                crate::natural::ColorSpace::Rec2020 => ColorSpace::REC2020,
1205
1206                crate::natural::ColorSpace::Rec2100 => ColorSpace::REC2100,
1207
1208                crate::natural::ColorSpace::Passthrough => ColorSpace::PASSTHROUGH,
1209
1210                crate::natural::ColorSpace::DoNotCare => ColorSpace::DO_NOT_CARE,
1211
1212                crate::natural::ColorSpace::UnknownOrdinal_(value) => {
1213                    ColorSpace { value: ::fidl_next::wire::Uint32::from(value) }
1214                }
1215            }
1216        }
1217    }
1218
1219    impl ::fidl_next::IntoNatural for ColorSpace {
1220        type Natural = crate::natural::ColorSpace;
1221    }
1222
1223    /// The wire type corresponding to [`PixelFormat`].
1224    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1225    #[repr(transparent)]
1226    pub struct PixelFormat {
1227        pub(crate) value: ::fidl_next::wire::Uint32,
1228    }
1229
1230    impl ::fidl_next::Constrained for PixelFormat {
1231        type Constraint = ();
1232
1233        fn validate(
1234            _: ::fidl_next::Slot<'_, Self>,
1235            _: Self::Constraint,
1236        ) -> Result<(), ::fidl_next::ValidationError> {
1237            Ok(())
1238        }
1239    }
1240
1241    unsafe impl ::fidl_next::Wire for PixelFormat {
1242        type Narrowed<'de> = Self;
1243
1244        #[inline]
1245        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1246            // Wire enums have no padding
1247        }
1248    }
1249
1250    impl PixelFormat {
1251        pub const INVALID: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(0) };
1252
1253        pub const R8_G8_B8_A8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(1) };
1254
1255        pub const R8_G8_B8_X8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(119) };
1256
1257        pub const B8_G8_R8_A8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(101) };
1258
1259        pub const B8_G8_R8_X8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(120) };
1260
1261        pub const I420: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(102) };
1262
1263        pub const M420: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(103) };
1264
1265        pub const NV12: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(104) };
1266
1267        pub const YUY2: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(105) };
1268
1269        pub const MJPEG: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(106) };
1270
1271        pub const YV12: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(107) };
1272
1273        pub const B8_G8_R8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(108) };
1274
1275        pub const R5_G6_B5: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(109) };
1276
1277        pub const R3_G3_B2: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(110) };
1278
1279        pub const R2_G2_B2_X2: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(111) };
1280
1281        pub const L8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(112) };
1282
1283        pub const R8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(113) };
1284
1285        pub const R8_G8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(114) };
1286
1287        pub const A2_R10_G10_B10: PixelFormat =
1288            PixelFormat { value: ::fidl_next::wire::Uint32(115) };
1289
1290        pub const A2_B10_G10_R10: PixelFormat =
1291            PixelFormat { value: ::fidl_next::wire::Uint32(116) };
1292
1293        pub const P010: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(117) };
1294
1295        pub const R8_G8_B8: PixelFormat = PixelFormat { value: ::fidl_next::wire::Uint32(118) };
1296
1297        pub const DO_NOT_CARE: PixelFormat =
1298            PixelFormat { value: ::fidl_next::wire::Uint32(4294967294) };
1299    }
1300
1301    unsafe impl<___D> ::fidl_next::Decode<___D> for PixelFormat
1302    where
1303        ___D: ?Sized,
1304    {
1305        fn decode(
1306            slot: ::fidl_next::Slot<'_, Self>,
1307            _: &mut ___D,
1308            _: (),
1309        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1310            Ok(())
1311        }
1312    }
1313
1314    impl ::core::convert::From<crate::natural::PixelFormat> for PixelFormat {
1315        fn from(natural: crate::natural::PixelFormat) -> Self {
1316            match natural {
1317                crate::natural::PixelFormat::Invalid => PixelFormat::INVALID,
1318
1319                crate::natural::PixelFormat::R8G8B8A8 => PixelFormat::R8_G8_B8_A8,
1320
1321                crate::natural::PixelFormat::R8G8B8X8 => PixelFormat::R8_G8_B8_X8,
1322
1323                crate::natural::PixelFormat::B8G8R8A8 => PixelFormat::B8_G8_R8_A8,
1324
1325                crate::natural::PixelFormat::B8G8R8X8 => PixelFormat::B8_G8_R8_X8,
1326
1327                crate::natural::PixelFormat::I420 => PixelFormat::I420,
1328
1329                crate::natural::PixelFormat::M420 => PixelFormat::M420,
1330
1331                crate::natural::PixelFormat::Nv12 => PixelFormat::NV12,
1332
1333                crate::natural::PixelFormat::Yuy2 => PixelFormat::YUY2,
1334
1335                crate::natural::PixelFormat::Mjpeg => PixelFormat::MJPEG,
1336
1337                crate::natural::PixelFormat::Yv12 => PixelFormat::YV12,
1338
1339                crate::natural::PixelFormat::B8G8R8 => PixelFormat::B8_G8_R8,
1340
1341                crate::natural::PixelFormat::R5G6B5 => PixelFormat::R5_G6_B5,
1342
1343                crate::natural::PixelFormat::R3G3B2 => PixelFormat::R3_G3_B2,
1344
1345                crate::natural::PixelFormat::R2G2B2X2 => PixelFormat::R2_G2_B2_X2,
1346
1347                crate::natural::PixelFormat::L8 => PixelFormat::L8,
1348
1349                crate::natural::PixelFormat::R8 => PixelFormat::R8,
1350
1351                crate::natural::PixelFormat::R8G8 => PixelFormat::R8_G8,
1352
1353                crate::natural::PixelFormat::A2R10G10B10 => PixelFormat::A2_R10_G10_B10,
1354
1355                crate::natural::PixelFormat::A2B10G10R10 => PixelFormat::A2_B10_G10_R10,
1356
1357                crate::natural::PixelFormat::P010 => PixelFormat::P010,
1358
1359                crate::natural::PixelFormat::R8G8B8 => PixelFormat::R8_G8_B8,
1360
1361                crate::natural::PixelFormat::DoNotCare => PixelFormat::DO_NOT_CARE,
1362
1363                crate::natural::PixelFormat::UnknownOrdinal_(value) => {
1364                    PixelFormat { value: ::fidl_next::wire::Uint32::from(value) }
1365                }
1366            }
1367        }
1368    }
1369
1370    impl ::fidl_next::IntoNatural for PixelFormat {
1371        type Natural = crate::natural::PixelFormat;
1372    }
1373
1374    /// The wire type corresponding to [`PixelFormatModifier`].
1375    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
1376    #[repr(transparent)]
1377    pub struct PixelFormatModifier {
1378        pub(crate) value: ::fidl_next::wire::Uint64,
1379    }
1380
1381    impl ::fidl_next::Constrained for PixelFormatModifier {
1382        type Constraint = ();
1383
1384        fn validate(
1385            _: ::fidl_next::Slot<'_, Self>,
1386            _: Self::Constraint,
1387        ) -> Result<(), ::fidl_next::ValidationError> {
1388            Ok(())
1389        }
1390    }
1391
1392    unsafe impl ::fidl_next::Wire for PixelFormatModifier {
1393        type Narrowed<'de> = Self;
1394
1395        #[inline]
1396        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1397            // Wire enums have no padding
1398        }
1399    }
1400
1401    impl PixelFormatModifier {
1402        pub const DO_NOT_CARE: PixelFormatModifier =
1403            PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594037927934) };
1404
1405        pub const INVALID: PixelFormatModifier =
1406            PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594037927935) };
1407
1408        pub const LINEAR: PixelFormatModifier =
1409            PixelFormatModifier { value: ::fidl_next::wire::Uint64(0) };
1410
1411        pub const INTEL_I915_X_TILED: PixelFormatModifier =
1412            PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594037927937) };
1413
1414        pub const INTEL_I915_Y_TILED: PixelFormatModifier =
1415            PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594037927938) };
1416
1417        pub const INTEL_I915_YF_TILED: PixelFormatModifier =
1418            PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594037927939) };
1419
1420        pub const INTEL_I915_Y_TILED_CCS: PixelFormatModifier =
1421            PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594054705154) };
1422
1423        pub const INTEL_I915_YF_TILED_CCS: PixelFormatModifier =
1424            PixelFormatModifier { value: ::fidl_next::wire::Uint64(72057594054705155) };
1425
1426        pub const ARM_AFBC_16_X16: PixelFormatModifier =
1427            PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303423489) };
1428
1429        pub const ARM_AFBC_32_X8: PixelFormatModifier =
1430            PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303423490) };
1431
1432        pub const ARM_LINEAR_TE: PixelFormatModifier =
1433            PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303427584) };
1434
1435        pub const ARM_AFBC_16_X16_TE: PixelFormatModifier =
1436            PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303427585) };
1437
1438        pub const ARM_AFBC_32_X8_TE: PixelFormatModifier =
1439            PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303427586) };
1440
1441        pub const ARM_AFBC_16_X16_YUV_TILED_HEADER: PixelFormatModifier =
1442            PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303431697) };
1443
1444        pub const ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV: PixelFormatModifier =
1445            PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303423601) };
1446
1447        pub const ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV_TE: PixelFormatModifier =
1448            PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303427697) };
1449
1450        pub const ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV_TILED_HEADER: PixelFormatModifier =
1451            PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303431793) };
1452
1453        pub const ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV_TE_TILED_HEADER: PixelFormatModifier =
1454            PixelFormatModifier { value: ::fidl_next::wire::Uint64(576460752303435889) };
1455
1456        pub const GOOGLE_GOLDFISH_OPTIMAL: PixelFormatModifier =
1457            PixelFormatModifier { value: ::fidl_next::wire::Uint64(7421932185906577409) };
1458
1459        pub const PVR_FBCDC_8_X8_V14: PixelFormatModifier =
1460            PixelFormatModifier { value: ::fidl_next::wire::Uint64(10520408729537478690) };
1461
1462        pub const PVR_FBCDC_16_X4_V14: PixelFormatModifier =
1463            PixelFormatModifier { value: ::fidl_next::wire::Uint64(10520408729537478695) };
1464    }
1465
1466    unsafe impl<___D> ::fidl_next::Decode<___D> for PixelFormatModifier
1467    where
1468        ___D: ?Sized,
1469    {
1470        fn decode(
1471            slot: ::fidl_next::Slot<'_, Self>,
1472            _: &mut ___D,
1473            _: (),
1474        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1475            Ok(())
1476        }
1477    }
1478
1479    impl ::core::convert::From<crate::natural::PixelFormatModifier> for PixelFormatModifier {
1480        fn from(natural: crate::natural::PixelFormatModifier) -> Self {
1481            match natural {
1482
1483                crate::natural::PixelFormatModifier::DoNotCare => PixelFormatModifier::DO_NOT_CARE,
1484
1485                crate::natural::PixelFormatModifier::Invalid => PixelFormatModifier::INVALID,
1486
1487                crate::natural::PixelFormatModifier::Linear => PixelFormatModifier::LINEAR,
1488
1489                crate::natural::PixelFormatModifier::IntelI915XTiled => PixelFormatModifier::INTEL_I915_X_TILED,
1490
1491                crate::natural::PixelFormatModifier::IntelI915YTiled => PixelFormatModifier::INTEL_I915_Y_TILED,
1492
1493                crate::natural::PixelFormatModifier::IntelI915YfTiled => PixelFormatModifier::INTEL_I915_YF_TILED,
1494
1495                crate::natural::PixelFormatModifier::IntelI915YTiledCcs => PixelFormatModifier::INTEL_I915_Y_TILED_CCS,
1496
1497                crate::natural::PixelFormatModifier::IntelI915YfTiledCcs => PixelFormatModifier::INTEL_I915_YF_TILED_CCS,
1498
1499                crate::natural::PixelFormatModifier::ArmAfbc16X16 => PixelFormatModifier::ARM_AFBC_16_X16,
1500
1501                crate::natural::PixelFormatModifier::ArmAfbc32X8 => PixelFormatModifier::ARM_AFBC_32_X8,
1502
1503                crate::natural::PixelFormatModifier::ArmLinearTe => PixelFormatModifier::ARM_LINEAR_TE,
1504
1505                crate::natural::PixelFormatModifier::ArmAfbc16X16Te => PixelFormatModifier::ARM_AFBC_16_X16_TE,
1506
1507                crate::natural::PixelFormatModifier::ArmAfbc32X8Te => PixelFormatModifier::ARM_AFBC_32_X8_TE,
1508
1509                crate::natural::PixelFormatModifier::ArmAfbc16X16YuvTiledHeader => PixelFormatModifier::ARM_AFBC_16_X16_YUV_TILED_HEADER,
1510
1511                crate::natural::PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuv => PixelFormatModifier::ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV,
1512
1513                crate::natural::PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTe => PixelFormatModifier::ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV_TE,
1514
1515                crate::natural::PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTiledHeader => PixelFormatModifier::ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV_TILED_HEADER,
1516
1517                crate::natural::PixelFormatModifier::ArmAfbc16X16SplitBlockSparseYuvTeTiledHeader => PixelFormatModifier::ARM_AFBC_16_X16_SPLIT_BLOCK_SPARSE_YUV_TE_TILED_HEADER,
1518
1519                crate::natural::PixelFormatModifier::GoogleGoldfishOptimal => PixelFormatModifier::GOOGLE_GOLDFISH_OPTIMAL,
1520
1521                crate::natural::PixelFormatModifier::PvrFbcdc8X8V14 => PixelFormatModifier::PVR_FBCDC_8_X8_V14,
1522
1523                crate::natural::PixelFormatModifier::PvrFbcdc16X4V14 => PixelFormatModifier::PVR_FBCDC_16_X4_V14,
1524
1525
1526                crate::natural::PixelFormatModifier::UnknownOrdinal_(value) => PixelFormatModifier {
1527                    value: ::fidl_next::wire::Uint64::from(value),
1528                }
1529
1530        }
1531        }
1532    }
1533
1534    impl ::fidl_next::IntoNatural for PixelFormatModifier {
1535        type Natural = crate::natural::PixelFormatModifier;
1536    }
1537
1538    /// The wire type corresponding to [`ImageFormat`].
1539    #[repr(C)]
1540    pub struct ImageFormat<'de> {
1541        pub(crate) table: ::fidl_next::wire::Table<'de>,
1542    }
1543
1544    impl<'de> Drop for ImageFormat<'de> {
1545        fn drop(&mut self) {
1546            let _ = self
1547                .table
1548                .get(1)
1549                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::PixelFormat>() });
1550
1551            let _ = self.table.get(2).map(|envelope| unsafe {
1552                envelope.read_unchecked::<crate::wire::PixelFormatModifier>()
1553            });
1554
1555            let _ = self
1556                .table
1557                .get(3)
1558                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::ColorSpace>() });
1559
1560            let _ = self.table.get(4).map(|envelope| unsafe {
1561                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1562            });
1563
1564            let _ = self
1565                .table
1566                .get(5)
1567                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
1568
1569            let _ = self.table.get(6).map(|envelope| unsafe {
1570                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::RectU>()
1571            });
1572
1573            let _ = self.table.get(7).map(|envelope| unsafe {
1574                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1575            });
1576
1577            let _ = self.table.get(8).map(|envelope| unsafe {
1578                envelope.read_unchecked::<::fidl_next_common_fuchsia_math::wire::SizeU>()
1579            });
1580        }
1581    }
1582
1583    impl ::fidl_next::Constrained for ImageFormat<'_> {
1584        type Constraint = ();
1585
1586        fn validate(
1587            _: ::fidl_next::Slot<'_, Self>,
1588            _: Self::Constraint,
1589        ) -> Result<(), ::fidl_next::ValidationError> {
1590            Ok(())
1591        }
1592    }
1593
1594    unsafe impl ::fidl_next::Wire for ImageFormat<'static> {
1595        type Narrowed<'de> = ImageFormat<'de>;
1596
1597        #[inline]
1598        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1599            ::fidl_next::munge!(let Self { table } = out);
1600            ::fidl_next::wire::Table::zero_padding(table);
1601        }
1602    }
1603
1604    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ImageFormat<'de>
1605    where
1606        ___D: ::fidl_next::Decoder<'de> + ?Sized,
1607    {
1608        fn decode(
1609            slot: ::fidl_next::Slot<'_, Self>,
1610            decoder: &mut ___D,
1611            _: (),
1612        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1613            ::fidl_next::munge!(let Self { table } = slot);
1614
1615            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1616                match ordinal {
1617                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1618
1619                    1 => {
1620                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::PixelFormat>(
1621                            slot.as_mut(),
1622                            decoder,
1623                            (),
1624                        )?;
1625
1626                        Ok(())
1627                    }
1628
1629                    2 => {
1630                        ::fidl_next::wire::Envelope::decode_as::<
1631                            ___D,
1632                            crate::wire::PixelFormatModifier,
1633                        >(slot.as_mut(), decoder, ())?;
1634
1635                        Ok(())
1636                    }
1637
1638                    3 => {
1639                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::ColorSpace>(
1640                            slot.as_mut(),
1641                            decoder,
1642                            (),
1643                        )?;
1644
1645                        Ok(())
1646                    }
1647
1648                    4 => {
1649                        ::fidl_next::wire::Envelope::decode_as::<
1650                            ___D,
1651                            ::fidl_next_common_fuchsia_math::wire::SizeU,
1652                        >(slot.as_mut(), decoder, ())?;
1653
1654                        Ok(())
1655                    }
1656
1657                    5 => {
1658                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
1659                            slot.as_mut(),
1660                            decoder,
1661                            (),
1662                        )?;
1663
1664                        Ok(())
1665                    }
1666
1667                    6 => {
1668                        ::fidl_next::wire::Envelope::decode_as::<
1669                            ___D,
1670                            ::fidl_next_common_fuchsia_math::wire::RectU,
1671                        >(slot.as_mut(), decoder, ())?;
1672
1673                        Ok(())
1674                    }
1675
1676                    7 => {
1677                        ::fidl_next::wire::Envelope::decode_as::<
1678                            ___D,
1679                            ::fidl_next_common_fuchsia_math::wire::SizeU,
1680                        >(slot.as_mut(), decoder, ())?;
1681
1682                        Ok(())
1683                    }
1684
1685                    8 => {
1686                        ::fidl_next::wire::Envelope::decode_as::<
1687                            ___D,
1688                            ::fidl_next_common_fuchsia_math::wire::SizeU,
1689                        >(slot.as_mut(), decoder, ())?;
1690
1691                        Ok(())
1692                    }
1693
1694                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
1695                }
1696            })
1697        }
1698    }
1699
1700    impl<'de> ImageFormat<'de> {
1701        pub fn pixel_format(&self) -> ::core::option::Option<&crate::wire::PixelFormat> {
1702            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1703        }
1704
1705        pub fn take_pixel_format(&mut self) -> ::core::option::Option<crate::wire::PixelFormat> {
1706            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
1707        }
1708
1709        pub fn pixel_format_modifier(
1710            &self,
1711        ) -> ::core::option::Option<&crate::wire::PixelFormatModifier> {
1712            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1713        }
1714
1715        pub fn take_pixel_format_modifier(
1716            &mut self,
1717        ) -> ::core::option::Option<crate::wire::PixelFormatModifier> {
1718            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
1719        }
1720
1721        pub fn color_space(&self) -> ::core::option::Option<&crate::wire::ColorSpace> {
1722            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1723        }
1724
1725        pub fn take_color_space(&mut self) -> ::core::option::Option<crate::wire::ColorSpace> {
1726            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
1727        }
1728
1729        pub fn size(
1730            &self,
1731        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
1732            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
1733        }
1734
1735        pub fn take_size(
1736            &mut self,
1737        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
1738            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
1739        }
1740
1741        pub fn bytes_per_row(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
1742            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
1743        }
1744
1745        pub fn take_bytes_per_row(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
1746            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
1747        }
1748
1749        pub fn display_rect(
1750            &self,
1751        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::RectU> {
1752            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
1753        }
1754
1755        pub fn take_display_rect(
1756            &mut self,
1757        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::RectU> {
1758            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
1759        }
1760
1761        pub fn valid_size(
1762            &self,
1763        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
1764            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
1765        }
1766
1767        pub fn take_valid_size(
1768            &mut self,
1769        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
1770            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
1771        }
1772
1773        pub fn pixel_aspect_ratio(
1774            &self,
1775        ) -> ::core::option::Option<&::fidl_next_common_fuchsia_math::wire::SizeU> {
1776            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
1777        }
1778
1779        pub fn take_pixel_aspect_ratio(
1780            &mut self,
1781        ) -> ::core::option::Option<::fidl_next_common_fuchsia_math::wire::SizeU> {
1782            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
1783        }
1784    }
1785
1786    impl<'de> ::core::fmt::Debug for ImageFormat<'de> {
1787        fn fmt(
1788            &self,
1789            f: &mut ::core::fmt::Formatter<'_>,
1790        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1791            f.debug_struct("ImageFormat")
1792                .field("pixel_format", &self.pixel_format())
1793                .field("pixel_format_modifier", &self.pixel_format_modifier())
1794                .field("color_space", &self.color_space())
1795                .field("size", &self.size())
1796                .field("bytes_per_row", &self.bytes_per_row())
1797                .field("display_rect", &self.display_rect())
1798                .field("valid_size", &self.valid_size())
1799                .field("pixel_aspect_ratio", &self.pixel_aspect_ratio())
1800                .finish()
1801        }
1802    }
1803
1804    impl<'de> ::fidl_next::IntoNatural for ImageFormat<'de> {
1805        type Natural = crate::natural::ImageFormat;
1806    }
1807}
1808
1809pub mod wire_optional {}
1810
1811pub mod generic {}
1812
1813pub use self::natural::*;
1814
1815pub const FORMAT_MODIFIER_ARM_BCH_BIT: u64 = 2048 as u64;
1816
1817pub const FORMAT_MODIFIER_ARM_SPARSE_BIT: u64 = 64 as u64;
1818
1819pub const FORMAT_MODIFIER_ARM_SPLIT_BLOCK_BIT: u64 = 32 as u64;
1820
1821pub const FORMAT_MODIFIER_ARM_TE_BIT: u64 = 4096 as u64;
1822
1823pub const FORMAT_MODIFIER_ARM_TILED_HEADER_BIT: u64 = 8192 as u64;
1824
1825pub const FORMAT_MODIFIER_ARM_YUV_BIT: u64 = 16 as u64;
1826
1827#[doc = " Format has a color control surface after the tile data\n"]
1828pub const FORMAT_MODIFIER_INTEL_CCS_BIT: u64 = 16777216 as u64;
1829
1830pub const FORMAT_MODIFIER_VENDOR_ALLWINNER: u64 = 648518346341351424 as u64;
1831
1832pub const FORMAT_MODIFIER_VENDOR_AMD: u64 = 144115188075855872 as u64;
1833
1834pub const FORMAT_MODIFIER_VENDOR_AMLOGIC: u64 = 720575940379279360 as u64;
1835
1836pub const FORMAT_MODIFIER_VENDOR_ARM: u64 = 576460752303423488 as u64;
1837
1838pub const FORMAT_MODIFIER_VENDOR_BROADCOM: u64 = 504403158265495552 as u64;
1839
1840pub const FORMAT_MODIFIER_VENDOR_GOOGLE: u64 = 7421932185906577408 as u64;
1841
1842pub const FORMAT_MODIFIER_VENDOR_INTEL: u64 = 72057594037927936 as u64;
1843
1844pub const FORMAT_MODIFIER_VENDOR_NVIDIA: u64 = 216172782113783808 as u64;
1845
1846pub const FORMAT_MODIFIER_VENDOR_PVR: u64 = 10520408729537478656 as u64;
1847
1848pub const FORMAT_MODIFIER_VENDOR_QCOM: u64 = 360287970189639680 as u64;
1849
1850pub const FORMAT_MODIFIER_VENDOR_SAMSUNG: u64 = 288230376151711744 as u64;
1851
1852pub const FORMAT_MODIFIER_VENDOR_VIVANTE: u64 = 432345564227567616 as u64;