fidl_fuchsia_ui_composition_common/
fidl_fuchsia_ui_composition_common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11/// A user-defined identifier for future presentation info. A maximum of 8
12/// future presentation counts is enough for the current usage of these APIs.
13pub type FuturePresentationInfos = Vec<fidl_fuchsia_scenic_scheduling::PresentationInfo>;
14
15pub const MAX_ACQUIRE_RELEASE_FENCE_COUNT: i32 = 16;
16
17/// A maximum of 64 child transforms is enough for the expected usage of these APIs. Callers may
18/// beyond this limit using [`AddChild`].
19pub const MAX_CHILD_TRANSFORMS: i32 = 64;
20
21/// A maximum of 64 hit regions is enough for the expected usage of these APIs.
22pub const MAX_HIT_REGION_COUNT: i32 = 64;
23
24pub const MAX_PRESENT_ARGS_FENCE_COUNT: i32 = 16;
25
26bitflags! {
27    /// The possible usages for a registered buffer collection. Can be a combination of options.
28    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash)]
29    pub struct RegisterBufferCollectionUsages: u16 {
30        /// The specified buffer collection can be used for Flatland and GFX image creation.
31        ///
32        /// See [`fuchsia.ui.composition/Flatland.CreateImage`] for more.
33        const DEFAULT = 1;
34        /// The specified buffer collection can be used for screenshotting purposes.
35        const SCREENSHOT = 2;
36    }
37}
38
39impl RegisterBufferCollectionUsages {
40    #[inline(always)]
41    pub fn from_bits_allow_unknown(bits: u16) -> Self {
42        Self::from_bits_retain(bits)
43    }
44
45    #[inline(always)]
46    pub fn has_unknown_bits(&self) -> bool {
47        self.get_unknown_bits() != 0
48    }
49
50    #[inline(always)]
51    pub fn get_unknown_bits(&self) -> u16 {
52        self.bits() & !Self::all().bits()
53    }
54}
55
56/// The set of possible blending functions to choose from when determining how an image should
57/// be composited on top of other images.
58#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
59#[repr(u32)]
60pub enum BlendMode {
61    /// Indicates that the source pixels replace the destination pixels. In other words,
62    /// the source pixels are treated as opaque, regardless of what alpha values are set.
63    Src = 1,
64    /// The source pixels are drawn over the destination pixels. The final pixel color
65    /// that is displayed is calculated as: C_src + (1.0 - alpha_src) * C_dst).
66    SrcOver = 2,
67}
68
69impl BlendMode {
70    #[inline]
71    pub fn from_primitive(prim: u32) -> Option<Self> {
72        match prim {
73            1 => Some(Self::Src),
74            2 => Some(Self::SrcOver),
75            _ => None,
76        }
77    }
78
79    #[inline]
80    pub const fn into_primitive(self) -> u32 {
81        self as u32
82    }
83
84    #[deprecated = "Strict enums should not use `is_unknown`"]
85    #[inline]
86    pub fn is_unknown(&self) -> bool {
87        false
88    }
89}
90
91#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
92#[repr(u32)]
93pub enum ChildViewStatus {
94    /// The underlying Flatland instance has connected its View, called [`Present`], and the
95    /// acquisition fences of the [`Present`] call have all be reached, indicating that it has some
96    /// content ready to be displayed, and NOT that the child content has actually been shown on the
97    /// screen (a common use case is for the parent to wait for the child content to be ready before
98    /// attaching the child to the global scene graph).
99    ContentHasPresented = 1,
100}
101
102impl ChildViewStatus {
103    #[inline]
104    pub fn from_primitive(prim: u32) -> Option<Self> {
105        match prim {
106            1 => Some(Self::ContentHasPresented),
107            _ => None,
108        }
109    }
110
111    #[inline]
112    pub const fn into_primitive(self) -> u32 {
113        self as u32
114    }
115
116    #[deprecated = "Strict enums should not use `is_unknown`"]
117    #[inline]
118    pub fn is_unknown(&self) -> bool {
119        false
120    }
121}
122
123/// The set of error codes returned in [`OnError`]. Everything except NO_ERROR, causes Flatland
124/// channel to be closed.
125#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
126#[repr(u32)]
127pub enum FlatlandError {
128    /// Indicates that the parameters used the function calls are invalid.
129    BadOperation = 1,
130    /// Indicates that `additional_present_credits` field was not properly processed and the client
131    /// queued more [`Present`]s than allowed.
132    NoPresentsRemaining = 2,
133    /// Indicates that the client has overwritten hanging gets in the protocols returned.
134    BadHangingGet = 3,
135}
136
137impl FlatlandError {
138    #[inline]
139    pub fn from_primitive(prim: u32) -> Option<Self> {
140        match prim {
141            1 => Some(Self::BadOperation),
142            2 => Some(Self::NoPresentsRemaining),
143            3 => Some(Self::BadHangingGet),
144            _ => None,
145        }
146    }
147
148    #[inline]
149    pub const fn into_primitive(self) -> u32 {
150        self as u32
151    }
152
153    #[deprecated = "Strict enums should not use `is_unknown`"]
154    #[inline]
155    pub fn is_unknown(&self) -> bool {
156        false
157    }
158}
159
160/// The kind of hit test interaction expected for a hit region.
161#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
162pub enum HitTestInteraction {
163    /// The natural default behavior is for a hit region to interact with both regular hit testing
164    /// and accessibility hit testing.
165    Default,
166    /// Some use cases require that a hit region to interact with regular hit testing, but not
167    /// interact with accessibility hit testing. Here, "semantics" refers to accessibility's
168    /// semantic tree data, which describes UI elements in a View.
169    SemanticallyInvisible,
170    #[doc(hidden)]
171    __SourceBreaking { unknown_ordinal: u8 },
172}
173
174/// Pattern that matches an unknown `HitTestInteraction` member.
175#[macro_export]
176macro_rules! HitTestInteractionUnknown {
177    () => {
178        _
179    };
180}
181
182impl HitTestInteraction {
183    #[inline]
184    pub fn from_primitive(prim: u8) -> Option<Self> {
185        match prim {
186            0 => Some(Self::Default),
187            1 => Some(Self::SemanticallyInvisible),
188            _ => None,
189        }
190    }
191
192    #[inline]
193    pub fn from_primitive_allow_unknown(prim: u8) -> Self {
194        match prim {
195            0 => Self::Default,
196            1 => Self::SemanticallyInvisible,
197            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
198        }
199    }
200
201    #[inline]
202    pub fn unknown() -> Self {
203        Self::__SourceBreaking { unknown_ordinal: 0xff }
204    }
205
206    #[inline]
207    pub const fn into_primitive(self) -> u8 {
208        match self {
209            Self::Default => 0,
210            Self::SemanticallyInvisible => 1,
211            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
212        }
213    }
214
215    #[inline]
216    pub fn is_unknown(&self) -> bool {
217        match self {
218            Self::__SourceBreaking { unknown_ordinal: _ } => true,
219            _ => false,
220        }
221    }
222}
223
224/// The set of possible image flip functions to choose from when determining how the image texture
225/// should be displayed.
226#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
227#[repr(u32)]
228pub enum ImageFlip {
229    None = 0,
230    /// Let V be the vertical axis of reflection, positioned at width/2. Then each pixel's x
231    /// coordinate is reflected across V. The y coordinates remain constant. For instance:
232    /// |1234|                |4321|
233    /// |abcd|  would become  |dcba|
234    LeftRight = 1,
235    /// Let H be the horizontal axis of reflection, positioned at height/2. Then each pixel's y
236    /// coordinate is reflected across H. The x coordinates remain constant. For instance:
237    /// |1234|                |abcd|
238    /// |abcd|  would become  |1234|
239    UpDown = 2,
240}
241
242impl ImageFlip {
243    #[inline]
244    pub fn from_primitive(prim: u32) -> Option<Self> {
245        match prim {
246            0 => Some(Self::None),
247            1 => Some(Self::LeftRight),
248            2 => Some(Self::UpDown),
249            _ => None,
250        }
251    }
252
253    #[inline]
254    pub const fn into_primitive(self) -> u32 {
255        self as u32
256    }
257
258    #[deprecated = "Strict enums should not use `is_unknown`"]
259    #[inline]
260    pub fn is_unknown(&self) -> bool {
261        false
262    }
263}
264
265/// In Flatland, the +X axis is to the right and +Y axis is down. There is no notion of a Z axis.
266/// Due to the lack of a Z axis, there is no mathematical notion of "handedness" (either right or
267/// left) with respect to rotation. Thus, we define a counter-clockwise rotation in the same way
268/// as if a skeuomorphic clock were to be displayed on the screen, with the hands of said clock
269/// moving in a CCW motion from the POV of the observer.
270#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
271#[repr(u32)]
272pub enum Orientation {
273    Ccw0Degrees = 1,
274    Ccw90Degrees = 2,
275    Ccw180Degrees = 3,
276    Ccw270Degrees = 4,
277}
278
279impl Orientation {
280    #[inline]
281    pub fn from_primitive(prim: u32) -> Option<Self> {
282        match prim {
283            1 => Some(Self::Ccw0Degrees),
284            2 => Some(Self::Ccw90Degrees),
285            3 => Some(Self::Ccw180Degrees),
286            4 => Some(Self::Ccw270Degrees),
287            _ => None,
288        }
289    }
290
291    #[inline]
292    pub const fn into_primitive(self) -> u32 {
293        self as u32
294    }
295
296    #[deprecated = "Strict enums should not use `is_unknown`"]
297    #[inline]
298    pub fn is_unknown(&self) -> bool {
299        false
300    }
301}
302
303/// ParentViewportWatchers will be informed when they are actively attached to a output display
304/// (either directly, or through a chain of parent Viewports) and when they are not. Until they are
305/// connected to a display, some pieces of information (such as pixel scale) may be unavailable.
306#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
307#[repr(u32)]
308pub enum ParentViewportStatus {
309    ConnectedToDisplay = 1,
310    DisconnectedFromDisplay = 2,
311}
312
313impl ParentViewportStatus {
314    #[inline]
315    pub fn from_primitive(prim: u32) -> Option<Self> {
316        match prim {
317            1 => Some(Self::ConnectedToDisplay),
318            2 => Some(Self::DisconnectedFromDisplay),
319            _ => None,
320        }
321    }
322
323    #[inline]
324    pub const fn into_primitive(self) -> u32 {
325        self as u32
326    }
327
328    #[deprecated = "Strict enums should not use `is_unknown`"]
329    #[inline]
330    pub fn is_unknown(&self) -> bool {
331        false
332    }
333}
334
335/// The set of error codes returned by Allocator::RegisterBufferCollection().
336#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
337#[repr(u32)]
338pub enum RegisterBufferCollectionError {
339    BadOperation = 1,
340}
341
342impl RegisterBufferCollectionError {
343    #[inline]
344    pub fn from_primitive(prim: u32) -> Option<Self> {
345        match prim {
346            1 => Some(Self::BadOperation),
347            _ => None,
348        }
349    }
350
351    #[inline]
352    pub const fn into_primitive(self) -> u32 {
353        self as u32
354    }
355
356    #[deprecated = "Strict enums should not use `is_unknown`"]
357    #[inline]
358    pub fn is_unknown(&self) -> bool {
359        false
360    }
361}
362
363/// The possible usages for registered buffer collection.
364#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
365#[repr(u32)]
366pub enum RegisterBufferCollectionUsage {
367    /// DEFAULT means that the specified buffer collection will be used for
368    /// Flatland and gfx image creation.
369    ///
370    /// See [`fuchsia.ui.composition/Flatland.CreateImage`] for more.
371    Default = 0,
372    /// SCREENSHOT means that the specified buffer collection will be used for
373    /// screenshotting purposes.
374    Screenshot = 1,
375}
376
377impl RegisterBufferCollectionUsage {
378    #[inline]
379    pub fn from_primitive(prim: u32) -> Option<Self> {
380        match prim {
381            0 => Some(Self::Default),
382            1 => Some(Self::Screenshot),
383            _ => None,
384        }
385    }
386
387    #[inline]
388    pub const fn into_primitive(self) -> u32 {
389        self as u32
390    }
391
392    #[deprecated = "Strict enums should not use `is_unknown`"]
393    #[inline]
394    pub fn is_unknown(&self) -> bool {
395        false
396    }
397}
398
399/// The rotation to be applied to the image.
400///
401/// If a given display is rotated, say, 270 degrees according to its
402/// `display_info` config file, then applying the equal and opposite rotation,
403/// [`CW_270_DEGREES`], should cancel the display rotation leading to a
404/// correctly rendered screenshot.
405///
406/// Clients should allocate an image according to the final dimensions they
407/// ultimately want to use, i.e. after rotation. These would be identical
408/// to the `width` and `height` values found in the `display_info` config file.
409#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
410#[repr(u32)]
411pub enum Rotation {
412    Cw0Degrees = 0,
413    Cw90Degrees = 1,
414    Cw180Degrees = 2,
415    Cw270Degrees = 3,
416}
417
418impl Rotation {
419    #[inline]
420    pub fn from_primitive(prim: u32) -> Option<Self> {
421        match prim {
422            0 => Some(Self::Cw0Degrees),
423            1 => Some(Self::Cw90Degrees),
424            2 => Some(Self::Cw180Degrees),
425            3 => Some(Self::Cw270Degrees),
426            _ => None,
427        }
428    }
429
430    #[inline]
431    pub const fn into_primitive(self) -> u32 {
432        self as u32
433    }
434
435    #[deprecated = "Strict enums should not use `is_unknown`"]
436    #[inline]
437    pub fn is_unknown(&self) -> bool {
438        false
439    }
440}
441
442/// The possible errors from the ScreenCapture protocol.
443#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
444pub enum ScreenCaptureError {
445    /// One or more required arguments are missing in the table argument.
446    MissingArgs,
447    /// One or more of the arguments was not valid.
448    InvalidArgs,
449    /// A general error occurred during the method call.
450    BadOperation,
451    /// Error that is returned if [`GetNextFrame`] is called when all of the VMOs in the
452    /// BufferCollection have been rendered to. [`ReleaseFrame`] must be called before a
453    /// successful call to GetNextFrame can be made.
454    BufferFull,
455    #[doc(hidden)]
456    __SourceBreaking { unknown_ordinal: u32 },
457}
458
459/// Pattern that matches an unknown `ScreenCaptureError` member.
460#[macro_export]
461macro_rules! ScreenCaptureErrorUnknown {
462    () => {
463        _
464    };
465}
466
467impl ScreenCaptureError {
468    #[inline]
469    pub fn from_primitive(prim: u32) -> Option<Self> {
470        match prim {
471            1 => Some(Self::MissingArgs),
472            2 => Some(Self::InvalidArgs),
473            3 => Some(Self::BadOperation),
474            4 => Some(Self::BufferFull),
475            _ => None,
476        }
477    }
478
479    #[inline]
480    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
481        match prim {
482            1 => Self::MissingArgs,
483            2 => Self::InvalidArgs,
484            3 => Self::BadOperation,
485            4 => Self::BufferFull,
486            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
487        }
488    }
489
490    #[inline]
491    pub fn unknown() -> Self {
492        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
493    }
494
495    #[inline]
496    pub const fn into_primitive(self) -> u32 {
497        match self {
498            Self::MissingArgs => 1,
499            Self::InvalidArgs => 2,
500            Self::BadOperation => 3,
501            Self::BufferFull => 4,
502            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
503        }
504    }
505
506    #[inline]
507    pub fn is_unknown(&self) -> bool {
508        match self {
509            Self::__SourceBreaking { unknown_ordinal: _ } => true,
510            _ => false,
511        }
512    }
513}
514
515/// The different formats of Screenshot that can be requested.
516#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
517pub enum ScreenshotFormat {
518    /// The default format, requesting a tightly packed pixel data with 32 bit BGRA pixels.
519    BgraRaw,
520    /// Requests tightly packed pixel data with 32 bit RGBA pixels.
521    RgbaRaw,
522    /// Requests tightly packed pixel data which is compressed into PNG format.
523    Png,
524    #[doc(hidden)]
525    __SourceBreaking { unknown_ordinal: u8 },
526}
527
528/// Pattern that matches an unknown `ScreenshotFormat` member.
529#[macro_export]
530macro_rules! ScreenshotFormatUnknown {
531    () => {
532        _
533    };
534}
535
536impl ScreenshotFormat {
537    #[inline]
538    pub fn from_primitive(prim: u8) -> Option<Self> {
539        match prim {
540            0 => Some(Self::BgraRaw),
541            2 => Some(Self::RgbaRaw),
542            1 => Some(Self::Png),
543            _ => None,
544        }
545    }
546
547    #[inline]
548    pub fn from_primitive_allow_unknown(prim: u8) -> Self {
549        match prim {
550            0 => Self::BgraRaw,
551            2 => Self::RgbaRaw,
552            1 => Self::Png,
553            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
554        }
555    }
556
557    #[inline]
558    pub fn unknown() -> Self {
559        Self::__SourceBreaking { unknown_ordinal: 0xff }
560    }
561
562    #[inline]
563    pub const fn into_primitive(self) -> u8 {
564        match self {
565            Self::BgraRaw => 0,
566            Self::RgbaRaw => 2,
567            Self::Png => 1,
568            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
569        }
570    }
571
572    #[inline]
573    pub fn is_unknown(&self) -> bool {
574        match self {
575            Self::__SourceBreaking { unknown_ordinal: _ } => true,
576            _ => false,
577        }
578    }
579}
580
581#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
582pub struct ChildViewWatcherGetStatusResponse {
583    pub status: ChildViewStatus,
584}
585
586impl fidl::Persistable for ChildViewWatcherGetStatusResponse {}
587
588/// Represents a color with alpha channel.
589/// Values are unorm (i.e. the valid range is [0,1]), and are in linear color
590/// space. They are not gamma-corrected nor premultiplied.
591#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
592pub struct ColorRgba {
593    pub red: f32,
594    pub green: f32,
595    pub blue: f32,
596    pub alpha: f32,
597}
598
599impl fidl::Persistable for ColorRgba {}
600
601/// A user-defined identifier for a particular piece of Content. See Content creation functions
602/// (e.g. [`CreateViewport`], [`CreateImage`]) for more information.
603#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
604#[repr(C)]
605pub struct ContentId {
606    pub value: u64,
607}
608
609impl fidl::Persistable for ContentId {}
610
611#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
612#[repr(C)]
613pub struct FlatlandAddChildRequest {
614    pub parent_transform_id: TransformId,
615    pub child_transform_id: TransformId,
616}
617
618impl fidl::Persistable for FlatlandAddChildRequest {}
619
620#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
621#[repr(C)]
622pub struct FlatlandCreateTransformRequest {
623    pub transform_id: TransformId,
624}
625
626impl fidl::Persistable for FlatlandCreateTransformRequest {}
627
628#[derive(Clone, Debug, PartialEq)]
629pub struct FlatlandDisplaySetDevicePixelRatioRequest {
630    pub device_pixel_ratio: fidl_fuchsia_math::VecF,
631}
632
633impl fidl::Persistable for FlatlandDisplaySetDevicePixelRatioRequest {}
634
635#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
636pub struct FlatlandOnErrorRequest {
637    pub error: FlatlandError,
638}
639
640impl fidl::Persistable for FlatlandOnErrorRequest {}
641
642#[derive(Clone, Debug, PartialEq)]
643pub struct FlatlandOnFramePresentedRequest {
644    pub frame_presented_info: fidl_fuchsia_scenic_scheduling::FramePresentedInfo,
645}
646
647impl fidl::Persistable for FlatlandOnFramePresentedRequest {}
648
649#[derive(Clone, Debug, PartialEq)]
650pub struct FlatlandOnNextFrameBeginRequest {
651    pub values: OnNextFrameBeginValues,
652}
653
654impl fidl::Persistable for FlatlandOnNextFrameBeginRequest {}
655
656#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
657#[repr(C)]
658pub struct FlatlandReleaseFilledRectRequest {
659    pub rect_id: ContentId,
660}
661
662impl fidl::Persistable for FlatlandReleaseFilledRectRequest {}
663
664#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
665#[repr(C)]
666pub struct FlatlandReleaseImageRequest {
667    pub image_id: ContentId,
668}
669
670impl fidl::Persistable for FlatlandReleaseImageRequest {}
671
672#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
673#[repr(C)]
674pub struct FlatlandReleaseTransformRequest {
675    pub transform_id: TransformId,
676}
677
678impl fidl::Persistable for FlatlandReleaseTransformRequest {}
679
680#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
681#[repr(C)]
682pub struct FlatlandReleaseViewportRequest {
683    pub viewport_id: ContentId,
684}
685
686impl fidl::Persistable for FlatlandReleaseViewportRequest {}
687
688#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
689#[repr(C)]
690pub struct FlatlandRemoveChildRequest {
691    pub parent_transform_id: TransformId,
692    pub child_transform_id: TransformId,
693}
694
695impl fidl::Persistable for FlatlandRemoveChildRequest {}
696
697#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
698pub struct FlatlandReplaceChildrenRequest {
699    pub parent_transform_id: TransformId,
700    pub new_child_transform_ids: Vec<TransformId>,
701}
702
703impl fidl::Persistable for FlatlandReplaceChildrenRequest {}
704
705#[derive(Clone, Debug, PartialEq)]
706pub struct FlatlandSetClipBoundaryRequest {
707    pub transform_id: TransformId,
708    pub rect: Option<Box<fidl_fuchsia_math::Rect>>,
709}
710
711impl fidl::Persistable for FlatlandSetClipBoundaryRequest {}
712
713#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
714#[repr(C)]
715pub struct FlatlandSetContentRequest {
716    pub transform_id: TransformId,
717    pub content_id: ContentId,
718}
719
720impl fidl::Persistable for FlatlandSetContentRequest {}
721
722#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
723pub struct FlatlandSetDebugNameRequest {
724    pub name: String,
725}
726
727impl fidl::Persistable for FlatlandSetDebugNameRequest {}
728
729#[derive(Clone, Debug, PartialEq)]
730pub struct FlatlandSetHitRegionsRequest {
731    pub transform_id: TransformId,
732    /// Each region's [`HitRegion.region.width`] and [`HitRegion.region.height`] field must be a
733    /// non-negative value.
734    pub regions: Vec<HitRegion>,
735}
736
737impl fidl::Persistable for FlatlandSetHitRegionsRequest {}
738
739#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
740pub struct FlatlandSetImageBlendingFunctionRequest {
741    pub image_id: ContentId,
742    pub blend_mode: BlendMode,
743}
744
745impl fidl::Persistable for FlatlandSetImageBlendingFunctionRequest {}
746
747#[derive(Clone, Debug, PartialEq)]
748pub struct FlatlandSetImageDestinationSizeRequest {
749    pub image_id: ContentId,
750    pub size: fidl_fuchsia_math::SizeU,
751}
752
753impl fidl::Persistable for FlatlandSetImageDestinationSizeRequest {}
754
755#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
756pub struct FlatlandSetImageFlipRequest {
757    pub image_id: ContentId,
758    pub flip: ImageFlip,
759}
760
761impl fidl::Persistable for FlatlandSetImageFlipRequest {}
762
763#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
764pub struct FlatlandSetImageOpacityRequest {
765    pub image_id: ContentId,
766    pub val: f32,
767}
768
769impl fidl::Persistable for FlatlandSetImageOpacityRequest {}
770
771#[derive(Clone, Debug, PartialEq)]
772pub struct FlatlandSetImageSampleRegionRequest {
773    pub image_id: ContentId,
774    pub rect: fidl_fuchsia_math::RectF,
775}
776
777impl fidl::Persistable for FlatlandSetImageSampleRegionRequest {}
778
779#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
780pub struct FlatlandSetInfiniteHitRegionRequest {
781    pub transform_id: TransformId,
782    pub hit_test: HitTestInteraction,
783}
784
785impl fidl::Persistable for FlatlandSetInfiniteHitRegionRequest {}
786
787#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
788pub struct FlatlandSetOpacityRequest {
789    pub transform_id: TransformId,
790    pub value: f32,
791}
792
793impl fidl::Persistable for FlatlandSetOpacityRequest {}
794
795#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
796pub struct FlatlandSetOrientationRequest {
797    pub transform_id: TransformId,
798    pub orientation: Orientation,
799}
800
801impl fidl::Persistable for FlatlandSetOrientationRequest {}
802
803#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
804#[repr(C)]
805pub struct FlatlandSetRootTransformRequest {
806    pub transform_id: TransformId,
807}
808
809impl fidl::Persistable for FlatlandSetRootTransformRequest {}
810
811#[derive(Clone, Debug, PartialEq)]
812pub struct FlatlandSetScaleRequest {
813    pub transform_id: TransformId,
814    pub scale: fidl_fuchsia_math::VecF,
815}
816
817impl fidl::Persistable for FlatlandSetScaleRequest {}
818
819#[derive(Clone, Debug, PartialEq)]
820pub struct FlatlandSetTranslationRequest {
821    pub transform_id: TransformId,
822    pub translation: fidl_fuchsia_math::Vec_,
823}
824
825impl fidl::Persistable for FlatlandSetTranslationRequest {}
826
827#[derive(Clone, Debug, PartialEq)]
828pub struct FlatlandSetViewportPropertiesRequest {
829    pub viewport_id: ContentId,
830    pub properties: ViewportProperties,
831}
832
833impl fidl::Persistable for FlatlandSetViewportPropertiesRequest {}
834
835/// An interactive area of a View, placed in the coordinate space of a specific Transform.
836#[derive(Clone, Debug, PartialEq)]
837pub struct HitRegion {
838    /// The position and size of this hit region, in the coordinate space of the Transform that owns
839    /// this hit region.
840    pub region: fidl_fuchsia_math::RectF,
841    /// The interaction behavior specified for this hit region.
842    /// To specify "no interaction at all", remove this hit region from the owning Transform.
843    pub hit_test: HitTestInteraction,
844}
845
846impl fidl::Persistable for HitRegion {}
847
848#[derive(Clone, Debug, PartialEq)]
849pub struct ParentViewportWatcherGetLayoutResponse {
850    pub info: LayoutInfo,
851}
852
853impl fidl::Persistable for ParentViewportWatcherGetLayoutResponse {}
854
855#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
856pub struct ParentViewportWatcherGetStatusResponse {
857    pub status: ParentViewportStatus,
858}
859
860impl fidl::Persistable for ParentViewportWatcherGetStatusResponse {}
861
862#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
863#[repr(C)]
864pub struct ScreenCaptureReleaseFrameRequest {
865    pub buffer_id: u32,
866}
867
868impl fidl::Persistable for ScreenCaptureReleaseFrameRequest {}
869
870/// A user-defined identifier for a particular transform. See [`CreateTransform`] and
871/// [`ReleaseTransform`] for more information.
872#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
873#[repr(C)]
874pub struct TransformId {
875    pub value: u64,
876}
877
878impl fidl::Persistable for TransformId {}
879
880/// The properties of an Image as defined by the client. These properties determine how an Image
881/// uses the backing BufferCollection. See [`CreateImage`] for more information.
882#[derive(Clone, Debug, Default, PartialEq)]
883pub struct ImageProperties {
884    /// The size of the Image in pixels.
885    pub size: Option<fidl_fuchsia_math::SizeU>,
886    #[doc(hidden)]
887    pub __source_breaking: fidl::marker::SourceBreaking,
888}
889
890impl fidl::Persistable for ImageProperties {}
891
892/// The return type of [`GetLayout`]. This table contains most of the information necessary
893/// for a client to decide how to layout their content in a Flatland instance. This data may be
894/// provided to the client before the command that creates the View is presented, so that the
895/// client may lay out content properly before their first call to [`Present`].
896#[derive(Clone, Debug, Default, PartialEq)]
897pub struct LayoutInfo {
898    /// The layout size of a View in logical pixels, defined by the parent's call to
899    /// [`SetViewportProperties`].
900    ///
901    /// The logical size also serves as the clip boundary of the View. Anything outside the clip
902    /// boundary will not be rendered. Hence, the View's Root Transform has a useful coordinate
903    /// space of (0, 0) to (logical_size.width, logical_size.height).
904    ///
905    /// Clients should re-layout their content when this value changes.
906    pub logical_size: Option<fidl_fuchsia_math::SizeU>,
907    /// The ratio of display's physical pixels to device independent pixels. Each logical pixel of a
908    /// View is displayed on-screen by one or more physical pixels, as determined by this scale.
909    /// Clients should not necessarily re-layout their content when this value changes, but
910    /// accommodate by reallocating their Image buffers to avoid sampling artifacts. The HiDPI-aware
911    /// client should allocate buffers that are sized (`logical_size`*`device_pixel_ratio`).
912    pub device_pixel_ratio: Option<fidl_fuchsia_math::VecF>,
913    /// The offsets between the edges and the visible rectangle of the View. The clients can assume
914    /// that the boundary region between the inset and the View edge is occluded, and should adjust
915    /// content layout to avoid this region. This inset is described in the view's logical
916    /// coordinate system. The HiDPI-aware clients should scale this by `device_pixel_ratio`.
917    pub inset: Option<fidl_fuchsia_math::Inset>,
918    #[doc(hidden)]
919    pub __source_breaking: fidl::marker::SourceBreaking,
920}
921
922impl fidl::Persistable for LayoutInfo {}
923
924/// Fields that a client needs in order to produce its next frame, returned in
925/// [`OnNextFrameBegin`]. Each field is guaranteed to be  set and contain valid information.
926#[derive(Clone, Debug, Default, PartialEq)]
927pub struct OnNextFrameBeginValues {
928    /// The number of *additional* [`Present`] calls allowed to the client so that they
929    /// can call [`Present`] further times. This is a delta in the present
930    /// credit budget, not the absolute number of present credits.
931    pub additional_present_credits: Option<u32>,
932    /// Information about future presentation and latch times that a client may aim for
933    /// precise scheduling behavior.
934    pub future_presentation_infos: Option<Vec<fidl_fuchsia_scenic_scheduling::PresentationInfo>>,
935    #[doc(hidden)]
936    pub __source_breaking: fidl::marker::SourceBreaking,
937}
938
939impl fidl::Persistable for OnNextFrameBeginValues {}
940
941/// The properties of a Viewport as defined by the parent. This data, along with the set of attached
942/// Transforms, will be used to compute the LayoutInfo for the View of the Viewport.
943/// `ViewportProperties` must have `logical_size` set at least once. This is the initial size that
944/// will drive the layout of the child.
945#[derive(Clone, Debug, Default, PartialEq)]
946pub struct ViewportProperties {
947    /// The size of the Viewport in logical pixels. This maps directly to the logical_size field in
948    /// LayoutInfo. The valid logical_size must have positive X and Y components.
949    pub logical_size: Option<fidl_fuchsia_math::SizeU>,
950    /// The offsets between the edges and the visible rectangle of the Viewport. This maps directly
951    /// to the `inset` field in LayoutInfo. The valid inset must have all components greater than or
952    /// equal to 0.
953    pub inset: Option<fidl_fuchsia_math::Inset>,
954    #[doc(hidden)]
955    pub __source_breaking: fidl::marker::SourceBreaking,
956}
957
958impl fidl::Persistable for ViewportProperties {}
959
960mod internal {
961    use super::*;
962    unsafe impl fidl::encoding::TypeMarker for RegisterBufferCollectionUsages {
963        type Owned = Self;
964
965        #[inline(always)]
966        fn inline_align(_context: fidl::encoding::Context) -> usize {
967            2
968        }
969
970        #[inline(always)]
971        fn inline_size(_context: fidl::encoding::Context) -> usize {
972            2
973        }
974    }
975
976    impl fidl::encoding::ValueTypeMarker for RegisterBufferCollectionUsages {
977        type Borrowed<'a> = Self;
978        #[inline(always)]
979        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
980            *value
981        }
982    }
983
984    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
985        for RegisterBufferCollectionUsages
986    {
987        #[inline]
988        unsafe fn encode(
989            self,
990            encoder: &mut fidl::encoding::Encoder<'_, D>,
991            offset: usize,
992            _depth: fidl::encoding::Depth,
993        ) -> fidl::Result<()> {
994            encoder.debug_check_bounds::<Self>(offset);
995            encoder.write_num(self.bits(), offset);
996            Ok(())
997        }
998    }
999
1000    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1001        for RegisterBufferCollectionUsages
1002    {
1003        #[inline(always)]
1004        fn new_empty() -> Self {
1005            Self::empty()
1006        }
1007
1008        #[inline]
1009        unsafe fn decode(
1010            &mut self,
1011            decoder: &mut fidl::encoding::Decoder<'_, D>,
1012            offset: usize,
1013            _depth: fidl::encoding::Depth,
1014        ) -> fidl::Result<()> {
1015            decoder.debug_check_bounds::<Self>(offset);
1016            let prim = decoder.read_num::<u16>(offset);
1017            *self = Self::from_bits_allow_unknown(prim);
1018            Ok(())
1019        }
1020    }
1021    unsafe impl fidl::encoding::TypeMarker for BlendMode {
1022        type Owned = Self;
1023
1024        #[inline(always)]
1025        fn inline_align(_context: fidl::encoding::Context) -> usize {
1026            std::mem::align_of::<u32>()
1027        }
1028
1029        #[inline(always)]
1030        fn inline_size(_context: fidl::encoding::Context) -> usize {
1031            std::mem::size_of::<u32>()
1032        }
1033
1034        #[inline(always)]
1035        fn encode_is_copy() -> bool {
1036            true
1037        }
1038
1039        #[inline(always)]
1040        fn decode_is_copy() -> bool {
1041            false
1042        }
1043    }
1044
1045    impl fidl::encoding::ValueTypeMarker for BlendMode {
1046        type Borrowed<'a> = Self;
1047        #[inline(always)]
1048        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1049            *value
1050        }
1051    }
1052
1053    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for BlendMode {
1054        #[inline]
1055        unsafe fn encode(
1056            self,
1057            encoder: &mut fidl::encoding::Encoder<'_, D>,
1058            offset: usize,
1059            _depth: fidl::encoding::Depth,
1060        ) -> fidl::Result<()> {
1061            encoder.debug_check_bounds::<Self>(offset);
1062            encoder.write_num(self.into_primitive(), offset);
1063            Ok(())
1064        }
1065    }
1066
1067    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BlendMode {
1068        #[inline(always)]
1069        fn new_empty() -> Self {
1070            Self::Src
1071        }
1072
1073        #[inline]
1074        unsafe fn decode(
1075            &mut self,
1076            decoder: &mut fidl::encoding::Decoder<'_, D>,
1077            offset: usize,
1078            _depth: fidl::encoding::Depth,
1079        ) -> fidl::Result<()> {
1080            decoder.debug_check_bounds::<Self>(offset);
1081            let prim = decoder.read_num::<u32>(offset);
1082
1083            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1084            Ok(())
1085        }
1086    }
1087    unsafe impl fidl::encoding::TypeMarker for ChildViewStatus {
1088        type Owned = Self;
1089
1090        #[inline(always)]
1091        fn inline_align(_context: fidl::encoding::Context) -> usize {
1092            std::mem::align_of::<u32>()
1093        }
1094
1095        #[inline(always)]
1096        fn inline_size(_context: fidl::encoding::Context) -> usize {
1097            std::mem::size_of::<u32>()
1098        }
1099
1100        #[inline(always)]
1101        fn encode_is_copy() -> bool {
1102            true
1103        }
1104
1105        #[inline(always)]
1106        fn decode_is_copy() -> bool {
1107            false
1108        }
1109    }
1110
1111    impl fidl::encoding::ValueTypeMarker for ChildViewStatus {
1112        type Borrowed<'a> = Self;
1113        #[inline(always)]
1114        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1115            *value
1116        }
1117    }
1118
1119    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1120        for ChildViewStatus
1121    {
1122        #[inline]
1123        unsafe fn encode(
1124            self,
1125            encoder: &mut fidl::encoding::Encoder<'_, D>,
1126            offset: usize,
1127            _depth: fidl::encoding::Depth,
1128        ) -> fidl::Result<()> {
1129            encoder.debug_check_bounds::<Self>(offset);
1130            encoder.write_num(self.into_primitive(), offset);
1131            Ok(())
1132        }
1133    }
1134
1135    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ChildViewStatus {
1136        #[inline(always)]
1137        fn new_empty() -> Self {
1138            Self::ContentHasPresented
1139        }
1140
1141        #[inline]
1142        unsafe fn decode(
1143            &mut self,
1144            decoder: &mut fidl::encoding::Decoder<'_, D>,
1145            offset: usize,
1146            _depth: fidl::encoding::Depth,
1147        ) -> fidl::Result<()> {
1148            decoder.debug_check_bounds::<Self>(offset);
1149            let prim = decoder.read_num::<u32>(offset);
1150
1151            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1152            Ok(())
1153        }
1154    }
1155    unsafe impl fidl::encoding::TypeMarker for FlatlandError {
1156        type Owned = Self;
1157
1158        #[inline(always)]
1159        fn inline_align(_context: fidl::encoding::Context) -> usize {
1160            std::mem::align_of::<u32>()
1161        }
1162
1163        #[inline(always)]
1164        fn inline_size(_context: fidl::encoding::Context) -> usize {
1165            std::mem::size_of::<u32>()
1166        }
1167
1168        #[inline(always)]
1169        fn encode_is_copy() -> bool {
1170            true
1171        }
1172
1173        #[inline(always)]
1174        fn decode_is_copy() -> bool {
1175            false
1176        }
1177    }
1178
1179    impl fidl::encoding::ValueTypeMarker for FlatlandError {
1180        type Borrowed<'a> = Self;
1181        #[inline(always)]
1182        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1183            *value
1184        }
1185    }
1186
1187    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for FlatlandError {
1188        #[inline]
1189        unsafe fn encode(
1190            self,
1191            encoder: &mut fidl::encoding::Encoder<'_, D>,
1192            offset: usize,
1193            _depth: fidl::encoding::Depth,
1194        ) -> fidl::Result<()> {
1195            encoder.debug_check_bounds::<Self>(offset);
1196            encoder.write_num(self.into_primitive(), offset);
1197            Ok(())
1198        }
1199    }
1200
1201    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FlatlandError {
1202        #[inline(always)]
1203        fn new_empty() -> Self {
1204            Self::BadOperation
1205        }
1206
1207        #[inline]
1208        unsafe fn decode(
1209            &mut self,
1210            decoder: &mut fidl::encoding::Decoder<'_, D>,
1211            offset: usize,
1212            _depth: fidl::encoding::Depth,
1213        ) -> fidl::Result<()> {
1214            decoder.debug_check_bounds::<Self>(offset);
1215            let prim = decoder.read_num::<u32>(offset);
1216
1217            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1218            Ok(())
1219        }
1220    }
1221    unsafe impl fidl::encoding::TypeMarker for HitTestInteraction {
1222        type Owned = Self;
1223
1224        #[inline(always)]
1225        fn inline_align(_context: fidl::encoding::Context) -> usize {
1226            std::mem::align_of::<u8>()
1227        }
1228
1229        #[inline(always)]
1230        fn inline_size(_context: fidl::encoding::Context) -> usize {
1231            std::mem::size_of::<u8>()
1232        }
1233
1234        #[inline(always)]
1235        fn encode_is_copy() -> bool {
1236            false
1237        }
1238
1239        #[inline(always)]
1240        fn decode_is_copy() -> bool {
1241            false
1242        }
1243    }
1244
1245    impl fidl::encoding::ValueTypeMarker for HitTestInteraction {
1246        type Borrowed<'a> = Self;
1247        #[inline(always)]
1248        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1249            *value
1250        }
1251    }
1252
1253    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1254        for HitTestInteraction
1255    {
1256        #[inline]
1257        unsafe fn encode(
1258            self,
1259            encoder: &mut fidl::encoding::Encoder<'_, D>,
1260            offset: usize,
1261            _depth: fidl::encoding::Depth,
1262        ) -> fidl::Result<()> {
1263            encoder.debug_check_bounds::<Self>(offset);
1264            encoder.write_num(self.into_primitive(), offset);
1265            Ok(())
1266        }
1267    }
1268
1269    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for HitTestInteraction {
1270        #[inline(always)]
1271        fn new_empty() -> Self {
1272            Self::unknown()
1273        }
1274
1275        #[inline]
1276        unsafe fn decode(
1277            &mut self,
1278            decoder: &mut fidl::encoding::Decoder<'_, D>,
1279            offset: usize,
1280            _depth: fidl::encoding::Depth,
1281        ) -> fidl::Result<()> {
1282            decoder.debug_check_bounds::<Self>(offset);
1283            let prim = decoder.read_num::<u8>(offset);
1284
1285            *self = Self::from_primitive_allow_unknown(prim);
1286            Ok(())
1287        }
1288    }
1289    unsafe impl fidl::encoding::TypeMarker for ImageFlip {
1290        type Owned = Self;
1291
1292        #[inline(always)]
1293        fn inline_align(_context: fidl::encoding::Context) -> usize {
1294            std::mem::align_of::<u32>()
1295        }
1296
1297        #[inline(always)]
1298        fn inline_size(_context: fidl::encoding::Context) -> usize {
1299            std::mem::size_of::<u32>()
1300        }
1301
1302        #[inline(always)]
1303        fn encode_is_copy() -> bool {
1304            true
1305        }
1306
1307        #[inline(always)]
1308        fn decode_is_copy() -> bool {
1309            false
1310        }
1311    }
1312
1313    impl fidl::encoding::ValueTypeMarker for ImageFlip {
1314        type Borrowed<'a> = Self;
1315        #[inline(always)]
1316        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1317            *value
1318        }
1319    }
1320
1321    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ImageFlip {
1322        #[inline]
1323        unsafe fn encode(
1324            self,
1325            encoder: &mut fidl::encoding::Encoder<'_, D>,
1326            offset: usize,
1327            _depth: fidl::encoding::Depth,
1328        ) -> fidl::Result<()> {
1329            encoder.debug_check_bounds::<Self>(offset);
1330            encoder.write_num(self.into_primitive(), offset);
1331            Ok(())
1332        }
1333    }
1334
1335    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ImageFlip {
1336        #[inline(always)]
1337        fn new_empty() -> Self {
1338            Self::None
1339        }
1340
1341        #[inline]
1342        unsafe fn decode(
1343            &mut self,
1344            decoder: &mut fidl::encoding::Decoder<'_, D>,
1345            offset: usize,
1346            _depth: fidl::encoding::Depth,
1347        ) -> fidl::Result<()> {
1348            decoder.debug_check_bounds::<Self>(offset);
1349            let prim = decoder.read_num::<u32>(offset);
1350
1351            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1352            Ok(())
1353        }
1354    }
1355    unsafe impl fidl::encoding::TypeMarker for Orientation {
1356        type Owned = Self;
1357
1358        #[inline(always)]
1359        fn inline_align(_context: fidl::encoding::Context) -> usize {
1360            std::mem::align_of::<u32>()
1361        }
1362
1363        #[inline(always)]
1364        fn inline_size(_context: fidl::encoding::Context) -> usize {
1365            std::mem::size_of::<u32>()
1366        }
1367
1368        #[inline(always)]
1369        fn encode_is_copy() -> bool {
1370            true
1371        }
1372
1373        #[inline(always)]
1374        fn decode_is_copy() -> bool {
1375            false
1376        }
1377    }
1378
1379    impl fidl::encoding::ValueTypeMarker for Orientation {
1380        type Borrowed<'a> = Self;
1381        #[inline(always)]
1382        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1383            *value
1384        }
1385    }
1386
1387    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Orientation {
1388        #[inline]
1389        unsafe fn encode(
1390            self,
1391            encoder: &mut fidl::encoding::Encoder<'_, D>,
1392            offset: usize,
1393            _depth: fidl::encoding::Depth,
1394        ) -> fidl::Result<()> {
1395            encoder.debug_check_bounds::<Self>(offset);
1396            encoder.write_num(self.into_primitive(), offset);
1397            Ok(())
1398        }
1399    }
1400
1401    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Orientation {
1402        #[inline(always)]
1403        fn new_empty() -> Self {
1404            Self::Ccw0Degrees
1405        }
1406
1407        #[inline]
1408        unsafe fn decode(
1409            &mut self,
1410            decoder: &mut fidl::encoding::Decoder<'_, D>,
1411            offset: usize,
1412            _depth: fidl::encoding::Depth,
1413        ) -> fidl::Result<()> {
1414            decoder.debug_check_bounds::<Self>(offset);
1415            let prim = decoder.read_num::<u32>(offset);
1416
1417            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1418            Ok(())
1419        }
1420    }
1421    unsafe impl fidl::encoding::TypeMarker for ParentViewportStatus {
1422        type Owned = Self;
1423
1424        #[inline(always)]
1425        fn inline_align(_context: fidl::encoding::Context) -> usize {
1426            std::mem::align_of::<u32>()
1427        }
1428
1429        #[inline(always)]
1430        fn inline_size(_context: fidl::encoding::Context) -> usize {
1431            std::mem::size_of::<u32>()
1432        }
1433
1434        #[inline(always)]
1435        fn encode_is_copy() -> bool {
1436            true
1437        }
1438
1439        #[inline(always)]
1440        fn decode_is_copy() -> bool {
1441            false
1442        }
1443    }
1444
1445    impl fidl::encoding::ValueTypeMarker for ParentViewportStatus {
1446        type Borrowed<'a> = Self;
1447        #[inline(always)]
1448        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1449            *value
1450        }
1451    }
1452
1453    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1454        for ParentViewportStatus
1455    {
1456        #[inline]
1457        unsafe fn encode(
1458            self,
1459            encoder: &mut fidl::encoding::Encoder<'_, D>,
1460            offset: usize,
1461            _depth: fidl::encoding::Depth,
1462        ) -> fidl::Result<()> {
1463            encoder.debug_check_bounds::<Self>(offset);
1464            encoder.write_num(self.into_primitive(), offset);
1465            Ok(())
1466        }
1467    }
1468
1469    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ParentViewportStatus {
1470        #[inline(always)]
1471        fn new_empty() -> Self {
1472            Self::ConnectedToDisplay
1473        }
1474
1475        #[inline]
1476        unsafe fn decode(
1477            &mut self,
1478            decoder: &mut fidl::encoding::Decoder<'_, D>,
1479            offset: usize,
1480            _depth: fidl::encoding::Depth,
1481        ) -> fidl::Result<()> {
1482            decoder.debug_check_bounds::<Self>(offset);
1483            let prim = decoder.read_num::<u32>(offset);
1484
1485            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1486            Ok(())
1487        }
1488    }
1489    unsafe impl fidl::encoding::TypeMarker for RegisterBufferCollectionError {
1490        type Owned = Self;
1491
1492        #[inline(always)]
1493        fn inline_align(_context: fidl::encoding::Context) -> usize {
1494            std::mem::align_of::<u32>()
1495        }
1496
1497        #[inline(always)]
1498        fn inline_size(_context: fidl::encoding::Context) -> usize {
1499            std::mem::size_of::<u32>()
1500        }
1501
1502        #[inline(always)]
1503        fn encode_is_copy() -> bool {
1504            true
1505        }
1506
1507        #[inline(always)]
1508        fn decode_is_copy() -> bool {
1509            false
1510        }
1511    }
1512
1513    impl fidl::encoding::ValueTypeMarker for RegisterBufferCollectionError {
1514        type Borrowed<'a> = Self;
1515        #[inline(always)]
1516        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1517            *value
1518        }
1519    }
1520
1521    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1522        for RegisterBufferCollectionError
1523    {
1524        #[inline]
1525        unsafe fn encode(
1526            self,
1527            encoder: &mut fidl::encoding::Encoder<'_, D>,
1528            offset: usize,
1529            _depth: fidl::encoding::Depth,
1530        ) -> fidl::Result<()> {
1531            encoder.debug_check_bounds::<Self>(offset);
1532            encoder.write_num(self.into_primitive(), offset);
1533            Ok(())
1534        }
1535    }
1536
1537    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1538        for RegisterBufferCollectionError
1539    {
1540        #[inline(always)]
1541        fn new_empty() -> Self {
1542            Self::BadOperation
1543        }
1544
1545        #[inline]
1546        unsafe fn decode(
1547            &mut self,
1548            decoder: &mut fidl::encoding::Decoder<'_, D>,
1549            offset: usize,
1550            _depth: fidl::encoding::Depth,
1551        ) -> fidl::Result<()> {
1552            decoder.debug_check_bounds::<Self>(offset);
1553            let prim = decoder.read_num::<u32>(offset);
1554
1555            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1556            Ok(())
1557        }
1558    }
1559    unsafe impl fidl::encoding::TypeMarker for RegisterBufferCollectionUsage {
1560        type Owned = Self;
1561
1562        #[inline(always)]
1563        fn inline_align(_context: fidl::encoding::Context) -> usize {
1564            std::mem::align_of::<u32>()
1565        }
1566
1567        #[inline(always)]
1568        fn inline_size(_context: fidl::encoding::Context) -> usize {
1569            std::mem::size_of::<u32>()
1570        }
1571
1572        #[inline(always)]
1573        fn encode_is_copy() -> bool {
1574            true
1575        }
1576
1577        #[inline(always)]
1578        fn decode_is_copy() -> bool {
1579            false
1580        }
1581    }
1582
1583    impl fidl::encoding::ValueTypeMarker for RegisterBufferCollectionUsage {
1584        type Borrowed<'a> = Self;
1585        #[inline(always)]
1586        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1587            *value
1588        }
1589    }
1590
1591    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1592        for RegisterBufferCollectionUsage
1593    {
1594        #[inline]
1595        unsafe fn encode(
1596            self,
1597            encoder: &mut fidl::encoding::Encoder<'_, D>,
1598            offset: usize,
1599            _depth: fidl::encoding::Depth,
1600        ) -> fidl::Result<()> {
1601            encoder.debug_check_bounds::<Self>(offset);
1602            encoder.write_num(self.into_primitive(), offset);
1603            Ok(())
1604        }
1605    }
1606
1607    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1608        for RegisterBufferCollectionUsage
1609    {
1610        #[inline(always)]
1611        fn new_empty() -> Self {
1612            Self::Default
1613        }
1614
1615        #[inline]
1616        unsafe fn decode(
1617            &mut self,
1618            decoder: &mut fidl::encoding::Decoder<'_, D>,
1619            offset: usize,
1620            _depth: fidl::encoding::Depth,
1621        ) -> fidl::Result<()> {
1622            decoder.debug_check_bounds::<Self>(offset);
1623            let prim = decoder.read_num::<u32>(offset);
1624
1625            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1626            Ok(())
1627        }
1628    }
1629    unsafe impl fidl::encoding::TypeMarker for Rotation {
1630        type Owned = Self;
1631
1632        #[inline(always)]
1633        fn inline_align(_context: fidl::encoding::Context) -> usize {
1634            std::mem::align_of::<u32>()
1635        }
1636
1637        #[inline(always)]
1638        fn inline_size(_context: fidl::encoding::Context) -> usize {
1639            std::mem::size_of::<u32>()
1640        }
1641
1642        #[inline(always)]
1643        fn encode_is_copy() -> bool {
1644            true
1645        }
1646
1647        #[inline(always)]
1648        fn decode_is_copy() -> bool {
1649            false
1650        }
1651    }
1652
1653    impl fidl::encoding::ValueTypeMarker for Rotation {
1654        type Borrowed<'a> = Self;
1655        #[inline(always)]
1656        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1657            *value
1658        }
1659    }
1660
1661    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for Rotation {
1662        #[inline]
1663        unsafe fn encode(
1664            self,
1665            encoder: &mut fidl::encoding::Encoder<'_, D>,
1666            offset: usize,
1667            _depth: fidl::encoding::Depth,
1668        ) -> fidl::Result<()> {
1669            encoder.debug_check_bounds::<Self>(offset);
1670            encoder.write_num(self.into_primitive(), offset);
1671            Ok(())
1672        }
1673    }
1674
1675    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Rotation {
1676        #[inline(always)]
1677        fn new_empty() -> Self {
1678            Self::Cw0Degrees
1679        }
1680
1681        #[inline]
1682        unsafe fn decode(
1683            &mut self,
1684            decoder: &mut fidl::encoding::Decoder<'_, D>,
1685            offset: usize,
1686            _depth: fidl::encoding::Depth,
1687        ) -> fidl::Result<()> {
1688            decoder.debug_check_bounds::<Self>(offset);
1689            let prim = decoder.read_num::<u32>(offset);
1690
1691            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1692            Ok(())
1693        }
1694    }
1695    unsafe impl fidl::encoding::TypeMarker for ScreenCaptureError {
1696        type Owned = Self;
1697
1698        #[inline(always)]
1699        fn inline_align(_context: fidl::encoding::Context) -> usize {
1700            std::mem::align_of::<u32>()
1701        }
1702
1703        #[inline(always)]
1704        fn inline_size(_context: fidl::encoding::Context) -> usize {
1705            std::mem::size_of::<u32>()
1706        }
1707
1708        #[inline(always)]
1709        fn encode_is_copy() -> bool {
1710            false
1711        }
1712
1713        #[inline(always)]
1714        fn decode_is_copy() -> bool {
1715            false
1716        }
1717    }
1718
1719    impl fidl::encoding::ValueTypeMarker for ScreenCaptureError {
1720        type Borrowed<'a> = Self;
1721        #[inline(always)]
1722        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1723            *value
1724        }
1725    }
1726
1727    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1728        for ScreenCaptureError
1729    {
1730        #[inline]
1731        unsafe fn encode(
1732            self,
1733            encoder: &mut fidl::encoding::Encoder<'_, D>,
1734            offset: usize,
1735            _depth: fidl::encoding::Depth,
1736        ) -> fidl::Result<()> {
1737            encoder.debug_check_bounds::<Self>(offset);
1738            encoder.write_num(self.into_primitive(), offset);
1739            Ok(())
1740        }
1741    }
1742
1743    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScreenCaptureError {
1744        #[inline(always)]
1745        fn new_empty() -> Self {
1746            Self::unknown()
1747        }
1748
1749        #[inline]
1750        unsafe fn decode(
1751            &mut self,
1752            decoder: &mut fidl::encoding::Decoder<'_, D>,
1753            offset: usize,
1754            _depth: fidl::encoding::Depth,
1755        ) -> fidl::Result<()> {
1756            decoder.debug_check_bounds::<Self>(offset);
1757            let prim = decoder.read_num::<u32>(offset);
1758
1759            *self = Self::from_primitive_allow_unknown(prim);
1760            Ok(())
1761        }
1762    }
1763    unsafe impl fidl::encoding::TypeMarker for ScreenshotFormat {
1764        type Owned = Self;
1765
1766        #[inline(always)]
1767        fn inline_align(_context: fidl::encoding::Context) -> usize {
1768            std::mem::align_of::<u8>()
1769        }
1770
1771        #[inline(always)]
1772        fn inline_size(_context: fidl::encoding::Context) -> usize {
1773            std::mem::size_of::<u8>()
1774        }
1775
1776        #[inline(always)]
1777        fn encode_is_copy() -> bool {
1778            false
1779        }
1780
1781        #[inline(always)]
1782        fn decode_is_copy() -> bool {
1783            false
1784        }
1785    }
1786
1787    impl fidl::encoding::ValueTypeMarker for ScreenshotFormat {
1788        type Borrowed<'a> = Self;
1789        #[inline(always)]
1790        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1791            *value
1792        }
1793    }
1794
1795    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1796        for ScreenshotFormat
1797    {
1798        #[inline]
1799        unsafe fn encode(
1800            self,
1801            encoder: &mut fidl::encoding::Encoder<'_, D>,
1802            offset: usize,
1803            _depth: fidl::encoding::Depth,
1804        ) -> fidl::Result<()> {
1805            encoder.debug_check_bounds::<Self>(offset);
1806            encoder.write_num(self.into_primitive(), offset);
1807            Ok(())
1808        }
1809    }
1810
1811    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ScreenshotFormat {
1812        #[inline(always)]
1813        fn new_empty() -> Self {
1814            Self::unknown()
1815        }
1816
1817        #[inline]
1818        unsafe fn decode(
1819            &mut self,
1820            decoder: &mut fidl::encoding::Decoder<'_, D>,
1821            offset: usize,
1822            _depth: fidl::encoding::Depth,
1823        ) -> fidl::Result<()> {
1824            decoder.debug_check_bounds::<Self>(offset);
1825            let prim = decoder.read_num::<u8>(offset);
1826
1827            *self = Self::from_primitive_allow_unknown(prim);
1828            Ok(())
1829        }
1830    }
1831
1832    impl fidl::encoding::ValueTypeMarker for ChildViewWatcherGetStatusResponse {
1833        type Borrowed<'a> = &'a Self;
1834        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1835            value
1836        }
1837    }
1838
1839    unsafe impl fidl::encoding::TypeMarker for ChildViewWatcherGetStatusResponse {
1840        type Owned = Self;
1841
1842        #[inline(always)]
1843        fn inline_align(_context: fidl::encoding::Context) -> usize {
1844            4
1845        }
1846
1847        #[inline(always)]
1848        fn inline_size(_context: fidl::encoding::Context) -> usize {
1849            4
1850        }
1851    }
1852
1853    unsafe impl<D: fidl::encoding::ResourceDialect>
1854        fidl::encoding::Encode<ChildViewWatcherGetStatusResponse, D>
1855        for &ChildViewWatcherGetStatusResponse
1856    {
1857        #[inline]
1858        unsafe fn encode(
1859            self,
1860            encoder: &mut fidl::encoding::Encoder<'_, D>,
1861            offset: usize,
1862            _depth: fidl::encoding::Depth,
1863        ) -> fidl::Result<()> {
1864            encoder.debug_check_bounds::<ChildViewWatcherGetStatusResponse>(offset);
1865            // Delegate to tuple encoding.
1866            fidl::encoding::Encode::<ChildViewWatcherGetStatusResponse, D>::encode(
1867                (<ChildViewStatus as fidl::encoding::ValueTypeMarker>::borrow(&self.status),),
1868                encoder,
1869                offset,
1870                _depth,
1871            )
1872        }
1873    }
1874    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ChildViewStatus, D>>
1875        fidl::encoding::Encode<ChildViewWatcherGetStatusResponse, D> for (T0,)
1876    {
1877        #[inline]
1878        unsafe fn encode(
1879            self,
1880            encoder: &mut fidl::encoding::Encoder<'_, D>,
1881            offset: usize,
1882            depth: fidl::encoding::Depth,
1883        ) -> fidl::Result<()> {
1884            encoder.debug_check_bounds::<ChildViewWatcherGetStatusResponse>(offset);
1885            // Zero out padding regions. There's no need to apply masks
1886            // because the unmasked parts will be overwritten by fields.
1887            // Write the fields.
1888            self.0.encode(encoder, offset + 0, depth)?;
1889            Ok(())
1890        }
1891    }
1892
1893    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1894        for ChildViewWatcherGetStatusResponse
1895    {
1896        #[inline(always)]
1897        fn new_empty() -> Self {
1898            Self { status: fidl::new_empty!(ChildViewStatus, D) }
1899        }
1900
1901        #[inline]
1902        unsafe fn decode(
1903            &mut self,
1904            decoder: &mut fidl::encoding::Decoder<'_, D>,
1905            offset: usize,
1906            _depth: fidl::encoding::Depth,
1907        ) -> fidl::Result<()> {
1908            decoder.debug_check_bounds::<Self>(offset);
1909            // Verify that padding bytes are zero.
1910            fidl::decode!(ChildViewStatus, D, &mut self.status, decoder, offset + 0, _depth)?;
1911            Ok(())
1912        }
1913    }
1914
1915    impl fidl::encoding::ValueTypeMarker for ColorRgba {
1916        type Borrowed<'a> = &'a Self;
1917        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1918            value
1919        }
1920    }
1921
1922    unsafe impl fidl::encoding::TypeMarker for ColorRgba {
1923        type Owned = Self;
1924
1925        #[inline(always)]
1926        fn inline_align(_context: fidl::encoding::Context) -> usize {
1927            4
1928        }
1929
1930        #[inline(always)]
1931        fn inline_size(_context: fidl::encoding::Context) -> usize {
1932            16
1933        }
1934    }
1935
1936    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ColorRgba, D>
1937        for &ColorRgba
1938    {
1939        #[inline]
1940        unsafe fn encode(
1941            self,
1942            encoder: &mut fidl::encoding::Encoder<'_, D>,
1943            offset: usize,
1944            _depth: fidl::encoding::Depth,
1945        ) -> fidl::Result<()> {
1946            encoder.debug_check_bounds::<ColorRgba>(offset);
1947            // Delegate to tuple encoding.
1948            fidl::encoding::Encode::<ColorRgba, D>::encode(
1949                (
1950                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.red),
1951                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.green),
1952                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.blue),
1953                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.alpha),
1954                ),
1955                encoder,
1956                offset,
1957                _depth,
1958            )
1959        }
1960    }
1961    unsafe impl<
1962            D: fidl::encoding::ResourceDialect,
1963            T0: fidl::encoding::Encode<f32, D>,
1964            T1: fidl::encoding::Encode<f32, D>,
1965            T2: fidl::encoding::Encode<f32, D>,
1966            T3: fidl::encoding::Encode<f32, D>,
1967        > fidl::encoding::Encode<ColorRgba, D> for (T0, T1, T2, T3)
1968    {
1969        #[inline]
1970        unsafe fn encode(
1971            self,
1972            encoder: &mut fidl::encoding::Encoder<'_, D>,
1973            offset: usize,
1974            depth: fidl::encoding::Depth,
1975        ) -> fidl::Result<()> {
1976            encoder.debug_check_bounds::<ColorRgba>(offset);
1977            // Zero out padding regions. There's no need to apply masks
1978            // because the unmasked parts will be overwritten by fields.
1979            // Write the fields.
1980            self.0.encode(encoder, offset + 0, depth)?;
1981            self.1.encode(encoder, offset + 4, depth)?;
1982            self.2.encode(encoder, offset + 8, depth)?;
1983            self.3.encode(encoder, offset + 12, depth)?;
1984            Ok(())
1985        }
1986    }
1987
1988    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ColorRgba {
1989        #[inline(always)]
1990        fn new_empty() -> Self {
1991            Self {
1992                red: fidl::new_empty!(f32, D),
1993                green: fidl::new_empty!(f32, D),
1994                blue: fidl::new_empty!(f32, D),
1995                alpha: fidl::new_empty!(f32, D),
1996            }
1997        }
1998
1999        #[inline]
2000        unsafe fn decode(
2001            &mut self,
2002            decoder: &mut fidl::encoding::Decoder<'_, D>,
2003            offset: usize,
2004            _depth: fidl::encoding::Depth,
2005        ) -> fidl::Result<()> {
2006            decoder.debug_check_bounds::<Self>(offset);
2007            // Verify that padding bytes are zero.
2008            fidl::decode!(f32, D, &mut self.red, decoder, offset + 0, _depth)?;
2009            fidl::decode!(f32, D, &mut self.green, decoder, offset + 4, _depth)?;
2010            fidl::decode!(f32, D, &mut self.blue, decoder, offset + 8, _depth)?;
2011            fidl::decode!(f32, D, &mut self.alpha, decoder, offset + 12, _depth)?;
2012            Ok(())
2013        }
2014    }
2015
2016    impl fidl::encoding::ValueTypeMarker for ContentId {
2017        type Borrowed<'a> = &'a Self;
2018        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2019            value
2020        }
2021    }
2022
2023    unsafe impl fidl::encoding::TypeMarker for ContentId {
2024        type Owned = Self;
2025
2026        #[inline(always)]
2027        fn inline_align(_context: fidl::encoding::Context) -> usize {
2028            8
2029        }
2030
2031        #[inline(always)]
2032        fn inline_size(_context: fidl::encoding::Context) -> usize {
2033            8
2034        }
2035        #[inline(always)]
2036        fn encode_is_copy() -> bool {
2037            true
2038        }
2039
2040        #[inline(always)]
2041        fn decode_is_copy() -> bool {
2042            true
2043        }
2044    }
2045
2046    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ContentId, D>
2047        for &ContentId
2048    {
2049        #[inline]
2050        unsafe fn encode(
2051            self,
2052            encoder: &mut fidl::encoding::Encoder<'_, D>,
2053            offset: usize,
2054            _depth: fidl::encoding::Depth,
2055        ) -> fidl::Result<()> {
2056            encoder.debug_check_bounds::<ContentId>(offset);
2057            unsafe {
2058                // Copy the object into the buffer.
2059                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2060                (buf_ptr as *mut ContentId).write_unaligned((self as *const ContentId).read());
2061                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2062                // done second because the memcpy will write garbage to these bytes.
2063            }
2064            Ok(())
2065        }
2066    }
2067    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2068        fidl::encoding::Encode<ContentId, D> for (T0,)
2069    {
2070        #[inline]
2071        unsafe fn encode(
2072            self,
2073            encoder: &mut fidl::encoding::Encoder<'_, D>,
2074            offset: usize,
2075            depth: fidl::encoding::Depth,
2076        ) -> fidl::Result<()> {
2077            encoder.debug_check_bounds::<ContentId>(offset);
2078            // Zero out padding regions. There's no need to apply masks
2079            // because the unmasked parts will be overwritten by fields.
2080            // Write the fields.
2081            self.0.encode(encoder, offset + 0, depth)?;
2082            Ok(())
2083        }
2084    }
2085
2086    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ContentId {
2087        #[inline(always)]
2088        fn new_empty() -> Self {
2089            Self { value: fidl::new_empty!(u64, D) }
2090        }
2091
2092        #[inline]
2093        unsafe fn decode(
2094            &mut self,
2095            decoder: &mut fidl::encoding::Decoder<'_, D>,
2096            offset: usize,
2097            _depth: fidl::encoding::Depth,
2098        ) -> fidl::Result<()> {
2099            decoder.debug_check_bounds::<Self>(offset);
2100            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2101            // Verify that padding bytes are zero.
2102            // Copy from the buffer into the object.
2103            unsafe {
2104                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2105            }
2106            Ok(())
2107        }
2108    }
2109
2110    impl fidl::encoding::ValueTypeMarker for FlatlandAddChildRequest {
2111        type Borrowed<'a> = &'a Self;
2112        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2113            value
2114        }
2115    }
2116
2117    unsafe impl fidl::encoding::TypeMarker for FlatlandAddChildRequest {
2118        type Owned = Self;
2119
2120        #[inline(always)]
2121        fn inline_align(_context: fidl::encoding::Context) -> usize {
2122            8
2123        }
2124
2125        #[inline(always)]
2126        fn inline_size(_context: fidl::encoding::Context) -> usize {
2127            16
2128        }
2129        #[inline(always)]
2130        fn encode_is_copy() -> bool {
2131            true
2132        }
2133
2134        #[inline(always)]
2135        fn decode_is_copy() -> bool {
2136            true
2137        }
2138    }
2139
2140    unsafe impl<D: fidl::encoding::ResourceDialect>
2141        fidl::encoding::Encode<FlatlandAddChildRequest, D> for &FlatlandAddChildRequest
2142    {
2143        #[inline]
2144        unsafe fn encode(
2145            self,
2146            encoder: &mut fidl::encoding::Encoder<'_, D>,
2147            offset: usize,
2148            _depth: fidl::encoding::Depth,
2149        ) -> fidl::Result<()> {
2150            encoder.debug_check_bounds::<FlatlandAddChildRequest>(offset);
2151            unsafe {
2152                // Copy the object into the buffer.
2153                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2154                (buf_ptr as *mut FlatlandAddChildRequest)
2155                    .write_unaligned((self as *const FlatlandAddChildRequest).read());
2156                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2157                // done second because the memcpy will write garbage to these bytes.
2158            }
2159            Ok(())
2160        }
2161    }
2162    unsafe impl<
2163            D: fidl::encoding::ResourceDialect,
2164            T0: fidl::encoding::Encode<TransformId, D>,
2165            T1: fidl::encoding::Encode<TransformId, D>,
2166        > fidl::encoding::Encode<FlatlandAddChildRequest, D> for (T0, T1)
2167    {
2168        #[inline]
2169        unsafe fn encode(
2170            self,
2171            encoder: &mut fidl::encoding::Encoder<'_, D>,
2172            offset: usize,
2173            depth: fidl::encoding::Depth,
2174        ) -> fidl::Result<()> {
2175            encoder.debug_check_bounds::<FlatlandAddChildRequest>(offset);
2176            // Zero out padding regions. There's no need to apply masks
2177            // because the unmasked parts will be overwritten by fields.
2178            // Write the fields.
2179            self.0.encode(encoder, offset + 0, depth)?;
2180            self.1.encode(encoder, offset + 8, depth)?;
2181            Ok(())
2182        }
2183    }
2184
2185    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2186        for FlatlandAddChildRequest
2187    {
2188        #[inline(always)]
2189        fn new_empty() -> Self {
2190            Self {
2191                parent_transform_id: fidl::new_empty!(TransformId, D),
2192                child_transform_id: fidl::new_empty!(TransformId, D),
2193            }
2194        }
2195
2196        #[inline]
2197        unsafe fn decode(
2198            &mut self,
2199            decoder: &mut fidl::encoding::Decoder<'_, D>,
2200            offset: usize,
2201            _depth: fidl::encoding::Depth,
2202        ) -> fidl::Result<()> {
2203            decoder.debug_check_bounds::<Self>(offset);
2204            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2205            // Verify that padding bytes are zero.
2206            // Copy from the buffer into the object.
2207            unsafe {
2208                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
2209            }
2210            Ok(())
2211        }
2212    }
2213
2214    impl fidl::encoding::ValueTypeMarker for FlatlandCreateTransformRequest {
2215        type Borrowed<'a> = &'a Self;
2216        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2217            value
2218        }
2219    }
2220
2221    unsafe impl fidl::encoding::TypeMarker for FlatlandCreateTransformRequest {
2222        type Owned = Self;
2223
2224        #[inline(always)]
2225        fn inline_align(_context: fidl::encoding::Context) -> usize {
2226            8
2227        }
2228
2229        #[inline(always)]
2230        fn inline_size(_context: fidl::encoding::Context) -> usize {
2231            8
2232        }
2233        #[inline(always)]
2234        fn encode_is_copy() -> bool {
2235            true
2236        }
2237
2238        #[inline(always)]
2239        fn decode_is_copy() -> bool {
2240            true
2241        }
2242    }
2243
2244    unsafe impl<D: fidl::encoding::ResourceDialect>
2245        fidl::encoding::Encode<FlatlandCreateTransformRequest, D>
2246        for &FlatlandCreateTransformRequest
2247    {
2248        #[inline]
2249        unsafe fn encode(
2250            self,
2251            encoder: &mut fidl::encoding::Encoder<'_, D>,
2252            offset: usize,
2253            _depth: fidl::encoding::Depth,
2254        ) -> fidl::Result<()> {
2255            encoder.debug_check_bounds::<FlatlandCreateTransformRequest>(offset);
2256            unsafe {
2257                // Copy the object into the buffer.
2258                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2259                (buf_ptr as *mut FlatlandCreateTransformRequest)
2260                    .write_unaligned((self as *const FlatlandCreateTransformRequest).read());
2261                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2262                // done second because the memcpy will write garbage to these bytes.
2263            }
2264            Ok(())
2265        }
2266    }
2267    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TransformId, D>>
2268        fidl::encoding::Encode<FlatlandCreateTransformRequest, D> for (T0,)
2269    {
2270        #[inline]
2271        unsafe fn encode(
2272            self,
2273            encoder: &mut fidl::encoding::Encoder<'_, D>,
2274            offset: usize,
2275            depth: fidl::encoding::Depth,
2276        ) -> fidl::Result<()> {
2277            encoder.debug_check_bounds::<FlatlandCreateTransformRequest>(offset);
2278            // Zero out padding regions. There's no need to apply masks
2279            // because the unmasked parts will be overwritten by fields.
2280            // Write the fields.
2281            self.0.encode(encoder, offset + 0, depth)?;
2282            Ok(())
2283        }
2284    }
2285
2286    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2287        for FlatlandCreateTransformRequest
2288    {
2289        #[inline(always)]
2290        fn new_empty() -> Self {
2291            Self { transform_id: fidl::new_empty!(TransformId, D) }
2292        }
2293
2294        #[inline]
2295        unsafe fn decode(
2296            &mut self,
2297            decoder: &mut fidl::encoding::Decoder<'_, D>,
2298            offset: usize,
2299            _depth: fidl::encoding::Depth,
2300        ) -> fidl::Result<()> {
2301            decoder.debug_check_bounds::<Self>(offset);
2302            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2303            // Verify that padding bytes are zero.
2304            // Copy from the buffer into the object.
2305            unsafe {
2306                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2307            }
2308            Ok(())
2309        }
2310    }
2311
2312    impl fidl::encoding::ValueTypeMarker for FlatlandDisplaySetDevicePixelRatioRequest {
2313        type Borrowed<'a> = &'a Self;
2314        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2315            value
2316        }
2317    }
2318
2319    unsafe impl fidl::encoding::TypeMarker for FlatlandDisplaySetDevicePixelRatioRequest {
2320        type Owned = Self;
2321
2322        #[inline(always)]
2323        fn inline_align(_context: fidl::encoding::Context) -> usize {
2324            4
2325        }
2326
2327        #[inline(always)]
2328        fn inline_size(_context: fidl::encoding::Context) -> usize {
2329            8
2330        }
2331    }
2332
2333    unsafe impl<D: fidl::encoding::ResourceDialect>
2334        fidl::encoding::Encode<FlatlandDisplaySetDevicePixelRatioRequest, D>
2335        for &FlatlandDisplaySetDevicePixelRatioRequest
2336    {
2337        #[inline]
2338        unsafe fn encode(
2339            self,
2340            encoder: &mut fidl::encoding::Encoder<'_, D>,
2341            offset: usize,
2342            _depth: fidl::encoding::Depth,
2343        ) -> fidl::Result<()> {
2344            encoder.debug_check_bounds::<FlatlandDisplaySetDevicePixelRatioRequest>(offset);
2345            // Delegate to tuple encoding.
2346            fidl::encoding::Encode::<FlatlandDisplaySetDevicePixelRatioRequest, D>::encode(
2347                (<fidl_fuchsia_math::VecF as fidl::encoding::ValueTypeMarker>::borrow(
2348                    &self.device_pixel_ratio,
2349                ),),
2350                encoder,
2351                offset,
2352                _depth,
2353            )
2354        }
2355    }
2356    unsafe impl<
2357            D: fidl::encoding::ResourceDialect,
2358            T0: fidl::encoding::Encode<fidl_fuchsia_math::VecF, D>,
2359        > fidl::encoding::Encode<FlatlandDisplaySetDevicePixelRatioRequest, D> for (T0,)
2360    {
2361        #[inline]
2362        unsafe fn encode(
2363            self,
2364            encoder: &mut fidl::encoding::Encoder<'_, D>,
2365            offset: usize,
2366            depth: fidl::encoding::Depth,
2367        ) -> fidl::Result<()> {
2368            encoder.debug_check_bounds::<FlatlandDisplaySetDevicePixelRatioRequest>(offset);
2369            // Zero out padding regions. There's no need to apply masks
2370            // because the unmasked parts will be overwritten by fields.
2371            // Write the fields.
2372            self.0.encode(encoder, offset + 0, depth)?;
2373            Ok(())
2374        }
2375    }
2376
2377    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2378        for FlatlandDisplaySetDevicePixelRatioRequest
2379    {
2380        #[inline(always)]
2381        fn new_empty() -> Self {
2382            Self { device_pixel_ratio: fidl::new_empty!(fidl_fuchsia_math::VecF, D) }
2383        }
2384
2385        #[inline]
2386        unsafe fn decode(
2387            &mut self,
2388            decoder: &mut fidl::encoding::Decoder<'_, D>,
2389            offset: usize,
2390            _depth: fidl::encoding::Depth,
2391        ) -> fidl::Result<()> {
2392            decoder.debug_check_bounds::<Self>(offset);
2393            // Verify that padding bytes are zero.
2394            fidl::decode!(
2395                fidl_fuchsia_math::VecF,
2396                D,
2397                &mut self.device_pixel_ratio,
2398                decoder,
2399                offset + 0,
2400                _depth
2401            )?;
2402            Ok(())
2403        }
2404    }
2405
2406    impl fidl::encoding::ValueTypeMarker for FlatlandOnErrorRequest {
2407        type Borrowed<'a> = &'a Self;
2408        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2409            value
2410        }
2411    }
2412
2413    unsafe impl fidl::encoding::TypeMarker for FlatlandOnErrorRequest {
2414        type Owned = Self;
2415
2416        #[inline(always)]
2417        fn inline_align(_context: fidl::encoding::Context) -> usize {
2418            4
2419        }
2420
2421        #[inline(always)]
2422        fn inline_size(_context: fidl::encoding::Context) -> usize {
2423            4
2424        }
2425    }
2426
2427    unsafe impl<D: fidl::encoding::ResourceDialect>
2428        fidl::encoding::Encode<FlatlandOnErrorRequest, D> for &FlatlandOnErrorRequest
2429    {
2430        #[inline]
2431        unsafe fn encode(
2432            self,
2433            encoder: &mut fidl::encoding::Encoder<'_, D>,
2434            offset: usize,
2435            _depth: fidl::encoding::Depth,
2436        ) -> fidl::Result<()> {
2437            encoder.debug_check_bounds::<FlatlandOnErrorRequest>(offset);
2438            // Delegate to tuple encoding.
2439            fidl::encoding::Encode::<FlatlandOnErrorRequest, D>::encode(
2440                (<FlatlandError as fidl::encoding::ValueTypeMarker>::borrow(&self.error),),
2441                encoder,
2442                offset,
2443                _depth,
2444            )
2445        }
2446    }
2447    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<FlatlandError, D>>
2448        fidl::encoding::Encode<FlatlandOnErrorRequest, D> for (T0,)
2449    {
2450        #[inline]
2451        unsafe fn encode(
2452            self,
2453            encoder: &mut fidl::encoding::Encoder<'_, D>,
2454            offset: usize,
2455            depth: fidl::encoding::Depth,
2456        ) -> fidl::Result<()> {
2457            encoder.debug_check_bounds::<FlatlandOnErrorRequest>(offset);
2458            // Zero out padding regions. There's no need to apply masks
2459            // because the unmasked parts will be overwritten by fields.
2460            // Write the fields.
2461            self.0.encode(encoder, offset + 0, depth)?;
2462            Ok(())
2463        }
2464    }
2465
2466    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2467        for FlatlandOnErrorRequest
2468    {
2469        #[inline(always)]
2470        fn new_empty() -> Self {
2471            Self { error: fidl::new_empty!(FlatlandError, D) }
2472        }
2473
2474        #[inline]
2475        unsafe fn decode(
2476            &mut self,
2477            decoder: &mut fidl::encoding::Decoder<'_, D>,
2478            offset: usize,
2479            _depth: fidl::encoding::Depth,
2480        ) -> fidl::Result<()> {
2481            decoder.debug_check_bounds::<Self>(offset);
2482            // Verify that padding bytes are zero.
2483            fidl::decode!(FlatlandError, D, &mut self.error, decoder, offset + 0, _depth)?;
2484            Ok(())
2485        }
2486    }
2487
2488    impl fidl::encoding::ValueTypeMarker for FlatlandOnFramePresentedRequest {
2489        type Borrowed<'a> = &'a Self;
2490        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2491            value
2492        }
2493    }
2494
2495    unsafe impl fidl::encoding::TypeMarker for FlatlandOnFramePresentedRequest {
2496        type Owned = Self;
2497
2498        #[inline(always)]
2499        fn inline_align(_context: fidl::encoding::Context) -> usize {
2500            8
2501        }
2502
2503        #[inline(always)]
2504        fn inline_size(_context: fidl::encoding::Context) -> usize {
2505            32
2506        }
2507    }
2508
2509    unsafe impl<D: fidl::encoding::ResourceDialect>
2510        fidl::encoding::Encode<FlatlandOnFramePresentedRequest, D>
2511        for &FlatlandOnFramePresentedRequest
2512    {
2513        #[inline]
2514        unsafe fn encode(
2515            self,
2516            encoder: &mut fidl::encoding::Encoder<'_, D>,
2517            offset: usize,
2518            _depth: fidl::encoding::Depth,
2519        ) -> fidl::Result<()> {
2520            encoder.debug_check_bounds::<FlatlandOnFramePresentedRequest>(offset);
2521            // Delegate to tuple encoding.
2522            fidl::encoding::Encode::<FlatlandOnFramePresentedRequest, D>::encode(
2523                (
2524                    <fidl_fuchsia_scenic_scheduling::FramePresentedInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.frame_presented_info),
2525                ),
2526                encoder, offset, _depth
2527            )
2528        }
2529    }
2530    unsafe impl<
2531            D: fidl::encoding::ResourceDialect,
2532            T0: fidl::encoding::Encode<fidl_fuchsia_scenic_scheduling::FramePresentedInfo, D>,
2533        > fidl::encoding::Encode<FlatlandOnFramePresentedRequest, D> for (T0,)
2534    {
2535        #[inline]
2536        unsafe fn encode(
2537            self,
2538            encoder: &mut fidl::encoding::Encoder<'_, D>,
2539            offset: usize,
2540            depth: fidl::encoding::Depth,
2541        ) -> fidl::Result<()> {
2542            encoder.debug_check_bounds::<FlatlandOnFramePresentedRequest>(offset);
2543            // Zero out padding regions. There's no need to apply masks
2544            // because the unmasked parts will be overwritten by fields.
2545            // Write the fields.
2546            self.0.encode(encoder, offset + 0, depth)?;
2547            Ok(())
2548        }
2549    }
2550
2551    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2552        for FlatlandOnFramePresentedRequest
2553    {
2554        #[inline(always)]
2555        fn new_empty() -> Self {
2556            Self {
2557                frame_presented_info: fidl::new_empty!(
2558                    fidl_fuchsia_scenic_scheduling::FramePresentedInfo,
2559                    D
2560                ),
2561            }
2562        }
2563
2564        #[inline]
2565        unsafe fn decode(
2566            &mut self,
2567            decoder: &mut fidl::encoding::Decoder<'_, D>,
2568            offset: usize,
2569            _depth: fidl::encoding::Depth,
2570        ) -> fidl::Result<()> {
2571            decoder.debug_check_bounds::<Self>(offset);
2572            // Verify that padding bytes are zero.
2573            fidl::decode!(
2574                fidl_fuchsia_scenic_scheduling::FramePresentedInfo,
2575                D,
2576                &mut self.frame_presented_info,
2577                decoder,
2578                offset + 0,
2579                _depth
2580            )?;
2581            Ok(())
2582        }
2583    }
2584
2585    impl fidl::encoding::ValueTypeMarker for FlatlandOnNextFrameBeginRequest {
2586        type Borrowed<'a> = &'a Self;
2587        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2588            value
2589        }
2590    }
2591
2592    unsafe impl fidl::encoding::TypeMarker for FlatlandOnNextFrameBeginRequest {
2593        type Owned = Self;
2594
2595        #[inline(always)]
2596        fn inline_align(_context: fidl::encoding::Context) -> usize {
2597            8
2598        }
2599
2600        #[inline(always)]
2601        fn inline_size(_context: fidl::encoding::Context) -> usize {
2602            16
2603        }
2604    }
2605
2606    unsafe impl<D: fidl::encoding::ResourceDialect>
2607        fidl::encoding::Encode<FlatlandOnNextFrameBeginRequest, D>
2608        for &FlatlandOnNextFrameBeginRequest
2609    {
2610        #[inline]
2611        unsafe fn encode(
2612            self,
2613            encoder: &mut fidl::encoding::Encoder<'_, D>,
2614            offset: usize,
2615            _depth: fidl::encoding::Depth,
2616        ) -> fidl::Result<()> {
2617            encoder.debug_check_bounds::<FlatlandOnNextFrameBeginRequest>(offset);
2618            // Delegate to tuple encoding.
2619            fidl::encoding::Encode::<FlatlandOnNextFrameBeginRequest, D>::encode(
2620                (<OnNextFrameBeginValues as fidl::encoding::ValueTypeMarker>::borrow(&self.values),),
2621                encoder,
2622                offset,
2623                _depth,
2624            )
2625        }
2626    }
2627    unsafe impl<
2628            D: fidl::encoding::ResourceDialect,
2629            T0: fidl::encoding::Encode<OnNextFrameBeginValues, D>,
2630        > fidl::encoding::Encode<FlatlandOnNextFrameBeginRequest, D> for (T0,)
2631    {
2632        #[inline]
2633        unsafe fn encode(
2634            self,
2635            encoder: &mut fidl::encoding::Encoder<'_, D>,
2636            offset: usize,
2637            depth: fidl::encoding::Depth,
2638        ) -> fidl::Result<()> {
2639            encoder.debug_check_bounds::<FlatlandOnNextFrameBeginRequest>(offset);
2640            // Zero out padding regions. There's no need to apply masks
2641            // because the unmasked parts will be overwritten by fields.
2642            // Write the fields.
2643            self.0.encode(encoder, offset + 0, depth)?;
2644            Ok(())
2645        }
2646    }
2647
2648    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2649        for FlatlandOnNextFrameBeginRequest
2650    {
2651        #[inline(always)]
2652        fn new_empty() -> Self {
2653            Self { values: fidl::new_empty!(OnNextFrameBeginValues, D) }
2654        }
2655
2656        #[inline]
2657        unsafe fn decode(
2658            &mut self,
2659            decoder: &mut fidl::encoding::Decoder<'_, D>,
2660            offset: usize,
2661            _depth: fidl::encoding::Depth,
2662        ) -> fidl::Result<()> {
2663            decoder.debug_check_bounds::<Self>(offset);
2664            // Verify that padding bytes are zero.
2665            fidl::decode!(
2666                OnNextFrameBeginValues,
2667                D,
2668                &mut self.values,
2669                decoder,
2670                offset + 0,
2671                _depth
2672            )?;
2673            Ok(())
2674        }
2675    }
2676
2677    impl fidl::encoding::ValueTypeMarker for FlatlandReleaseFilledRectRequest {
2678        type Borrowed<'a> = &'a Self;
2679        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2680            value
2681        }
2682    }
2683
2684    unsafe impl fidl::encoding::TypeMarker for FlatlandReleaseFilledRectRequest {
2685        type Owned = Self;
2686
2687        #[inline(always)]
2688        fn inline_align(_context: fidl::encoding::Context) -> usize {
2689            8
2690        }
2691
2692        #[inline(always)]
2693        fn inline_size(_context: fidl::encoding::Context) -> usize {
2694            8
2695        }
2696        #[inline(always)]
2697        fn encode_is_copy() -> bool {
2698            true
2699        }
2700
2701        #[inline(always)]
2702        fn decode_is_copy() -> bool {
2703            true
2704        }
2705    }
2706
2707    unsafe impl<D: fidl::encoding::ResourceDialect>
2708        fidl::encoding::Encode<FlatlandReleaseFilledRectRequest, D>
2709        for &FlatlandReleaseFilledRectRequest
2710    {
2711        #[inline]
2712        unsafe fn encode(
2713            self,
2714            encoder: &mut fidl::encoding::Encoder<'_, D>,
2715            offset: usize,
2716            _depth: fidl::encoding::Depth,
2717        ) -> fidl::Result<()> {
2718            encoder.debug_check_bounds::<FlatlandReleaseFilledRectRequest>(offset);
2719            unsafe {
2720                // Copy the object into the buffer.
2721                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2722                (buf_ptr as *mut FlatlandReleaseFilledRectRequest)
2723                    .write_unaligned((self as *const FlatlandReleaseFilledRectRequest).read());
2724                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2725                // done second because the memcpy will write garbage to these bytes.
2726            }
2727            Ok(())
2728        }
2729    }
2730    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ContentId, D>>
2731        fidl::encoding::Encode<FlatlandReleaseFilledRectRequest, D> for (T0,)
2732    {
2733        #[inline]
2734        unsafe fn encode(
2735            self,
2736            encoder: &mut fidl::encoding::Encoder<'_, D>,
2737            offset: usize,
2738            depth: fidl::encoding::Depth,
2739        ) -> fidl::Result<()> {
2740            encoder.debug_check_bounds::<FlatlandReleaseFilledRectRequest>(offset);
2741            // Zero out padding regions. There's no need to apply masks
2742            // because the unmasked parts will be overwritten by fields.
2743            // Write the fields.
2744            self.0.encode(encoder, offset + 0, depth)?;
2745            Ok(())
2746        }
2747    }
2748
2749    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2750        for FlatlandReleaseFilledRectRequest
2751    {
2752        #[inline(always)]
2753        fn new_empty() -> Self {
2754            Self { rect_id: fidl::new_empty!(ContentId, D) }
2755        }
2756
2757        #[inline]
2758        unsafe fn decode(
2759            &mut self,
2760            decoder: &mut fidl::encoding::Decoder<'_, D>,
2761            offset: usize,
2762            _depth: fidl::encoding::Depth,
2763        ) -> fidl::Result<()> {
2764            decoder.debug_check_bounds::<Self>(offset);
2765            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2766            // Verify that padding bytes are zero.
2767            // Copy from the buffer into the object.
2768            unsafe {
2769                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2770            }
2771            Ok(())
2772        }
2773    }
2774
2775    impl fidl::encoding::ValueTypeMarker for FlatlandReleaseImageRequest {
2776        type Borrowed<'a> = &'a Self;
2777        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2778            value
2779        }
2780    }
2781
2782    unsafe impl fidl::encoding::TypeMarker for FlatlandReleaseImageRequest {
2783        type Owned = Self;
2784
2785        #[inline(always)]
2786        fn inline_align(_context: fidl::encoding::Context) -> usize {
2787            8
2788        }
2789
2790        #[inline(always)]
2791        fn inline_size(_context: fidl::encoding::Context) -> usize {
2792            8
2793        }
2794        #[inline(always)]
2795        fn encode_is_copy() -> bool {
2796            true
2797        }
2798
2799        #[inline(always)]
2800        fn decode_is_copy() -> bool {
2801            true
2802        }
2803    }
2804
2805    unsafe impl<D: fidl::encoding::ResourceDialect>
2806        fidl::encoding::Encode<FlatlandReleaseImageRequest, D> for &FlatlandReleaseImageRequest
2807    {
2808        #[inline]
2809        unsafe fn encode(
2810            self,
2811            encoder: &mut fidl::encoding::Encoder<'_, D>,
2812            offset: usize,
2813            _depth: fidl::encoding::Depth,
2814        ) -> fidl::Result<()> {
2815            encoder.debug_check_bounds::<FlatlandReleaseImageRequest>(offset);
2816            unsafe {
2817                // Copy the object into the buffer.
2818                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2819                (buf_ptr as *mut FlatlandReleaseImageRequest)
2820                    .write_unaligned((self as *const FlatlandReleaseImageRequest).read());
2821                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2822                // done second because the memcpy will write garbage to these bytes.
2823            }
2824            Ok(())
2825        }
2826    }
2827    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ContentId, D>>
2828        fidl::encoding::Encode<FlatlandReleaseImageRequest, D> for (T0,)
2829    {
2830        #[inline]
2831        unsafe fn encode(
2832            self,
2833            encoder: &mut fidl::encoding::Encoder<'_, D>,
2834            offset: usize,
2835            depth: fidl::encoding::Depth,
2836        ) -> fidl::Result<()> {
2837            encoder.debug_check_bounds::<FlatlandReleaseImageRequest>(offset);
2838            // Zero out padding regions. There's no need to apply masks
2839            // because the unmasked parts will be overwritten by fields.
2840            // Write the fields.
2841            self.0.encode(encoder, offset + 0, depth)?;
2842            Ok(())
2843        }
2844    }
2845
2846    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2847        for FlatlandReleaseImageRequest
2848    {
2849        #[inline(always)]
2850        fn new_empty() -> Self {
2851            Self { image_id: fidl::new_empty!(ContentId, D) }
2852        }
2853
2854        #[inline]
2855        unsafe fn decode(
2856            &mut self,
2857            decoder: &mut fidl::encoding::Decoder<'_, D>,
2858            offset: usize,
2859            _depth: fidl::encoding::Depth,
2860        ) -> fidl::Result<()> {
2861            decoder.debug_check_bounds::<Self>(offset);
2862            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2863            // Verify that padding bytes are zero.
2864            // Copy from the buffer into the object.
2865            unsafe {
2866                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2867            }
2868            Ok(())
2869        }
2870    }
2871
2872    impl fidl::encoding::ValueTypeMarker for FlatlandReleaseTransformRequest {
2873        type Borrowed<'a> = &'a Self;
2874        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2875            value
2876        }
2877    }
2878
2879    unsafe impl fidl::encoding::TypeMarker for FlatlandReleaseTransformRequest {
2880        type Owned = Self;
2881
2882        #[inline(always)]
2883        fn inline_align(_context: fidl::encoding::Context) -> usize {
2884            8
2885        }
2886
2887        #[inline(always)]
2888        fn inline_size(_context: fidl::encoding::Context) -> usize {
2889            8
2890        }
2891        #[inline(always)]
2892        fn encode_is_copy() -> bool {
2893            true
2894        }
2895
2896        #[inline(always)]
2897        fn decode_is_copy() -> bool {
2898            true
2899        }
2900    }
2901
2902    unsafe impl<D: fidl::encoding::ResourceDialect>
2903        fidl::encoding::Encode<FlatlandReleaseTransformRequest, D>
2904        for &FlatlandReleaseTransformRequest
2905    {
2906        #[inline]
2907        unsafe fn encode(
2908            self,
2909            encoder: &mut fidl::encoding::Encoder<'_, D>,
2910            offset: usize,
2911            _depth: fidl::encoding::Depth,
2912        ) -> fidl::Result<()> {
2913            encoder.debug_check_bounds::<FlatlandReleaseTransformRequest>(offset);
2914            unsafe {
2915                // Copy the object into the buffer.
2916                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2917                (buf_ptr as *mut FlatlandReleaseTransformRequest)
2918                    .write_unaligned((self as *const FlatlandReleaseTransformRequest).read());
2919                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2920                // done second because the memcpy will write garbage to these bytes.
2921            }
2922            Ok(())
2923        }
2924    }
2925    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TransformId, D>>
2926        fidl::encoding::Encode<FlatlandReleaseTransformRequest, D> for (T0,)
2927    {
2928        #[inline]
2929        unsafe fn encode(
2930            self,
2931            encoder: &mut fidl::encoding::Encoder<'_, D>,
2932            offset: usize,
2933            depth: fidl::encoding::Depth,
2934        ) -> fidl::Result<()> {
2935            encoder.debug_check_bounds::<FlatlandReleaseTransformRequest>(offset);
2936            // Zero out padding regions. There's no need to apply masks
2937            // because the unmasked parts will be overwritten by fields.
2938            // Write the fields.
2939            self.0.encode(encoder, offset + 0, depth)?;
2940            Ok(())
2941        }
2942    }
2943
2944    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2945        for FlatlandReleaseTransformRequest
2946    {
2947        #[inline(always)]
2948        fn new_empty() -> Self {
2949            Self { transform_id: fidl::new_empty!(TransformId, D) }
2950        }
2951
2952        #[inline]
2953        unsafe fn decode(
2954            &mut self,
2955            decoder: &mut fidl::encoding::Decoder<'_, D>,
2956            offset: usize,
2957            _depth: fidl::encoding::Depth,
2958        ) -> fidl::Result<()> {
2959            decoder.debug_check_bounds::<Self>(offset);
2960            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2961            // Verify that padding bytes are zero.
2962            // Copy from the buffer into the object.
2963            unsafe {
2964                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2965            }
2966            Ok(())
2967        }
2968    }
2969
2970    impl fidl::encoding::ValueTypeMarker for FlatlandReleaseViewportRequest {
2971        type Borrowed<'a> = &'a Self;
2972        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2973            value
2974        }
2975    }
2976
2977    unsafe impl fidl::encoding::TypeMarker for FlatlandReleaseViewportRequest {
2978        type Owned = Self;
2979
2980        #[inline(always)]
2981        fn inline_align(_context: fidl::encoding::Context) -> usize {
2982            8
2983        }
2984
2985        #[inline(always)]
2986        fn inline_size(_context: fidl::encoding::Context) -> usize {
2987            8
2988        }
2989        #[inline(always)]
2990        fn encode_is_copy() -> bool {
2991            true
2992        }
2993
2994        #[inline(always)]
2995        fn decode_is_copy() -> bool {
2996            true
2997        }
2998    }
2999
3000    unsafe impl<D: fidl::encoding::ResourceDialect>
3001        fidl::encoding::Encode<FlatlandReleaseViewportRequest, D>
3002        for &FlatlandReleaseViewportRequest
3003    {
3004        #[inline]
3005        unsafe fn encode(
3006            self,
3007            encoder: &mut fidl::encoding::Encoder<'_, D>,
3008            offset: usize,
3009            _depth: fidl::encoding::Depth,
3010        ) -> fidl::Result<()> {
3011            encoder.debug_check_bounds::<FlatlandReleaseViewportRequest>(offset);
3012            unsafe {
3013                // Copy the object into the buffer.
3014                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3015                (buf_ptr as *mut FlatlandReleaseViewportRequest)
3016                    .write_unaligned((self as *const FlatlandReleaseViewportRequest).read());
3017                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3018                // done second because the memcpy will write garbage to these bytes.
3019            }
3020            Ok(())
3021        }
3022    }
3023    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ContentId, D>>
3024        fidl::encoding::Encode<FlatlandReleaseViewportRequest, D> for (T0,)
3025    {
3026        #[inline]
3027        unsafe fn encode(
3028            self,
3029            encoder: &mut fidl::encoding::Encoder<'_, D>,
3030            offset: usize,
3031            depth: fidl::encoding::Depth,
3032        ) -> fidl::Result<()> {
3033            encoder.debug_check_bounds::<FlatlandReleaseViewportRequest>(offset);
3034            // Zero out padding regions. There's no need to apply masks
3035            // because the unmasked parts will be overwritten by fields.
3036            // Write the fields.
3037            self.0.encode(encoder, offset + 0, depth)?;
3038            Ok(())
3039        }
3040    }
3041
3042    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3043        for FlatlandReleaseViewportRequest
3044    {
3045        #[inline(always)]
3046        fn new_empty() -> Self {
3047            Self { viewport_id: fidl::new_empty!(ContentId, D) }
3048        }
3049
3050        #[inline]
3051        unsafe fn decode(
3052            &mut self,
3053            decoder: &mut fidl::encoding::Decoder<'_, D>,
3054            offset: usize,
3055            _depth: fidl::encoding::Depth,
3056        ) -> fidl::Result<()> {
3057            decoder.debug_check_bounds::<Self>(offset);
3058            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3059            // Verify that padding bytes are zero.
3060            // Copy from the buffer into the object.
3061            unsafe {
3062                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3063            }
3064            Ok(())
3065        }
3066    }
3067
3068    impl fidl::encoding::ValueTypeMarker for FlatlandRemoveChildRequest {
3069        type Borrowed<'a> = &'a Self;
3070        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3071            value
3072        }
3073    }
3074
3075    unsafe impl fidl::encoding::TypeMarker for FlatlandRemoveChildRequest {
3076        type Owned = Self;
3077
3078        #[inline(always)]
3079        fn inline_align(_context: fidl::encoding::Context) -> usize {
3080            8
3081        }
3082
3083        #[inline(always)]
3084        fn inline_size(_context: fidl::encoding::Context) -> usize {
3085            16
3086        }
3087        #[inline(always)]
3088        fn encode_is_copy() -> bool {
3089            true
3090        }
3091
3092        #[inline(always)]
3093        fn decode_is_copy() -> bool {
3094            true
3095        }
3096    }
3097
3098    unsafe impl<D: fidl::encoding::ResourceDialect>
3099        fidl::encoding::Encode<FlatlandRemoveChildRequest, D> for &FlatlandRemoveChildRequest
3100    {
3101        #[inline]
3102        unsafe fn encode(
3103            self,
3104            encoder: &mut fidl::encoding::Encoder<'_, D>,
3105            offset: usize,
3106            _depth: fidl::encoding::Depth,
3107        ) -> fidl::Result<()> {
3108            encoder.debug_check_bounds::<FlatlandRemoveChildRequest>(offset);
3109            unsafe {
3110                // Copy the object into the buffer.
3111                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3112                (buf_ptr as *mut FlatlandRemoveChildRequest)
3113                    .write_unaligned((self as *const FlatlandRemoveChildRequest).read());
3114                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3115                // done second because the memcpy will write garbage to these bytes.
3116            }
3117            Ok(())
3118        }
3119    }
3120    unsafe impl<
3121            D: fidl::encoding::ResourceDialect,
3122            T0: fidl::encoding::Encode<TransformId, D>,
3123            T1: fidl::encoding::Encode<TransformId, D>,
3124        > fidl::encoding::Encode<FlatlandRemoveChildRequest, D> for (T0, T1)
3125    {
3126        #[inline]
3127        unsafe fn encode(
3128            self,
3129            encoder: &mut fidl::encoding::Encoder<'_, D>,
3130            offset: usize,
3131            depth: fidl::encoding::Depth,
3132        ) -> fidl::Result<()> {
3133            encoder.debug_check_bounds::<FlatlandRemoveChildRequest>(offset);
3134            // Zero out padding regions. There's no need to apply masks
3135            // because the unmasked parts will be overwritten by fields.
3136            // Write the fields.
3137            self.0.encode(encoder, offset + 0, depth)?;
3138            self.1.encode(encoder, offset + 8, depth)?;
3139            Ok(())
3140        }
3141    }
3142
3143    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3144        for FlatlandRemoveChildRequest
3145    {
3146        #[inline(always)]
3147        fn new_empty() -> Self {
3148            Self {
3149                parent_transform_id: fidl::new_empty!(TransformId, D),
3150                child_transform_id: fidl::new_empty!(TransformId, D),
3151            }
3152        }
3153
3154        #[inline]
3155        unsafe fn decode(
3156            &mut self,
3157            decoder: &mut fidl::encoding::Decoder<'_, D>,
3158            offset: usize,
3159            _depth: fidl::encoding::Depth,
3160        ) -> fidl::Result<()> {
3161            decoder.debug_check_bounds::<Self>(offset);
3162            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3163            // Verify that padding bytes are zero.
3164            // Copy from the buffer into the object.
3165            unsafe {
3166                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
3167            }
3168            Ok(())
3169        }
3170    }
3171
3172    impl fidl::encoding::ValueTypeMarker for FlatlandReplaceChildrenRequest {
3173        type Borrowed<'a> = &'a Self;
3174        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3175            value
3176        }
3177    }
3178
3179    unsafe impl fidl::encoding::TypeMarker for FlatlandReplaceChildrenRequest {
3180        type Owned = Self;
3181
3182        #[inline(always)]
3183        fn inline_align(_context: fidl::encoding::Context) -> usize {
3184            8
3185        }
3186
3187        #[inline(always)]
3188        fn inline_size(_context: fidl::encoding::Context) -> usize {
3189            24
3190        }
3191    }
3192
3193    unsafe impl<D: fidl::encoding::ResourceDialect>
3194        fidl::encoding::Encode<FlatlandReplaceChildrenRequest, D>
3195        for &FlatlandReplaceChildrenRequest
3196    {
3197        #[inline]
3198        unsafe fn encode(
3199            self,
3200            encoder: &mut fidl::encoding::Encoder<'_, D>,
3201            offset: usize,
3202            _depth: fidl::encoding::Depth,
3203        ) -> fidl::Result<()> {
3204            encoder.debug_check_bounds::<FlatlandReplaceChildrenRequest>(offset);
3205            // Delegate to tuple encoding.
3206            fidl::encoding::Encode::<FlatlandReplaceChildrenRequest, D>::encode(
3207                (
3208                    <TransformId as fidl::encoding::ValueTypeMarker>::borrow(&self.parent_transform_id),
3209                    <fidl::encoding::Vector<TransformId, 64> as fidl::encoding::ValueTypeMarker>::borrow(&self.new_child_transform_ids),
3210                ),
3211                encoder, offset, _depth
3212            )
3213        }
3214    }
3215    unsafe impl<
3216            D: fidl::encoding::ResourceDialect,
3217            T0: fidl::encoding::Encode<TransformId, D>,
3218            T1: fidl::encoding::Encode<fidl::encoding::Vector<TransformId, 64>, D>,
3219        > fidl::encoding::Encode<FlatlandReplaceChildrenRequest, D> for (T0, T1)
3220    {
3221        #[inline]
3222        unsafe fn encode(
3223            self,
3224            encoder: &mut fidl::encoding::Encoder<'_, D>,
3225            offset: usize,
3226            depth: fidl::encoding::Depth,
3227        ) -> fidl::Result<()> {
3228            encoder.debug_check_bounds::<FlatlandReplaceChildrenRequest>(offset);
3229            // Zero out padding regions. There's no need to apply masks
3230            // because the unmasked parts will be overwritten by fields.
3231            // Write the fields.
3232            self.0.encode(encoder, offset + 0, depth)?;
3233            self.1.encode(encoder, offset + 8, depth)?;
3234            Ok(())
3235        }
3236    }
3237
3238    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3239        for FlatlandReplaceChildrenRequest
3240    {
3241        #[inline(always)]
3242        fn new_empty() -> Self {
3243            Self {
3244                parent_transform_id: fidl::new_empty!(TransformId, D),
3245                new_child_transform_ids: fidl::new_empty!(fidl::encoding::Vector<TransformId, 64>, D),
3246            }
3247        }
3248
3249        #[inline]
3250        unsafe fn decode(
3251            &mut self,
3252            decoder: &mut fidl::encoding::Decoder<'_, D>,
3253            offset: usize,
3254            _depth: fidl::encoding::Depth,
3255        ) -> fidl::Result<()> {
3256            decoder.debug_check_bounds::<Self>(offset);
3257            // Verify that padding bytes are zero.
3258            fidl::decode!(
3259                TransformId,
3260                D,
3261                &mut self.parent_transform_id,
3262                decoder,
3263                offset + 0,
3264                _depth
3265            )?;
3266            fidl::decode!(fidl::encoding::Vector<TransformId, 64>, D, &mut self.new_child_transform_ids, decoder, offset + 8, _depth)?;
3267            Ok(())
3268        }
3269    }
3270
3271    impl fidl::encoding::ValueTypeMarker for FlatlandSetClipBoundaryRequest {
3272        type Borrowed<'a> = &'a Self;
3273        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3274            value
3275        }
3276    }
3277
3278    unsafe impl fidl::encoding::TypeMarker for FlatlandSetClipBoundaryRequest {
3279        type Owned = Self;
3280
3281        #[inline(always)]
3282        fn inline_align(_context: fidl::encoding::Context) -> usize {
3283            8
3284        }
3285
3286        #[inline(always)]
3287        fn inline_size(_context: fidl::encoding::Context) -> usize {
3288            16
3289        }
3290    }
3291
3292    unsafe impl<D: fidl::encoding::ResourceDialect>
3293        fidl::encoding::Encode<FlatlandSetClipBoundaryRequest, D>
3294        for &FlatlandSetClipBoundaryRequest
3295    {
3296        #[inline]
3297        unsafe fn encode(
3298            self,
3299            encoder: &mut fidl::encoding::Encoder<'_, D>,
3300            offset: usize,
3301            _depth: fidl::encoding::Depth,
3302        ) -> fidl::Result<()> {
3303            encoder.debug_check_bounds::<FlatlandSetClipBoundaryRequest>(offset);
3304            // Delegate to tuple encoding.
3305            fidl::encoding::Encode::<FlatlandSetClipBoundaryRequest, D>::encode(
3306                (
3307                    <TransformId as fidl::encoding::ValueTypeMarker>::borrow(&self.transform_id),
3308                    <fidl::encoding::Boxed<fidl_fuchsia_math::Rect> as fidl::encoding::ValueTypeMarker>::borrow(&self.rect),
3309                ),
3310                encoder, offset, _depth
3311            )
3312        }
3313    }
3314    unsafe impl<
3315            D: fidl::encoding::ResourceDialect,
3316            T0: fidl::encoding::Encode<TransformId, D>,
3317            T1: fidl::encoding::Encode<fidl::encoding::Boxed<fidl_fuchsia_math::Rect>, D>,
3318        > fidl::encoding::Encode<FlatlandSetClipBoundaryRequest, D> for (T0, T1)
3319    {
3320        #[inline]
3321        unsafe fn encode(
3322            self,
3323            encoder: &mut fidl::encoding::Encoder<'_, D>,
3324            offset: usize,
3325            depth: fidl::encoding::Depth,
3326        ) -> fidl::Result<()> {
3327            encoder.debug_check_bounds::<FlatlandSetClipBoundaryRequest>(offset);
3328            // Zero out padding regions. There's no need to apply masks
3329            // because the unmasked parts will be overwritten by fields.
3330            // Write the fields.
3331            self.0.encode(encoder, offset + 0, depth)?;
3332            self.1.encode(encoder, offset + 8, depth)?;
3333            Ok(())
3334        }
3335    }
3336
3337    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3338        for FlatlandSetClipBoundaryRequest
3339    {
3340        #[inline(always)]
3341        fn new_empty() -> Self {
3342            Self {
3343                transform_id: fidl::new_empty!(TransformId, D),
3344                rect: fidl::new_empty!(fidl::encoding::Boxed<fidl_fuchsia_math::Rect>, D),
3345            }
3346        }
3347
3348        #[inline]
3349        unsafe fn decode(
3350            &mut self,
3351            decoder: &mut fidl::encoding::Decoder<'_, D>,
3352            offset: usize,
3353            _depth: fidl::encoding::Depth,
3354        ) -> fidl::Result<()> {
3355            decoder.debug_check_bounds::<Self>(offset);
3356            // Verify that padding bytes are zero.
3357            fidl::decode!(TransformId, D, &mut self.transform_id, decoder, offset + 0, _depth)?;
3358            fidl::decode!(
3359                fidl::encoding::Boxed<fidl_fuchsia_math::Rect>,
3360                D,
3361                &mut self.rect,
3362                decoder,
3363                offset + 8,
3364                _depth
3365            )?;
3366            Ok(())
3367        }
3368    }
3369
3370    impl fidl::encoding::ValueTypeMarker for FlatlandSetContentRequest {
3371        type Borrowed<'a> = &'a Self;
3372        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3373            value
3374        }
3375    }
3376
3377    unsafe impl fidl::encoding::TypeMarker for FlatlandSetContentRequest {
3378        type Owned = Self;
3379
3380        #[inline(always)]
3381        fn inline_align(_context: fidl::encoding::Context) -> usize {
3382            8
3383        }
3384
3385        #[inline(always)]
3386        fn inline_size(_context: fidl::encoding::Context) -> usize {
3387            16
3388        }
3389        #[inline(always)]
3390        fn encode_is_copy() -> bool {
3391            true
3392        }
3393
3394        #[inline(always)]
3395        fn decode_is_copy() -> bool {
3396            true
3397        }
3398    }
3399
3400    unsafe impl<D: fidl::encoding::ResourceDialect>
3401        fidl::encoding::Encode<FlatlandSetContentRequest, D> for &FlatlandSetContentRequest
3402    {
3403        #[inline]
3404        unsafe fn encode(
3405            self,
3406            encoder: &mut fidl::encoding::Encoder<'_, D>,
3407            offset: usize,
3408            _depth: fidl::encoding::Depth,
3409        ) -> fidl::Result<()> {
3410            encoder.debug_check_bounds::<FlatlandSetContentRequest>(offset);
3411            unsafe {
3412                // Copy the object into the buffer.
3413                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3414                (buf_ptr as *mut FlatlandSetContentRequest)
3415                    .write_unaligned((self as *const FlatlandSetContentRequest).read());
3416                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3417                // done second because the memcpy will write garbage to these bytes.
3418            }
3419            Ok(())
3420        }
3421    }
3422    unsafe impl<
3423            D: fidl::encoding::ResourceDialect,
3424            T0: fidl::encoding::Encode<TransformId, D>,
3425            T1: fidl::encoding::Encode<ContentId, D>,
3426        > fidl::encoding::Encode<FlatlandSetContentRequest, D> for (T0, T1)
3427    {
3428        #[inline]
3429        unsafe fn encode(
3430            self,
3431            encoder: &mut fidl::encoding::Encoder<'_, D>,
3432            offset: usize,
3433            depth: fidl::encoding::Depth,
3434        ) -> fidl::Result<()> {
3435            encoder.debug_check_bounds::<FlatlandSetContentRequest>(offset);
3436            // Zero out padding regions. There's no need to apply masks
3437            // because the unmasked parts will be overwritten by fields.
3438            // Write the fields.
3439            self.0.encode(encoder, offset + 0, depth)?;
3440            self.1.encode(encoder, offset + 8, depth)?;
3441            Ok(())
3442        }
3443    }
3444
3445    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3446        for FlatlandSetContentRequest
3447    {
3448        #[inline(always)]
3449        fn new_empty() -> Self {
3450            Self {
3451                transform_id: fidl::new_empty!(TransformId, D),
3452                content_id: fidl::new_empty!(ContentId, D),
3453            }
3454        }
3455
3456        #[inline]
3457        unsafe fn decode(
3458            &mut self,
3459            decoder: &mut fidl::encoding::Decoder<'_, D>,
3460            offset: usize,
3461            _depth: fidl::encoding::Depth,
3462        ) -> fidl::Result<()> {
3463            decoder.debug_check_bounds::<Self>(offset);
3464            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3465            // Verify that padding bytes are zero.
3466            // Copy from the buffer into the object.
3467            unsafe {
3468                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
3469            }
3470            Ok(())
3471        }
3472    }
3473
3474    impl fidl::encoding::ValueTypeMarker for FlatlandSetDebugNameRequest {
3475        type Borrowed<'a> = &'a Self;
3476        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3477            value
3478        }
3479    }
3480
3481    unsafe impl fidl::encoding::TypeMarker for FlatlandSetDebugNameRequest {
3482        type Owned = Self;
3483
3484        #[inline(always)]
3485        fn inline_align(_context: fidl::encoding::Context) -> usize {
3486            8
3487        }
3488
3489        #[inline(always)]
3490        fn inline_size(_context: fidl::encoding::Context) -> usize {
3491            16
3492        }
3493    }
3494
3495    unsafe impl<D: fidl::encoding::ResourceDialect>
3496        fidl::encoding::Encode<FlatlandSetDebugNameRequest, D> for &FlatlandSetDebugNameRequest
3497    {
3498        #[inline]
3499        unsafe fn encode(
3500            self,
3501            encoder: &mut fidl::encoding::Encoder<'_, D>,
3502            offset: usize,
3503            _depth: fidl::encoding::Depth,
3504        ) -> fidl::Result<()> {
3505            encoder.debug_check_bounds::<FlatlandSetDebugNameRequest>(offset);
3506            // Delegate to tuple encoding.
3507            fidl::encoding::Encode::<FlatlandSetDebugNameRequest, D>::encode(
3508                (<fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
3509                    &self.name,
3510                ),),
3511                encoder,
3512                offset,
3513                _depth,
3514            )
3515        }
3516    }
3517    unsafe impl<
3518            D: fidl::encoding::ResourceDialect,
3519            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
3520        > fidl::encoding::Encode<FlatlandSetDebugNameRequest, D> for (T0,)
3521    {
3522        #[inline]
3523        unsafe fn encode(
3524            self,
3525            encoder: &mut fidl::encoding::Encoder<'_, D>,
3526            offset: usize,
3527            depth: fidl::encoding::Depth,
3528        ) -> fidl::Result<()> {
3529            encoder.debug_check_bounds::<FlatlandSetDebugNameRequest>(offset);
3530            // Zero out padding regions. There's no need to apply masks
3531            // because the unmasked parts will be overwritten by fields.
3532            // Write the fields.
3533            self.0.encode(encoder, offset + 0, depth)?;
3534            Ok(())
3535        }
3536    }
3537
3538    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3539        for FlatlandSetDebugNameRequest
3540    {
3541        #[inline(always)]
3542        fn new_empty() -> Self {
3543            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<64>, D) }
3544        }
3545
3546        #[inline]
3547        unsafe fn decode(
3548            &mut self,
3549            decoder: &mut fidl::encoding::Decoder<'_, D>,
3550            offset: usize,
3551            _depth: fidl::encoding::Depth,
3552        ) -> fidl::Result<()> {
3553            decoder.debug_check_bounds::<Self>(offset);
3554            // Verify that padding bytes are zero.
3555            fidl::decode!(
3556                fidl::encoding::BoundedString<64>,
3557                D,
3558                &mut self.name,
3559                decoder,
3560                offset + 0,
3561                _depth
3562            )?;
3563            Ok(())
3564        }
3565    }
3566
3567    impl fidl::encoding::ValueTypeMarker for FlatlandSetHitRegionsRequest {
3568        type Borrowed<'a> = &'a Self;
3569        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3570            value
3571        }
3572    }
3573
3574    unsafe impl fidl::encoding::TypeMarker for FlatlandSetHitRegionsRequest {
3575        type Owned = Self;
3576
3577        #[inline(always)]
3578        fn inline_align(_context: fidl::encoding::Context) -> usize {
3579            8
3580        }
3581
3582        #[inline(always)]
3583        fn inline_size(_context: fidl::encoding::Context) -> usize {
3584            24
3585        }
3586    }
3587
3588    unsafe impl<D: fidl::encoding::ResourceDialect>
3589        fidl::encoding::Encode<FlatlandSetHitRegionsRequest, D> for &FlatlandSetHitRegionsRequest
3590    {
3591        #[inline]
3592        unsafe fn encode(
3593            self,
3594            encoder: &mut fidl::encoding::Encoder<'_, D>,
3595            offset: usize,
3596            _depth: fidl::encoding::Depth,
3597        ) -> fidl::Result<()> {
3598            encoder.debug_check_bounds::<FlatlandSetHitRegionsRequest>(offset);
3599            // Delegate to tuple encoding.
3600            fidl::encoding::Encode::<FlatlandSetHitRegionsRequest, D>::encode(
3601                (
3602                    <TransformId as fidl::encoding::ValueTypeMarker>::borrow(&self.transform_id),
3603                    <fidl::encoding::Vector<HitRegion, 64> as fidl::encoding::ValueTypeMarker>::borrow(&self.regions),
3604                ),
3605                encoder, offset, _depth
3606            )
3607        }
3608    }
3609    unsafe impl<
3610            D: fidl::encoding::ResourceDialect,
3611            T0: fidl::encoding::Encode<TransformId, D>,
3612            T1: fidl::encoding::Encode<fidl::encoding::Vector<HitRegion, 64>, D>,
3613        > fidl::encoding::Encode<FlatlandSetHitRegionsRequest, D> for (T0, T1)
3614    {
3615        #[inline]
3616        unsafe fn encode(
3617            self,
3618            encoder: &mut fidl::encoding::Encoder<'_, D>,
3619            offset: usize,
3620            depth: fidl::encoding::Depth,
3621        ) -> fidl::Result<()> {
3622            encoder.debug_check_bounds::<FlatlandSetHitRegionsRequest>(offset);
3623            // Zero out padding regions. There's no need to apply masks
3624            // because the unmasked parts will be overwritten by fields.
3625            // Write the fields.
3626            self.0.encode(encoder, offset + 0, depth)?;
3627            self.1.encode(encoder, offset + 8, depth)?;
3628            Ok(())
3629        }
3630    }
3631
3632    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3633        for FlatlandSetHitRegionsRequest
3634    {
3635        #[inline(always)]
3636        fn new_empty() -> Self {
3637            Self {
3638                transform_id: fidl::new_empty!(TransformId, D),
3639                regions: fidl::new_empty!(fidl::encoding::Vector<HitRegion, 64>, D),
3640            }
3641        }
3642
3643        #[inline]
3644        unsafe fn decode(
3645            &mut self,
3646            decoder: &mut fidl::encoding::Decoder<'_, D>,
3647            offset: usize,
3648            _depth: fidl::encoding::Depth,
3649        ) -> fidl::Result<()> {
3650            decoder.debug_check_bounds::<Self>(offset);
3651            // Verify that padding bytes are zero.
3652            fidl::decode!(TransformId, D, &mut self.transform_id, decoder, offset + 0, _depth)?;
3653            fidl::decode!(fidl::encoding::Vector<HitRegion, 64>, D, &mut self.regions, decoder, offset + 8, _depth)?;
3654            Ok(())
3655        }
3656    }
3657
3658    impl fidl::encoding::ValueTypeMarker for FlatlandSetImageBlendingFunctionRequest {
3659        type Borrowed<'a> = &'a Self;
3660        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3661            value
3662        }
3663    }
3664
3665    unsafe impl fidl::encoding::TypeMarker for FlatlandSetImageBlendingFunctionRequest {
3666        type Owned = Self;
3667
3668        #[inline(always)]
3669        fn inline_align(_context: fidl::encoding::Context) -> usize {
3670            8
3671        }
3672
3673        #[inline(always)]
3674        fn inline_size(_context: fidl::encoding::Context) -> usize {
3675            16
3676        }
3677    }
3678
3679    unsafe impl<D: fidl::encoding::ResourceDialect>
3680        fidl::encoding::Encode<FlatlandSetImageBlendingFunctionRequest, D>
3681        for &FlatlandSetImageBlendingFunctionRequest
3682    {
3683        #[inline]
3684        unsafe fn encode(
3685            self,
3686            encoder: &mut fidl::encoding::Encoder<'_, D>,
3687            offset: usize,
3688            _depth: fidl::encoding::Depth,
3689        ) -> fidl::Result<()> {
3690            encoder.debug_check_bounds::<FlatlandSetImageBlendingFunctionRequest>(offset);
3691            // Delegate to tuple encoding.
3692            fidl::encoding::Encode::<FlatlandSetImageBlendingFunctionRequest, D>::encode(
3693                (
3694                    <ContentId as fidl::encoding::ValueTypeMarker>::borrow(&self.image_id),
3695                    <BlendMode as fidl::encoding::ValueTypeMarker>::borrow(&self.blend_mode),
3696                ),
3697                encoder,
3698                offset,
3699                _depth,
3700            )
3701        }
3702    }
3703    unsafe impl<
3704            D: fidl::encoding::ResourceDialect,
3705            T0: fidl::encoding::Encode<ContentId, D>,
3706            T1: fidl::encoding::Encode<BlendMode, D>,
3707        > fidl::encoding::Encode<FlatlandSetImageBlendingFunctionRequest, D> for (T0, T1)
3708    {
3709        #[inline]
3710        unsafe fn encode(
3711            self,
3712            encoder: &mut fidl::encoding::Encoder<'_, D>,
3713            offset: usize,
3714            depth: fidl::encoding::Depth,
3715        ) -> fidl::Result<()> {
3716            encoder.debug_check_bounds::<FlatlandSetImageBlendingFunctionRequest>(offset);
3717            // Zero out padding regions. There's no need to apply masks
3718            // because the unmasked parts will be overwritten by fields.
3719            unsafe {
3720                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3721                (ptr as *mut u64).write_unaligned(0);
3722            }
3723            // Write the fields.
3724            self.0.encode(encoder, offset + 0, depth)?;
3725            self.1.encode(encoder, offset + 8, depth)?;
3726            Ok(())
3727        }
3728    }
3729
3730    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3731        for FlatlandSetImageBlendingFunctionRequest
3732    {
3733        #[inline(always)]
3734        fn new_empty() -> Self {
3735            Self {
3736                image_id: fidl::new_empty!(ContentId, D),
3737                blend_mode: fidl::new_empty!(BlendMode, D),
3738            }
3739        }
3740
3741        #[inline]
3742        unsafe fn decode(
3743            &mut self,
3744            decoder: &mut fidl::encoding::Decoder<'_, D>,
3745            offset: usize,
3746            _depth: fidl::encoding::Depth,
3747        ) -> fidl::Result<()> {
3748            decoder.debug_check_bounds::<Self>(offset);
3749            // Verify that padding bytes are zero.
3750            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3751            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3752            let mask = 0xffffffff00000000u64;
3753            let maskedval = padval & mask;
3754            if maskedval != 0 {
3755                return Err(fidl::Error::NonZeroPadding {
3756                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3757                });
3758            }
3759            fidl::decode!(ContentId, D, &mut self.image_id, decoder, offset + 0, _depth)?;
3760            fidl::decode!(BlendMode, D, &mut self.blend_mode, decoder, offset + 8, _depth)?;
3761            Ok(())
3762        }
3763    }
3764
3765    impl fidl::encoding::ValueTypeMarker for FlatlandSetImageDestinationSizeRequest {
3766        type Borrowed<'a> = &'a Self;
3767        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3768            value
3769        }
3770    }
3771
3772    unsafe impl fidl::encoding::TypeMarker for FlatlandSetImageDestinationSizeRequest {
3773        type Owned = Self;
3774
3775        #[inline(always)]
3776        fn inline_align(_context: fidl::encoding::Context) -> usize {
3777            8
3778        }
3779
3780        #[inline(always)]
3781        fn inline_size(_context: fidl::encoding::Context) -> usize {
3782            16
3783        }
3784    }
3785
3786    unsafe impl<D: fidl::encoding::ResourceDialect>
3787        fidl::encoding::Encode<FlatlandSetImageDestinationSizeRequest, D>
3788        for &FlatlandSetImageDestinationSizeRequest
3789    {
3790        #[inline]
3791        unsafe fn encode(
3792            self,
3793            encoder: &mut fidl::encoding::Encoder<'_, D>,
3794            offset: usize,
3795            _depth: fidl::encoding::Depth,
3796        ) -> fidl::Result<()> {
3797            encoder.debug_check_bounds::<FlatlandSetImageDestinationSizeRequest>(offset);
3798            // Delegate to tuple encoding.
3799            fidl::encoding::Encode::<FlatlandSetImageDestinationSizeRequest, D>::encode(
3800                (
3801                    <ContentId as fidl::encoding::ValueTypeMarker>::borrow(&self.image_id),
3802                    <fidl_fuchsia_math::SizeU as fidl::encoding::ValueTypeMarker>::borrow(
3803                        &self.size,
3804                    ),
3805                ),
3806                encoder,
3807                offset,
3808                _depth,
3809            )
3810        }
3811    }
3812    unsafe impl<
3813            D: fidl::encoding::ResourceDialect,
3814            T0: fidl::encoding::Encode<ContentId, D>,
3815            T1: fidl::encoding::Encode<fidl_fuchsia_math::SizeU, D>,
3816        > fidl::encoding::Encode<FlatlandSetImageDestinationSizeRequest, D> for (T0, T1)
3817    {
3818        #[inline]
3819        unsafe fn encode(
3820            self,
3821            encoder: &mut fidl::encoding::Encoder<'_, D>,
3822            offset: usize,
3823            depth: fidl::encoding::Depth,
3824        ) -> fidl::Result<()> {
3825            encoder.debug_check_bounds::<FlatlandSetImageDestinationSizeRequest>(offset);
3826            // Zero out padding regions. There's no need to apply masks
3827            // because the unmasked parts will be overwritten by fields.
3828            // Write the fields.
3829            self.0.encode(encoder, offset + 0, depth)?;
3830            self.1.encode(encoder, offset + 8, depth)?;
3831            Ok(())
3832        }
3833    }
3834
3835    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3836        for FlatlandSetImageDestinationSizeRequest
3837    {
3838        #[inline(always)]
3839        fn new_empty() -> Self {
3840            Self {
3841                image_id: fidl::new_empty!(ContentId, D),
3842                size: fidl::new_empty!(fidl_fuchsia_math::SizeU, D),
3843            }
3844        }
3845
3846        #[inline]
3847        unsafe fn decode(
3848            &mut self,
3849            decoder: &mut fidl::encoding::Decoder<'_, D>,
3850            offset: usize,
3851            _depth: fidl::encoding::Depth,
3852        ) -> fidl::Result<()> {
3853            decoder.debug_check_bounds::<Self>(offset);
3854            // Verify that padding bytes are zero.
3855            fidl::decode!(ContentId, D, &mut self.image_id, decoder, offset + 0, _depth)?;
3856            fidl::decode!(
3857                fidl_fuchsia_math::SizeU,
3858                D,
3859                &mut self.size,
3860                decoder,
3861                offset + 8,
3862                _depth
3863            )?;
3864            Ok(())
3865        }
3866    }
3867
3868    impl fidl::encoding::ValueTypeMarker for FlatlandSetImageFlipRequest {
3869        type Borrowed<'a> = &'a Self;
3870        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3871            value
3872        }
3873    }
3874
3875    unsafe impl fidl::encoding::TypeMarker for FlatlandSetImageFlipRequest {
3876        type Owned = Self;
3877
3878        #[inline(always)]
3879        fn inline_align(_context: fidl::encoding::Context) -> usize {
3880            8
3881        }
3882
3883        #[inline(always)]
3884        fn inline_size(_context: fidl::encoding::Context) -> usize {
3885            16
3886        }
3887    }
3888
3889    unsafe impl<D: fidl::encoding::ResourceDialect>
3890        fidl::encoding::Encode<FlatlandSetImageFlipRequest, D> for &FlatlandSetImageFlipRequest
3891    {
3892        #[inline]
3893        unsafe fn encode(
3894            self,
3895            encoder: &mut fidl::encoding::Encoder<'_, D>,
3896            offset: usize,
3897            _depth: fidl::encoding::Depth,
3898        ) -> fidl::Result<()> {
3899            encoder.debug_check_bounds::<FlatlandSetImageFlipRequest>(offset);
3900            // Delegate to tuple encoding.
3901            fidl::encoding::Encode::<FlatlandSetImageFlipRequest, D>::encode(
3902                (
3903                    <ContentId as fidl::encoding::ValueTypeMarker>::borrow(&self.image_id),
3904                    <ImageFlip as fidl::encoding::ValueTypeMarker>::borrow(&self.flip),
3905                ),
3906                encoder,
3907                offset,
3908                _depth,
3909            )
3910        }
3911    }
3912    unsafe impl<
3913            D: fidl::encoding::ResourceDialect,
3914            T0: fidl::encoding::Encode<ContentId, D>,
3915            T1: fidl::encoding::Encode<ImageFlip, D>,
3916        > fidl::encoding::Encode<FlatlandSetImageFlipRequest, D> for (T0, T1)
3917    {
3918        #[inline]
3919        unsafe fn encode(
3920            self,
3921            encoder: &mut fidl::encoding::Encoder<'_, D>,
3922            offset: usize,
3923            depth: fidl::encoding::Depth,
3924        ) -> fidl::Result<()> {
3925            encoder.debug_check_bounds::<FlatlandSetImageFlipRequest>(offset);
3926            // Zero out padding regions. There's no need to apply masks
3927            // because the unmasked parts will be overwritten by fields.
3928            unsafe {
3929                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3930                (ptr as *mut u64).write_unaligned(0);
3931            }
3932            // Write the fields.
3933            self.0.encode(encoder, offset + 0, depth)?;
3934            self.1.encode(encoder, offset + 8, depth)?;
3935            Ok(())
3936        }
3937    }
3938
3939    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3940        for FlatlandSetImageFlipRequest
3941    {
3942        #[inline(always)]
3943        fn new_empty() -> Self {
3944            Self { image_id: fidl::new_empty!(ContentId, D), flip: fidl::new_empty!(ImageFlip, D) }
3945        }
3946
3947        #[inline]
3948        unsafe fn decode(
3949            &mut self,
3950            decoder: &mut fidl::encoding::Decoder<'_, D>,
3951            offset: usize,
3952            _depth: fidl::encoding::Depth,
3953        ) -> fidl::Result<()> {
3954            decoder.debug_check_bounds::<Self>(offset);
3955            // Verify that padding bytes are zero.
3956            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3957            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3958            let mask = 0xffffffff00000000u64;
3959            let maskedval = padval & mask;
3960            if maskedval != 0 {
3961                return Err(fidl::Error::NonZeroPadding {
3962                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3963                });
3964            }
3965            fidl::decode!(ContentId, D, &mut self.image_id, decoder, offset + 0, _depth)?;
3966            fidl::decode!(ImageFlip, D, &mut self.flip, decoder, offset + 8, _depth)?;
3967            Ok(())
3968        }
3969    }
3970
3971    impl fidl::encoding::ValueTypeMarker for FlatlandSetImageOpacityRequest {
3972        type Borrowed<'a> = &'a Self;
3973        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3974            value
3975        }
3976    }
3977
3978    unsafe impl fidl::encoding::TypeMarker for FlatlandSetImageOpacityRequest {
3979        type Owned = Self;
3980
3981        #[inline(always)]
3982        fn inline_align(_context: fidl::encoding::Context) -> usize {
3983            8
3984        }
3985
3986        #[inline(always)]
3987        fn inline_size(_context: fidl::encoding::Context) -> usize {
3988            16
3989        }
3990    }
3991
3992    unsafe impl<D: fidl::encoding::ResourceDialect>
3993        fidl::encoding::Encode<FlatlandSetImageOpacityRequest, D>
3994        for &FlatlandSetImageOpacityRequest
3995    {
3996        #[inline]
3997        unsafe fn encode(
3998            self,
3999            encoder: &mut fidl::encoding::Encoder<'_, D>,
4000            offset: usize,
4001            _depth: fidl::encoding::Depth,
4002        ) -> fidl::Result<()> {
4003            encoder.debug_check_bounds::<FlatlandSetImageOpacityRequest>(offset);
4004            // Delegate to tuple encoding.
4005            fidl::encoding::Encode::<FlatlandSetImageOpacityRequest, D>::encode(
4006                (
4007                    <ContentId as fidl::encoding::ValueTypeMarker>::borrow(&self.image_id),
4008                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.val),
4009                ),
4010                encoder,
4011                offset,
4012                _depth,
4013            )
4014        }
4015    }
4016    unsafe impl<
4017            D: fidl::encoding::ResourceDialect,
4018            T0: fidl::encoding::Encode<ContentId, D>,
4019            T1: fidl::encoding::Encode<f32, D>,
4020        > fidl::encoding::Encode<FlatlandSetImageOpacityRequest, D> for (T0, T1)
4021    {
4022        #[inline]
4023        unsafe fn encode(
4024            self,
4025            encoder: &mut fidl::encoding::Encoder<'_, D>,
4026            offset: usize,
4027            depth: fidl::encoding::Depth,
4028        ) -> fidl::Result<()> {
4029            encoder.debug_check_bounds::<FlatlandSetImageOpacityRequest>(offset);
4030            // Zero out padding regions. There's no need to apply masks
4031            // because the unmasked parts will be overwritten by fields.
4032            unsafe {
4033                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4034                (ptr as *mut u64).write_unaligned(0);
4035            }
4036            // Write the fields.
4037            self.0.encode(encoder, offset + 0, depth)?;
4038            self.1.encode(encoder, offset + 8, depth)?;
4039            Ok(())
4040        }
4041    }
4042
4043    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4044        for FlatlandSetImageOpacityRequest
4045    {
4046        #[inline(always)]
4047        fn new_empty() -> Self {
4048            Self { image_id: fidl::new_empty!(ContentId, D), val: fidl::new_empty!(f32, D) }
4049        }
4050
4051        #[inline]
4052        unsafe fn decode(
4053            &mut self,
4054            decoder: &mut fidl::encoding::Decoder<'_, D>,
4055            offset: usize,
4056            _depth: fidl::encoding::Depth,
4057        ) -> fidl::Result<()> {
4058            decoder.debug_check_bounds::<Self>(offset);
4059            // Verify that padding bytes are zero.
4060            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4061            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4062            let mask = 0xffffffff00000000u64;
4063            let maskedval = padval & mask;
4064            if maskedval != 0 {
4065                return Err(fidl::Error::NonZeroPadding {
4066                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4067                });
4068            }
4069            fidl::decode!(ContentId, D, &mut self.image_id, decoder, offset + 0, _depth)?;
4070            fidl::decode!(f32, D, &mut self.val, decoder, offset + 8, _depth)?;
4071            Ok(())
4072        }
4073    }
4074
4075    impl fidl::encoding::ValueTypeMarker for FlatlandSetImageSampleRegionRequest {
4076        type Borrowed<'a> = &'a Self;
4077        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4078            value
4079        }
4080    }
4081
4082    unsafe impl fidl::encoding::TypeMarker for FlatlandSetImageSampleRegionRequest {
4083        type Owned = Self;
4084
4085        #[inline(always)]
4086        fn inline_align(_context: fidl::encoding::Context) -> usize {
4087            8
4088        }
4089
4090        #[inline(always)]
4091        fn inline_size(_context: fidl::encoding::Context) -> usize {
4092            24
4093        }
4094    }
4095
4096    unsafe impl<D: fidl::encoding::ResourceDialect>
4097        fidl::encoding::Encode<FlatlandSetImageSampleRegionRequest, D>
4098        for &FlatlandSetImageSampleRegionRequest
4099    {
4100        #[inline]
4101        unsafe fn encode(
4102            self,
4103            encoder: &mut fidl::encoding::Encoder<'_, D>,
4104            offset: usize,
4105            _depth: fidl::encoding::Depth,
4106        ) -> fidl::Result<()> {
4107            encoder.debug_check_bounds::<FlatlandSetImageSampleRegionRequest>(offset);
4108            // Delegate to tuple encoding.
4109            fidl::encoding::Encode::<FlatlandSetImageSampleRegionRequest, D>::encode(
4110                (
4111                    <ContentId as fidl::encoding::ValueTypeMarker>::borrow(&self.image_id),
4112                    <fidl_fuchsia_math::RectF as fidl::encoding::ValueTypeMarker>::borrow(
4113                        &self.rect,
4114                    ),
4115                ),
4116                encoder,
4117                offset,
4118                _depth,
4119            )
4120        }
4121    }
4122    unsafe impl<
4123            D: fidl::encoding::ResourceDialect,
4124            T0: fidl::encoding::Encode<ContentId, D>,
4125            T1: fidl::encoding::Encode<fidl_fuchsia_math::RectF, D>,
4126        > fidl::encoding::Encode<FlatlandSetImageSampleRegionRequest, D> for (T0, T1)
4127    {
4128        #[inline]
4129        unsafe fn encode(
4130            self,
4131            encoder: &mut fidl::encoding::Encoder<'_, D>,
4132            offset: usize,
4133            depth: fidl::encoding::Depth,
4134        ) -> fidl::Result<()> {
4135            encoder.debug_check_bounds::<FlatlandSetImageSampleRegionRequest>(offset);
4136            // Zero out padding regions. There's no need to apply masks
4137            // because the unmasked parts will be overwritten by fields.
4138            // Write the fields.
4139            self.0.encode(encoder, offset + 0, depth)?;
4140            self.1.encode(encoder, offset + 8, depth)?;
4141            Ok(())
4142        }
4143    }
4144
4145    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4146        for FlatlandSetImageSampleRegionRequest
4147    {
4148        #[inline(always)]
4149        fn new_empty() -> Self {
4150            Self {
4151                image_id: fidl::new_empty!(ContentId, D),
4152                rect: fidl::new_empty!(fidl_fuchsia_math::RectF, D),
4153            }
4154        }
4155
4156        #[inline]
4157        unsafe fn decode(
4158            &mut self,
4159            decoder: &mut fidl::encoding::Decoder<'_, D>,
4160            offset: usize,
4161            _depth: fidl::encoding::Depth,
4162        ) -> fidl::Result<()> {
4163            decoder.debug_check_bounds::<Self>(offset);
4164            // Verify that padding bytes are zero.
4165            fidl::decode!(ContentId, D, &mut self.image_id, decoder, offset + 0, _depth)?;
4166            fidl::decode!(
4167                fidl_fuchsia_math::RectF,
4168                D,
4169                &mut self.rect,
4170                decoder,
4171                offset + 8,
4172                _depth
4173            )?;
4174            Ok(())
4175        }
4176    }
4177
4178    impl fidl::encoding::ValueTypeMarker for FlatlandSetInfiniteHitRegionRequest {
4179        type Borrowed<'a> = &'a Self;
4180        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4181            value
4182        }
4183    }
4184
4185    unsafe impl fidl::encoding::TypeMarker for FlatlandSetInfiniteHitRegionRequest {
4186        type Owned = Self;
4187
4188        #[inline(always)]
4189        fn inline_align(_context: fidl::encoding::Context) -> usize {
4190            8
4191        }
4192
4193        #[inline(always)]
4194        fn inline_size(_context: fidl::encoding::Context) -> usize {
4195            16
4196        }
4197    }
4198
4199    unsafe impl<D: fidl::encoding::ResourceDialect>
4200        fidl::encoding::Encode<FlatlandSetInfiniteHitRegionRequest, D>
4201        for &FlatlandSetInfiniteHitRegionRequest
4202    {
4203        #[inline]
4204        unsafe fn encode(
4205            self,
4206            encoder: &mut fidl::encoding::Encoder<'_, D>,
4207            offset: usize,
4208            _depth: fidl::encoding::Depth,
4209        ) -> fidl::Result<()> {
4210            encoder.debug_check_bounds::<FlatlandSetInfiniteHitRegionRequest>(offset);
4211            // Delegate to tuple encoding.
4212            fidl::encoding::Encode::<FlatlandSetInfiniteHitRegionRequest, D>::encode(
4213                (
4214                    <TransformId as fidl::encoding::ValueTypeMarker>::borrow(&self.transform_id),
4215                    <HitTestInteraction as fidl::encoding::ValueTypeMarker>::borrow(&self.hit_test),
4216                ),
4217                encoder,
4218                offset,
4219                _depth,
4220            )
4221        }
4222    }
4223    unsafe impl<
4224            D: fidl::encoding::ResourceDialect,
4225            T0: fidl::encoding::Encode<TransformId, D>,
4226            T1: fidl::encoding::Encode<HitTestInteraction, D>,
4227        > fidl::encoding::Encode<FlatlandSetInfiniteHitRegionRequest, D> for (T0, T1)
4228    {
4229        #[inline]
4230        unsafe fn encode(
4231            self,
4232            encoder: &mut fidl::encoding::Encoder<'_, D>,
4233            offset: usize,
4234            depth: fidl::encoding::Depth,
4235        ) -> fidl::Result<()> {
4236            encoder.debug_check_bounds::<FlatlandSetInfiniteHitRegionRequest>(offset);
4237            // Zero out padding regions. There's no need to apply masks
4238            // because the unmasked parts will be overwritten by fields.
4239            unsafe {
4240                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4241                (ptr as *mut u64).write_unaligned(0);
4242            }
4243            // Write the fields.
4244            self.0.encode(encoder, offset + 0, depth)?;
4245            self.1.encode(encoder, offset + 8, depth)?;
4246            Ok(())
4247        }
4248    }
4249
4250    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4251        for FlatlandSetInfiniteHitRegionRequest
4252    {
4253        #[inline(always)]
4254        fn new_empty() -> Self {
4255            Self {
4256                transform_id: fidl::new_empty!(TransformId, D),
4257                hit_test: fidl::new_empty!(HitTestInteraction, D),
4258            }
4259        }
4260
4261        #[inline]
4262        unsafe fn decode(
4263            &mut self,
4264            decoder: &mut fidl::encoding::Decoder<'_, D>,
4265            offset: usize,
4266            _depth: fidl::encoding::Depth,
4267        ) -> fidl::Result<()> {
4268            decoder.debug_check_bounds::<Self>(offset);
4269            // Verify that padding bytes are zero.
4270            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4271            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4272            let mask = 0xffffffffffffff00u64;
4273            let maskedval = padval & mask;
4274            if maskedval != 0 {
4275                return Err(fidl::Error::NonZeroPadding {
4276                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4277                });
4278            }
4279            fidl::decode!(TransformId, D, &mut self.transform_id, decoder, offset + 0, _depth)?;
4280            fidl::decode!(HitTestInteraction, D, &mut self.hit_test, decoder, offset + 8, _depth)?;
4281            Ok(())
4282        }
4283    }
4284
4285    impl fidl::encoding::ValueTypeMarker for FlatlandSetOpacityRequest {
4286        type Borrowed<'a> = &'a Self;
4287        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4288            value
4289        }
4290    }
4291
4292    unsafe impl fidl::encoding::TypeMarker for FlatlandSetOpacityRequest {
4293        type Owned = Self;
4294
4295        #[inline(always)]
4296        fn inline_align(_context: fidl::encoding::Context) -> usize {
4297            8
4298        }
4299
4300        #[inline(always)]
4301        fn inline_size(_context: fidl::encoding::Context) -> usize {
4302            16
4303        }
4304    }
4305
4306    unsafe impl<D: fidl::encoding::ResourceDialect>
4307        fidl::encoding::Encode<FlatlandSetOpacityRequest, D> for &FlatlandSetOpacityRequest
4308    {
4309        #[inline]
4310        unsafe fn encode(
4311            self,
4312            encoder: &mut fidl::encoding::Encoder<'_, D>,
4313            offset: usize,
4314            _depth: fidl::encoding::Depth,
4315        ) -> fidl::Result<()> {
4316            encoder.debug_check_bounds::<FlatlandSetOpacityRequest>(offset);
4317            // Delegate to tuple encoding.
4318            fidl::encoding::Encode::<FlatlandSetOpacityRequest, D>::encode(
4319                (
4320                    <TransformId as fidl::encoding::ValueTypeMarker>::borrow(&self.transform_id),
4321                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
4322                ),
4323                encoder,
4324                offset,
4325                _depth,
4326            )
4327        }
4328    }
4329    unsafe impl<
4330            D: fidl::encoding::ResourceDialect,
4331            T0: fidl::encoding::Encode<TransformId, D>,
4332            T1: fidl::encoding::Encode<f32, D>,
4333        > fidl::encoding::Encode<FlatlandSetOpacityRequest, D> for (T0, T1)
4334    {
4335        #[inline]
4336        unsafe fn encode(
4337            self,
4338            encoder: &mut fidl::encoding::Encoder<'_, D>,
4339            offset: usize,
4340            depth: fidl::encoding::Depth,
4341        ) -> fidl::Result<()> {
4342            encoder.debug_check_bounds::<FlatlandSetOpacityRequest>(offset);
4343            // Zero out padding regions. There's no need to apply masks
4344            // because the unmasked parts will be overwritten by fields.
4345            unsafe {
4346                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4347                (ptr as *mut u64).write_unaligned(0);
4348            }
4349            // Write the fields.
4350            self.0.encode(encoder, offset + 0, depth)?;
4351            self.1.encode(encoder, offset + 8, depth)?;
4352            Ok(())
4353        }
4354    }
4355
4356    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4357        for FlatlandSetOpacityRequest
4358    {
4359        #[inline(always)]
4360        fn new_empty() -> Self {
4361            Self { transform_id: fidl::new_empty!(TransformId, D), value: fidl::new_empty!(f32, D) }
4362        }
4363
4364        #[inline]
4365        unsafe fn decode(
4366            &mut self,
4367            decoder: &mut fidl::encoding::Decoder<'_, D>,
4368            offset: usize,
4369            _depth: fidl::encoding::Depth,
4370        ) -> fidl::Result<()> {
4371            decoder.debug_check_bounds::<Self>(offset);
4372            // Verify that padding bytes are zero.
4373            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4374            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4375            let mask = 0xffffffff00000000u64;
4376            let maskedval = padval & mask;
4377            if maskedval != 0 {
4378                return Err(fidl::Error::NonZeroPadding {
4379                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4380                });
4381            }
4382            fidl::decode!(TransformId, D, &mut self.transform_id, decoder, offset + 0, _depth)?;
4383            fidl::decode!(f32, D, &mut self.value, decoder, offset + 8, _depth)?;
4384            Ok(())
4385        }
4386    }
4387
4388    impl fidl::encoding::ValueTypeMarker for FlatlandSetOrientationRequest {
4389        type Borrowed<'a> = &'a Self;
4390        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4391            value
4392        }
4393    }
4394
4395    unsafe impl fidl::encoding::TypeMarker for FlatlandSetOrientationRequest {
4396        type Owned = Self;
4397
4398        #[inline(always)]
4399        fn inline_align(_context: fidl::encoding::Context) -> usize {
4400            8
4401        }
4402
4403        #[inline(always)]
4404        fn inline_size(_context: fidl::encoding::Context) -> usize {
4405            16
4406        }
4407    }
4408
4409    unsafe impl<D: fidl::encoding::ResourceDialect>
4410        fidl::encoding::Encode<FlatlandSetOrientationRequest, D>
4411        for &FlatlandSetOrientationRequest
4412    {
4413        #[inline]
4414        unsafe fn encode(
4415            self,
4416            encoder: &mut fidl::encoding::Encoder<'_, D>,
4417            offset: usize,
4418            _depth: fidl::encoding::Depth,
4419        ) -> fidl::Result<()> {
4420            encoder.debug_check_bounds::<FlatlandSetOrientationRequest>(offset);
4421            // Delegate to tuple encoding.
4422            fidl::encoding::Encode::<FlatlandSetOrientationRequest, D>::encode(
4423                (
4424                    <TransformId as fidl::encoding::ValueTypeMarker>::borrow(&self.transform_id),
4425                    <Orientation as fidl::encoding::ValueTypeMarker>::borrow(&self.orientation),
4426                ),
4427                encoder,
4428                offset,
4429                _depth,
4430            )
4431        }
4432    }
4433    unsafe impl<
4434            D: fidl::encoding::ResourceDialect,
4435            T0: fidl::encoding::Encode<TransformId, D>,
4436            T1: fidl::encoding::Encode<Orientation, D>,
4437        > fidl::encoding::Encode<FlatlandSetOrientationRequest, D> for (T0, T1)
4438    {
4439        #[inline]
4440        unsafe fn encode(
4441            self,
4442            encoder: &mut fidl::encoding::Encoder<'_, D>,
4443            offset: usize,
4444            depth: fidl::encoding::Depth,
4445        ) -> fidl::Result<()> {
4446            encoder.debug_check_bounds::<FlatlandSetOrientationRequest>(offset);
4447            // Zero out padding regions. There's no need to apply masks
4448            // because the unmasked parts will be overwritten by fields.
4449            unsafe {
4450                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
4451                (ptr as *mut u64).write_unaligned(0);
4452            }
4453            // Write the fields.
4454            self.0.encode(encoder, offset + 0, depth)?;
4455            self.1.encode(encoder, offset + 8, depth)?;
4456            Ok(())
4457        }
4458    }
4459
4460    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4461        for FlatlandSetOrientationRequest
4462    {
4463        #[inline(always)]
4464        fn new_empty() -> Self {
4465            Self {
4466                transform_id: fidl::new_empty!(TransformId, D),
4467                orientation: fidl::new_empty!(Orientation, D),
4468            }
4469        }
4470
4471        #[inline]
4472        unsafe fn decode(
4473            &mut self,
4474            decoder: &mut fidl::encoding::Decoder<'_, D>,
4475            offset: usize,
4476            _depth: fidl::encoding::Depth,
4477        ) -> fidl::Result<()> {
4478            decoder.debug_check_bounds::<Self>(offset);
4479            // Verify that padding bytes are zero.
4480            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
4481            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4482            let mask = 0xffffffff00000000u64;
4483            let maskedval = padval & mask;
4484            if maskedval != 0 {
4485                return Err(fidl::Error::NonZeroPadding {
4486                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
4487                });
4488            }
4489            fidl::decode!(TransformId, D, &mut self.transform_id, decoder, offset + 0, _depth)?;
4490            fidl::decode!(Orientation, D, &mut self.orientation, decoder, offset + 8, _depth)?;
4491            Ok(())
4492        }
4493    }
4494
4495    impl fidl::encoding::ValueTypeMarker for FlatlandSetRootTransformRequest {
4496        type Borrowed<'a> = &'a Self;
4497        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4498            value
4499        }
4500    }
4501
4502    unsafe impl fidl::encoding::TypeMarker for FlatlandSetRootTransformRequest {
4503        type Owned = Self;
4504
4505        #[inline(always)]
4506        fn inline_align(_context: fidl::encoding::Context) -> usize {
4507            8
4508        }
4509
4510        #[inline(always)]
4511        fn inline_size(_context: fidl::encoding::Context) -> usize {
4512            8
4513        }
4514        #[inline(always)]
4515        fn encode_is_copy() -> bool {
4516            true
4517        }
4518
4519        #[inline(always)]
4520        fn decode_is_copy() -> bool {
4521            true
4522        }
4523    }
4524
4525    unsafe impl<D: fidl::encoding::ResourceDialect>
4526        fidl::encoding::Encode<FlatlandSetRootTransformRequest, D>
4527        for &FlatlandSetRootTransformRequest
4528    {
4529        #[inline]
4530        unsafe fn encode(
4531            self,
4532            encoder: &mut fidl::encoding::Encoder<'_, D>,
4533            offset: usize,
4534            _depth: fidl::encoding::Depth,
4535        ) -> fidl::Result<()> {
4536            encoder.debug_check_bounds::<FlatlandSetRootTransformRequest>(offset);
4537            unsafe {
4538                // Copy the object into the buffer.
4539                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4540                (buf_ptr as *mut FlatlandSetRootTransformRequest)
4541                    .write_unaligned((self as *const FlatlandSetRootTransformRequest).read());
4542                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4543                // done second because the memcpy will write garbage to these bytes.
4544            }
4545            Ok(())
4546        }
4547    }
4548    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<TransformId, D>>
4549        fidl::encoding::Encode<FlatlandSetRootTransformRequest, D> for (T0,)
4550    {
4551        #[inline]
4552        unsafe fn encode(
4553            self,
4554            encoder: &mut fidl::encoding::Encoder<'_, D>,
4555            offset: usize,
4556            depth: fidl::encoding::Depth,
4557        ) -> fidl::Result<()> {
4558            encoder.debug_check_bounds::<FlatlandSetRootTransformRequest>(offset);
4559            // Zero out padding regions. There's no need to apply masks
4560            // because the unmasked parts will be overwritten by fields.
4561            // Write the fields.
4562            self.0.encode(encoder, offset + 0, depth)?;
4563            Ok(())
4564        }
4565    }
4566
4567    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4568        for FlatlandSetRootTransformRequest
4569    {
4570        #[inline(always)]
4571        fn new_empty() -> Self {
4572            Self { transform_id: fidl::new_empty!(TransformId, D) }
4573        }
4574
4575        #[inline]
4576        unsafe fn decode(
4577            &mut self,
4578            decoder: &mut fidl::encoding::Decoder<'_, D>,
4579            offset: usize,
4580            _depth: fidl::encoding::Depth,
4581        ) -> fidl::Result<()> {
4582            decoder.debug_check_bounds::<Self>(offset);
4583            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4584            // Verify that padding bytes are zero.
4585            // Copy from the buffer into the object.
4586            unsafe {
4587                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
4588            }
4589            Ok(())
4590        }
4591    }
4592
4593    impl fidl::encoding::ValueTypeMarker for FlatlandSetScaleRequest {
4594        type Borrowed<'a> = &'a Self;
4595        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4596            value
4597        }
4598    }
4599
4600    unsafe impl fidl::encoding::TypeMarker for FlatlandSetScaleRequest {
4601        type Owned = Self;
4602
4603        #[inline(always)]
4604        fn inline_align(_context: fidl::encoding::Context) -> usize {
4605            8
4606        }
4607
4608        #[inline(always)]
4609        fn inline_size(_context: fidl::encoding::Context) -> usize {
4610            16
4611        }
4612    }
4613
4614    unsafe impl<D: fidl::encoding::ResourceDialect>
4615        fidl::encoding::Encode<FlatlandSetScaleRequest, D> for &FlatlandSetScaleRequest
4616    {
4617        #[inline]
4618        unsafe fn encode(
4619            self,
4620            encoder: &mut fidl::encoding::Encoder<'_, D>,
4621            offset: usize,
4622            _depth: fidl::encoding::Depth,
4623        ) -> fidl::Result<()> {
4624            encoder.debug_check_bounds::<FlatlandSetScaleRequest>(offset);
4625            // Delegate to tuple encoding.
4626            fidl::encoding::Encode::<FlatlandSetScaleRequest, D>::encode(
4627                (
4628                    <TransformId as fidl::encoding::ValueTypeMarker>::borrow(&self.transform_id),
4629                    <fidl_fuchsia_math::VecF as fidl::encoding::ValueTypeMarker>::borrow(
4630                        &self.scale,
4631                    ),
4632                ),
4633                encoder,
4634                offset,
4635                _depth,
4636            )
4637        }
4638    }
4639    unsafe impl<
4640            D: fidl::encoding::ResourceDialect,
4641            T0: fidl::encoding::Encode<TransformId, D>,
4642            T1: fidl::encoding::Encode<fidl_fuchsia_math::VecF, D>,
4643        > fidl::encoding::Encode<FlatlandSetScaleRequest, D> for (T0, T1)
4644    {
4645        #[inline]
4646        unsafe fn encode(
4647            self,
4648            encoder: &mut fidl::encoding::Encoder<'_, D>,
4649            offset: usize,
4650            depth: fidl::encoding::Depth,
4651        ) -> fidl::Result<()> {
4652            encoder.debug_check_bounds::<FlatlandSetScaleRequest>(offset);
4653            // Zero out padding regions. There's no need to apply masks
4654            // because the unmasked parts will be overwritten by fields.
4655            // Write the fields.
4656            self.0.encode(encoder, offset + 0, depth)?;
4657            self.1.encode(encoder, offset + 8, depth)?;
4658            Ok(())
4659        }
4660    }
4661
4662    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4663        for FlatlandSetScaleRequest
4664    {
4665        #[inline(always)]
4666        fn new_empty() -> Self {
4667            Self {
4668                transform_id: fidl::new_empty!(TransformId, D),
4669                scale: fidl::new_empty!(fidl_fuchsia_math::VecF, D),
4670            }
4671        }
4672
4673        #[inline]
4674        unsafe fn decode(
4675            &mut self,
4676            decoder: &mut fidl::encoding::Decoder<'_, D>,
4677            offset: usize,
4678            _depth: fidl::encoding::Depth,
4679        ) -> fidl::Result<()> {
4680            decoder.debug_check_bounds::<Self>(offset);
4681            // Verify that padding bytes are zero.
4682            fidl::decode!(TransformId, D, &mut self.transform_id, decoder, offset + 0, _depth)?;
4683            fidl::decode!(
4684                fidl_fuchsia_math::VecF,
4685                D,
4686                &mut self.scale,
4687                decoder,
4688                offset + 8,
4689                _depth
4690            )?;
4691            Ok(())
4692        }
4693    }
4694
4695    impl fidl::encoding::ValueTypeMarker for FlatlandSetTranslationRequest {
4696        type Borrowed<'a> = &'a Self;
4697        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4698            value
4699        }
4700    }
4701
4702    unsafe impl fidl::encoding::TypeMarker for FlatlandSetTranslationRequest {
4703        type Owned = Self;
4704
4705        #[inline(always)]
4706        fn inline_align(_context: fidl::encoding::Context) -> usize {
4707            8
4708        }
4709
4710        #[inline(always)]
4711        fn inline_size(_context: fidl::encoding::Context) -> usize {
4712            16
4713        }
4714    }
4715
4716    unsafe impl<D: fidl::encoding::ResourceDialect>
4717        fidl::encoding::Encode<FlatlandSetTranslationRequest, D>
4718        for &FlatlandSetTranslationRequest
4719    {
4720        #[inline]
4721        unsafe fn encode(
4722            self,
4723            encoder: &mut fidl::encoding::Encoder<'_, D>,
4724            offset: usize,
4725            _depth: fidl::encoding::Depth,
4726        ) -> fidl::Result<()> {
4727            encoder.debug_check_bounds::<FlatlandSetTranslationRequest>(offset);
4728            // Delegate to tuple encoding.
4729            fidl::encoding::Encode::<FlatlandSetTranslationRequest, D>::encode(
4730                (
4731                    <TransformId as fidl::encoding::ValueTypeMarker>::borrow(&self.transform_id),
4732                    <fidl_fuchsia_math::Vec_ as fidl::encoding::ValueTypeMarker>::borrow(
4733                        &self.translation,
4734                    ),
4735                ),
4736                encoder,
4737                offset,
4738                _depth,
4739            )
4740        }
4741    }
4742    unsafe impl<
4743            D: fidl::encoding::ResourceDialect,
4744            T0: fidl::encoding::Encode<TransformId, D>,
4745            T1: fidl::encoding::Encode<fidl_fuchsia_math::Vec_, D>,
4746        > fidl::encoding::Encode<FlatlandSetTranslationRequest, D> for (T0, T1)
4747    {
4748        #[inline]
4749        unsafe fn encode(
4750            self,
4751            encoder: &mut fidl::encoding::Encoder<'_, D>,
4752            offset: usize,
4753            depth: fidl::encoding::Depth,
4754        ) -> fidl::Result<()> {
4755            encoder.debug_check_bounds::<FlatlandSetTranslationRequest>(offset);
4756            // Zero out padding regions. There's no need to apply masks
4757            // because the unmasked parts will be overwritten by fields.
4758            // Write the fields.
4759            self.0.encode(encoder, offset + 0, depth)?;
4760            self.1.encode(encoder, offset + 8, depth)?;
4761            Ok(())
4762        }
4763    }
4764
4765    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4766        for FlatlandSetTranslationRequest
4767    {
4768        #[inline(always)]
4769        fn new_empty() -> Self {
4770            Self {
4771                transform_id: fidl::new_empty!(TransformId, D),
4772                translation: fidl::new_empty!(fidl_fuchsia_math::Vec_, D),
4773            }
4774        }
4775
4776        #[inline]
4777        unsafe fn decode(
4778            &mut self,
4779            decoder: &mut fidl::encoding::Decoder<'_, D>,
4780            offset: usize,
4781            _depth: fidl::encoding::Depth,
4782        ) -> fidl::Result<()> {
4783            decoder.debug_check_bounds::<Self>(offset);
4784            // Verify that padding bytes are zero.
4785            fidl::decode!(TransformId, D, &mut self.transform_id, decoder, offset + 0, _depth)?;
4786            fidl::decode!(
4787                fidl_fuchsia_math::Vec_,
4788                D,
4789                &mut self.translation,
4790                decoder,
4791                offset + 8,
4792                _depth
4793            )?;
4794            Ok(())
4795        }
4796    }
4797
4798    impl fidl::encoding::ValueTypeMarker for FlatlandSetViewportPropertiesRequest {
4799        type Borrowed<'a> = &'a Self;
4800        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4801            value
4802        }
4803    }
4804
4805    unsafe impl fidl::encoding::TypeMarker for FlatlandSetViewportPropertiesRequest {
4806        type Owned = Self;
4807
4808        #[inline(always)]
4809        fn inline_align(_context: fidl::encoding::Context) -> usize {
4810            8
4811        }
4812
4813        #[inline(always)]
4814        fn inline_size(_context: fidl::encoding::Context) -> usize {
4815            24
4816        }
4817    }
4818
4819    unsafe impl<D: fidl::encoding::ResourceDialect>
4820        fidl::encoding::Encode<FlatlandSetViewportPropertiesRequest, D>
4821        for &FlatlandSetViewportPropertiesRequest
4822    {
4823        #[inline]
4824        unsafe fn encode(
4825            self,
4826            encoder: &mut fidl::encoding::Encoder<'_, D>,
4827            offset: usize,
4828            _depth: fidl::encoding::Depth,
4829        ) -> fidl::Result<()> {
4830            encoder.debug_check_bounds::<FlatlandSetViewportPropertiesRequest>(offset);
4831            // Delegate to tuple encoding.
4832            fidl::encoding::Encode::<FlatlandSetViewportPropertiesRequest, D>::encode(
4833                (
4834                    <ContentId as fidl::encoding::ValueTypeMarker>::borrow(&self.viewport_id),
4835                    <ViewportProperties as fidl::encoding::ValueTypeMarker>::borrow(
4836                        &self.properties,
4837                    ),
4838                ),
4839                encoder,
4840                offset,
4841                _depth,
4842            )
4843        }
4844    }
4845    unsafe impl<
4846            D: fidl::encoding::ResourceDialect,
4847            T0: fidl::encoding::Encode<ContentId, D>,
4848            T1: fidl::encoding::Encode<ViewportProperties, D>,
4849        > fidl::encoding::Encode<FlatlandSetViewportPropertiesRequest, D> for (T0, T1)
4850    {
4851        #[inline]
4852        unsafe fn encode(
4853            self,
4854            encoder: &mut fidl::encoding::Encoder<'_, D>,
4855            offset: usize,
4856            depth: fidl::encoding::Depth,
4857        ) -> fidl::Result<()> {
4858            encoder.debug_check_bounds::<FlatlandSetViewportPropertiesRequest>(offset);
4859            // Zero out padding regions. There's no need to apply masks
4860            // because the unmasked parts will be overwritten by fields.
4861            // Write the fields.
4862            self.0.encode(encoder, offset + 0, depth)?;
4863            self.1.encode(encoder, offset + 8, depth)?;
4864            Ok(())
4865        }
4866    }
4867
4868    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4869        for FlatlandSetViewportPropertiesRequest
4870    {
4871        #[inline(always)]
4872        fn new_empty() -> Self {
4873            Self {
4874                viewport_id: fidl::new_empty!(ContentId, D),
4875                properties: fidl::new_empty!(ViewportProperties, D),
4876            }
4877        }
4878
4879        #[inline]
4880        unsafe fn decode(
4881            &mut self,
4882            decoder: &mut fidl::encoding::Decoder<'_, D>,
4883            offset: usize,
4884            _depth: fidl::encoding::Depth,
4885        ) -> fidl::Result<()> {
4886            decoder.debug_check_bounds::<Self>(offset);
4887            // Verify that padding bytes are zero.
4888            fidl::decode!(ContentId, D, &mut self.viewport_id, decoder, offset + 0, _depth)?;
4889            fidl::decode!(
4890                ViewportProperties,
4891                D,
4892                &mut self.properties,
4893                decoder,
4894                offset + 8,
4895                _depth
4896            )?;
4897            Ok(())
4898        }
4899    }
4900
4901    impl fidl::encoding::ValueTypeMarker for HitRegion {
4902        type Borrowed<'a> = &'a Self;
4903        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4904            value
4905        }
4906    }
4907
4908    unsafe impl fidl::encoding::TypeMarker for HitRegion {
4909        type Owned = Self;
4910
4911        #[inline(always)]
4912        fn inline_align(_context: fidl::encoding::Context) -> usize {
4913            4
4914        }
4915
4916        #[inline(always)]
4917        fn inline_size(_context: fidl::encoding::Context) -> usize {
4918            20
4919        }
4920    }
4921
4922    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<HitRegion, D>
4923        for &HitRegion
4924    {
4925        #[inline]
4926        unsafe fn encode(
4927            self,
4928            encoder: &mut fidl::encoding::Encoder<'_, D>,
4929            offset: usize,
4930            _depth: fidl::encoding::Depth,
4931        ) -> fidl::Result<()> {
4932            encoder.debug_check_bounds::<HitRegion>(offset);
4933            // Delegate to tuple encoding.
4934            fidl::encoding::Encode::<HitRegion, D>::encode(
4935                (
4936                    <fidl_fuchsia_math::RectF as fidl::encoding::ValueTypeMarker>::borrow(
4937                        &self.region,
4938                    ),
4939                    <HitTestInteraction as fidl::encoding::ValueTypeMarker>::borrow(&self.hit_test),
4940                ),
4941                encoder,
4942                offset,
4943                _depth,
4944            )
4945        }
4946    }
4947    unsafe impl<
4948            D: fidl::encoding::ResourceDialect,
4949            T0: fidl::encoding::Encode<fidl_fuchsia_math::RectF, D>,
4950            T1: fidl::encoding::Encode<HitTestInteraction, D>,
4951        > fidl::encoding::Encode<HitRegion, D> for (T0, T1)
4952    {
4953        #[inline]
4954        unsafe fn encode(
4955            self,
4956            encoder: &mut fidl::encoding::Encoder<'_, D>,
4957            offset: usize,
4958            depth: fidl::encoding::Depth,
4959        ) -> fidl::Result<()> {
4960            encoder.debug_check_bounds::<HitRegion>(offset);
4961            // Zero out padding regions. There's no need to apply masks
4962            // because the unmasked parts will be overwritten by fields.
4963            unsafe {
4964                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
4965                (ptr as *mut u32).write_unaligned(0);
4966            }
4967            // Write the fields.
4968            self.0.encode(encoder, offset + 0, depth)?;
4969            self.1.encode(encoder, offset + 16, depth)?;
4970            Ok(())
4971        }
4972    }
4973
4974    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for HitRegion {
4975        #[inline(always)]
4976        fn new_empty() -> Self {
4977            Self {
4978                region: fidl::new_empty!(fidl_fuchsia_math::RectF, D),
4979                hit_test: fidl::new_empty!(HitTestInteraction, D),
4980            }
4981        }
4982
4983        #[inline]
4984        unsafe fn decode(
4985            &mut self,
4986            decoder: &mut fidl::encoding::Decoder<'_, D>,
4987            offset: usize,
4988            _depth: fidl::encoding::Depth,
4989        ) -> fidl::Result<()> {
4990            decoder.debug_check_bounds::<Self>(offset);
4991            // Verify that padding bytes are zero.
4992            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
4993            let padval = unsafe { (ptr as *const u32).read_unaligned() };
4994            let mask = 0xffffff00u32;
4995            let maskedval = padval & mask;
4996            if maskedval != 0 {
4997                return Err(fidl::Error::NonZeroPadding {
4998                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
4999                });
5000            }
5001            fidl::decode!(
5002                fidl_fuchsia_math::RectF,
5003                D,
5004                &mut self.region,
5005                decoder,
5006                offset + 0,
5007                _depth
5008            )?;
5009            fidl::decode!(HitTestInteraction, D, &mut self.hit_test, decoder, offset + 16, _depth)?;
5010            Ok(())
5011        }
5012    }
5013
5014    impl fidl::encoding::ValueTypeMarker for ParentViewportWatcherGetLayoutResponse {
5015        type Borrowed<'a> = &'a Self;
5016        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5017            value
5018        }
5019    }
5020
5021    unsafe impl fidl::encoding::TypeMarker for ParentViewportWatcherGetLayoutResponse {
5022        type Owned = Self;
5023
5024        #[inline(always)]
5025        fn inline_align(_context: fidl::encoding::Context) -> usize {
5026            8
5027        }
5028
5029        #[inline(always)]
5030        fn inline_size(_context: fidl::encoding::Context) -> usize {
5031            16
5032        }
5033    }
5034
5035    unsafe impl<D: fidl::encoding::ResourceDialect>
5036        fidl::encoding::Encode<ParentViewportWatcherGetLayoutResponse, D>
5037        for &ParentViewportWatcherGetLayoutResponse
5038    {
5039        #[inline]
5040        unsafe fn encode(
5041            self,
5042            encoder: &mut fidl::encoding::Encoder<'_, D>,
5043            offset: usize,
5044            _depth: fidl::encoding::Depth,
5045        ) -> fidl::Result<()> {
5046            encoder.debug_check_bounds::<ParentViewportWatcherGetLayoutResponse>(offset);
5047            // Delegate to tuple encoding.
5048            fidl::encoding::Encode::<ParentViewportWatcherGetLayoutResponse, D>::encode(
5049                (<LayoutInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
5050                encoder,
5051                offset,
5052                _depth,
5053            )
5054        }
5055    }
5056    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<LayoutInfo, D>>
5057        fidl::encoding::Encode<ParentViewportWatcherGetLayoutResponse, D> for (T0,)
5058    {
5059        #[inline]
5060        unsafe fn encode(
5061            self,
5062            encoder: &mut fidl::encoding::Encoder<'_, D>,
5063            offset: usize,
5064            depth: fidl::encoding::Depth,
5065        ) -> fidl::Result<()> {
5066            encoder.debug_check_bounds::<ParentViewportWatcherGetLayoutResponse>(offset);
5067            // Zero out padding regions. There's no need to apply masks
5068            // because the unmasked parts will be overwritten by fields.
5069            // Write the fields.
5070            self.0.encode(encoder, offset + 0, depth)?;
5071            Ok(())
5072        }
5073    }
5074
5075    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5076        for ParentViewportWatcherGetLayoutResponse
5077    {
5078        #[inline(always)]
5079        fn new_empty() -> Self {
5080            Self { info: fidl::new_empty!(LayoutInfo, D) }
5081        }
5082
5083        #[inline]
5084        unsafe fn decode(
5085            &mut self,
5086            decoder: &mut fidl::encoding::Decoder<'_, D>,
5087            offset: usize,
5088            _depth: fidl::encoding::Depth,
5089        ) -> fidl::Result<()> {
5090            decoder.debug_check_bounds::<Self>(offset);
5091            // Verify that padding bytes are zero.
5092            fidl::decode!(LayoutInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
5093            Ok(())
5094        }
5095    }
5096
5097    impl fidl::encoding::ValueTypeMarker for ParentViewportWatcherGetStatusResponse {
5098        type Borrowed<'a> = &'a Self;
5099        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5100            value
5101        }
5102    }
5103
5104    unsafe impl fidl::encoding::TypeMarker for ParentViewportWatcherGetStatusResponse {
5105        type Owned = Self;
5106
5107        #[inline(always)]
5108        fn inline_align(_context: fidl::encoding::Context) -> usize {
5109            4
5110        }
5111
5112        #[inline(always)]
5113        fn inline_size(_context: fidl::encoding::Context) -> usize {
5114            4
5115        }
5116    }
5117
5118    unsafe impl<D: fidl::encoding::ResourceDialect>
5119        fidl::encoding::Encode<ParentViewportWatcherGetStatusResponse, D>
5120        for &ParentViewportWatcherGetStatusResponse
5121    {
5122        #[inline]
5123        unsafe fn encode(
5124            self,
5125            encoder: &mut fidl::encoding::Encoder<'_, D>,
5126            offset: usize,
5127            _depth: fidl::encoding::Depth,
5128        ) -> fidl::Result<()> {
5129            encoder.debug_check_bounds::<ParentViewportWatcherGetStatusResponse>(offset);
5130            // Delegate to tuple encoding.
5131            fidl::encoding::Encode::<ParentViewportWatcherGetStatusResponse, D>::encode(
5132                (<ParentViewportStatus as fidl::encoding::ValueTypeMarker>::borrow(&self.status),),
5133                encoder,
5134                offset,
5135                _depth,
5136            )
5137        }
5138    }
5139    unsafe impl<
5140            D: fidl::encoding::ResourceDialect,
5141            T0: fidl::encoding::Encode<ParentViewportStatus, D>,
5142        > fidl::encoding::Encode<ParentViewportWatcherGetStatusResponse, D> for (T0,)
5143    {
5144        #[inline]
5145        unsafe fn encode(
5146            self,
5147            encoder: &mut fidl::encoding::Encoder<'_, D>,
5148            offset: usize,
5149            depth: fidl::encoding::Depth,
5150        ) -> fidl::Result<()> {
5151            encoder.debug_check_bounds::<ParentViewportWatcherGetStatusResponse>(offset);
5152            // Zero out padding regions. There's no need to apply masks
5153            // because the unmasked parts will be overwritten by fields.
5154            // Write the fields.
5155            self.0.encode(encoder, offset + 0, depth)?;
5156            Ok(())
5157        }
5158    }
5159
5160    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5161        for ParentViewportWatcherGetStatusResponse
5162    {
5163        #[inline(always)]
5164        fn new_empty() -> Self {
5165            Self { status: fidl::new_empty!(ParentViewportStatus, D) }
5166        }
5167
5168        #[inline]
5169        unsafe fn decode(
5170            &mut self,
5171            decoder: &mut fidl::encoding::Decoder<'_, D>,
5172            offset: usize,
5173            _depth: fidl::encoding::Depth,
5174        ) -> fidl::Result<()> {
5175            decoder.debug_check_bounds::<Self>(offset);
5176            // Verify that padding bytes are zero.
5177            fidl::decode!(ParentViewportStatus, D, &mut self.status, decoder, offset + 0, _depth)?;
5178            Ok(())
5179        }
5180    }
5181
5182    impl fidl::encoding::ValueTypeMarker for ScreenCaptureReleaseFrameRequest {
5183        type Borrowed<'a> = &'a Self;
5184        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5185            value
5186        }
5187    }
5188
5189    unsafe impl fidl::encoding::TypeMarker for ScreenCaptureReleaseFrameRequest {
5190        type Owned = Self;
5191
5192        #[inline(always)]
5193        fn inline_align(_context: fidl::encoding::Context) -> usize {
5194            4
5195        }
5196
5197        #[inline(always)]
5198        fn inline_size(_context: fidl::encoding::Context) -> usize {
5199            4
5200        }
5201        #[inline(always)]
5202        fn encode_is_copy() -> bool {
5203            true
5204        }
5205
5206        #[inline(always)]
5207        fn decode_is_copy() -> bool {
5208            true
5209        }
5210    }
5211
5212    unsafe impl<D: fidl::encoding::ResourceDialect>
5213        fidl::encoding::Encode<ScreenCaptureReleaseFrameRequest, D>
5214        for &ScreenCaptureReleaseFrameRequest
5215    {
5216        #[inline]
5217        unsafe fn encode(
5218            self,
5219            encoder: &mut fidl::encoding::Encoder<'_, D>,
5220            offset: usize,
5221            _depth: fidl::encoding::Depth,
5222        ) -> fidl::Result<()> {
5223            encoder.debug_check_bounds::<ScreenCaptureReleaseFrameRequest>(offset);
5224            unsafe {
5225                // Copy the object into the buffer.
5226                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5227                (buf_ptr as *mut ScreenCaptureReleaseFrameRequest)
5228                    .write_unaligned((self as *const ScreenCaptureReleaseFrameRequest).read());
5229                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5230                // done second because the memcpy will write garbage to these bytes.
5231            }
5232            Ok(())
5233        }
5234    }
5235    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5236        fidl::encoding::Encode<ScreenCaptureReleaseFrameRequest, D> for (T0,)
5237    {
5238        #[inline]
5239        unsafe fn encode(
5240            self,
5241            encoder: &mut fidl::encoding::Encoder<'_, D>,
5242            offset: usize,
5243            depth: fidl::encoding::Depth,
5244        ) -> fidl::Result<()> {
5245            encoder.debug_check_bounds::<ScreenCaptureReleaseFrameRequest>(offset);
5246            // Zero out padding regions. There's no need to apply masks
5247            // because the unmasked parts will be overwritten by fields.
5248            // Write the fields.
5249            self.0.encode(encoder, offset + 0, depth)?;
5250            Ok(())
5251        }
5252    }
5253
5254    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5255        for ScreenCaptureReleaseFrameRequest
5256    {
5257        #[inline(always)]
5258        fn new_empty() -> Self {
5259            Self { buffer_id: fidl::new_empty!(u32, D) }
5260        }
5261
5262        #[inline]
5263        unsafe fn decode(
5264            &mut self,
5265            decoder: &mut fidl::encoding::Decoder<'_, D>,
5266            offset: usize,
5267            _depth: fidl::encoding::Depth,
5268        ) -> fidl::Result<()> {
5269            decoder.debug_check_bounds::<Self>(offset);
5270            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5271            // Verify that padding bytes are zero.
5272            // Copy from the buffer into the object.
5273            unsafe {
5274                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5275            }
5276            Ok(())
5277        }
5278    }
5279
5280    impl fidl::encoding::ValueTypeMarker for TransformId {
5281        type Borrowed<'a> = &'a Self;
5282        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5283            value
5284        }
5285    }
5286
5287    unsafe impl fidl::encoding::TypeMarker for TransformId {
5288        type Owned = Self;
5289
5290        #[inline(always)]
5291        fn inline_align(_context: fidl::encoding::Context) -> usize {
5292            8
5293        }
5294
5295        #[inline(always)]
5296        fn inline_size(_context: fidl::encoding::Context) -> usize {
5297            8
5298        }
5299        #[inline(always)]
5300        fn encode_is_copy() -> bool {
5301            true
5302        }
5303
5304        #[inline(always)]
5305        fn decode_is_copy() -> bool {
5306            true
5307        }
5308    }
5309
5310    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TransformId, D>
5311        for &TransformId
5312    {
5313        #[inline]
5314        unsafe fn encode(
5315            self,
5316            encoder: &mut fidl::encoding::Encoder<'_, D>,
5317            offset: usize,
5318            _depth: fidl::encoding::Depth,
5319        ) -> fidl::Result<()> {
5320            encoder.debug_check_bounds::<TransformId>(offset);
5321            unsafe {
5322                // Copy the object into the buffer.
5323                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5324                (buf_ptr as *mut TransformId).write_unaligned((self as *const TransformId).read());
5325                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5326                // done second because the memcpy will write garbage to these bytes.
5327            }
5328            Ok(())
5329        }
5330    }
5331    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
5332        fidl::encoding::Encode<TransformId, D> for (T0,)
5333    {
5334        #[inline]
5335        unsafe fn encode(
5336            self,
5337            encoder: &mut fidl::encoding::Encoder<'_, D>,
5338            offset: usize,
5339            depth: fidl::encoding::Depth,
5340        ) -> fidl::Result<()> {
5341            encoder.debug_check_bounds::<TransformId>(offset);
5342            // Zero out padding regions. There's no need to apply masks
5343            // because the unmasked parts will be overwritten by fields.
5344            // Write the fields.
5345            self.0.encode(encoder, offset + 0, depth)?;
5346            Ok(())
5347        }
5348    }
5349
5350    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TransformId {
5351        #[inline(always)]
5352        fn new_empty() -> Self {
5353            Self { value: fidl::new_empty!(u64, D) }
5354        }
5355
5356        #[inline]
5357        unsafe fn decode(
5358            &mut self,
5359            decoder: &mut fidl::encoding::Decoder<'_, D>,
5360            offset: usize,
5361            _depth: fidl::encoding::Depth,
5362        ) -> fidl::Result<()> {
5363            decoder.debug_check_bounds::<Self>(offset);
5364            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5365            // Verify that padding bytes are zero.
5366            // Copy from the buffer into the object.
5367            unsafe {
5368                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
5369            }
5370            Ok(())
5371        }
5372    }
5373
5374    impl ImageProperties {
5375        #[inline(always)]
5376        fn max_ordinal_present(&self) -> u64 {
5377            if let Some(_) = self.size {
5378                return 1;
5379            }
5380            0
5381        }
5382    }
5383
5384    impl fidl::encoding::ValueTypeMarker for ImageProperties {
5385        type Borrowed<'a> = &'a Self;
5386        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5387            value
5388        }
5389    }
5390
5391    unsafe impl fidl::encoding::TypeMarker for ImageProperties {
5392        type Owned = Self;
5393
5394        #[inline(always)]
5395        fn inline_align(_context: fidl::encoding::Context) -> usize {
5396            8
5397        }
5398
5399        #[inline(always)]
5400        fn inline_size(_context: fidl::encoding::Context) -> usize {
5401            16
5402        }
5403    }
5404
5405    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ImageProperties, D>
5406        for &ImageProperties
5407    {
5408        unsafe fn encode(
5409            self,
5410            encoder: &mut fidl::encoding::Encoder<'_, D>,
5411            offset: usize,
5412            mut depth: fidl::encoding::Depth,
5413        ) -> fidl::Result<()> {
5414            encoder.debug_check_bounds::<ImageProperties>(offset);
5415            // Vector header
5416            let max_ordinal: u64 = self.max_ordinal_present();
5417            encoder.write_num(max_ordinal, offset);
5418            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5419            // Calling encoder.out_of_line_offset(0) is not allowed.
5420            if max_ordinal == 0 {
5421                return Ok(());
5422            }
5423            depth.increment()?;
5424            let envelope_size = 8;
5425            let bytes_len = max_ordinal as usize * envelope_size;
5426            #[allow(unused_variables)]
5427            let offset = encoder.out_of_line_offset(bytes_len);
5428            let mut _prev_end_offset: usize = 0;
5429            if 1 > max_ordinal {
5430                return Ok(());
5431            }
5432
5433            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5434            // are envelope_size bytes.
5435            let cur_offset: usize = (1 - 1) * envelope_size;
5436
5437            // Zero reserved fields.
5438            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5439
5440            // Safety:
5441            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5442            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5443            //   envelope_size bytes, there is always sufficient room.
5444            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_math::SizeU, D>(
5445                self.size
5446                    .as_ref()
5447                    .map(<fidl_fuchsia_math::SizeU as fidl::encoding::ValueTypeMarker>::borrow),
5448                encoder,
5449                offset + cur_offset,
5450                depth,
5451            )?;
5452
5453            _prev_end_offset = cur_offset + envelope_size;
5454
5455            Ok(())
5456        }
5457    }
5458
5459    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ImageProperties {
5460        #[inline(always)]
5461        fn new_empty() -> Self {
5462            Self::default()
5463        }
5464
5465        unsafe fn decode(
5466            &mut self,
5467            decoder: &mut fidl::encoding::Decoder<'_, D>,
5468            offset: usize,
5469            mut depth: fidl::encoding::Depth,
5470        ) -> fidl::Result<()> {
5471            decoder.debug_check_bounds::<Self>(offset);
5472            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5473                None => return Err(fidl::Error::NotNullable),
5474                Some(len) => len,
5475            };
5476            // Calling decoder.out_of_line_offset(0) is not allowed.
5477            if len == 0 {
5478                return Ok(());
5479            };
5480            depth.increment()?;
5481            let envelope_size = 8;
5482            let bytes_len = len * envelope_size;
5483            let offset = decoder.out_of_line_offset(bytes_len)?;
5484            // Decode the envelope for each type.
5485            let mut _next_ordinal_to_read = 0;
5486            let mut next_offset = offset;
5487            let end_offset = offset + bytes_len;
5488            _next_ordinal_to_read += 1;
5489            if next_offset >= end_offset {
5490                return Ok(());
5491            }
5492
5493            // Decode unknown envelopes for gaps in ordinals.
5494            while _next_ordinal_to_read < 1 {
5495                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5496                _next_ordinal_to_read += 1;
5497                next_offset += envelope_size;
5498            }
5499
5500            let next_out_of_line = decoder.next_out_of_line();
5501            let handles_before = decoder.remaining_handles();
5502            if let Some((inlined, num_bytes, num_handles)) =
5503                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5504            {
5505                let member_inline_size =
5506                    <fidl_fuchsia_math::SizeU as fidl::encoding::TypeMarker>::inline_size(
5507                        decoder.context,
5508                    );
5509                if inlined != (member_inline_size <= 4) {
5510                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5511                }
5512                let inner_offset;
5513                let mut inner_depth = depth.clone();
5514                if inlined {
5515                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5516                    inner_offset = next_offset;
5517                } else {
5518                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5519                    inner_depth.increment()?;
5520                }
5521                let val_ref =
5522                    self.size.get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_math::SizeU, D));
5523                fidl::decode!(
5524                    fidl_fuchsia_math::SizeU,
5525                    D,
5526                    val_ref,
5527                    decoder,
5528                    inner_offset,
5529                    inner_depth
5530                )?;
5531                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5532                {
5533                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5534                }
5535                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5536                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5537                }
5538            }
5539
5540            next_offset += envelope_size;
5541
5542            // Decode the remaining unknown envelopes.
5543            while next_offset < end_offset {
5544                _next_ordinal_to_read += 1;
5545                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5546                next_offset += envelope_size;
5547            }
5548
5549            Ok(())
5550        }
5551    }
5552
5553    impl LayoutInfo {
5554        #[inline(always)]
5555        fn max_ordinal_present(&self) -> u64 {
5556            if let Some(_) = self.inset {
5557                return 4;
5558            }
5559            if let Some(_) = self.device_pixel_ratio {
5560                return 3;
5561            }
5562            if let Some(_) = self.logical_size {
5563                return 1;
5564            }
5565            0
5566        }
5567    }
5568
5569    impl fidl::encoding::ValueTypeMarker for LayoutInfo {
5570        type Borrowed<'a> = &'a Self;
5571        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5572            value
5573        }
5574    }
5575
5576    unsafe impl fidl::encoding::TypeMarker for LayoutInfo {
5577        type Owned = Self;
5578
5579        #[inline(always)]
5580        fn inline_align(_context: fidl::encoding::Context) -> usize {
5581            8
5582        }
5583
5584        #[inline(always)]
5585        fn inline_size(_context: fidl::encoding::Context) -> usize {
5586            16
5587        }
5588    }
5589
5590    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LayoutInfo, D>
5591        for &LayoutInfo
5592    {
5593        unsafe fn encode(
5594            self,
5595            encoder: &mut fidl::encoding::Encoder<'_, D>,
5596            offset: usize,
5597            mut depth: fidl::encoding::Depth,
5598        ) -> fidl::Result<()> {
5599            encoder.debug_check_bounds::<LayoutInfo>(offset);
5600            // Vector header
5601            let max_ordinal: u64 = self.max_ordinal_present();
5602            encoder.write_num(max_ordinal, offset);
5603            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5604            // Calling encoder.out_of_line_offset(0) is not allowed.
5605            if max_ordinal == 0 {
5606                return Ok(());
5607            }
5608            depth.increment()?;
5609            let envelope_size = 8;
5610            let bytes_len = max_ordinal as usize * envelope_size;
5611            #[allow(unused_variables)]
5612            let offset = encoder.out_of_line_offset(bytes_len);
5613            let mut _prev_end_offset: usize = 0;
5614            if 1 > max_ordinal {
5615                return Ok(());
5616            }
5617
5618            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5619            // are envelope_size bytes.
5620            let cur_offset: usize = (1 - 1) * envelope_size;
5621
5622            // Zero reserved fields.
5623            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5624
5625            // Safety:
5626            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5627            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5628            //   envelope_size bytes, there is always sufficient room.
5629            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_math::SizeU, D>(
5630                self.logical_size
5631                    .as_ref()
5632                    .map(<fidl_fuchsia_math::SizeU as fidl::encoding::ValueTypeMarker>::borrow),
5633                encoder,
5634                offset + cur_offset,
5635                depth,
5636            )?;
5637
5638            _prev_end_offset = cur_offset + envelope_size;
5639            if 3 > max_ordinal {
5640                return Ok(());
5641            }
5642
5643            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5644            // are envelope_size bytes.
5645            let cur_offset: usize = (3 - 1) * envelope_size;
5646
5647            // Zero reserved fields.
5648            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5649
5650            // Safety:
5651            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5652            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5653            //   envelope_size bytes, there is always sufficient room.
5654            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_math::VecF, D>(
5655                self.device_pixel_ratio
5656                    .as_ref()
5657                    .map(<fidl_fuchsia_math::VecF as fidl::encoding::ValueTypeMarker>::borrow),
5658                encoder,
5659                offset + cur_offset,
5660                depth,
5661            )?;
5662
5663            _prev_end_offset = cur_offset + envelope_size;
5664            if 4 > max_ordinal {
5665                return Ok(());
5666            }
5667
5668            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5669            // are envelope_size bytes.
5670            let cur_offset: usize = (4 - 1) * envelope_size;
5671
5672            // Zero reserved fields.
5673            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5674
5675            // Safety:
5676            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5677            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5678            //   envelope_size bytes, there is always sufficient room.
5679            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_math::Inset, D>(
5680                self.inset
5681                    .as_ref()
5682                    .map(<fidl_fuchsia_math::Inset as fidl::encoding::ValueTypeMarker>::borrow),
5683                encoder,
5684                offset + cur_offset,
5685                depth,
5686            )?;
5687
5688            _prev_end_offset = cur_offset + envelope_size;
5689
5690            Ok(())
5691        }
5692    }
5693
5694    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LayoutInfo {
5695        #[inline(always)]
5696        fn new_empty() -> Self {
5697            Self::default()
5698        }
5699
5700        unsafe fn decode(
5701            &mut self,
5702            decoder: &mut fidl::encoding::Decoder<'_, D>,
5703            offset: usize,
5704            mut depth: fidl::encoding::Depth,
5705        ) -> fidl::Result<()> {
5706            decoder.debug_check_bounds::<Self>(offset);
5707            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5708                None => return Err(fidl::Error::NotNullable),
5709                Some(len) => len,
5710            };
5711            // Calling decoder.out_of_line_offset(0) is not allowed.
5712            if len == 0 {
5713                return Ok(());
5714            };
5715            depth.increment()?;
5716            let envelope_size = 8;
5717            let bytes_len = len * envelope_size;
5718            let offset = decoder.out_of_line_offset(bytes_len)?;
5719            // Decode the envelope for each type.
5720            let mut _next_ordinal_to_read = 0;
5721            let mut next_offset = offset;
5722            let end_offset = offset + bytes_len;
5723            _next_ordinal_to_read += 1;
5724            if next_offset >= end_offset {
5725                return Ok(());
5726            }
5727
5728            // Decode unknown envelopes for gaps in ordinals.
5729            while _next_ordinal_to_read < 1 {
5730                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5731                _next_ordinal_to_read += 1;
5732                next_offset += envelope_size;
5733            }
5734
5735            let next_out_of_line = decoder.next_out_of_line();
5736            let handles_before = decoder.remaining_handles();
5737            if let Some((inlined, num_bytes, num_handles)) =
5738                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5739            {
5740                let member_inline_size =
5741                    <fidl_fuchsia_math::SizeU as fidl::encoding::TypeMarker>::inline_size(
5742                        decoder.context,
5743                    );
5744                if inlined != (member_inline_size <= 4) {
5745                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5746                }
5747                let inner_offset;
5748                let mut inner_depth = depth.clone();
5749                if inlined {
5750                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5751                    inner_offset = next_offset;
5752                } else {
5753                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5754                    inner_depth.increment()?;
5755                }
5756                let val_ref = self
5757                    .logical_size
5758                    .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_math::SizeU, D));
5759                fidl::decode!(
5760                    fidl_fuchsia_math::SizeU,
5761                    D,
5762                    val_ref,
5763                    decoder,
5764                    inner_offset,
5765                    inner_depth
5766                )?;
5767                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5768                {
5769                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5770                }
5771                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5772                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5773                }
5774            }
5775
5776            next_offset += envelope_size;
5777            _next_ordinal_to_read += 1;
5778            if next_offset >= end_offset {
5779                return Ok(());
5780            }
5781
5782            // Decode unknown envelopes for gaps in ordinals.
5783            while _next_ordinal_to_read < 3 {
5784                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5785                _next_ordinal_to_read += 1;
5786                next_offset += envelope_size;
5787            }
5788
5789            let next_out_of_line = decoder.next_out_of_line();
5790            let handles_before = decoder.remaining_handles();
5791            if let Some((inlined, num_bytes, num_handles)) =
5792                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5793            {
5794                let member_inline_size =
5795                    <fidl_fuchsia_math::VecF as fidl::encoding::TypeMarker>::inline_size(
5796                        decoder.context,
5797                    );
5798                if inlined != (member_inline_size <= 4) {
5799                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5800                }
5801                let inner_offset;
5802                let mut inner_depth = depth.clone();
5803                if inlined {
5804                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5805                    inner_offset = next_offset;
5806                } else {
5807                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5808                    inner_depth.increment()?;
5809                }
5810                let val_ref = self
5811                    .device_pixel_ratio
5812                    .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_math::VecF, D));
5813                fidl::decode!(
5814                    fidl_fuchsia_math::VecF,
5815                    D,
5816                    val_ref,
5817                    decoder,
5818                    inner_offset,
5819                    inner_depth
5820                )?;
5821                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5822                {
5823                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5824                }
5825                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5826                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5827                }
5828            }
5829
5830            next_offset += envelope_size;
5831            _next_ordinal_to_read += 1;
5832            if next_offset >= end_offset {
5833                return Ok(());
5834            }
5835
5836            // Decode unknown envelopes for gaps in ordinals.
5837            while _next_ordinal_to_read < 4 {
5838                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5839                _next_ordinal_to_read += 1;
5840                next_offset += envelope_size;
5841            }
5842
5843            let next_out_of_line = decoder.next_out_of_line();
5844            let handles_before = decoder.remaining_handles();
5845            if let Some((inlined, num_bytes, num_handles)) =
5846                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5847            {
5848                let member_inline_size =
5849                    <fidl_fuchsia_math::Inset as fidl::encoding::TypeMarker>::inline_size(
5850                        decoder.context,
5851                    );
5852                if inlined != (member_inline_size <= 4) {
5853                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5854                }
5855                let inner_offset;
5856                let mut inner_depth = depth.clone();
5857                if inlined {
5858                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5859                    inner_offset = next_offset;
5860                } else {
5861                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5862                    inner_depth.increment()?;
5863                }
5864                let val_ref =
5865                    self.inset.get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_math::Inset, D));
5866                fidl::decode!(
5867                    fidl_fuchsia_math::Inset,
5868                    D,
5869                    val_ref,
5870                    decoder,
5871                    inner_offset,
5872                    inner_depth
5873                )?;
5874                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5875                {
5876                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5877                }
5878                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5879                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5880                }
5881            }
5882
5883            next_offset += envelope_size;
5884
5885            // Decode the remaining unknown envelopes.
5886            while next_offset < end_offset {
5887                _next_ordinal_to_read += 1;
5888                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5889                next_offset += envelope_size;
5890            }
5891
5892            Ok(())
5893        }
5894    }
5895
5896    impl OnNextFrameBeginValues {
5897        #[inline(always)]
5898        fn max_ordinal_present(&self) -> u64 {
5899            if let Some(_) = self.future_presentation_infos {
5900                return 2;
5901            }
5902            if let Some(_) = self.additional_present_credits {
5903                return 1;
5904            }
5905            0
5906        }
5907    }
5908
5909    impl fidl::encoding::ValueTypeMarker for OnNextFrameBeginValues {
5910        type Borrowed<'a> = &'a Self;
5911        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5912            value
5913        }
5914    }
5915
5916    unsafe impl fidl::encoding::TypeMarker for OnNextFrameBeginValues {
5917        type Owned = Self;
5918
5919        #[inline(always)]
5920        fn inline_align(_context: fidl::encoding::Context) -> usize {
5921            8
5922        }
5923
5924        #[inline(always)]
5925        fn inline_size(_context: fidl::encoding::Context) -> usize {
5926            16
5927        }
5928    }
5929
5930    unsafe impl<D: fidl::encoding::ResourceDialect>
5931        fidl::encoding::Encode<OnNextFrameBeginValues, D> for &OnNextFrameBeginValues
5932    {
5933        unsafe fn encode(
5934            self,
5935            encoder: &mut fidl::encoding::Encoder<'_, D>,
5936            offset: usize,
5937            mut depth: fidl::encoding::Depth,
5938        ) -> fidl::Result<()> {
5939            encoder.debug_check_bounds::<OnNextFrameBeginValues>(offset);
5940            // Vector header
5941            let max_ordinal: u64 = self.max_ordinal_present();
5942            encoder.write_num(max_ordinal, offset);
5943            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5944            // Calling encoder.out_of_line_offset(0) is not allowed.
5945            if max_ordinal == 0 {
5946                return Ok(());
5947            }
5948            depth.increment()?;
5949            let envelope_size = 8;
5950            let bytes_len = max_ordinal as usize * envelope_size;
5951            #[allow(unused_variables)]
5952            let offset = encoder.out_of_line_offset(bytes_len);
5953            let mut _prev_end_offset: usize = 0;
5954            if 1 > max_ordinal {
5955                return Ok(());
5956            }
5957
5958            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5959            // are envelope_size bytes.
5960            let cur_offset: usize = (1 - 1) * envelope_size;
5961
5962            // Zero reserved fields.
5963            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5964
5965            // Safety:
5966            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5967            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5968            //   envelope_size bytes, there is always sufficient room.
5969            fidl::encoding::encode_in_envelope_optional::<u32, D>(
5970                self.additional_present_credits
5971                    .as_ref()
5972                    .map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
5973                encoder,
5974                offset + cur_offset,
5975                depth,
5976            )?;
5977
5978            _prev_end_offset = cur_offset + envelope_size;
5979            if 2 > max_ordinal {
5980                return Ok(());
5981            }
5982
5983            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5984            // are envelope_size bytes.
5985            let cur_offset: usize = (2 - 1) * envelope_size;
5986
5987            // Zero reserved fields.
5988            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5989
5990            // Safety:
5991            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5992            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5993            //   envelope_size bytes, there is always sufficient room.
5994            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl_fuchsia_scenic_scheduling::PresentationInfo, 8>, D>(
5995            self.future_presentation_infos.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_scenic_scheduling::PresentationInfo, 8> as fidl::encoding::ValueTypeMarker>::borrow),
5996            encoder, offset + cur_offset, depth
5997        )?;
5998
5999            _prev_end_offset = cur_offset + envelope_size;
6000
6001            Ok(())
6002        }
6003    }
6004
6005    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6006        for OnNextFrameBeginValues
6007    {
6008        #[inline(always)]
6009        fn new_empty() -> Self {
6010            Self::default()
6011        }
6012
6013        unsafe fn decode(
6014            &mut self,
6015            decoder: &mut fidl::encoding::Decoder<'_, D>,
6016            offset: usize,
6017            mut depth: fidl::encoding::Depth,
6018        ) -> fidl::Result<()> {
6019            decoder.debug_check_bounds::<Self>(offset);
6020            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6021                None => return Err(fidl::Error::NotNullable),
6022                Some(len) => len,
6023            };
6024            // Calling decoder.out_of_line_offset(0) is not allowed.
6025            if len == 0 {
6026                return Ok(());
6027            };
6028            depth.increment()?;
6029            let envelope_size = 8;
6030            let bytes_len = len * envelope_size;
6031            let offset = decoder.out_of_line_offset(bytes_len)?;
6032            // Decode the envelope for each type.
6033            let mut _next_ordinal_to_read = 0;
6034            let mut next_offset = offset;
6035            let end_offset = offset + bytes_len;
6036            _next_ordinal_to_read += 1;
6037            if next_offset >= end_offset {
6038                return Ok(());
6039            }
6040
6041            // Decode unknown envelopes for gaps in ordinals.
6042            while _next_ordinal_to_read < 1 {
6043                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6044                _next_ordinal_to_read += 1;
6045                next_offset += envelope_size;
6046            }
6047
6048            let next_out_of_line = decoder.next_out_of_line();
6049            let handles_before = decoder.remaining_handles();
6050            if let Some((inlined, num_bytes, num_handles)) =
6051                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6052            {
6053                let member_inline_size =
6054                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6055                if inlined != (member_inline_size <= 4) {
6056                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6057                }
6058                let inner_offset;
6059                let mut inner_depth = depth.clone();
6060                if inlined {
6061                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6062                    inner_offset = next_offset;
6063                } else {
6064                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6065                    inner_depth.increment()?;
6066                }
6067                let val_ref =
6068                    self.additional_present_credits.get_or_insert_with(|| fidl::new_empty!(u32, D));
6069                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
6070                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6071                {
6072                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6073                }
6074                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6075                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6076                }
6077            }
6078
6079            next_offset += envelope_size;
6080            _next_ordinal_to_read += 1;
6081            if next_offset >= end_offset {
6082                return Ok(());
6083            }
6084
6085            // Decode unknown envelopes for gaps in ordinals.
6086            while _next_ordinal_to_read < 2 {
6087                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6088                _next_ordinal_to_read += 1;
6089                next_offset += envelope_size;
6090            }
6091
6092            let next_out_of_line = decoder.next_out_of_line();
6093            let handles_before = decoder.remaining_handles();
6094            if let Some((inlined, num_bytes, num_handles)) =
6095                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6096            {
6097                let member_inline_size = <fidl::encoding::Vector<
6098                    fidl_fuchsia_scenic_scheduling::PresentationInfo,
6099                    8,
6100                > as fidl::encoding::TypeMarker>::inline_size(
6101                    decoder.context
6102                );
6103                if inlined != (member_inline_size <= 4) {
6104                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6105                }
6106                let inner_offset;
6107                let mut inner_depth = depth.clone();
6108                if inlined {
6109                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6110                    inner_offset = next_offset;
6111                } else {
6112                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6113                    inner_depth.increment()?;
6114                }
6115                let val_ref =
6116                self.future_presentation_infos.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_scenic_scheduling::PresentationInfo, 8>, D));
6117                fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_scenic_scheduling::PresentationInfo, 8>, D, val_ref, decoder, inner_offset, inner_depth)?;
6118                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6119                {
6120                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6121                }
6122                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6123                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6124                }
6125            }
6126
6127            next_offset += envelope_size;
6128
6129            // Decode the remaining unknown envelopes.
6130            while next_offset < end_offset {
6131                _next_ordinal_to_read += 1;
6132                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6133                next_offset += envelope_size;
6134            }
6135
6136            Ok(())
6137        }
6138    }
6139
6140    impl ViewportProperties {
6141        #[inline(always)]
6142        fn max_ordinal_present(&self) -> u64 {
6143            if let Some(_) = self.inset {
6144                return 2;
6145            }
6146            if let Some(_) = self.logical_size {
6147                return 1;
6148            }
6149            0
6150        }
6151    }
6152
6153    impl fidl::encoding::ValueTypeMarker for ViewportProperties {
6154        type Borrowed<'a> = &'a Self;
6155        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6156            value
6157        }
6158    }
6159
6160    unsafe impl fidl::encoding::TypeMarker for ViewportProperties {
6161        type Owned = Self;
6162
6163        #[inline(always)]
6164        fn inline_align(_context: fidl::encoding::Context) -> usize {
6165            8
6166        }
6167
6168        #[inline(always)]
6169        fn inline_size(_context: fidl::encoding::Context) -> usize {
6170            16
6171        }
6172    }
6173
6174    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ViewportProperties, D>
6175        for &ViewportProperties
6176    {
6177        unsafe fn encode(
6178            self,
6179            encoder: &mut fidl::encoding::Encoder<'_, D>,
6180            offset: usize,
6181            mut depth: fidl::encoding::Depth,
6182        ) -> fidl::Result<()> {
6183            encoder.debug_check_bounds::<ViewportProperties>(offset);
6184            // Vector header
6185            let max_ordinal: u64 = self.max_ordinal_present();
6186            encoder.write_num(max_ordinal, offset);
6187            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6188            // Calling encoder.out_of_line_offset(0) is not allowed.
6189            if max_ordinal == 0 {
6190                return Ok(());
6191            }
6192            depth.increment()?;
6193            let envelope_size = 8;
6194            let bytes_len = max_ordinal as usize * envelope_size;
6195            #[allow(unused_variables)]
6196            let offset = encoder.out_of_line_offset(bytes_len);
6197            let mut _prev_end_offset: usize = 0;
6198            if 1 > max_ordinal {
6199                return Ok(());
6200            }
6201
6202            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6203            // are envelope_size bytes.
6204            let cur_offset: usize = (1 - 1) * envelope_size;
6205
6206            // Zero reserved fields.
6207            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6208
6209            // Safety:
6210            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6211            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6212            //   envelope_size bytes, there is always sufficient room.
6213            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_math::SizeU, D>(
6214                self.logical_size
6215                    .as_ref()
6216                    .map(<fidl_fuchsia_math::SizeU as fidl::encoding::ValueTypeMarker>::borrow),
6217                encoder,
6218                offset + cur_offset,
6219                depth,
6220            )?;
6221
6222            _prev_end_offset = cur_offset + envelope_size;
6223            if 2 > max_ordinal {
6224                return Ok(());
6225            }
6226
6227            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6228            // are envelope_size bytes.
6229            let cur_offset: usize = (2 - 1) * envelope_size;
6230
6231            // Zero reserved fields.
6232            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6233
6234            // Safety:
6235            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6236            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6237            //   envelope_size bytes, there is always sufficient room.
6238            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_math::Inset, D>(
6239                self.inset
6240                    .as_ref()
6241                    .map(<fidl_fuchsia_math::Inset as fidl::encoding::ValueTypeMarker>::borrow),
6242                encoder,
6243                offset + cur_offset,
6244                depth,
6245            )?;
6246
6247            _prev_end_offset = cur_offset + envelope_size;
6248
6249            Ok(())
6250        }
6251    }
6252
6253    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ViewportProperties {
6254        #[inline(always)]
6255        fn new_empty() -> Self {
6256            Self::default()
6257        }
6258
6259        unsafe fn decode(
6260            &mut self,
6261            decoder: &mut fidl::encoding::Decoder<'_, D>,
6262            offset: usize,
6263            mut depth: fidl::encoding::Depth,
6264        ) -> fidl::Result<()> {
6265            decoder.debug_check_bounds::<Self>(offset);
6266            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6267                None => return Err(fidl::Error::NotNullable),
6268                Some(len) => len,
6269            };
6270            // Calling decoder.out_of_line_offset(0) is not allowed.
6271            if len == 0 {
6272                return Ok(());
6273            };
6274            depth.increment()?;
6275            let envelope_size = 8;
6276            let bytes_len = len * envelope_size;
6277            let offset = decoder.out_of_line_offset(bytes_len)?;
6278            // Decode the envelope for each type.
6279            let mut _next_ordinal_to_read = 0;
6280            let mut next_offset = offset;
6281            let end_offset = offset + bytes_len;
6282            _next_ordinal_to_read += 1;
6283            if next_offset >= end_offset {
6284                return Ok(());
6285            }
6286
6287            // Decode unknown envelopes for gaps in ordinals.
6288            while _next_ordinal_to_read < 1 {
6289                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6290                _next_ordinal_to_read += 1;
6291                next_offset += envelope_size;
6292            }
6293
6294            let next_out_of_line = decoder.next_out_of_line();
6295            let handles_before = decoder.remaining_handles();
6296            if let Some((inlined, num_bytes, num_handles)) =
6297                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6298            {
6299                let member_inline_size =
6300                    <fidl_fuchsia_math::SizeU as fidl::encoding::TypeMarker>::inline_size(
6301                        decoder.context,
6302                    );
6303                if inlined != (member_inline_size <= 4) {
6304                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6305                }
6306                let inner_offset;
6307                let mut inner_depth = depth.clone();
6308                if inlined {
6309                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6310                    inner_offset = next_offset;
6311                } else {
6312                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6313                    inner_depth.increment()?;
6314                }
6315                let val_ref = self
6316                    .logical_size
6317                    .get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_math::SizeU, D));
6318                fidl::decode!(
6319                    fidl_fuchsia_math::SizeU,
6320                    D,
6321                    val_ref,
6322                    decoder,
6323                    inner_offset,
6324                    inner_depth
6325                )?;
6326                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6327                {
6328                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6329                }
6330                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6331                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6332                }
6333            }
6334
6335            next_offset += envelope_size;
6336            _next_ordinal_to_read += 1;
6337            if next_offset >= end_offset {
6338                return Ok(());
6339            }
6340
6341            // Decode unknown envelopes for gaps in ordinals.
6342            while _next_ordinal_to_read < 2 {
6343                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6344                _next_ordinal_to_read += 1;
6345                next_offset += envelope_size;
6346            }
6347
6348            let next_out_of_line = decoder.next_out_of_line();
6349            let handles_before = decoder.remaining_handles();
6350            if let Some((inlined, num_bytes, num_handles)) =
6351                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6352            {
6353                let member_inline_size =
6354                    <fidl_fuchsia_math::Inset as fidl::encoding::TypeMarker>::inline_size(
6355                        decoder.context,
6356                    );
6357                if inlined != (member_inline_size <= 4) {
6358                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6359                }
6360                let inner_offset;
6361                let mut inner_depth = depth.clone();
6362                if inlined {
6363                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6364                    inner_offset = next_offset;
6365                } else {
6366                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6367                    inner_depth.increment()?;
6368                }
6369                let val_ref =
6370                    self.inset.get_or_insert_with(|| fidl::new_empty!(fidl_fuchsia_math::Inset, D));
6371                fidl::decode!(
6372                    fidl_fuchsia_math::Inset,
6373                    D,
6374                    val_ref,
6375                    decoder,
6376                    inner_offset,
6377                    inner_depth
6378                )?;
6379                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6380                {
6381                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6382                }
6383                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6384                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6385                }
6386            }
6387
6388            next_offset += envelope_size;
6389
6390            // Decode the remaining unknown envelopes.
6391            while next_offset < end_offset {
6392                _next_ordinal_to_read += 1;
6393                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6394                next_offset += envelope_size;
6395            }
6396
6397            Ok(())
6398        }
6399    }
6400}