fidl_fuchsia_ui_gfx/
fidl_fuchsia_ui_gfx.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::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13/// Maximum length for a resource label.
14pub const LABEL_MAX_LENGTH: u32 = 32;
15
16/// Reports metrics information.
17/// This event type is only reported for node resources.
18pub const METRICS_EVENT_MASK: u32 = 1;
19
20pub const SIZE_CHANGE_HINT_EVENT_MASK: u32 = 2;
21
22/// Describes how nodes interact with hit testings.
23#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
24#[repr(u32)]
25pub enum HitTestBehavior {
26    /// Apply hit testing to the node's content, its parts, and its children.
27    KDefault = 0,
28    /// Suppress hit testing of the node and everything it contains.
29    KSuppress = 1,
30}
31
32impl HitTestBehavior {
33    #[inline]
34    pub fn from_primitive(prim: u32) -> Option<Self> {
35        match prim {
36            0 => Some(Self::KDefault),
37            1 => Some(Self::KSuppress),
38            _ => None,
39        }
40    }
41
42    #[inline]
43    pub const fn into_primitive(self) -> u32 {
44        self as u32
45    }
46
47    #[deprecated = "Strict enums should not use `is_unknown`"]
48    #[inline]
49    pub fn is_unknown(&self) -> bool {
50        false
51    }
52}
53
54/// Describes an exported resource that is to be imported by an
55/// ImportResourceCmd.
56///
57/// NOTE: Currently just an enum of importable resource types, but may later be
58/// expanded to express concepts like "meshes with a particular vertex format".
59#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
60#[repr(u32)]
61pub enum ImportSpec {
62    Node = 0,
63}
64
65impl ImportSpec {
66    #[inline]
67    pub fn from_primitive(prim: u32) -> Option<Self> {
68        match prim {
69            0 => Some(Self::Node),
70            _ => None,
71        }
72    }
73
74    #[inline]
75    pub const fn into_primitive(self) -> u32 {
76        self as u32
77    }
78
79    #[deprecated = "Strict enums should not use `is_unknown`"]
80    #[inline]
81    pub fn is_unknown(&self) -> bool {
82        false
83    }
84}
85
86/// Set a mesh's indices and vertices.
87///
88/// `mesh_id` refs the Mesh to be updated.
89/// `index_buffer_id` refs a Buffer that contains the mesh indices.
90/// `index_format` defines how the index buffer data is to be interpreted.
91/// `index_offset` number of bytes from the start of the index Buffer.
92/// `index_count` number of indices.
93/// `vertex_buffer_id` refs a Buffer that contains the mesh vertices.
94/// `vertex_format` defines how the vertex buffer data is to be interpreted.
95/// `vertex_offset` number of bytes from the start of the vertex Buffer.
96/// `vertex_count` number of vertices.
97/// `bounding_box` must contain all vertices within the specified range.
98///
99/// The MeshVertexFormat defines which per-vertex attributes are provided by the
100/// mesh, and the size of each attribute (and therefore the size of each vertex).
101/// The attributes are ordered within the vertex in the same order that they
102/// appear within the MeshVertexFormat struct.  For example, if the values are
103/// kVector3, kNone and kVector2, then:
104///   - each vertex has a position and UV-coordinates, but no surface normal.
105///   - the 3D position occupies bytes 0-11 (3 dimensions * 4 bytes per float32).
106///   - the UV coords occupy bytes 12-19, since no surface normal is provided.
107#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
108#[repr(u32)]
109pub enum MeshIndexFormat {
110    KUint16 = 1,
111    KUint32 = 2,
112}
113
114impl MeshIndexFormat {
115    #[inline]
116    pub fn from_primitive(prim: u32) -> Option<Self> {
117        match prim {
118            1 => Some(Self::KUint16),
119            2 => Some(Self::KUint32),
120            _ => None,
121        }
122    }
123
124    #[inline]
125    pub const fn into_primitive(self) -> u32 {
126        self as u32
127    }
128
129    #[deprecated = "Strict enums should not use `is_unknown`"]
130    #[inline]
131    pub fn is_unknown(&self) -> bool {
132        false
133    }
134}
135
136#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
137#[repr(u32)]
138pub enum RenderFrequency {
139    WhenRequested = 0,
140    Continuously = 1,
141}
142
143impl RenderFrequency {
144    #[inline]
145    pub fn from_primitive(prim: u32) -> Option<Self> {
146        match prim {
147            0 => Some(Self::WhenRequested),
148            1 => Some(Self::Continuously),
149            _ => None,
150        }
151    }
152
153    #[inline]
154    pub const fn into_primitive(self) -> u32 {
155        self as u32
156    }
157
158    #[deprecated = "Strict enums should not use `is_unknown`"]
159    #[inline]
160    pub fn is_unknown(&self) -> bool {
161        false
162    }
163}
164
165/// Represents the shadow algorithm that the `Renderer` should use when lighting
166/// the scene.
167#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
168#[repr(u32)]
169pub enum ShadowTechnique {
170    /// No shadows.
171    Unshadowed = 0,
172    /// Default.  Screen-space, depth-buffer based shadows; SSDO-ish.
173    ScreenSpace = 1,
174    /// Basic shadow map.
175    ShadowMap = 2,
176    /// Moment shadow map (see http:///momentsingraphics.de).
177    MomentShadowMap = 3,
178    /// Stencil shadow volume.
179    StencilShadowVolume = 4,
180}
181
182impl ShadowTechnique {
183    #[inline]
184    pub fn from_primitive(prim: u32) -> Option<Self> {
185        match prim {
186            0 => Some(Self::Unshadowed),
187            1 => Some(Self::ScreenSpace),
188            2 => Some(Self::ShadowMap),
189            3 => Some(Self::MomentShadowMap),
190            4 => Some(Self::StencilShadowVolume),
191            _ => None,
192        }
193    }
194
195    #[inline]
196    pub const fn into_primitive(self) -> u32 {
197        self as u32
198    }
199
200    #[deprecated = "Strict enums should not use `is_unknown`"]
201    #[inline]
202    pub fn is_unknown(&self) -> bool {
203        false
204    }
205}
206
207#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
208#[repr(u32)]
209pub enum ValueType {
210    KNone = 0,
211    KVector1 = 1,
212    KVector2 = 2,
213    KVector3 = 3,
214    KVector4 = 4,
215    KMatrix4 = 5,
216    KColorRgb = 6,
217    KColorRgba = 7,
218    KQuaternion = 8,
219    KFactoredTransform = 9,
220}
221
222impl ValueType {
223    #[inline]
224    pub fn from_primitive(prim: u32) -> Option<Self> {
225        match prim {
226            0 => Some(Self::KNone),
227            1 => Some(Self::KVector1),
228            2 => Some(Self::KVector2),
229            3 => Some(Self::KVector3),
230            4 => Some(Self::KVector4),
231            5 => Some(Self::KMatrix4),
232            6 => Some(Self::KColorRgb),
233            7 => Some(Self::KColorRgba),
234            8 => Some(Self::KQuaternion),
235            9 => Some(Self::KFactoredTransform),
236            _ => None,
237        }
238    }
239
240    #[inline]
241    pub const fn into_primitive(self) -> u32 {
242        self as u32
243    }
244
245    #[deprecated = "Strict enums should not use `is_unknown`"]
246    #[inline]
247    pub fn is_unknown(&self) -> bool {
248        false
249    }
250}
251
252/// Add a node as a child to another node.
253///
254/// Constraints:
255/// - `id` refs a Node with the has_children characteristic.
256/// - `child_id` refs any Node.
257///
258/// Discussion:
259/// The child node is first removed from its existing parent, as if DetachCmd
260/// was applied first.
261#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
262#[repr(C)]
263pub struct AddChildCmd {
264    pub node_id: u32,
265    pub child_id: u32,
266}
267
268impl fidl::Persistable for AddChildCmd {}
269
270/// Add a layer to a layer stack.
271/// Constraints:
272/// - `layer_stack_id` refs a `LayerStack`.
273/// - `layer_id` refs a `Layer`.
274/// - The layer must not already belong to a different stack; it must first be
275///   detached.
276#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
277#[repr(C)]
278pub struct AddLayerCmd {
279    pub layer_stack_id: u32,
280    pub layer_id: u32,
281}
282
283impl fidl::Persistable for AddLayerCmd {}
284
285/// Adds the light specified by `light_id` specified by `light_id` to the scene
286/// identified by `scene_id`.
287#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
288#[repr(C)]
289pub struct AddLightCmd {
290    pub scene_id: u32,
291    pub light_id: u32,
292}
293
294impl fidl::Persistable for AddLightCmd {}
295
296/// Add a node as a part of another node.  The implications of being a part
297/// rather than a child differ based on the type of the part.  However, one
298/// implication is constant: removing all of a node's children (e.g. via
299/// DetachChildrenCmd) does not affect its parts.  This is similar to the
300/// "shadow DOM" in a web browser: the controls of a <video> element are
301/// implemented as using the shadow DOM, and do no show up amongst the children
302/// of that element.
303///
304/// Constraints:
305/// - `id` refs a Node with the has_parts characteristic.
306/// - `part_id` refs any Node.
307///
308/// Discussion:
309/// The part node is first removed from its existing parent, as if DetachCmd
310/// was applied first.
311#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
312#[repr(C)]
313pub struct AddPartCmd {
314    pub node_id: u32,
315    pub part_id: u32,
316}
317
318impl fidl::Persistable for AddPartCmd {}
319
320/// An AmbientLight is a Light that is is assumed to be everywhere in the scene,
321/// in all directions.
322///
323/// Supported commands:
324/// - SetLightColor
325#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
326#[repr(C)]
327pub struct AmbientLightArgs {
328    pub dummy: u32,
329}
330
331impl fidl::Persistable for AmbientLightArgs {}
332
333#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
334pub struct BindMeshBuffersCmd {
335    pub mesh_id: u32,
336    pub index_buffer_id: u32,
337    pub index_format: MeshIndexFormat,
338    pub index_offset: u64,
339    pub index_count: u32,
340    pub vertex_buffer_id: u32,
341    pub vertex_format: MeshVertexFormat,
342    pub vertex_offset: u64,
343    pub vertex_count: u32,
344    pub bounding_box: BoundingBox,
345}
346
347impl fidl::Persistable for BindMeshBuffersCmd {}
348
349/// Represents an axis-aligned bounding box.
350///
351/// If any of the dimensions has a negative extent (e.g. max.x < min.x) then the
352/// bounding box is treated as empty. It is valid for a client to define an
353/// empty bounding box.
354///
355/// An "empty bounding box" is one that does not admit a point inhabitant.
356/// Note that a zero-volume, zero-area bounding box (e.g., a point like
357/// (0,0,0)-(0,0,0), or a line like (0,0,0)-(1,0,0)) is thus not empty.
358#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
359pub struct BoundingBox {
360    pub min: Vec3,
361    pub max: Vec3,
362}
363
364impl fidl::Persistable for BoundingBox {}
365
366/// A buffer mapped to a range of `Memory`.
367#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
368#[repr(C)]
369pub struct BufferArgs {
370    pub memory_id: u32,
371    pub memory_offset: u32,
372    pub num_bytes: u32,
373}
374
375impl fidl::Persistable for BufferArgs {}
376
377/// A Camera is used to render a Scene from a particular viewpoint.  This is
378/// achieved by setting a Renderer to use the camera.
379///
380/// The following commands may be applied to a Camera:
381/// - SetCameraTransform
382/// - SetCameraProjection
383/// - SetCameraPoseBuffer
384#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
385#[repr(C)]
386pub struct CameraArgs {
387    /// The scene that the camera is viewing.
388    pub scene_id: u32,
389}
390
391impl fidl::Persistable for CameraArgs {}
392
393#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
394pub struct CircleArgs {
395    pub radius: Value,
396}
397
398impl fidl::Persistable for CircleArgs {}
399
400/// Characteristics:
401/// - has_parent
402/// - is_clip
403/// - has_parts
404#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
405#[repr(C)]
406pub struct ClipNodeArgs {
407    pub unused: u32,
408}
409
410impl fidl::Persistable for ClipNodeArgs {}
411
412#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
413pub struct ColorRgb {
414    pub red: f32,
415    pub green: f32,
416    pub blue: f32,
417}
418
419impl fidl::Persistable for ColorRgb {}
420
421/// A value that is specified explicitly by `value` if `variable_id` is zero,
422/// or is the value produced by the resource identified by `variable_id`, e.g.
423/// an animation or expression.  In the latter case, the value produced by the
424/// resource must be a ColorRgb, and `value` is ignored.
425#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
426pub struct ColorRgbValue {
427    pub value: ColorRgb,
428    pub variable_id: u32,
429}
430
431impl fidl::Persistable for ColorRgbValue {}
432
433/// sRGB color space and nonlinear transfer function.
434#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
435#[repr(C)]
436pub struct ColorRgba {
437    pub red: u8,
438    pub green: u8,
439    pub blue: u8,
440    pub alpha: u8,
441}
442
443impl fidl::Persistable for ColorRgba {}
444
445/// A value that is specified explicitly by `value` if `variable_id` is zero,
446/// or is the value produced by the resource identified by `variable_id`, e.g.
447/// an animation or expression.  In the latter case, the value produced by the
448/// resource must be a ColorRgba, and `value` is ignored.
449#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
450#[repr(C)]
451pub struct ColorRgbaValue {
452    pub value: ColorRgba,
453    pub variable_id: u32,
454}
455
456impl fidl::Persistable for ColorRgbaValue {}
457
458/// A Compositor draws its `LayerStack` into a framebuffer provided by its
459/// attached `Display`, if any.  If no display is attached, nothing is rendered.
460#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
461#[repr(C)]
462pub struct CompositorArgs {
463    pub dummy: u32,
464}
465
466impl fidl::Persistable for CompositorArgs {}
467
468/// Instructs the compositor to create the specified `Resource`, and to register
469/// it in a table so that it can be referenced by subsequent commands.
470#[derive(Debug, PartialEq)]
471pub struct CreateResourceCmd {
472    /// An ID that is currently not used within the session.
473    pub id: u32,
474    pub resource: ResourceArgs,
475}
476
477impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for CreateResourceCmd {}
478
479/// Detaches all of a node's children (but not its parts).
480#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
481#[repr(C)]
482pub struct DetachChildrenCmd {
483    pub node_id: u32,
484}
485
486impl fidl::Persistable for DetachChildrenCmd {}
487
488/// Detaches a parentable object from its parent (e.g. a node from a parent node,
489/// or a layer from a layer stack).  It is illegal to apply this command to a
490/// non-parentable object.  No-op if the target object currently has no parent.
491///
492/// Constraints:
493/// - `id` refs a parentable object
494///
495/// Discussion:
496/// For nodes, this command will detach a node from its parent, regardless of
497/// whether it is a part or a child of its parent.
498#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
499#[repr(C)]
500pub struct DetachCmd {
501    pub id: u32,
502}
503
504impl fidl::Persistable for DetachCmd {}
505
506/// Detach the light specified by `light_id` from the scene that it is attached
507/// to, if any.
508#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
509#[repr(C)]
510pub struct DetachLightCmd {
511    pub light_id: u32,
512}
513
514impl fidl::Persistable for DetachLightCmd {}
515
516/// Detach all lights from the scene specified by `scene_id`.
517#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
518#[repr(C)]
519pub struct DetachLightsCmd {
520    pub scene_id: u32,
521}
522
523impl fidl::Persistable for DetachLightsCmd {}
524
525/// A DirectionalLight is a Light that is emitted from a point at infinity.
526///
527/// Although the light is directional, the light has some amount of angular
528/// dispersion (i.e., the light is not fully columnated). For simplicity, we
529/// assume the dispersion of the light source is symmetric about the light's
530/// primary direction.
531///
532/// Supported commands:
533/// - SetLightColor
534/// - SetLightDirection
535#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
536#[repr(C)]
537pub struct DirectionalLightArgs {
538    pub dummy: u32,
539}
540
541impl fidl::Persistable for DirectionalLightArgs {}
542
543/// A DisplayCompositor draws its attached `LayerStack` into an image that is
544/// presented on a display.
545#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
546#[repr(C)]
547pub struct DisplayCompositorArgs {
548    pub dummy: u32,
549}
550
551impl fidl::Persistable for DisplayCompositorArgs {}
552
553/// Provides information about a display.
554#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
555#[repr(C)]
556pub struct DisplayInfo {
557    /// The size of the display, in physical pixels.
558    pub width_in_px: u32,
559    pub height_in_px: u32,
560}
561
562impl fidl::Persistable for DisplayInfo {}
563
564/// Characteristics:
565/// - has_transform
566/// - has_children
567/// - has_parent
568/// - has_parts
569/// - has_clip
570#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
571#[repr(C)]
572pub struct EntityNodeArgs {
573    pub unused: u32,
574}
575
576impl fidl::Persistable for EntityNodeArgs {}
577
578/// Create an external reference to the specified resource, which can then be
579/// imported into another Session by passing a handle to `token`'s peer to
580/// ImportResourceCmd; see that comment for more details.
581///
582/// The importing client is typically in a different process than the exporter.
583/// No specific mechanism is provided for transferring a token from an exporter
584/// to an importer; collaborators may choose any out-of-band API they wish to do
585/// so.
586#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
587pub struct ExportResourceCmdDeprecated {
588    pub id: u32,
589    pub token: fidl::EventPair,
590}
591
592impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
593    for ExportResourceCmdDeprecated
594{
595}
596
597/// Token that uniquely identifies a root point for a subgraph in the global
598/// scene graph. Each `ExportToken` has exactly one corresponding `ImportToken`.
599///
600/// A Scenic client can have its contents referenced from another client by
601/// creating a typed resource using this token.  The other client must also
602/// create a correspondingly typed resource using the corresponding
603/// `ImportToken`.
604///
605/// The exact nature of the inter-client reference depends on the specific
606/// resources created from the tokens.  For example, creating a `View`
607/// resource from this token allows everything attached to the `View` to be
608/// embedded in another clients `ViewHolder`.
609#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
610pub struct ExportToken {
611    pub value: fidl::EventPair,
612}
613
614impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ExportToken {}
615
616#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
617pub struct FactoredTransform {
618    pub translation: Vec3,
619    pub scale: Vec3,
620    /// Point around which rotation and scaling occur.
621    pub anchor: Vec3,
622    pub rotation: Quaternion,
623}
624
625impl fidl::Persistable for FactoredTransform {}
626
627/// A value that is specified explicitly by `value` if `variable_id` is zero,
628/// or is the value produced by the resource identified by `variable_id`, e.g.
629/// an animation or expression.  In the latter case, the value produced by the
630/// resource must be a float32, and `value` is ignored.
631#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
632pub struct FloatValue {
633    pub value: f32,
634    pub variable_id: u32,
635}
636
637impl fidl::Persistable for FloatValue {}
638
639/// An image mapped to a range of a `Memory` resource.
640#[derive(Clone, Debug, PartialEq)]
641pub struct ImageArgs {
642    pub info: fidl_fuchsia_images::ImageInfo,
643    pub memory_id: u32,
644    pub memory_offset: u32,
645}
646
647impl fidl::Persistable for ImageArgs {}
648
649/// An image mapped to a range of a `Memory` resource.
650#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
651#[repr(C)]
652pub struct ImageArgs2 {
653    pub width: u32,
654    pub height: u32,
655    /// The id of a `BufferCollection`. Before creating this resource, the
656    /// buffer collection should be registered on the same `Session` with
657    /// `RegisterBufferCollection` and it should have its contraints set.
658    /// Once the buffers are allocated successfully (e.g. after calling
659    /// `WaitForBuffersAllocated`), the collection's id can be used to create
660    /// the image resource.
661    pub buffer_collection_id: u32,
662    /// The index of the VMO from the `BufferCollection` that backs this image.
663    pub buffer_collection_index: u32,
664}
665
666impl fidl::Persistable for ImageArgs2 {}
667
668/// An image that is backed by a `BufferCollection` registered with `Allocator`.
669#[derive(Debug, PartialEq)]
670pub struct ImageArgs3 {
671    pub width: u32,
672    pub height: u32,
673    /// Image creation requires an allocated `BufferCollection` registered with Allocator.
674    /// `import_token` should be the other end of a BufferCollectionExportToken that is
675    /// successfully registered. All clients of the specified BufferCollection must have set
676    /// their constraints and buffers should be allocated before calling.
677    pub import_token: fidl_fuchsia_ui_composition::BufferCollectionImportToken,
678    /// The index of the VMO from the `BufferCollection` that backs this image.
679    pub buffer_collection_index: u32,
680}
681
682impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ImageArgs3 {}
683
684/// `ImagePipe2` is a `Resource` that can be used as a `Texture` for a `Material`.
685#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
686pub struct ImagePipe2Args {
687    pub image_pipe_request: fidl::endpoints::ServerEnd<fidl_fuchsia_images::ImagePipe2Marker>,
688}
689
690impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ImagePipe2Args {}
691
692/// Import a resource that was exported via ExportResourceCmd().  `token` is
693/// a handle to the eventpair peer that was used to export the resource, and
694/// `spec` describes the type of the imported resource, and the commands which
695/// can legally be applied to it.  Afterward, `id` can be used to refer to the
696/// resource in an Command, similarly (but not identically: see below) to a
697/// resource that was created in the session.  For example, you can add children
698/// to an imported EntityNode via AddChildCmd.
699///
700/// However, note that the importer does not gain full access to the imported
701/// resource, but rather to an attenuated subset of its capabilities.  For
702/// example, you cannot use a DetachCmd to detach an imported EntityNode from
703/// its parent.
704///
705/// Unlike ExportResourceCmd, there is no configurable timeout.  There is an
706/// expectation that the exported resource will become available in a short
707/// amount of time.  TODO: this needs elaboration... e.g. we might notify via the
708/// SessionListener when we know that the link will never be made (e.g. if the
709/// peer of the import token is destroyed).
710#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
711pub struct ImportResourceCmdDeprecated {
712    pub id: u32,
713    pub token: fidl::EventPair,
714    pub spec: ImportSpec,
715}
716
717impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
718    for ImportResourceCmdDeprecated
719{
720}
721
722/// Token that uniquely identifies an attachment point for a subgraph in the
723/// global scene graph.  Each `ImportToken` has exactly one corresponding
724/// `ExportToken`.
725///
726/// A Scenic client can reference contents from another client by creating a
727/// typed resource using this token.  The other client must also create a
728/// correspondingly typed resource using the corresponding `ExportToken`.
729///
730/// The exact nature of the inter-client reference depends on the specific
731/// resources created from the tokens.  For example, creating a `ViewHolder`
732/// resource from this token allows a client to embed another client's `View`.
733#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
734pub struct ImportToken {
735    pub value: fidl::EventPair,
736}
737
738impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ImportToken {}
739
740/// Delivered when the imported resource with the given ID is no longer bound to
741/// its host resource, or if the imported resource can not be bound because
742/// the host resource is not available.
743#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
744#[repr(C)]
745pub struct ImportUnboundEvent {
746    pub resource_id: u32,
747}
748
749impl fidl::Persistable for ImportUnboundEvent {}
750
751/// A Layer is a 2-dimensional image that is drawn by a Compositor.  The
752/// contents of each Layer in a Layerstack are independent of each other.
753/// A layer is not drawn unless it has a camera, texture, or color.
754///
755/// Supported commands:
756/// - Detach
757/// - SetCamera
758/// - SetColor
759/// - SetTexture
760/// - SetSize (depth must be zero)
761/// - SetSize
762/// - SetTranslation (z component determines the relative Z-ordering of layers)
763/// - SetRotation (must rotate around Z-axis)
764/// - SetScale
765#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
766#[repr(C)]
767pub struct LayerArgs {
768    pub dummy: u32,
769}
770
771impl fidl::Persistable for LayerArgs {}
772
773/// A LayerStack is a stack of layers that are attached to a Compositor, which
774/// draws them in order of increasing Z-order (or rather, presents the illusion
775/// of drawing them in that order: it may apply any optimizations that don't
776/// affect the output).
777///
778/// Supported commands:
779/// - AddLayer
780#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
781#[repr(C)]
782pub struct LayerStackArgs {
783    pub dummy: u32,
784}
785
786impl fidl::Persistable for LayerStackArgs {}
787
788/// Simple texture-mapped material.
789///
790/// Supported commands:
791/// - SetTextureCmd: sets the texture, or it can be left as zero (no texture).
792///   The texture can be an Image or ImagePipe2.
793/// - SetColorCmd: sets the color.
794#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
795#[repr(C)]
796pub struct MaterialArgs {
797    pub dummy: u32,
798}
799
800impl fidl::Persistable for MaterialArgs {}
801
802/// A value that is specified explicitly by `value` if `variable_id` is zero,
803/// or is the value produced by the resource identified by `variable_id`, e.g.
804/// an animation or expression.  In the latter case, the value produced by the
805/// resource must be a vec4, and `value` is ignored.
806#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
807pub struct Matrix4Value {
808    pub value: Mat4,
809    pub variable_id: u32,
810}
811
812impl fidl::Persistable for Matrix4Value {}
813
814/// `Memory` is a `Resource` that wraps a client-provided Zircon vmo to register
815/// it with Scenic.
816#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
817pub struct MemoryArgs {
818    /// The VMO which backs this memory.
819    pub vmo: fidl::Vmo,
820    /// The amount of memory from `vmo` that should be utilized.
821    pub allocation_size: u64,
822    /// The type of memory stored in the VMO, namely whether it's GPU memory or
823    /// host memory.
824    pub memory_type: fidl_fuchsia_images::MemoryType,
825}
826
827impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for MemoryArgs {}
828
829/// A Mesh cannot be rendered until it has been bound to vertex/index buffers;
830/// see BindMeshBuffersCmd.
831#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
832pub struct MeshArgs;
833
834impl fidl::Persistable for MeshArgs {}
835
836#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
837pub struct MeshVertexFormat {
838    /// kVector2 or kVector3.
839    pub position_type: ValueType,
840    /// kVector2 or kVector3 (must match position_type), or kNone.
841    pub normal_type: ValueType,
842    /// kVector2 or kNone.
843    pub tex_coord_type: ValueType,
844}
845
846impl fidl::Persistable for MeshVertexFormat {}
847
848/// Rendering target metrics associated with a node.
849/// See also `MetricsEvent`.
850#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
851pub struct Metrics {
852    /// The ratio between the size of one logical pixel within the node's local
853    /// coordinate system and the size of one physical pixel of the rendering
854    /// target.
855    ///
856    /// This scale factors change in relation to the resolution of the rendering
857    /// target and the scale transformations applied by containing nodes.
858    /// They are always strictly positive and non-zero.
859    ///
860    /// For example, suppose the rendering target is a high resolution display
861    /// with a device pixel ratio of 2.0 meaning that each logical pixel
862    /// within the model corresponds to two physical pixels of the display.
863    /// Assuming no scale transformations affect the node, then its metrics event
864    /// will report a scale factor of 2.0.
865    ///
866    /// Building on this example, if instead the node's parent applies a
867    /// scale transformation of 0.25 to the node, then the node's metrics event
868    /// will report a scale factor of 0.5 indicating that the node should render
869    /// its content at a reduced resolution and level of detail since a smaller
870    /// area of physical pixels (half the size in each dimension) will be rendered.
871    pub scale_x: f32,
872    pub scale_y: f32,
873    pub scale_z: f32,
874}
875
876impl fidl::Persistable for Metrics {}
877
878/// Provides rendering target metrics information about the specified node.
879///
880/// This event is delivered when the following conditions are true:
881/// - The node is a descendant of a `Scene`.
882/// - The node has `kMetricsEventMask` set to an enabled state.
883/// - The node's metrics have changed since they were last delivered, or since
884///   `kMetricsEventMask` transitioned from a disabled state to an enabled state.
885///
886/// Subscribe to this event to receive information about the scale factors you
887/// should apply when generating textures for your nodes.
888#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
889pub struct MetricsEvent {
890    pub node_id: u32,
891    pub metrics: Metrics,
892}
893
894impl fidl::Persistable for MetricsEvent {}
895
896/// Characteristics:
897/// - has_transform
898/// - has_parent
899/// - has_children
900/// - has_parts
901/// - has_opacity
902#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
903#[repr(C)]
904pub struct OpacityNodeArgsHack {
905    pub unused: u32,
906}
907
908impl fidl::Persistable for OpacityNodeArgsHack {}
909
910/// Oriented plane described by a normal vector and a distance
911/// from the origin along that vector.
912#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
913pub struct Plane3 {
914    pub dir: Vec3,
915    pub dist: f32,
916}
917
918impl fidl::Persistable for Plane3 {}
919
920/// A PointLight is a Light that emits light in all directions.  By default, the
921/// intensity of the light falls off according to the physically based
922/// "inverse-square law" (see Wikipedia), although it can be adjusted to other
923/// values for artistic effect.
924///
925/// Supported commands:
926/// - SetLightColor
927/// - SetPointLightPosition
928/// - SetPointLightFalloff
929#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
930#[repr(C)]
931pub struct PointLightArgs {
932    pub dummy: u32,
933}
934
935impl fidl::Persistable for PointLightArgs {}
936
937#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
938pub struct Quaternion {
939    pub x: f32,
940    pub y: f32,
941    pub z: f32,
942    pub w: f32,
943}
944
945impl fidl::Persistable for Quaternion {}
946
947/// A value that is specified explicitly by `value` if `variable_id` is zero,
948/// or is the value produced by the resource identified by `variable_id`, e.g.
949/// an animation or expression.  In the latter case, the value produced by the
950/// resource must be a Quaternion, and `value` is ignored.
951#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
952pub struct QuaternionValue {
953    pub value: Quaternion,
954    pub variable_id: u32,
955}
956
957impl fidl::Persistable for QuaternionValue {}
958
959/// Rectangle centered at (0,0).
960#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
961pub struct RectangleArgs {
962    pub width: Value,
963    pub height: Value,
964}
965
966impl fidl::Persistable for RectangleArgs {}
967
968/// Releases the client's reference to the resource; it is then illegal to use
969/// the ID in subsequent Commands.  Other references to the resource may exist,
970/// so releasing the resource does not result in its immediate destruction; it is
971/// only destroyed once the last reference is released.  For example, the
972/// resource may be required to render an in-progress frame, or it may be
973/// referred to by another resource).  However, the ID will be immediately
974/// unregistered, and may be reused to create a new resource.
975#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
976#[repr(C)]
977pub struct ReleaseResourceCmd {
978    /// ID of the resource to be dereferenced.
979    pub id: u32,
980}
981
982impl fidl::Persistable for ReleaseResourceCmd {}
983
984/// Remove all layers from a layer stack.
985/// Constraints
986/// - `layer_stack_id` refs a `LayerStack`.
987#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
988#[repr(C)]
989pub struct RemoveAllLayersCmd {
990    pub layer_stack_id: u32,
991}
992
993impl fidl::Persistable for RemoveAllLayersCmd {}
994
995/// Remove a layer from a layer stack.
996/// Constraints:
997/// - `layer_stack_id` refs a `LayerStack`.
998/// - `layer_id` refs a `Layer`.
999/// - The layer must belong to this stack.
1000#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1001#[repr(C)]
1002pub struct RemoveLayerCmd {
1003    pub layer_stack_id: u32,
1004    pub layer_id: u32,
1005}
1006
1007impl fidl::Persistable for RemoveLayerCmd {}
1008
1009/// A Renderer renders a Scene via a Camera.
1010///
1011/// Supported commands:
1012/// - SetCamera
1013/// - SetRendererParam
1014#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1015#[repr(C)]
1016pub struct RendererArgs {
1017    pub dummy: u32,
1018}
1019
1020impl fidl::Persistable for RendererArgs {}
1021
1022/// RoundedRectangle centered at (0,0).  Legal parameter values must satisfy the
1023/// constraint that the flat sides of the rectangle have non-negative length.
1024/// In other words, the following constraints must hold:
1025///   - top_left_radius + top_right_radius <= width
1026///   - bottom_left_radius + bottom_right_radius <= width
1027///   - top_left_radius + bottom_left_radius <= height
1028///   - top_right_radius + bottom_right_radius <= height
1029#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1030pub struct RoundedRectangleArgs {
1031    pub width: Value,
1032    pub height: Value,
1033    pub top_left_radius: Value,
1034    pub top_right_radius: Value,
1035    pub bottom_right_radius: Value,
1036    pub bottom_left_radius: Value,
1037}
1038
1039impl fidl::Persistable for RoundedRectangleArgs {}
1040
1041/// Adds the light specified by `light_id` specified by `light_id` to the scene
1042/// identified by `scene_id`.
1043#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1044#[repr(C)]
1045pub struct SceneAddAmbientLightCmd {
1046    pub scene_id: u32,
1047    pub light_id: u32,
1048}
1049
1050impl fidl::Persistable for SceneAddAmbientLightCmd {}
1051
1052/// Adds the light specified by `light_id` specified by `light_id` to the scene
1053/// identified by `scene_id`.
1054#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1055#[repr(C)]
1056pub struct SceneAddDirectionalLightCmd {
1057    pub scene_id: u32,
1058    pub light_id: u32,
1059}
1060
1061impl fidl::Persistable for SceneAddDirectionalLightCmd {}
1062
1063/// Adds the light specified by `light_id` specified by `light_id` to the scene
1064/// identified by `scene_id`.
1065#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1066#[repr(C)]
1067pub struct SceneAddPointLightCmd {
1068    pub scene_id: u32,
1069    pub light_id: u32,
1070}
1071
1072impl fidl::Persistable for SceneAddPointLightCmd {}
1073
1074/// A Scene is the root of a scene-graph, and defines the rendering environment
1075/// (lighting, etc.) for the tree of nodes beneath it.
1076///
1077/// Supported commands:
1078/// - Add/RemoveLight
1079/// - AddChild
1080#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1081#[repr(C)]
1082pub struct SceneArgs {
1083    pub dummy: u32,
1084}
1085
1086impl fidl::Persistable for SceneArgs {}
1087
1088/// Sends a hint about a pending size change to the given node and all nodes
1089/// below. This is generally sent before an animation.
1090///
1091/// `width_change_factor` and `height_change_factor` is how much bigger or smaller
1092/// the item is expected to be in the near future. This one number encapsulate
1093/// both changes in scale, as well as changes to layout width and height.
1094#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1095pub struct SendSizeChangeHintCmdHack {
1096    pub node_id: u32,
1097    pub width_change_factor: f32,
1098    pub height_change_factor: f32,
1099}
1100
1101impl fidl::Persistable for SendSizeChangeHintCmdHack {}
1102
1103/// Sets a Resource's (typically a Node's) anchor point.
1104///
1105/// Constraints:
1106/// - `id` refs a Resource with the has_transform characteristic.
1107#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1108pub struct SetAnchorCmd {
1109    pub id: u32,
1110    pub value: Vector3Value,
1111}
1112
1113impl fidl::Persistable for SetAnchorCmd {}
1114
1115/// Sets a camera's 2D clip-space transform.
1116///
1117/// Constraints:
1118/// - `camera_id` refs a `Camera`.
1119/// - `translation` is the desired translation, in Vulkan NDC.
1120/// - `scale` is the scale factor to apply on the x/y plane before translation.
1121#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1122pub struct SetCameraClipSpaceTransformCmd {
1123    pub camera_id: u32,
1124    pub translation: Vec2,
1125    pub scale: f32,
1126}
1127
1128impl fidl::Persistable for SetCameraClipSpaceTransformCmd {}
1129
1130/// Sets a renderer's camera.
1131///
1132/// Constraints:
1133/// - `renderer_id` refs a `Renderer`.
1134/// - `camera_id` refs a `Camera`, or stops rendering by passing zero.
1135/// - `matrix` is a value or variable of type kMatrix4x4.
1136#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1137#[repr(C)]
1138pub struct SetCameraCmd {
1139    pub renderer_id: u32,
1140    pub camera_id: u32,
1141}
1142
1143impl fidl::Persistable for SetCameraCmd {}
1144
1145/// Sets the "pose buffer" for the camera identified by `camera_id`.
1146/// This operation can be applied to both Cameras and StereoCameras.
1147///
1148/// This will override any position and rotation set for the camera and will
1149/// make it take its position and rotation from the pose buffer each frame
1150/// based on the presentation time for that frame.
1151///
1152/// A pose buffer represents a ring buffer of poses for a fixed number of time
1153/// points in the future. Each entry in the buffer identified by `buffer_id` is
1154/// a quaternion and a position layed out as follows:
1155///
1156/// struct Pose {
1157///   // Quaternion
1158///   float32 a;
1159///   float32 b;
1160///   float32 c;
1161///   float32 d;
1162///
1163///   // Position
1164///   float32 x;
1165///   float32 y;
1166///   float32 z;
1167///
1168///   // Reserved/Padding
1169///   byte[4] reserved;
1170/// }
1171///
1172/// The buffer can be thought of as a packed array of `num_entries` Pose structs
1173/// and is required to be at least num_entries * sizeof(Pose) bytes.
1174///
1175/// The quaternions and positions are specified in the space of the camera's
1176/// parent node.
1177///
1178/// `base_time` is a base time point expressed in nanoseconds in the
1179/// `CLOCK_MONOTONIC` timebase and `time_interval` is the time in nanoseconds
1180/// between entries in the buffer. `base_time` must be in the past.
1181///
1182/// For a given point in time `t` expressed in nanoseconds in the
1183/// `CLOCK_MONOTONIC` timebase the index of the corresponding pose in
1184/// the pose buffer can be computed as follows:
1185///
1186/// index(t) = ((t - base_time) / time_interval) % num_entries
1187///
1188/// poses[index(t)] is valid for t over the time interval (t - time_interval, t]
1189/// and should be expected to updated continuously without synchronization
1190/// for the duration of that interval. If a single pose value is needed for
1191/// multiple non-atomic operations a value should be latched and stored outside
1192/// the pose buffer.
1193///
1194/// Because the poses are not protected by any synchronization primitives it is
1195/// possible that when a pose is latched it will be only partially updated, and
1196/// the pose being read will contain some components from the pose before it is
1197/// updated and some components from the updated pose. The safety of using these
1198/// "torn" poses relies on two things:
1199///
1200/// 1) Sequential poses written to poses[index(t)] are very similar to each
1201/// other numerically, so that if some components are taken from the first and
1202/// some are taken from another the result is numerically similar to both
1203///
1204/// 2) The space of positions and quaternions is locally flat at the scale of
1205/// changes between sequential updates, which guarantees that two poses which
1206/// are numerically similar also represent semantically similar poses (i.e.
1207/// there are no discontinuities which will cause a small numerical change in
1208/// the position or quaterninon to cause a large change in the encoded pose)
1209/// For positions this is guaranteed because Scenic uses a Euclidean 3-space
1210/// which is globally flat and for quaternions this is guaranteed because
1211/// quaternions encode rotation as points on a unit 4-sphere, and spheres are
1212/// locally flat. For more details on the encoding of rotations in quaterions
1213/// see https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
1214///
1215/// This commanderation is intended for late latching camera pose to support
1216/// low-latency motion-tracked rendering.
1217#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1218#[repr(C)]
1219pub struct SetCameraPoseBufferCmd {
1220    pub camera_id: u32,
1221    pub buffer_id: u32,
1222    pub num_entries: u32,
1223    pub base_time: i64,
1224    pub time_interval: u64,
1225}
1226
1227impl fidl::Persistable for SetCameraPoseBufferCmd {}
1228
1229/// Sets a camera's projection matrix.
1230/// This operation cannot be applied to a StereoCamera.
1231///
1232/// Constraints:
1233/// - `camera_id` refs a `Camera` that is not a `StereoCamera`.
1234/// - `fovy` is the Y-axis field of view, in radians.
1235///
1236/// NOTE: A default orthographic projection is specified by setting `fovy` to
1237/// zero.  In this case, the camera transform is ignored.
1238#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1239pub struct SetCameraProjectionCmd {
1240    pub camera_id: u32,
1241    pub fovy: FloatValue,
1242}
1243
1244impl fidl::Persistable for SetCameraProjectionCmd {}
1245
1246/// Sets a camera's view matrix.
1247/// This operation can be applied to both Cameras and StereoCameras.
1248///
1249/// Constraints:
1250/// - `camera_id` refs a `Camera`.
1251/// - `eye_position` is the position of the eye.
1252/// - `eye_look_at` is the point is the scene the that eye is pointed at.
1253/// - `eye_up` defines the camera's "up" vector.
1254#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1255pub struct SetCameraTransformCmd {
1256    pub camera_id: u32,
1257    pub eye_position: Vector3Value,
1258    pub eye_look_at: Vector3Value,
1259    pub eye_up: Vector3Value,
1260}
1261
1262impl fidl::Persistable for SetCameraTransformCmd {}
1263
1264/// Sets/clears a node's clip.  DEPRECATED: use SetClipPlanesCmd.
1265///
1266/// Constraints:
1267/// - `node_id` refs a `Node` with the has_clip characteristic.
1268/// - `clip_id` a `Node` with the is_clip characteristic, or nothing.  If the
1269///   referenced node is not rooted, then it will have no effect (since its
1270///   full world-transform cannot be determined).
1271/// - `clip_to_self` If false, children are only clipped to the region specified
1272///   by `clip_id`.  If true, children are additionally clipped to the node's
1273///   shape (as determined by its ShapeNode parts).
1274///
1275/// Discussion:
1276/// If a node has a clip, it will be applied to both the parts and the children
1277/// of the node.  Under some circumstances (TBD), a clip will not be applicable
1278/// to a node; in such cases it will be as though no clip has been specified for
1279/// the node.
1280#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1281pub struct SetClipCmd {
1282    pub node_id: u32,
1283    pub clip_id: u32,
1284    pub clip_to_self: bool,
1285}
1286
1287impl fidl::Persistable for SetClipCmd {}
1288
1289/// Sets the list of clip planes that apply to a Node and all of its children.  Replaces
1290/// the list set by any previous SetClipPlanesCmd.
1291///
1292/// - `node_id` refs a `Node` with the has_clip characteristic.
1293/// - `clip_planes` is the new list of oriented clip planes.
1294#[derive(Clone, Debug, PartialEq, PartialOrd)]
1295pub struct SetClipPlanesCmd {
1296    pub node_id: u32,
1297    pub clip_planes: Vec<Plane3>,
1298}
1299
1300impl fidl::Persistable for SetClipPlanesCmd {}
1301
1302/// Sets a material's color.
1303///
1304/// Constraints:
1305/// - `material_id` refs a `Material`.
1306///
1307/// If a texture is set on the material, then the value sampled from the texture
1308/// is multiplied by the color.
1309#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1310#[repr(C)]
1311pub struct SetColorCmd {
1312    pub material_id: u32,
1313    pub color: ColorRgbaValue,
1314}
1315
1316impl fidl::Persistable for SetColorCmd {}
1317
1318/// Set whether clipping should be disabled for the specified renderer.  For a
1319/// newly-created renderer, clipping will NOT be disabled (i.e. it will be
1320/// enabled).
1321///
1322/// NOTE: this disables visual clipping only; objects are still clipped for the
1323/// purposes of hit-testing.
1324///
1325/// `renderer_id` refs the target renderer.
1326/// `disable_clipping` specifies whether the clipping should be disabled.
1327#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1328pub struct SetDisableClippingCmd {
1329    pub renderer_id: u32,
1330    pub disable_clipping: bool,
1331}
1332
1333impl fidl::Persistable for SetDisableClippingCmd {}
1334
1335/// Set the color conversion applied to the compositor's display.
1336/// The conversion is applied to to each pixel according to the formula:
1337///
1338/// (matrix * (pixel + preoffsets)) + postoffsets
1339///
1340/// where pixel is a column vector consisting of the pixel's 3 components.
1341///
1342/// `matrix` is passed in row-major order. Clients will be responsible
1343/// for passing default values, when needed.
1344/// Default values are not currently supported in fidl.
1345/// Default Values:
1346///   preoffsets = [0 0 0]
1347///   matrix = [1 0 0 0 1 0 0 0 1]
1348///   postoffsets = [0 0 0]
1349#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1350pub struct SetDisplayColorConversionCmdHack {
1351    pub compositor_id: u32,
1352    pub preoffsets: [f32; 3],
1353    pub matrix: [f32; 9],
1354    pub postoffsets: [f32; 3],
1355}
1356
1357impl fidl::Persistable for SetDisplayColorConversionCmdHack {}
1358
1359#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1360#[repr(C)]
1361pub struct SetDisplayMinimumRgbCmdHack {
1362    pub min_value: u8,
1363}
1364
1365impl fidl::Persistable for SetDisplayMinimumRgbCmdHack {}
1366
1367/// Depending on the device, the display might be rotated
1368/// with respect to what the lower level device controller
1369/// considers the physical orientation of pixels. The
1370/// compositors and layers must be in alignment with the
1371/// underlying physical orientation which means that for
1372/// certain operations like screenshotting, they cannot
1373/// provide results with the accurate orientation unless
1374/// they have information about how the higher-level display
1375/// is orienting the screen. The only legal values for the
1376/// rotation are 0, 90, 180, and 270, which are each
1377///  applied counterclockwise.
1378#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1379#[repr(C)]
1380pub struct SetDisplayRotationCmdHack {
1381    pub compositor_id: u32,
1382    pub rotation_degrees: u32,
1383}
1384
1385impl fidl::Persistable for SetDisplayRotationCmdHack {}
1386
1387#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1388pub struct SetEnableDebugViewBoundsCmd {
1389    pub view_id: u32,
1390    pub enable: bool,
1391}
1392
1393impl fidl::Persistable for SetEnableDebugViewBoundsCmd {}
1394
1395/// Sets which events a resource should deliver to the session listener.
1396/// This command replaces any prior event mask for the resource.
1397///
1398/// The initial event mask for a resource is zero, meaning no events are
1399/// reported.
1400///
1401/// Constraints:
1402/// - `resource_id` is a valid resource id
1403/// - `event_mask` is zero or a combination of `k*EventMask` bits OR'ed together.
1404#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1405#[repr(C)]
1406pub struct SetEventMaskCmd {
1407    pub id: u32,
1408    pub event_mask: u32,
1409}
1410
1411impl fidl::Persistable for SetEventMaskCmd {}
1412
1413/// Sets a node's hit test behavior.
1414///
1415/// Discussion:
1416/// By default, hit testing is performed on the node's content, its parts,
1417/// and its children.
1418#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1419pub struct SetHitTestBehaviorCmd {
1420    pub node_id: u32,
1421    pub hit_test_behavior: HitTestBehavior,
1422}
1423
1424impl fidl::Persistable for SetHitTestBehaviorCmd {}
1425
1426#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1427pub struct SetImportFocusCmdDeprecated;
1428
1429impl fidl::Persistable for SetImportFocusCmdDeprecated {}
1430
1431/// Sets/clears a label to help developers identify the purpose of the resource
1432/// when using diagnostic tools.
1433///
1434/// The label serves no functional purpose in the scene graph.  It exists only
1435/// to help developers understand its structure.  The scene manager may truncate
1436/// or discard labels at will.
1437///
1438/// Constraints:
1439/// - The label's maximum length is `kLabelMaxLength` characters.
1440/// - Setting the label to an empty string clears it.
1441#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1442pub struct SetLabelCmd {
1443    pub id: u32,
1444    pub label: String,
1445}
1446
1447impl fidl::Persistable for SetLabelCmd {}
1448
1449/// Set a compositor's layer stack, replacing the current stack (if any).
1450/// Constraints:
1451/// - `compositor_id` refs a `DisplayCompositor`.
1452/// - `layer_stack_id` refs a `LayerStack`.
1453#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1454#[repr(C)]
1455pub struct SetLayerStackCmd {
1456    pub compositor_id: u32,
1457    pub layer_stack_id: u32,
1458}
1459
1460impl fidl::Persistable for SetLayerStackCmd {}
1461
1462/// Sets the color of the Light identified by `light_id`.
1463#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1464pub struct SetLightColorCmd {
1465    pub light_id: u32,
1466    pub color: ColorRgbValue,
1467}
1468
1469impl fidl::Persistable for SetLightColorCmd {}
1470
1471/// Sets the direction of the DirectionalLight identified by `light_id`.
1472#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1473pub struct SetLightDirectionCmd {
1474    pub light_id: u32,
1475    pub direction: Vector3Value,
1476}
1477
1478impl fidl::Persistable for SetLightDirectionCmd {}
1479
1480/// Sets/clears a node's material.
1481///
1482/// Constraints:
1483/// - `node_id` refs a `Node` with the has_material characteristic.
1484/// - `material_id` refs a `Material`, or nothing.
1485/// - if this command causes the target to have both a `Shape` and a `Material`,
1486///   then these must be compatible with each other (see README.md regarding
1487///   "Shape/Material Compatibility").
1488///
1489/// Discussion:
1490/// In order to be painted, a node requires both a `Shape` and a `Material`.
1491/// Without a material, a node can still participate in hit-testing and clipping.
1492/// Without a shape, a node cannot do any of the above.
1493#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1494#[repr(C)]
1495pub struct SetMaterialCmd {
1496    pub node_id: u32,
1497    pub material_id: u32,
1498}
1499
1500impl fidl::Persistable for SetMaterialCmd {}
1501
1502/// Sets a node's opacity.
1503///
1504/// Constraints:
1505/// - `node_id` refs a `Node` with the has_opacity characteristic.
1506/// - `opacity` is in the range [0, 1].
1507#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1508pub struct SetOpacityCmd {
1509    pub node_id: u32,
1510    pub opacity: f32,
1511}
1512
1513impl fidl::Persistable for SetOpacityCmd {}
1514
1515/// Sets the falloff factor of the PointLight identified by `light_id`.
1516/// A value of 1.0 corresponds to the physically-based "inverse-square law"
1517/// (see Wikipedia).  Other values can be used for artistic effect, e.g. a
1518/// value of 0.0 means that the radiance of a surface is not dependant on
1519/// its distance from the light.
1520#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1521pub struct SetPointLightFalloffCmd {
1522    pub light_id: u32,
1523    pub falloff: FloatValue,
1524}
1525
1526impl fidl::Persistable for SetPointLightFalloffCmd {}
1527
1528/// Sets the position of the PointLight identified by `light_id`.
1529#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1530pub struct SetPointLightPositionCmd {
1531    pub light_id: u32,
1532    pub position: Vector3Value,
1533}
1534
1535impl fidl::Persistable for SetPointLightPositionCmd {}
1536
1537/// Set a layer's renderer, replacing the current renderer (if any).
1538/// Constraints:
1539/// - `layer_id` refs a `Layer`.
1540/// - `renderer_id` refs a `Renderer`.
1541#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1542#[repr(C)]
1543pub struct SetRendererCmd {
1544    pub layer_id: u32,
1545    pub renderer_id: u32,
1546}
1547
1548impl fidl::Persistable for SetRendererCmd {}
1549
1550/// Sets a parameter that affects how a renderer renders a scene.
1551///
1552/// `renderer_id` refs the Renderer that is being modified.
1553/// `param` describes the parameter that should be set, and to what.
1554#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1555pub struct SetRendererParamCmd {
1556    pub renderer_id: u32,
1557    pub param: RendererParam,
1558}
1559
1560impl fidl::Persistable for SetRendererParamCmd {}
1561
1562/// Sets a Resource's (typically a Node's) rotation.
1563///
1564/// Constraints:
1565/// - `id` refs a Resource with the has_transform characteristic.
1566///
1567/// Discussion:
1568/// Quaternions represent any rotation in a 3D coordinate system. Consisting of
1569/// [a,b,c,d], [a] represents the amount of rotation that should be applied and
1570/// [b,c,d] represents the vector around which the rotation is applied. This
1571/// conforms to the semantics of glm::quat.
1572#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1573pub struct SetRotationCmd {
1574    pub id: u32,
1575    pub value: QuaternionValue,
1576}
1577
1578impl fidl::Persistable for SetRotationCmd {}
1579
1580/// Sets a Resource's (typically a Node's) scale.
1581///
1582/// Constraints:
1583/// - `id` refs a Resource with the has_transform characteristic.
1584#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1585pub struct SetScaleCmd {
1586    pub id: u32,
1587    pub value: Vector3Value,
1588}
1589
1590impl fidl::Persistable for SetScaleCmd {}
1591
1592/// Sets a node's semantic visibility.
1593///
1594/// Discussion:
1595/// By default, all nodes are semantically visible. Semantically invisible nodes and their children
1596/// are ignored by hit tests performed for accessibility.
1597#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1598pub struct SetSemanticVisibilityCmd {
1599    pub node_id: u32,
1600    pub visible: bool,
1601}
1602
1603impl fidl::Persistable for SetSemanticVisibilityCmd {}
1604
1605/// Sets/clears a node's shape.
1606///
1607/// Constraints:
1608/// - `node_id` refs a `Node` with the has_shape characteristic.
1609/// - `shape_id` refs a `Shape`, or nothing.
1610/// - if this command causes the target to have both a `Shape` and a `Material`,
1611///   then these must be compatible with each other (see README.md regarding
1612///   "Shape/Material Compatibility").
1613///
1614/// Discussion:
1615/// In order to be painted, a node requires both a `Shape` and a `Material`.
1616/// Without a material, a node can still participate in hit-testing and clipping.
1617/// Without a shape, a node cannot do any of the above.
1618#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1619#[repr(C)]
1620pub struct SetShapeCmd {
1621    pub node_id: u32,
1622    pub shape_id: u32,
1623}
1624
1625impl fidl::Persistable for SetShapeCmd {}
1626
1627/// Sets an object's size.
1628///
1629/// Constraints:
1630/// - `id` refs a resizeable object.
1631/// - some objects that support this command may have additional constraints
1632///   (e.g. in some cases `depth` must be zero).
1633#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1634pub struct SetSizeCmd {
1635    pub id: u32,
1636    pub value: Vector2Value,
1637}
1638
1639impl fidl::Persistable for SetSizeCmd {}
1640
1641/// Sets a StereoCamera's projection matrices.
1642/// This operation can only be applied to a StereoCamera.
1643///
1644/// Constraints:
1645/// - `camera_id` refs a `StereoCamera`.
1646/// - `left_projection` is the projection matrix for the left eye.
1647/// - `right_projection` is the projection matrix for the right eye.
1648///
1649/// These projection matrices may also contain a transform in camera space for
1650/// their eye if needed.
1651#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1652pub struct SetStereoCameraProjectionCmd {
1653    pub camera_id: u32,
1654    pub left_projection: Matrix4Value,
1655    pub right_projection: Matrix4Value,
1656}
1657
1658impl fidl::Persistable for SetStereoCameraProjectionCmd {}
1659
1660/// Sets/clears a node's tag value.
1661///
1662/// A session can apply a tag value to any node to which it has access, including
1663/// imported nodes.  These tags are private to the session and cannot be read
1664/// or modified by other sessions.  When multiple sessions import the same node,
1665/// each session will only observe its own tag values.
1666///
1667/// Hit test results for a session only include nodes which the session has
1668/// tagged with a non-zero value.  Therefore a session can use tag values to
1669/// associate nodes with their functional purpose when picked.
1670///
1671/// Constraints:
1672/// - `node_id` refs a `Node`.
1673/// - `tag_value` is the tag value to assign, or 0 to remove the tag.
1674#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1675#[repr(C)]
1676pub struct SetTagCmd {
1677    pub node_id: u32,
1678    pub tag_value: u32,
1679}
1680
1681impl fidl::Persistable for SetTagCmd {}
1682
1683/// Sets/clears a material's texture.
1684///
1685/// Constraints:
1686/// - `material_id` refs a `Material`.
1687/// - `texture_id` refs a `Image`, `ImagePipe2`, or nothing.
1688///
1689/// If no texture is provided (i.e. `texture_id` is zero), a solid color is used.
1690/// If a texture is provided, then the value sampled from the texture is
1691/// multiplied by the color.
1692#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1693#[repr(C)]
1694pub struct SetTextureCmd {
1695    pub material_id: u32,
1696    pub texture_id: u32,
1697}
1698
1699impl fidl::Persistable for SetTextureCmd {}
1700
1701/// Sets a Resource's (typically a Node's) translation.
1702///
1703/// Constraints:
1704/// - `id` refs a Resource with the has_transform characteristic.
1705#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1706pub struct SetTranslationCmd {
1707    pub id: u32,
1708    pub value: Vector3Value,
1709}
1710
1711impl fidl::Persistable for SetTranslationCmd {}
1712
1713#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1714pub struct SetViewHolderBoundsColorCmd {
1715    pub view_holder_id: u32,
1716    pub color: ColorRgbValue,
1717}
1718
1719impl fidl::Persistable for SetViewHolderBoundsColorCmd {}
1720
1721/// Sets the properties for a ViewHolder's attached View.
1722///
1723/// Constraints:
1724/// - `view_holder_id` refs a `ViewHolder`.
1725#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1726pub struct SetViewPropertiesCmd {
1727    pub view_holder_id: u32,
1728    pub properties: ViewProperties,
1729}
1730
1731impl fidl::Persistable for SetViewPropertiesCmd {}
1732
1733/// Characteristics:
1734/// - has_parent
1735/// - has_shape
1736/// - has_material
1737#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1738#[repr(C)]
1739pub struct ShapeNodeArgs {
1740    pub unused: u32,
1741}
1742
1743impl fidl::Persistable for ShapeNodeArgs {}
1744
1745/// Delivered in response to a size change hint from a parent node
1746/// (SendSizeChangeHintCmd).
1747///
1748/// This event is delivered when the following conditions are true:
1749/// - The node has `kSizeChangeEventMask` set to an enabled state.
1750/// - A parent node has sent a SendSizeChangeHintCmd.
1751///
1752/// Subscribe to this event to receive information about how large textures you
1753/// will need in the near future for your nodes. The canonical use case is to
1754/// pre-allocate memory to avoid repeated re-allocations.
1755#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1756pub struct SizeChangeHintEvent {
1757    pub node_id: u32,
1758    pub width_change_factor: f32,
1759    pub height_change_factor: f32,
1760}
1761
1762impl fidl::Persistable for SizeChangeHintEvent {}
1763
1764#[derive(Debug, PartialEq)]
1765pub struct SnapshotCallbackDeprecatedOnDataRequest {
1766    pub data: fidl_fuchsia_mem::Buffer,
1767}
1768
1769impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
1770    for SnapshotCallbackDeprecatedOnDataRequest
1771{
1772}
1773
1774/// A StereoCamera is a Camera that renders the scene in side-by-side stereo.
1775///
1776/// Any command which can be applied to a Camera can also be applied to a
1777/// StereoCamera.
1778/// Additional supported commands:
1779/// - SetStereoCameraProjection
1780#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1781#[repr(C)]
1782pub struct StereoCameraArgs {
1783    /// The scene that the camera is viewing.
1784    pub scene_id: u32,
1785}
1786
1787impl fidl::Persistable for StereoCameraArgs {}
1788
1789#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1790pub struct TakeSnapshotCmdDeprecated {
1791    pub node_id: u32,
1792    pub callback: fidl::endpoints::ClientEnd<SnapshotCallbackDeprecatedMarker>,
1793}
1794
1795impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TakeSnapshotCmdDeprecated {}
1796
1797/// Describes a typed, client-modifiable value.
1798#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1799pub struct VariableArgs {
1800    pub type_: ValueType,
1801    pub initial_value: Value,
1802}
1803
1804impl fidl::Persistable for VariableArgs {}
1805
1806/// A value that is specified explicitly by `value` if `variable_id` is zero,
1807/// or is the value produced by the resource identified by `variable_id`, e.g.
1808/// an animation or expression.  In the latter case, the value produced by the
1809/// resource must be a vec2, and `value` is ignored.
1810#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1811pub struct Vector2Value {
1812    pub value: Vec2,
1813    pub variable_id: u32,
1814}
1815
1816impl fidl::Persistable for Vector2Value {}
1817
1818/// A value that is specified explicitly by `value` if `variable_id` is zero,
1819/// or is the value produced by the resource identified by `variable_id`, e.g.
1820/// an animation or expression.  In the latter case, the value produced by the
1821/// resource must be a vec3, and `value` is ignored.
1822#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1823pub struct Vector3Value {
1824    pub value: Vec3,
1825    pub variable_id: u32,
1826}
1827
1828impl fidl::Persistable for Vector3Value {}
1829
1830/// A value that is specified explicitly by `value` if `variable_id` is zero,
1831/// or is the value produced by the resource identified by `variable_id`, e.g.
1832/// an animation or expression.  In the latter case, the value produced by the
1833/// resource must be a vec4, and `value` is ignored.
1834#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1835pub struct Vector4Value {
1836    pub value: Vec4,
1837    pub variable_id: u32,
1838}
1839
1840impl fidl::Persistable for Vector4Value {}
1841
1842/// Represents the root of a subgraph within a larger scene graph.  Nodes can be
1843/// attached to the `View` as children, and these Nodes will have the `View`s'
1844/// coordinate transform applied to their own, in addition to being clipped to
1845/// the `View`s' bounding box.
1846/// See `ViewProperties`.
1847///
1848/// Each `View` is linked to a paired `ViewHolder` via a shared token pair.
1849///
1850/// Usually the `View` and its associated `ViewHolder` exist in separate
1851/// processes.  By combining them, the UI for an entire system can be built
1852/// using content contributed from many different processes.
1853#[derive(Debug, PartialEq)]
1854pub struct ViewArgs {
1855    pub token: fidl_fuchsia_ui_views::ViewToken,
1856    pub debug_name: Option<String>,
1857}
1858
1859impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ViewArgs {}
1860
1861/// Represents the root of a subgraph within a larger scene graph.  Nodes can be
1862/// attached to the `View` as children, and these Nodes will have the `View`s'
1863/// coordinate transform applied to their own, in addition to being clipped to
1864/// the `View`s' bounding box.
1865/// See `ViewProperties`.
1866///
1867/// Each `View` is linked to a paired `ViewHolder` via a shared token pair.
1868///
1869/// Usually the `View` and its associated `ViewHolder` exist in separate
1870/// processes.  By combining them, the UI for an entire system can be built
1871/// using content contributed from many different processes.
1872///
1873/// Clients self-identify their `View` with a `ViewRef`, which is a stable
1874/// identifier that may be cloned and passed to other components in a
1875/// feed-forward style. It is accompanied by a `ViewRefControl`, which Scenic
1876/// uses to signal `View` destruction across the system; the `ViewRefControl`
1877/// must be unique - do not clone it.
1878#[derive(Debug, PartialEq)]
1879pub struct ViewArgs3 {
1880    pub token: fidl_fuchsia_ui_views::ViewToken,
1881    /// `control_ref.reference` must have default eventpair rights (i.e., with
1882    /// signaling), minus ZX_RIGHT_DUPLICATE.
1883    pub control_ref: fidl_fuchsia_ui_views::ViewRefControl,
1884    /// `view_ref.reference` must have basic rights (i.e., no signaling).
1885    pub view_ref: fidl_fuchsia_ui_views::ViewRef,
1886    pub debug_name: Option<String>,
1887}
1888
1889impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ViewArgs3 {}
1890
1891/// Delivered to a View's Session when the parent ViewHolder for the given View
1892/// becomes a part of a Scene.
1893///
1894/// A ViewHolder is considered to be part of a Scene if there is an unbroken
1895/// chain of parent-child relationships between the Scene node and the
1896/// ViewHolder node.
1897#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1898pub struct ViewAttachedToSceneEvent {
1899    pub view_id: u32,
1900    pub properties: ViewProperties,
1901}
1902
1903impl fidl::Persistable for ViewAttachedToSceneEvent {}
1904
1905/// Delivered to a ViewHolder's Session when its peer View is connected.
1906#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1907#[repr(C)]
1908pub struct ViewConnectedEvent {
1909    pub view_holder_id: u32,
1910}
1911
1912impl fidl::Persistable for ViewConnectedEvent {}
1913
1914/// Delivered to a View's Session when the parent ViewHolder for the given View
1915/// is no longer part of a scene.
1916///
1917/// This can happen if the ViewHolder is detached directly from the scene, or
1918/// if one of its parent nodes is.
1919///
1920/// A ViewHolder is considered to be part of a Scene if there is an unbroken
1921/// chain of parent-child relationships between the Scene node and the
1922/// ViewHolder node.
1923#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1924#[repr(C)]
1925pub struct ViewDetachedFromSceneEvent {
1926    pub view_id: u32,
1927}
1928
1929impl fidl::Persistable for ViewDetachedFromSceneEvent {}
1930
1931/// Delivered to a ViewHolder's Session when its peer View is disconnected or
1932/// destroyed.
1933///
1934/// If the View is destroyed before the connection is established, then this
1935/// event will be delivered immediately when the ViewHolder attempts to connect.
1936#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1937#[repr(C)]
1938pub struct ViewDisconnectedEvent {
1939    pub view_holder_id: u32,
1940}
1941
1942impl fidl::Persistable for ViewDisconnectedEvent {}
1943
1944/// Represents an attachment point for a subgraph within a larger scene graph.
1945/// The `ViewHolder` can be attached to a Node as a child, and the contents of
1946/// the linked `View` will become a child of the Node as well.
1947///
1948/// Each `ViewHolder` is linked to a paired `View` via a shared token pair.
1949///
1950/// Usually the `ViewHolder` and its associated `View` exist in separate
1951/// processes.  By combining them, the UI for an entire system can be built
1952/// using content contributed from many different processes.
1953#[derive(Debug, PartialEq)]
1954pub struct ViewHolderArgs {
1955    pub token: fidl_fuchsia_ui_views::ViewHolderToken,
1956    pub debug_name: Option<String>,
1957}
1958
1959impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ViewHolderArgs {}
1960
1961/// Delivered to a View's Session when its peer ViewHolder is connected.
1962///
1963/// If the ViewHolder is destroyed before the connection is established, then
1964/// this event will not be delivered.
1965#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1966#[repr(C)]
1967pub struct ViewHolderConnectedEvent {
1968    pub view_id: u32,
1969}
1970
1971impl fidl::Persistable for ViewHolderConnectedEvent {}
1972
1973/// Delivered to a View's Session when its peer ViewHolder is disconnected or
1974/// destroyed.
1975///
1976/// If the ViewHolder is destroyed before the connection is established, then
1977/// this event will be delivered immediately when the View attempts to connect.
1978#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1979#[repr(C)]
1980pub struct ViewHolderDisconnectedEvent {
1981    pub view_id: u32,
1982}
1983
1984impl fidl::Persistable for ViewHolderDisconnectedEvent {}
1985
1986/// Represents the properties for a View.
1987#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1988pub struct ViewProperties {
1989    /// The View's bounding box extents can be defined as:
1990    ///    { bounding_box.min, bounding_box.max }
1991    /// Content contained within the View is clipped to this bounding box.
1992    pub bounding_box: BoundingBox,
1993    /// `insets_from_min` and `insets_from_max` specify the distances between the
1994    /// view's bounding box and that of its parent.
1995    ///
1996    /// These properties are not strictly enforced by Scenic, but only used
1997    /// as hints for clients and other components that receives ViewProperties:
1998    ///
1999    /// View clients can assume that anything drawn outside of
2000    ///    { bounding_box.min + inset_from_min, bounding_box.max - inset_from_max }
2001    /// may be obscured by an ancestor view. The reason for obscuring, and the rules
2002    /// surrounding it, is specific to each product.
2003    pub inset_from_min: Vec3,
2004    pub inset_from_max: Vec3,
2005    /// Whether the View can receive a focus event; default is true.  When
2006    /// false, and this View is eligible to receive a focus event, no
2007    /// focus/unfocus event is actually sent to any View.
2008    pub focus_change: bool,
2009    /// Whether the View allows geometrically underlying Views to receive input;
2010    /// default is true. When false, Scenic does not send input events to
2011    /// underlying Views.
2012    pub downward_input: bool,
2013}
2014
2015impl fidl::Persistable for ViewProperties {}
2016
2017/// Delivered when the parent ViewHolder for the given View makes a change to
2018/// the View's properties.
2019#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
2020pub struct ViewPropertiesChangedEvent {
2021    pub view_id: u32,
2022    pub properties: ViewProperties,
2023}
2024
2025impl fidl::Persistable for ViewPropertiesChangedEvent {}
2026
2027/// Represents the state of a View in Scenic.
2028#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2029pub struct ViewState {
2030    /// Whether the View is rendering. Default is false. Delivered to the View's
2031    /// corresponding ViewHolder after the View's first frame render request.
2032    pub is_rendering: bool,
2033}
2034
2035impl fidl::Persistable for ViewState {}
2036
2037/// Delivered to a ViewHolder's Session when its peer View's state has changed.
2038#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2039pub struct ViewStateChangedEvent {
2040    pub view_holder_id: u32,
2041    pub state: ViewState,
2042}
2043
2044impl fidl::Persistable for ViewStateChangedEvent {}
2045
2046#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
2047pub struct Mat4 {
2048    /// Column major order.
2049    pub matrix: [f32; 16],
2050}
2051
2052impl fidl::Persistable for Mat4 {}
2053
2054#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
2055pub struct Vec2 {
2056    pub x: f32,
2057    pub y: f32,
2058}
2059
2060impl fidl::Persistable for Vec2 {}
2061
2062#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
2063pub struct Vec3 {
2064    pub x: f32,
2065    pub y: f32,
2066    pub z: f32,
2067}
2068
2069impl fidl::Persistable for Vec3 {}
2070
2071#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
2072pub struct Vec4 {
2073    pub x: f32,
2074    pub y: f32,
2075    pub z: f32,
2076    pub w: f32,
2077}
2078
2079impl fidl::Persistable for Vec4 {}
2080
2081/// Commands that are used to modify the state of a `Session`.
2082#[derive(Debug, PartialEq)]
2083pub enum Command {
2084    CreateResource(CreateResourceCmd),
2085    ReleaseResource(ReleaseResourceCmd),
2086    ExportResource(ExportResourceCmdDeprecated),
2087    ImportResource(ImportResourceCmdDeprecated),
2088    /// Tagging commands.
2089    SetTag(SetTagCmd),
2090    /// Grouping commands.
2091    Detach(DetachCmd),
2092    /// Spatial commands.
2093    SetTranslation(SetTranslationCmd),
2094    SetScale(SetScaleCmd),
2095    SetRotation(SetRotationCmd),
2096    SetAnchor(SetAnchorCmd),
2097    SetSize(SetSizeCmd),
2098    SetOpacity(SetOpacityCmd),
2099    SendSizeChangeHintHack(SendSizeChangeHintCmdHack),
2100    /// Node-specific commands.
2101    AddChild(AddChildCmd),
2102    /// re-parenting?
2103    AddPart(AddPartCmd),
2104    DetachChildren(DetachChildrenCmd),
2105    SetShape(SetShapeCmd),
2106    SetMaterial(SetMaterialCmd),
2107    SetClip(SetClipCmd),
2108    SetHitTestBehavior(SetHitTestBehaviorCmd),
2109    SetViewProperties(SetViewPropertiesCmd),
2110    TakeSnapshotCmd(TakeSnapshotCmdDeprecated),
2111    /// Camera and lighting commands.
2112    SetCamera(SetCameraCmd),
2113    SetCameraTransform(SetCameraTransformCmd),
2114    SetCameraProjection(SetCameraProjectionCmd),
2115    SetStereoCameraProjection(SetStereoCameraProjectionCmd),
2116    SetCameraPoseBuffer(SetCameraPoseBufferCmd),
2117    SetLightColor(SetLightColorCmd),
2118    SetLightDirection(SetLightDirectionCmd),
2119    AddLight(AddLightCmd),
2120    DetachLight(DetachLightCmd),
2121    DetachLights(DetachLightsCmd),
2122    SetTexture(SetTextureCmd),
2123    SetColor(SetColorCmd),
2124    /// Mesh commands.
2125    BindMeshBuffers(BindMeshBuffersCmd),
2126    /// Layer and renderer commands.
2127    AddLayer(AddLayerCmd),
2128    RemoveLayer(RemoveLayerCmd),
2129    RemoveAllLayers(RemoveAllLayersCmd),
2130    SetLayerStack(SetLayerStackCmd),
2131    SetRenderer(SetRendererCmd),
2132    SetRendererParam(SetRendererParamCmd),
2133    /// Events.
2134    SetEventMask(SetEventMaskCmd),
2135    /// Diagnostic commands.
2136    SetLabel(SetLabelCmd),
2137    /// Debugging commands.
2138    SetDisableClipping(SetDisableClippingCmd),
2139    SetImportFocus(SetImportFocusCmdDeprecated),
2140    SetClipPlanes(SetClipPlanesCmd),
2141    SetPointLightPosition(SetPointLightPositionCmd),
2142    SetPointLightFalloff(SetPointLightFalloffCmd),
2143    Scene_AddAmbientLight(SceneAddAmbientLightCmd),
2144    Scene_AddDirectionalLight(SceneAddDirectionalLightCmd),
2145    Scene_AddPointLight(SceneAddPointLightCmd),
2146    SetDisplayColorConversion(SetDisplayColorConversionCmdHack),
2147    SetDisplayRotation(SetDisplayRotationCmdHack),
2148    SetEnableViewDebugBounds(SetEnableDebugViewBoundsCmd),
2149    SetViewHolderBoundsColor(SetViewHolderBoundsColorCmd),
2150    SetCameraClipSpaceTransform(SetCameraClipSpaceTransformCmd),
2151    SetDisplayMinimumRgb(SetDisplayMinimumRgbCmdHack),
2152    SetSemanticVisibility(SetSemanticVisibilityCmd),
2153}
2154
2155impl Command {
2156    #[inline]
2157    pub fn ordinal(&self) -> u64 {
2158        match *self {
2159            Self::CreateResource(_) => 1,
2160            Self::ReleaseResource(_) => 2,
2161            Self::ExportResource(_) => 3,
2162            Self::ImportResource(_) => 4,
2163            Self::SetTag(_) => 5,
2164            Self::Detach(_) => 6,
2165            Self::SetTranslation(_) => 7,
2166            Self::SetScale(_) => 8,
2167            Self::SetRotation(_) => 9,
2168            Self::SetAnchor(_) => 10,
2169            Self::SetSize(_) => 11,
2170            Self::SetOpacity(_) => 12,
2171            Self::SendSizeChangeHintHack(_) => 13,
2172            Self::AddChild(_) => 14,
2173            Self::AddPart(_) => 15,
2174            Self::DetachChildren(_) => 16,
2175            Self::SetShape(_) => 17,
2176            Self::SetMaterial(_) => 18,
2177            Self::SetClip(_) => 19,
2178            Self::SetHitTestBehavior(_) => 20,
2179            Self::SetViewProperties(_) => 21,
2180            Self::TakeSnapshotCmd(_) => 22,
2181            Self::SetCamera(_) => 23,
2182            Self::SetCameraTransform(_) => 24,
2183            Self::SetCameraProjection(_) => 25,
2184            Self::SetStereoCameraProjection(_) => 26,
2185            Self::SetCameraPoseBuffer(_) => 27,
2186            Self::SetLightColor(_) => 28,
2187            Self::SetLightDirection(_) => 29,
2188            Self::AddLight(_) => 30,
2189            Self::DetachLight(_) => 31,
2190            Self::DetachLights(_) => 32,
2191            Self::SetTexture(_) => 33,
2192            Self::SetColor(_) => 34,
2193            Self::BindMeshBuffers(_) => 35,
2194            Self::AddLayer(_) => 36,
2195            Self::RemoveLayer(_) => 37,
2196            Self::RemoveAllLayers(_) => 38,
2197            Self::SetLayerStack(_) => 39,
2198            Self::SetRenderer(_) => 40,
2199            Self::SetRendererParam(_) => 41,
2200            Self::SetEventMask(_) => 42,
2201            Self::SetLabel(_) => 43,
2202            Self::SetDisableClipping(_) => 44,
2203            Self::SetImportFocus(_) => 45,
2204            Self::SetClipPlanes(_) => 46,
2205            Self::SetPointLightPosition(_) => 47,
2206            Self::SetPointLightFalloff(_) => 48,
2207            Self::Scene_AddAmbientLight(_) => 49,
2208            Self::Scene_AddDirectionalLight(_) => 50,
2209            Self::Scene_AddPointLight(_) => 51,
2210            Self::SetDisplayColorConversion(_) => 52,
2211            Self::SetDisplayRotation(_) => 53,
2212            Self::SetEnableViewDebugBounds(_) => 54,
2213            Self::SetViewHolderBoundsColor(_) => 55,
2214            Self::SetCameraClipSpaceTransform(_) => 56,
2215            Self::SetDisplayMinimumRgb(_) => 57,
2216            Self::SetSemanticVisibility(_) => 58,
2217        }
2218    }
2219
2220    #[deprecated = "Strict unions should not use `is_unknown`"]
2221    #[inline]
2222    pub fn is_unknown(&self) -> bool {
2223        false
2224    }
2225}
2226
2227impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Command {}
2228
2229/// These are all of the types of events which can be reported by a `Session`.
2230/// Use `SetEventMaskCmd` to enable event delivery for a resource.
2231#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
2232pub enum Event {
2233    /// Events which are controlled by a mask.
2234    Metrics(MetricsEvent),
2235    SizeChangeHint(SizeChangeHintEvent),
2236    /// Events which are always delivered, regardless of mask.
2237    ImportUnbound(ImportUnboundEvent),
2238    ViewConnected(ViewConnectedEvent),
2239    ViewDisconnected(ViewDisconnectedEvent),
2240    ViewHolderDisconnected(ViewHolderDisconnectedEvent),
2241    ViewAttachedToScene(ViewAttachedToSceneEvent),
2242    ViewDetachedFromScene(ViewDetachedFromSceneEvent),
2243    ViewPropertiesChanged(ViewPropertiesChangedEvent),
2244    ViewStateChanged(ViewStateChangedEvent),
2245    ViewHolderConnected(ViewHolderConnectedEvent),
2246}
2247
2248impl Event {
2249    #[inline]
2250    pub fn ordinal(&self) -> u64 {
2251        match *self {
2252            Self::Metrics(_) => 1,
2253            Self::SizeChangeHint(_) => 2,
2254            Self::ImportUnbound(_) => 3,
2255            Self::ViewConnected(_) => 4,
2256            Self::ViewDisconnected(_) => 5,
2257            Self::ViewHolderDisconnected(_) => 6,
2258            Self::ViewAttachedToScene(_) => 7,
2259            Self::ViewDetachedFromScene(_) => 8,
2260            Self::ViewPropertiesChanged(_) => 9,
2261            Self::ViewStateChanged(_) => 10,
2262            Self::ViewHolderConnected(_) => 11,
2263        }
2264    }
2265
2266    #[deprecated = "Strict unions should not use `is_unknown`"]
2267    #[inline]
2268    pub fn is_unknown(&self) -> bool {
2269        false
2270    }
2271}
2272
2273impl fidl::Persistable for Event {}
2274
2275/// These are all of the types of parameters that can be set to configure a
2276/// `Renderer`.
2277#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
2278pub enum RendererParam {
2279    ShadowTechnique(ShadowTechnique),
2280    Reserved(RenderFrequency),
2281    EnableDebugging(bool),
2282}
2283
2284impl RendererParam {
2285    #[inline]
2286    pub fn ordinal(&self) -> u64 {
2287        match *self {
2288            Self::ShadowTechnique(_) => 1,
2289            Self::Reserved(_) => 2,
2290            Self::EnableDebugging(_) => 3,
2291        }
2292    }
2293
2294    #[deprecated = "Strict unions should not use `is_unknown`"]
2295    #[inline]
2296    pub fn is_unknown(&self) -> bool {
2297        false
2298    }
2299}
2300
2301impl fidl::Persistable for RendererParam {}
2302
2303/// These are all of the types of resources that can be created within a
2304/// `Session`. Add new fields only to the bottom of the list.
2305#[derive(Debug, PartialEq)]
2306pub enum ResourceArgs {
2307    Memory(MemoryArgs),
2308    Image(ImageArgs),
2309    Buffer(BufferArgs),
2310    View(ViewArgs),
2311    ViewHolder(ViewHolderArgs),
2312    Rectangle(RectangleArgs),
2313    RoundedRectangle(RoundedRectangleArgs),
2314    Circle(CircleArgs),
2315    Mesh(MeshArgs),
2316    ShapeNode(ShapeNodeArgs),
2317    ClipNode(ClipNodeArgs),
2318    EntityNode(EntityNodeArgs),
2319    OpacityNode(OpacityNodeArgsHack),
2320    Material(MaterialArgs),
2321    Compositor(CompositorArgs),
2322    DisplayCompositor(DisplayCompositorArgs),
2323    LayerStack(LayerStackArgs),
2324    Layer(LayerArgs),
2325    Scene(SceneArgs),
2326    Camera(CameraArgs),
2327    StereoCamera(StereoCameraArgs),
2328    Renderer(RendererArgs),
2329    AmbientLight(AmbientLightArgs),
2330    DirectionalLight(DirectionalLightArgs),
2331    Variable(VariableArgs),
2332    PointLight(PointLightArgs),
2333    View3(ViewArgs3),
2334    ImagePipe2(ImagePipe2Args),
2335    Image2(ImageArgs2),
2336    Image3(ImageArgs3),
2337}
2338
2339impl ResourceArgs {
2340    #[inline]
2341    pub fn ordinal(&self) -> u64 {
2342        match *self {
2343            Self::Memory(_) => 1,
2344            Self::Image(_) => 2,
2345            Self::Buffer(_) => 4,
2346            Self::View(_) => 5,
2347            Self::ViewHolder(_) => 6,
2348            Self::Rectangle(_) => 7,
2349            Self::RoundedRectangle(_) => 8,
2350            Self::Circle(_) => 9,
2351            Self::Mesh(_) => 10,
2352            Self::ShapeNode(_) => 11,
2353            Self::ClipNode(_) => 12,
2354            Self::EntityNode(_) => 13,
2355            Self::OpacityNode(_) => 14,
2356            Self::Material(_) => 15,
2357            Self::Compositor(_) => 16,
2358            Self::DisplayCompositor(_) => 17,
2359            Self::LayerStack(_) => 19,
2360            Self::Layer(_) => 20,
2361            Self::Scene(_) => 21,
2362            Self::Camera(_) => 22,
2363            Self::StereoCamera(_) => 23,
2364            Self::Renderer(_) => 24,
2365            Self::AmbientLight(_) => 25,
2366            Self::DirectionalLight(_) => 26,
2367            Self::Variable(_) => 27,
2368            Self::PointLight(_) => 28,
2369            Self::View3(_) => 31,
2370            Self::ImagePipe2(_) => 32,
2371            Self::Image2(_) => 33,
2372            Self::Image3(_) => 34,
2373        }
2374    }
2375
2376    #[deprecated = "Strict unions should not use `is_unknown`"]
2377    #[inline]
2378    pub fn is_unknown(&self) -> bool {
2379        false
2380    }
2381}
2382
2383impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ResourceArgs {}
2384
2385#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
2386pub enum Value {
2387    Vector1(f32),
2388    Vector2(Vec2),
2389    Vector3(Vec3),
2390    Vector4(Vec4),
2391    Matrix4x4(Mat4),
2392    ColorRgba(ColorRgba),
2393    ColorRgb(ColorRgb),
2394    /// Degrees of counter-clockwise rotation in the XY plane.
2395    Degrees(f32),
2396    Quaternion(Quaternion),
2397    Transform(FactoredTransform),
2398    /// ID of a value-producing resource (an animation or an expression).
2399    /// The type of this value matches the type produced by the named resource.
2400    VariableId(u32),
2401}
2402
2403impl Value {
2404    #[inline]
2405    pub fn ordinal(&self) -> u64 {
2406        match *self {
2407            Self::Vector1(_) => 1,
2408            Self::Vector2(_) => 2,
2409            Self::Vector3(_) => 3,
2410            Self::Vector4(_) => 4,
2411            Self::Matrix4x4(_) => 5,
2412            Self::ColorRgba(_) => 6,
2413            Self::ColorRgb(_) => 7,
2414            Self::Degrees(_) => 8,
2415            Self::Quaternion(_) => 9,
2416            Self::Transform(_) => 10,
2417            Self::VariableId(_) => 11,
2418        }
2419    }
2420
2421    #[deprecated = "Strict unions should not use `is_unknown`"]
2422    #[inline]
2423    pub fn is_unknown(&self) -> bool {
2424        false
2425    }
2426}
2427
2428impl fidl::Persistable for Value {}
2429
2430#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2431pub struct SnapshotCallbackDeprecatedMarker;
2432
2433impl fidl::endpoints::ProtocolMarker for SnapshotCallbackDeprecatedMarker {
2434    type Proxy = SnapshotCallbackDeprecatedProxy;
2435    type RequestStream = SnapshotCallbackDeprecatedRequestStream;
2436    #[cfg(target_os = "fuchsia")]
2437    type SynchronousProxy = SnapshotCallbackDeprecatedSynchronousProxy;
2438
2439    const DEBUG_NAME: &'static str = "(anonymous) SnapshotCallbackDeprecated";
2440}
2441
2442pub trait SnapshotCallbackDeprecatedProxyInterface: Send + Sync {
2443    fn r#on_data(&self, data: fidl_fuchsia_mem::Buffer) -> Result<(), fidl::Error>;
2444}
2445#[derive(Debug)]
2446#[cfg(target_os = "fuchsia")]
2447pub struct SnapshotCallbackDeprecatedSynchronousProxy {
2448    client: fidl::client::sync::Client,
2449}
2450
2451#[cfg(target_os = "fuchsia")]
2452impl fidl::endpoints::SynchronousProxy for SnapshotCallbackDeprecatedSynchronousProxy {
2453    type Proxy = SnapshotCallbackDeprecatedProxy;
2454    type Protocol = SnapshotCallbackDeprecatedMarker;
2455
2456    fn from_channel(inner: fidl::Channel) -> Self {
2457        Self::new(inner)
2458    }
2459
2460    fn into_channel(self) -> fidl::Channel {
2461        self.client.into_channel()
2462    }
2463
2464    fn as_channel(&self) -> &fidl::Channel {
2465        self.client.as_channel()
2466    }
2467}
2468
2469#[cfg(target_os = "fuchsia")]
2470impl SnapshotCallbackDeprecatedSynchronousProxy {
2471    pub fn new(channel: fidl::Channel) -> Self {
2472        let protocol_name =
2473            <SnapshotCallbackDeprecatedMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2474        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2475    }
2476
2477    pub fn into_channel(self) -> fidl::Channel {
2478        self.client.into_channel()
2479    }
2480
2481    /// Waits until an event arrives and returns it. It is safe for other
2482    /// threads to make concurrent requests while waiting for an event.
2483    pub fn wait_for_event(
2484        &self,
2485        deadline: zx::MonotonicInstant,
2486    ) -> Result<SnapshotCallbackDeprecatedEvent, fidl::Error> {
2487        SnapshotCallbackDeprecatedEvent::decode(self.client.wait_for_event(deadline)?)
2488    }
2489
2490    pub fn r#on_data(&self, mut data: fidl_fuchsia_mem::Buffer) -> Result<(), fidl::Error> {
2491        self.client.send::<SnapshotCallbackDeprecatedOnDataRequest>(
2492            (&mut data,),
2493            0x11d1a93b419b7d9f,
2494            fidl::encoding::DynamicFlags::empty(),
2495        )
2496    }
2497}
2498
2499#[derive(Debug, Clone)]
2500pub struct SnapshotCallbackDeprecatedProxy {
2501    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2502}
2503
2504impl fidl::endpoints::Proxy for SnapshotCallbackDeprecatedProxy {
2505    type Protocol = SnapshotCallbackDeprecatedMarker;
2506
2507    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2508        Self::new(inner)
2509    }
2510
2511    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2512        self.client.into_channel().map_err(|client| Self { client })
2513    }
2514
2515    fn as_channel(&self) -> &::fidl::AsyncChannel {
2516        self.client.as_channel()
2517    }
2518}
2519
2520impl SnapshotCallbackDeprecatedProxy {
2521    /// Create a new Proxy for fuchsia.ui.gfx/SnapshotCallbackDEPRECATED.
2522    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2523        let protocol_name =
2524            <SnapshotCallbackDeprecatedMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2525        Self { client: fidl::client::Client::new(channel, protocol_name) }
2526    }
2527
2528    /// Get a Stream of events from the remote end of the protocol.
2529    ///
2530    /// # Panics
2531    ///
2532    /// Panics if the event stream was already taken.
2533    pub fn take_event_stream(&self) -> SnapshotCallbackDeprecatedEventStream {
2534        SnapshotCallbackDeprecatedEventStream { event_receiver: self.client.take_event_receiver() }
2535    }
2536
2537    pub fn r#on_data(&self, mut data: fidl_fuchsia_mem::Buffer) -> Result<(), fidl::Error> {
2538        SnapshotCallbackDeprecatedProxyInterface::r#on_data(self, data)
2539    }
2540}
2541
2542impl SnapshotCallbackDeprecatedProxyInterface for SnapshotCallbackDeprecatedProxy {
2543    fn r#on_data(&self, mut data: fidl_fuchsia_mem::Buffer) -> Result<(), fidl::Error> {
2544        self.client.send::<SnapshotCallbackDeprecatedOnDataRequest>(
2545            (&mut data,),
2546            0x11d1a93b419b7d9f,
2547            fidl::encoding::DynamicFlags::empty(),
2548        )
2549    }
2550}
2551
2552pub struct SnapshotCallbackDeprecatedEventStream {
2553    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2554}
2555
2556impl std::marker::Unpin for SnapshotCallbackDeprecatedEventStream {}
2557
2558impl futures::stream::FusedStream for SnapshotCallbackDeprecatedEventStream {
2559    fn is_terminated(&self) -> bool {
2560        self.event_receiver.is_terminated()
2561    }
2562}
2563
2564impl futures::Stream for SnapshotCallbackDeprecatedEventStream {
2565    type Item = Result<SnapshotCallbackDeprecatedEvent, fidl::Error>;
2566
2567    fn poll_next(
2568        mut self: std::pin::Pin<&mut Self>,
2569        cx: &mut std::task::Context<'_>,
2570    ) -> std::task::Poll<Option<Self::Item>> {
2571        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2572            &mut self.event_receiver,
2573            cx
2574        )?) {
2575            Some(buf) => std::task::Poll::Ready(Some(SnapshotCallbackDeprecatedEvent::decode(buf))),
2576            None => std::task::Poll::Ready(None),
2577        }
2578    }
2579}
2580
2581#[derive(Debug)]
2582pub enum SnapshotCallbackDeprecatedEvent {}
2583
2584impl SnapshotCallbackDeprecatedEvent {
2585    /// Decodes a message buffer as a [`SnapshotCallbackDeprecatedEvent`].
2586    fn decode(
2587        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2588    ) -> Result<SnapshotCallbackDeprecatedEvent, fidl::Error> {
2589        let (bytes, _handles) = buf.split_mut();
2590        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2591        debug_assert_eq!(tx_header.tx_id, 0);
2592        match tx_header.ordinal {
2593            _ => Err(fidl::Error::UnknownOrdinal {
2594                ordinal: tx_header.ordinal,
2595                protocol_name: <SnapshotCallbackDeprecatedMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2596            })
2597        }
2598    }
2599}
2600
2601/// A Stream of incoming requests for fuchsia.ui.gfx/SnapshotCallbackDEPRECATED.
2602pub struct SnapshotCallbackDeprecatedRequestStream {
2603    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2604    is_terminated: bool,
2605}
2606
2607impl std::marker::Unpin for SnapshotCallbackDeprecatedRequestStream {}
2608
2609impl futures::stream::FusedStream for SnapshotCallbackDeprecatedRequestStream {
2610    fn is_terminated(&self) -> bool {
2611        self.is_terminated
2612    }
2613}
2614
2615impl fidl::endpoints::RequestStream for SnapshotCallbackDeprecatedRequestStream {
2616    type Protocol = SnapshotCallbackDeprecatedMarker;
2617    type ControlHandle = SnapshotCallbackDeprecatedControlHandle;
2618
2619    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2620        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2621    }
2622
2623    fn control_handle(&self) -> Self::ControlHandle {
2624        SnapshotCallbackDeprecatedControlHandle { inner: self.inner.clone() }
2625    }
2626
2627    fn into_inner(
2628        self,
2629    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2630    {
2631        (self.inner, self.is_terminated)
2632    }
2633
2634    fn from_inner(
2635        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2636        is_terminated: bool,
2637    ) -> Self {
2638        Self { inner, is_terminated }
2639    }
2640}
2641
2642impl futures::Stream for SnapshotCallbackDeprecatedRequestStream {
2643    type Item = Result<SnapshotCallbackDeprecatedRequest, fidl::Error>;
2644
2645    fn poll_next(
2646        mut self: std::pin::Pin<&mut Self>,
2647        cx: &mut std::task::Context<'_>,
2648    ) -> std::task::Poll<Option<Self::Item>> {
2649        let this = &mut *self;
2650        if this.inner.check_shutdown(cx) {
2651            this.is_terminated = true;
2652            return std::task::Poll::Ready(None);
2653        }
2654        if this.is_terminated {
2655            panic!("polled SnapshotCallbackDeprecatedRequestStream after completion");
2656        }
2657        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2658            |bytes, handles| {
2659                match this.inner.channel().read_etc(cx, bytes, handles) {
2660                    std::task::Poll::Ready(Ok(())) => {}
2661                    std::task::Poll::Pending => return std::task::Poll::Pending,
2662                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2663                        this.is_terminated = true;
2664                        return std::task::Poll::Ready(None);
2665                    }
2666                    std::task::Poll::Ready(Err(e)) => {
2667                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2668                            e.into(),
2669                        ))))
2670                    }
2671                }
2672
2673                // A message has been received from the channel
2674                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2675
2676                std::task::Poll::Ready(Some(match header.ordinal {
2677                0x11d1a93b419b7d9f => {
2678                    header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2679                    let mut req = fidl::new_empty!(SnapshotCallbackDeprecatedOnDataRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
2680                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SnapshotCallbackDeprecatedOnDataRequest>(&header, _body_bytes, handles, &mut req)?;
2681                    let control_handle = SnapshotCallbackDeprecatedControlHandle {
2682                        inner: this.inner.clone(),
2683                    };
2684                    Ok(SnapshotCallbackDeprecatedRequest::OnData {data: req.data,
2685
2686                        control_handle,
2687                    })
2688                }
2689                _ => Err(fidl::Error::UnknownOrdinal {
2690                    ordinal: header.ordinal,
2691                    protocol_name: <SnapshotCallbackDeprecatedMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2692                }),
2693            }))
2694            },
2695        )
2696    }
2697}
2698
2699#[derive(Debug)]
2700pub enum SnapshotCallbackDeprecatedRequest {
2701    OnData {
2702        data: fidl_fuchsia_mem::Buffer,
2703        control_handle: SnapshotCallbackDeprecatedControlHandle,
2704    },
2705}
2706
2707impl SnapshotCallbackDeprecatedRequest {
2708    #[allow(irrefutable_let_patterns)]
2709    pub fn into_on_data(
2710        self,
2711    ) -> Option<(fidl_fuchsia_mem::Buffer, SnapshotCallbackDeprecatedControlHandle)> {
2712        if let SnapshotCallbackDeprecatedRequest::OnData { data, control_handle } = self {
2713            Some((data, control_handle))
2714        } else {
2715            None
2716        }
2717    }
2718
2719    /// Name of the method defined in FIDL
2720    pub fn method_name(&self) -> &'static str {
2721        match *self {
2722            SnapshotCallbackDeprecatedRequest::OnData { .. } => "on_data",
2723        }
2724    }
2725}
2726
2727#[derive(Debug, Clone)]
2728pub struct SnapshotCallbackDeprecatedControlHandle {
2729    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2730}
2731
2732impl fidl::endpoints::ControlHandle for SnapshotCallbackDeprecatedControlHandle {
2733    fn shutdown(&self) {
2734        self.inner.shutdown()
2735    }
2736    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2737        self.inner.shutdown_with_epitaph(status)
2738    }
2739
2740    fn is_closed(&self) -> bool {
2741        self.inner.channel().is_closed()
2742    }
2743    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2744        self.inner.channel().on_closed()
2745    }
2746
2747    #[cfg(target_os = "fuchsia")]
2748    fn signal_peer(
2749        &self,
2750        clear_mask: zx::Signals,
2751        set_mask: zx::Signals,
2752    ) -> Result<(), zx_status::Status> {
2753        use fidl::Peered;
2754        self.inner.channel().signal_peer(clear_mask, set_mask)
2755    }
2756}
2757
2758impl SnapshotCallbackDeprecatedControlHandle {}
2759
2760mod internal {
2761    use super::*;
2762    unsafe impl fidl::encoding::TypeMarker for HitTestBehavior {
2763        type Owned = Self;
2764
2765        #[inline(always)]
2766        fn inline_align(_context: fidl::encoding::Context) -> usize {
2767            std::mem::align_of::<u32>()
2768        }
2769
2770        #[inline(always)]
2771        fn inline_size(_context: fidl::encoding::Context) -> usize {
2772            std::mem::size_of::<u32>()
2773        }
2774
2775        #[inline(always)]
2776        fn encode_is_copy() -> bool {
2777            true
2778        }
2779
2780        #[inline(always)]
2781        fn decode_is_copy() -> bool {
2782            false
2783        }
2784    }
2785
2786    impl fidl::encoding::ValueTypeMarker for HitTestBehavior {
2787        type Borrowed<'a> = Self;
2788        #[inline(always)]
2789        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2790            *value
2791        }
2792    }
2793
2794    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2795        for HitTestBehavior
2796    {
2797        #[inline]
2798        unsafe fn encode(
2799            self,
2800            encoder: &mut fidl::encoding::Encoder<'_, D>,
2801            offset: usize,
2802            _depth: fidl::encoding::Depth,
2803        ) -> fidl::Result<()> {
2804            encoder.debug_check_bounds::<Self>(offset);
2805            encoder.write_num(self.into_primitive(), offset);
2806            Ok(())
2807        }
2808    }
2809
2810    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for HitTestBehavior {
2811        #[inline(always)]
2812        fn new_empty() -> Self {
2813            Self::KDefault
2814        }
2815
2816        #[inline]
2817        unsafe fn decode(
2818            &mut self,
2819            decoder: &mut fidl::encoding::Decoder<'_, D>,
2820            offset: usize,
2821            _depth: fidl::encoding::Depth,
2822        ) -> fidl::Result<()> {
2823            decoder.debug_check_bounds::<Self>(offset);
2824            let prim = decoder.read_num::<u32>(offset);
2825
2826            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2827            Ok(())
2828        }
2829    }
2830    unsafe impl fidl::encoding::TypeMarker for ImportSpec {
2831        type Owned = Self;
2832
2833        #[inline(always)]
2834        fn inline_align(_context: fidl::encoding::Context) -> usize {
2835            std::mem::align_of::<u32>()
2836        }
2837
2838        #[inline(always)]
2839        fn inline_size(_context: fidl::encoding::Context) -> usize {
2840            std::mem::size_of::<u32>()
2841        }
2842
2843        #[inline(always)]
2844        fn encode_is_copy() -> bool {
2845            true
2846        }
2847
2848        #[inline(always)]
2849        fn decode_is_copy() -> bool {
2850            false
2851        }
2852    }
2853
2854    impl fidl::encoding::ValueTypeMarker for ImportSpec {
2855        type Borrowed<'a> = Self;
2856        #[inline(always)]
2857        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2858            *value
2859        }
2860    }
2861
2862    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ImportSpec {
2863        #[inline]
2864        unsafe fn encode(
2865            self,
2866            encoder: &mut fidl::encoding::Encoder<'_, D>,
2867            offset: usize,
2868            _depth: fidl::encoding::Depth,
2869        ) -> fidl::Result<()> {
2870            encoder.debug_check_bounds::<Self>(offset);
2871            encoder.write_num(self.into_primitive(), offset);
2872            Ok(())
2873        }
2874    }
2875
2876    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ImportSpec {
2877        #[inline(always)]
2878        fn new_empty() -> Self {
2879            Self::Node
2880        }
2881
2882        #[inline]
2883        unsafe fn decode(
2884            &mut self,
2885            decoder: &mut fidl::encoding::Decoder<'_, D>,
2886            offset: usize,
2887            _depth: fidl::encoding::Depth,
2888        ) -> fidl::Result<()> {
2889            decoder.debug_check_bounds::<Self>(offset);
2890            let prim = decoder.read_num::<u32>(offset);
2891
2892            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2893            Ok(())
2894        }
2895    }
2896    unsafe impl fidl::encoding::TypeMarker for MeshIndexFormat {
2897        type Owned = Self;
2898
2899        #[inline(always)]
2900        fn inline_align(_context: fidl::encoding::Context) -> usize {
2901            std::mem::align_of::<u32>()
2902        }
2903
2904        #[inline(always)]
2905        fn inline_size(_context: fidl::encoding::Context) -> usize {
2906            std::mem::size_of::<u32>()
2907        }
2908
2909        #[inline(always)]
2910        fn encode_is_copy() -> bool {
2911            true
2912        }
2913
2914        #[inline(always)]
2915        fn decode_is_copy() -> bool {
2916            false
2917        }
2918    }
2919
2920    impl fidl::encoding::ValueTypeMarker for MeshIndexFormat {
2921        type Borrowed<'a> = Self;
2922        #[inline(always)]
2923        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2924            *value
2925        }
2926    }
2927
2928    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2929        for MeshIndexFormat
2930    {
2931        #[inline]
2932        unsafe fn encode(
2933            self,
2934            encoder: &mut fidl::encoding::Encoder<'_, D>,
2935            offset: usize,
2936            _depth: fidl::encoding::Depth,
2937        ) -> fidl::Result<()> {
2938            encoder.debug_check_bounds::<Self>(offset);
2939            encoder.write_num(self.into_primitive(), offset);
2940            Ok(())
2941        }
2942    }
2943
2944    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MeshIndexFormat {
2945        #[inline(always)]
2946        fn new_empty() -> Self {
2947            Self::KUint16
2948        }
2949
2950        #[inline]
2951        unsafe fn decode(
2952            &mut self,
2953            decoder: &mut fidl::encoding::Decoder<'_, D>,
2954            offset: usize,
2955            _depth: fidl::encoding::Depth,
2956        ) -> fidl::Result<()> {
2957            decoder.debug_check_bounds::<Self>(offset);
2958            let prim = decoder.read_num::<u32>(offset);
2959
2960            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2961            Ok(())
2962        }
2963    }
2964    unsafe impl fidl::encoding::TypeMarker for RenderFrequency {
2965        type Owned = Self;
2966
2967        #[inline(always)]
2968        fn inline_align(_context: fidl::encoding::Context) -> usize {
2969            std::mem::align_of::<u32>()
2970        }
2971
2972        #[inline(always)]
2973        fn inline_size(_context: fidl::encoding::Context) -> usize {
2974            std::mem::size_of::<u32>()
2975        }
2976
2977        #[inline(always)]
2978        fn encode_is_copy() -> bool {
2979            true
2980        }
2981
2982        #[inline(always)]
2983        fn decode_is_copy() -> bool {
2984            false
2985        }
2986    }
2987
2988    impl fidl::encoding::ValueTypeMarker for RenderFrequency {
2989        type Borrowed<'a> = Self;
2990        #[inline(always)]
2991        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2992            *value
2993        }
2994    }
2995
2996    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2997        for RenderFrequency
2998    {
2999        #[inline]
3000        unsafe fn encode(
3001            self,
3002            encoder: &mut fidl::encoding::Encoder<'_, D>,
3003            offset: usize,
3004            _depth: fidl::encoding::Depth,
3005        ) -> fidl::Result<()> {
3006            encoder.debug_check_bounds::<Self>(offset);
3007            encoder.write_num(self.into_primitive(), offset);
3008            Ok(())
3009        }
3010    }
3011
3012    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RenderFrequency {
3013        #[inline(always)]
3014        fn new_empty() -> Self {
3015            Self::WhenRequested
3016        }
3017
3018        #[inline]
3019        unsafe fn decode(
3020            &mut self,
3021            decoder: &mut fidl::encoding::Decoder<'_, D>,
3022            offset: usize,
3023            _depth: fidl::encoding::Depth,
3024        ) -> fidl::Result<()> {
3025            decoder.debug_check_bounds::<Self>(offset);
3026            let prim = decoder.read_num::<u32>(offset);
3027
3028            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
3029            Ok(())
3030        }
3031    }
3032    unsafe impl fidl::encoding::TypeMarker for ShadowTechnique {
3033        type Owned = Self;
3034
3035        #[inline(always)]
3036        fn inline_align(_context: fidl::encoding::Context) -> usize {
3037            std::mem::align_of::<u32>()
3038        }
3039
3040        #[inline(always)]
3041        fn inline_size(_context: fidl::encoding::Context) -> usize {
3042            std::mem::size_of::<u32>()
3043        }
3044
3045        #[inline(always)]
3046        fn encode_is_copy() -> bool {
3047            true
3048        }
3049
3050        #[inline(always)]
3051        fn decode_is_copy() -> bool {
3052            false
3053        }
3054    }
3055
3056    impl fidl::encoding::ValueTypeMarker for ShadowTechnique {
3057        type Borrowed<'a> = Self;
3058        #[inline(always)]
3059        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3060            *value
3061        }
3062    }
3063
3064    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
3065        for ShadowTechnique
3066    {
3067        #[inline]
3068        unsafe fn encode(
3069            self,
3070            encoder: &mut fidl::encoding::Encoder<'_, D>,
3071            offset: usize,
3072            _depth: fidl::encoding::Depth,
3073        ) -> fidl::Result<()> {
3074            encoder.debug_check_bounds::<Self>(offset);
3075            encoder.write_num(self.into_primitive(), offset);
3076            Ok(())
3077        }
3078    }
3079
3080    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ShadowTechnique {
3081        #[inline(always)]
3082        fn new_empty() -> Self {
3083            Self::Unshadowed
3084        }
3085
3086        #[inline]
3087        unsafe fn decode(
3088            &mut self,
3089            decoder: &mut fidl::encoding::Decoder<'_, D>,
3090            offset: usize,
3091            _depth: fidl::encoding::Depth,
3092        ) -> fidl::Result<()> {
3093            decoder.debug_check_bounds::<Self>(offset);
3094            let prim = decoder.read_num::<u32>(offset);
3095
3096            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
3097            Ok(())
3098        }
3099    }
3100    unsafe impl fidl::encoding::TypeMarker for ValueType {
3101        type Owned = Self;
3102
3103        #[inline(always)]
3104        fn inline_align(_context: fidl::encoding::Context) -> usize {
3105            std::mem::align_of::<u32>()
3106        }
3107
3108        #[inline(always)]
3109        fn inline_size(_context: fidl::encoding::Context) -> usize {
3110            std::mem::size_of::<u32>()
3111        }
3112
3113        #[inline(always)]
3114        fn encode_is_copy() -> bool {
3115            true
3116        }
3117
3118        #[inline(always)]
3119        fn decode_is_copy() -> bool {
3120            false
3121        }
3122    }
3123
3124    impl fidl::encoding::ValueTypeMarker for ValueType {
3125        type Borrowed<'a> = Self;
3126        #[inline(always)]
3127        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3128            *value
3129        }
3130    }
3131
3132    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ValueType {
3133        #[inline]
3134        unsafe fn encode(
3135            self,
3136            encoder: &mut fidl::encoding::Encoder<'_, D>,
3137            offset: usize,
3138            _depth: fidl::encoding::Depth,
3139        ) -> fidl::Result<()> {
3140            encoder.debug_check_bounds::<Self>(offset);
3141            encoder.write_num(self.into_primitive(), offset);
3142            Ok(())
3143        }
3144    }
3145
3146    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ValueType {
3147        #[inline(always)]
3148        fn new_empty() -> Self {
3149            Self::KNone
3150        }
3151
3152        #[inline]
3153        unsafe fn decode(
3154            &mut self,
3155            decoder: &mut fidl::encoding::Decoder<'_, D>,
3156            offset: usize,
3157            _depth: fidl::encoding::Depth,
3158        ) -> fidl::Result<()> {
3159            decoder.debug_check_bounds::<Self>(offset);
3160            let prim = decoder.read_num::<u32>(offset);
3161
3162            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
3163            Ok(())
3164        }
3165    }
3166
3167    impl fidl::encoding::ValueTypeMarker for AddChildCmd {
3168        type Borrowed<'a> = &'a Self;
3169        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3170            value
3171        }
3172    }
3173
3174    unsafe impl fidl::encoding::TypeMarker for AddChildCmd {
3175        type Owned = Self;
3176
3177        #[inline(always)]
3178        fn inline_align(_context: fidl::encoding::Context) -> usize {
3179            4
3180        }
3181
3182        #[inline(always)]
3183        fn inline_size(_context: fidl::encoding::Context) -> usize {
3184            8
3185        }
3186        #[inline(always)]
3187        fn encode_is_copy() -> bool {
3188            true
3189        }
3190
3191        #[inline(always)]
3192        fn decode_is_copy() -> bool {
3193            true
3194        }
3195    }
3196
3197    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddChildCmd, D>
3198        for &AddChildCmd
3199    {
3200        #[inline]
3201        unsafe fn encode(
3202            self,
3203            encoder: &mut fidl::encoding::Encoder<'_, D>,
3204            offset: usize,
3205            _depth: fidl::encoding::Depth,
3206        ) -> fidl::Result<()> {
3207            encoder.debug_check_bounds::<AddChildCmd>(offset);
3208            unsafe {
3209                // Copy the object into the buffer.
3210                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3211                (buf_ptr as *mut AddChildCmd).write_unaligned((self as *const AddChildCmd).read());
3212                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3213                // done second because the memcpy will write garbage to these bytes.
3214            }
3215            Ok(())
3216        }
3217    }
3218    unsafe impl<
3219            D: fidl::encoding::ResourceDialect,
3220            T0: fidl::encoding::Encode<u32, D>,
3221            T1: fidl::encoding::Encode<u32, D>,
3222        > fidl::encoding::Encode<AddChildCmd, D> for (T0, T1)
3223    {
3224        #[inline]
3225        unsafe fn encode(
3226            self,
3227            encoder: &mut fidl::encoding::Encoder<'_, D>,
3228            offset: usize,
3229            depth: fidl::encoding::Depth,
3230        ) -> fidl::Result<()> {
3231            encoder.debug_check_bounds::<AddChildCmd>(offset);
3232            // Zero out padding regions. There's no need to apply masks
3233            // because the unmasked parts will be overwritten by fields.
3234            // Write the fields.
3235            self.0.encode(encoder, offset + 0, depth)?;
3236            self.1.encode(encoder, offset + 4, depth)?;
3237            Ok(())
3238        }
3239    }
3240
3241    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddChildCmd {
3242        #[inline(always)]
3243        fn new_empty() -> Self {
3244            Self { node_id: fidl::new_empty!(u32, D), child_id: fidl::new_empty!(u32, D) }
3245        }
3246
3247        #[inline]
3248        unsafe fn decode(
3249            &mut self,
3250            decoder: &mut fidl::encoding::Decoder<'_, D>,
3251            offset: usize,
3252            _depth: fidl::encoding::Depth,
3253        ) -> fidl::Result<()> {
3254            decoder.debug_check_bounds::<Self>(offset);
3255            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3256            // Verify that padding bytes are zero.
3257            // Copy from the buffer into the object.
3258            unsafe {
3259                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3260            }
3261            Ok(())
3262        }
3263    }
3264
3265    impl fidl::encoding::ValueTypeMarker for AddLayerCmd {
3266        type Borrowed<'a> = &'a Self;
3267        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3268            value
3269        }
3270    }
3271
3272    unsafe impl fidl::encoding::TypeMarker for AddLayerCmd {
3273        type Owned = Self;
3274
3275        #[inline(always)]
3276        fn inline_align(_context: fidl::encoding::Context) -> usize {
3277            4
3278        }
3279
3280        #[inline(always)]
3281        fn inline_size(_context: fidl::encoding::Context) -> usize {
3282            8
3283        }
3284        #[inline(always)]
3285        fn encode_is_copy() -> bool {
3286            true
3287        }
3288
3289        #[inline(always)]
3290        fn decode_is_copy() -> bool {
3291            true
3292        }
3293    }
3294
3295    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddLayerCmd, D>
3296        for &AddLayerCmd
3297    {
3298        #[inline]
3299        unsafe fn encode(
3300            self,
3301            encoder: &mut fidl::encoding::Encoder<'_, D>,
3302            offset: usize,
3303            _depth: fidl::encoding::Depth,
3304        ) -> fidl::Result<()> {
3305            encoder.debug_check_bounds::<AddLayerCmd>(offset);
3306            unsafe {
3307                // Copy the object into the buffer.
3308                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3309                (buf_ptr as *mut AddLayerCmd).write_unaligned((self as *const AddLayerCmd).read());
3310                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3311                // done second because the memcpy will write garbage to these bytes.
3312            }
3313            Ok(())
3314        }
3315    }
3316    unsafe impl<
3317            D: fidl::encoding::ResourceDialect,
3318            T0: fidl::encoding::Encode<u32, D>,
3319            T1: fidl::encoding::Encode<u32, D>,
3320        > fidl::encoding::Encode<AddLayerCmd, D> for (T0, T1)
3321    {
3322        #[inline]
3323        unsafe fn encode(
3324            self,
3325            encoder: &mut fidl::encoding::Encoder<'_, D>,
3326            offset: usize,
3327            depth: fidl::encoding::Depth,
3328        ) -> fidl::Result<()> {
3329            encoder.debug_check_bounds::<AddLayerCmd>(offset);
3330            // Zero out padding regions. There's no need to apply masks
3331            // because the unmasked parts will be overwritten by fields.
3332            // Write the fields.
3333            self.0.encode(encoder, offset + 0, depth)?;
3334            self.1.encode(encoder, offset + 4, depth)?;
3335            Ok(())
3336        }
3337    }
3338
3339    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddLayerCmd {
3340        #[inline(always)]
3341        fn new_empty() -> Self {
3342            Self { layer_stack_id: fidl::new_empty!(u32, D), layer_id: fidl::new_empty!(u32, D) }
3343        }
3344
3345        #[inline]
3346        unsafe fn decode(
3347            &mut self,
3348            decoder: &mut fidl::encoding::Decoder<'_, D>,
3349            offset: usize,
3350            _depth: fidl::encoding::Depth,
3351        ) -> fidl::Result<()> {
3352            decoder.debug_check_bounds::<Self>(offset);
3353            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3354            // Verify that padding bytes are zero.
3355            // Copy from the buffer into the object.
3356            unsafe {
3357                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3358            }
3359            Ok(())
3360        }
3361    }
3362
3363    impl fidl::encoding::ValueTypeMarker for AddLightCmd {
3364        type Borrowed<'a> = &'a Self;
3365        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3366            value
3367        }
3368    }
3369
3370    unsafe impl fidl::encoding::TypeMarker for AddLightCmd {
3371        type Owned = Self;
3372
3373        #[inline(always)]
3374        fn inline_align(_context: fidl::encoding::Context) -> usize {
3375            4
3376        }
3377
3378        #[inline(always)]
3379        fn inline_size(_context: fidl::encoding::Context) -> usize {
3380            8
3381        }
3382        #[inline(always)]
3383        fn encode_is_copy() -> bool {
3384            true
3385        }
3386
3387        #[inline(always)]
3388        fn decode_is_copy() -> bool {
3389            true
3390        }
3391    }
3392
3393    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddLightCmd, D>
3394        for &AddLightCmd
3395    {
3396        #[inline]
3397        unsafe fn encode(
3398            self,
3399            encoder: &mut fidl::encoding::Encoder<'_, D>,
3400            offset: usize,
3401            _depth: fidl::encoding::Depth,
3402        ) -> fidl::Result<()> {
3403            encoder.debug_check_bounds::<AddLightCmd>(offset);
3404            unsafe {
3405                // Copy the object into the buffer.
3406                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3407                (buf_ptr as *mut AddLightCmd).write_unaligned((self as *const AddLightCmd).read());
3408                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3409                // done second because the memcpy will write garbage to these bytes.
3410            }
3411            Ok(())
3412        }
3413    }
3414    unsafe impl<
3415            D: fidl::encoding::ResourceDialect,
3416            T0: fidl::encoding::Encode<u32, D>,
3417            T1: fidl::encoding::Encode<u32, D>,
3418        > fidl::encoding::Encode<AddLightCmd, D> for (T0, T1)
3419    {
3420        #[inline]
3421        unsafe fn encode(
3422            self,
3423            encoder: &mut fidl::encoding::Encoder<'_, D>,
3424            offset: usize,
3425            depth: fidl::encoding::Depth,
3426        ) -> fidl::Result<()> {
3427            encoder.debug_check_bounds::<AddLightCmd>(offset);
3428            // Zero out padding regions. There's no need to apply masks
3429            // because the unmasked parts will be overwritten by fields.
3430            // Write the fields.
3431            self.0.encode(encoder, offset + 0, depth)?;
3432            self.1.encode(encoder, offset + 4, depth)?;
3433            Ok(())
3434        }
3435    }
3436
3437    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddLightCmd {
3438        #[inline(always)]
3439        fn new_empty() -> Self {
3440            Self { scene_id: fidl::new_empty!(u32, D), light_id: fidl::new_empty!(u32, D) }
3441        }
3442
3443        #[inline]
3444        unsafe fn decode(
3445            &mut self,
3446            decoder: &mut fidl::encoding::Decoder<'_, D>,
3447            offset: usize,
3448            _depth: fidl::encoding::Depth,
3449        ) -> fidl::Result<()> {
3450            decoder.debug_check_bounds::<Self>(offset);
3451            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3452            // Verify that padding bytes are zero.
3453            // Copy from the buffer into the object.
3454            unsafe {
3455                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3456            }
3457            Ok(())
3458        }
3459    }
3460
3461    impl fidl::encoding::ValueTypeMarker for AddPartCmd {
3462        type Borrowed<'a> = &'a Self;
3463        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3464            value
3465        }
3466    }
3467
3468    unsafe impl fidl::encoding::TypeMarker for AddPartCmd {
3469        type Owned = Self;
3470
3471        #[inline(always)]
3472        fn inline_align(_context: fidl::encoding::Context) -> usize {
3473            4
3474        }
3475
3476        #[inline(always)]
3477        fn inline_size(_context: fidl::encoding::Context) -> usize {
3478            8
3479        }
3480        #[inline(always)]
3481        fn encode_is_copy() -> bool {
3482            true
3483        }
3484
3485        #[inline(always)]
3486        fn decode_is_copy() -> bool {
3487            true
3488        }
3489    }
3490
3491    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddPartCmd, D>
3492        for &AddPartCmd
3493    {
3494        #[inline]
3495        unsafe fn encode(
3496            self,
3497            encoder: &mut fidl::encoding::Encoder<'_, D>,
3498            offset: usize,
3499            _depth: fidl::encoding::Depth,
3500        ) -> fidl::Result<()> {
3501            encoder.debug_check_bounds::<AddPartCmd>(offset);
3502            unsafe {
3503                // Copy the object into the buffer.
3504                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3505                (buf_ptr as *mut AddPartCmd).write_unaligned((self as *const AddPartCmd).read());
3506                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3507                // done second because the memcpy will write garbage to these bytes.
3508            }
3509            Ok(())
3510        }
3511    }
3512    unsafe impl<
3513            D: fidl::encoding::ResourceDialect,
3514            T0: fidl::encoding::Encode<u32, D>,
3515            T1: fidl::encoding::Encode<u32, D>,
3516        > fidl::encoding::Encode<AddPartCmd, D> for (T0, T1)
3517    {
3518        #[inline]
3519        unsafe fn encode(
3520            self,
3521            encoder: &mut fidl::encoding::Encoder<'_, D>,
3522            offset: usize,
3523            depth: fidl::encoding::Depth,
3524        ) -> fidl::Result<()> {
3525            encoder.debug_check_bounds::<AddPartCmd>(offset);
3526            // Zero out padding regions. There's no need to apply masks
3527            // because the unmasked parts will be overwritten by fields.
3528            // Write the fields.
3529            self.0.encode(encoder, offset + 0, depth)?;
3530            self.1.encode(encoder, offset + 4, depth)?;
3531            Ok(())
3532        }
3533    }
3534
3535    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddPartCmd {
3536        #[inline(always)]
3537        fn new_empty() -> Self {
3538            Self { node_id: fidl::new_empty!(u32, D), part_id: fidl::new_empty!(u32, D) }
3539        }
3540
3541        #[inline]
3542        unsafe fn decode(
3543            &mut self,
3544            decoder: &mut fidl::encoding::Decoder<'_, D>,
3545            offset: usize,
3546            _depth: fidl::encoding::Depth,
3547        ) -> fidl::Result<()> {
3548            decoder.debug_check_bounds::<Self>(offset);
3549            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3550            // Verify that padding bytes are zero.
3551            // Copy from the buffer into the object.
3552            unsafe {
3553                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3554            }
3555            Ok(())
3556        }
3557    }
3558
3559    impl fidl::encoding::ValueTypeMarker for AmbientLightArgs {
3560        type Borrowed<'a> = &'a Self;
3561        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3562            value
3563        }
3564    }
3565
3566    unsafe impl fidl::encoding::TypeMarker for AmbientLightArgs {
3567        type Owned = Self;
3568
3569        #[inline(always)]
3570        fn inline_align(_context: fidl::encoding::Context) -> usize {
3571            4
3572        }
3573
3574        #[inline(always)]
3575        fn inline_size(_context: fidl::encoding::Context) -> usize {
3576            4
3577        }
3578        #[inline(always)]
3579        fn encode_is_copy() -> bool {
3580            true
3581        }
3582
3583        #[inline(always)]
3584        fn decode_is_copy() -> bool {
3585            true
3586        }
3587    }
3588
3589    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AmbientLightArgs, D>
3590        for &AmbientLightArgs
3591    {
3592        #[inline]
3593        unsafe fn encode(
3594            self,
3595            encoder: &mut fidl::encoding::Encoder<'_, D>,
3596            offset: usize,
3597            _depth: fidl::encoding::Depth,
3598        ) -> fidl::Result<()> {
3599            encoder.debug_check_bounds::<AmbientLightArgs>(offset);
3600            unsafe {
3601                // Copy the object into the buffer.
3602                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3603                (buf_ptr as *mut AmbientLightArgs)
3604                    .write_unaligned((self as *const AmbientLightArgs).read());
3605                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3606                // done second because the memcpy will write garbage to these bytes.
3607            }
3608            Ok(())
3609        }
3610    }
3611    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
3612        fidl::encoding::Encode<AmbientLightArgs, D> for (T0,)
3613    {
3614        #[inline]
3615        unsafe fn encode(
3616            self,
3617            encoder: &mut fidl::encoding::Encoder<'_, D>,
3618            offset: usize,
3619            depth: fidl::encoding::Depth,
3620        ) -> fidl::Result<()> {
3621            encoder.debug_check_bounds::<AmbientLightArgs>(offset);
3622            // Zero out padding regions. There's no need to apply masks
3623            // because the unmasked parts will be overwritten by fields.
3624            // Write the fields.
3625            self.0.encode(encoder, offset + 0, depth)?;
3626            Ok(())
3627        }
3628    }
3629
3630    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AmbientLightArgs {
3631        #[inline(always)]
3632        fn new_empty() -> Self {
3633            Self { dummy: fidl::new_empty!(u32, D) }
3634        }
3635
3636        #[inline]
3637        unsafe fn decode(
3638            &mut self,
3639            decoder: &mut fidl::encoding::Decoder<'_, D>,
3640            offset: usize,
3641            _depth: fidl::encoding::Depth,
3642        ) -> fidl::Result<()> {
3643            decoder.debug_check_bounds::<Self>(offset);
3644            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3645            // Verify that padding bytes are zero.
3646            // Copy from the buffer into the object.
3647            unsafe {
3648                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
3649            }
3650            Ok(())
3651        }
3652    }
3653
3654    impl fidl::encoding::ValueTypeMarker for BindMeshBuffersCmd {
3655        type Borrowed<'a> = &'a Self;
3656        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3657            value
3658        }
3659    }
3660
3661    unsafe impl fidl::encoding::TypeMarker for BindMeshBuffersCmd {
3662        type Owned = Self;
3663
3664        #[inline(always)]
3665        fn inline_align(_context: fidl::encoding::Context) -> usize {
3666            8
3667        }
3668
3669        #[inline(always)]
3670        fn inline_size(_context: fidl::encoding::Context) -> usize {
3671            88
3672        }
3673    }
3674
3675    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BindMeshBuffersCmd, D>
3676        for &BindMeshBuffersCmd
3677    {
3678        #[inline]
3679        unsafe fn encode(
3680            self,
3681            encoder: &mut fidl::encoding::Encoder<'_, D>,
3682            offset: usize,
3683            _depth: fidl::encoding::Depth,
3684        ) -> fidl::Result<()> {
3685            encoder.debug_check_bounds::<BindMeshBuffersCmd>(offset);
3686            // Delegate to tuple encoding.
3687            fidl::encoding::Encode::<BindMeshBuffersCmd, D>::encode(
3688                (
3689                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.mesh_id),
3690                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.index_buffer_id),
3691                    <MeshIndexFormat as fidl::encoding::ValueTypeMarker>::borrow(
3692                        &self.index_format,
3693                    ),
3694                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.index_offset),
3695                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.index_count),
3696                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.vertex_buffer_id),
3697                    <MeshVertexFormat as fidl::encoding::ValueTypeMarker>::borrow(
3698                        &self.vertex_format,
3699                    ),
3700                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.vertex_offset),
3701                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.vertex_count),
3702                    <BoundingBox as fidl::encoding::ValueTypeMarker>::borrow(&self.bounding_box),
3703                ),
3704                encoder,
3705                offset,
3706                _depth,
3707            )
3708        }
3709    }
3710    unsafe impl<
3711            D: fidl::encoding::ResourceDialect,
3712            T0: fidl::encoding::Encode<u32, D>,
3713            T1: fidl::encoding::Encode<u32, D>,
3714            T2: fidl::encoding::Encode<MeshIndexFormat, D>,
3715            T3: fidl::encoding::Encode<u64, D>,
3716            T4: fidl::encoding::Encode<u32, D>,
3717            T5: fidl::encoding::Encode<u32, D>,
3718            T6: fidl::encoding::Encode<MeshVertexFormat, D>,
3719            T7: fidl::encoding::Encode<u64, D>,
3720            T8: fidl::encoding::Encode<u32, D>,
3721            T9: fidl::encoding::Encode<BoundingBox, D>,
3722        > fidl::encoding::Encode<BindMeshBuffersCmd, D>
3723        for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
3724    {
3725        #[inline]
3726        unsafe fn encode(
3727            self,
3728            encoder: &mut fidl::encoding::Encoder<'_, D>,
3729            offset: usize,
3730            depth: fidl::encoding::Depth,
3731        ) -> fidl::Result<()> {
3732            encoder.debug_check_bounds::<BindMeshBuffersCmd>(offset);
3733            // Zero out padding regions. There's no need to apply masks
3734            // because the unmasked parts will be overwritten by fields.
3735            unsafe {
3736                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3737                (ptr as *mut u64).write_unaligned(0);
3738            }
3739            unsafe {
3740                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
3741                (ptr as *mut u64).write_unaligned(0);
3742            }
3743            unsafe {
3744                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(80);
3745                (ptr as *mut u64).write_unaligned(0);
3746            }
3747            // Write the fields.
3748            self.0.encode(encoder, offset + 0, depth)?;
3749            self.1.encode(encoder, offset + 4, depth)?;
3750            self.2.encode(encoder, offset + 8, depth)?;
3751            self.3.encode(encoder, offset + 16, depth)?;
3752            self.4.encode(encoder, offset + 24, depth)?;
3753            self.5.encode(encoder, offset + 28, depth)?;
3754            self.6.encode(encoder, offset + 32, depth)?;
3755            self.7.encode(encoder, offset + 48, depth)?;
3756            self.8.encode(encoder, offset + 56, depth)?;
3757            self.9.encode(encoder, offset + 60, depth)?;
3758            Ok(())
3759        }
3760    }
3761
3762    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BindMeshBuffersCmd {
3763        #[inline(always)]
3764        fn new_empty() -> Self {
3765            Self {
3766                mesh_id: fidl::new_empty!(u32, D),
3767                index_buffer_id: fidl::new_empty!(u32, D),
3768                index_format: fidl::new_empty!(MeshIndexFormat, D),
3769                index_offset: fidl::new_empty!(u64, D),
3770                index_count: fidl::new_empty!(u32, D),
3771                vertex_buffer_id: fidl::new_empty!(u32, D),
3772                vertex_format: fidl::new_empty!(MeshVertexFormat, D),
3773                vertex_offset: fidl::new_empty!(u64, D),
3774                vertex_count: fidl::new_empty!(u32, D),
3775                bounding_box: fidl::new_empty!(BoundingBox, D),
3776            }
3777        }
3778
3779        #[inline]
3780        unsafe fn decode(
3781            &mut self,
3782            decoder: &mut fidl::encoding::Decoder<'_, D>,
3783            offset: usize,
3784            _depth: fidl::encoding::Depth,
3785        ) -> fidl::Result<()> {
3786            decoder.debug_check_bounds::<Self>(offset);
3787            // Verify that padding bytes are zero.
3788            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3789            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3790            let mask = 0xffffffff00000000u64;
3791            let maskedval = padval & mask;
3792            if maskedval != 0 {
3793                return Err(fidl::Error::NonZeroPadding {
3794                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3795                });
3796            }
3797            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
3798            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3799            let mask = 0xffffffff00000000u64;
3800            let maskedval = padval & mask;
3801            if maskedval != 0 {
3802                return Err(fidl::Error::NonZeroPadding {
3803                    padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
3804                });
3805            }
3806            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(80) };
3807            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3808            let mask = 0xffffffff00000000u64;
3809            let maskedval = padval & mask;
3810            if maskedval != 0 {
3811                return Err(fidl::Error::NonZeroPadding {
3812                    padding_start: offset + 80 + ((mask as u64).trailing_zeros() / 8) as usize,
3813                });
3814            }
3815            fidl::decode!(u32, D, &mut self.mesh_id, decoder, offset + 0, _depth)?;
3816            fidl::decode!(u32, D, &mut self.index_buffer_id, decoder, offset + 4, _depth)?;
3817            fidl::decode!(MeshIndexFormat, D, &mut self.index_format, decoder, offset + 8, _depth)?;
3818            fidl::decode!(u64, D, &mut self.index_offset, decoder, offset + 16, _depth)?;
3819            fidl::decode!(u32, D, &mut self.index_count, decoder, offset + 24, _depth)?;
3820            fidl::decode!(u32, D, &mut self.vertex_buffer_id, decoder, offset + 28, _depth)?;
3821            fidl::decode!(
3822                MeshVertexFormat,
3823                D,
3824                &mut self.vertex_format,
3825                decoder,
3826                offset + 32,
3827                _depth
3828            )?;
3829            fidl::decode!(u64, D, &mut self.vertex_offset, decoder, offset + 48, _depth)?;
3830            fidl::decode!(u32, D, &mut self.vertex_count, decoder, offset + 56, _depth)?;
3831            fidl::decode!(BoundingBox, D, &mut self.bounding_box, decoder, offset + 60, _depth)?;
3832            Ok(())
3833        }
3834    }
3835
3836    impl fidl::encoding::ValueTypeMarker for BoundingBox {
3837        type Borrowed<'a> = &'a Self;
3838        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3839            value
3840        }
3841    }
3842
3843    unsafe impl fidl::encoding::TypeMarker for BoundingBox {
3844        type Owned = Self;
3845
3846        #[inline(always)]
3847        fn inline_align(_context: fidl::encoding::Context) -> usize {
3848            4
3849        }
3850
3851        #[inline(always)]
3852        fn inline_size(_context: fidl::encoding::Context) -> usize {
3853            24
3854        }
3855    }
3856
3857    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BoundingBox, D>
3858        for &BoundingBox
3859    {
3860        #[inline]
3861        unsafe fn encode(
3862            self,
3863            encoder: &mut fidl::encoding::Encoder<'_, D>,
3864            offset: usize,
3865            _depth: fidl::encoding::Depth,
3866        ) -> fidl::Result<()> {
3867            encoder.debug_check_bounds::<BoundingBox>(offset);
3868            // Delegate to tuple encoding.
3869            fidl::encoding::Encode::<BoundingBox, D>::encode(
3870                (
3871                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.min),
3872                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.max),
3873                ),
3874                encoder,
3875                offset,
3876                _depth,
3877            )
3878        }
3879    }
3880    unsafe impl<
3881            D: fidl::encoding::ResourceDialect,
3882            T0: fidl::encoding::Encode<Vec3, D>,
3883            T1: fidl::encoding::Encode<Vec3, D>,
3884        > fidl::encoding::Encode<BoundingBox, D> for (T0, T1)
3885    {
3886        #[inline]
3887        unsafe fn encode(
3888            self,
3889            encoder: &mut fidl::encoding::Encoder<'_, D>,
3890            offset: usize,
3891            depth: fidl::encoding::Depth,
3892        ) -> fidl::Result<()> {
3893            encoder.debug_check_bounds::<BoundingBox>(offset);
3894            // Zero out padding regions. There's no need to apply masks
3895            // because the unmasked parts will be overwritten by fields.
3896            // Write the fields.
3897            self.0.encode(encoder, offset + 0, depth)?;
3898            self.1.encode(encoder, offset + 12, depth)?;
3899            Ok(())
3900        }
3901    }
3902
3903    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BoundingBox {
3904        #[inline(always)]
3905        fn new_empty() -> Self {
3906            Self { min: fidl::new_empty!(Vec3, D), max: fidl::new_empty!(Vec3, D) }
3907        }
3908
3909        #[inline]
3910        unsafe fn decode(
3911            &mut self,
3912            decoder: &mut fidl::encoding::Decoder<'_, D>,
3913            offset: usize,
3914            _depth: fidl::encoding::Depth,
3915        ) -> fidl::Result<()> {
3916            decoder.debug_check_bounds::<Self>(offset);
3917            // Verify that padding bytes are zero.
3918            fidl::decode!(Vec3, D, &mut self.min, decoder, offset + 0, _depth)?;
3919            fidl::decode!(Vec3, D, &mut self.max, decoder, offset + 12, _depth)?;
3920            Ok(())
3921        }
3922    }
3923
3924    impl fidl::encoding::ValueTypeMarker for BufferArgs {
3925        type Borrowed<'a> = &'a Self;
3926        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3927            value
3928        }
3929    }
3930
3931    unsafe impl fidl::encoding::TypeMarker for BufferArgs {
3932        type Owned = Self;
3933
3934        #[inline(always)]
3935        fn inline_align(_context: fidl::encoding::Context) -> usize {
3936            4
3937        }
3938
3939        #[inline(always)]
3940        fn inline_size(_context: fidl::encoding::Context) -> usize {
3941            12
3942        }
3943        #[inline(always)]
3944        fn encode_is_copy() -> bool {
3945            true
3946        }
3947
3948        #[inline(always)]
3949        fn decode_is_copy() -> bool {
3950            true
3951        }
3952    }
3953
3954    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BufferArgs, D>
3955        for &BufferArgs
3956    {
3957        #[inline]
3958        unsafe fn encode(
3959            self,
3960            encoder: &mut fidl::encoding::Encoder<'_, D>,
3961            offset: usize,
3962            _depth: fidl::encoding::Depth,
3963        ) -> fidl::Result<()> {
3964            encoder.debug_check_bounds::<BufferArgs>(offset);
3965            unsafe {
3966                // Copy the object into the buffer.
3967                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3968                (buf_ptr as *mut BufferArgs).write_unaligned((self as *const BufferArgs).read());
3969                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3970                // done second because the memcpy will write garbage to these bytes.
3971            }
3972            Ok(())
3973        }
3974    }
3975    unsafe impl<
3976            D: fidl::encoding::ResourceDialect,
3977            T0: fidl::encoding::Encode<u32, D>,
3978            T1: fidl::encoding::Encode<u32, D>,
3979            T2: fidl::encoding::Encode<u32, D>,
3980        > fidl::encoding::Encode<BufferArgs, D> for (T0, T1, T2)
3981    {
3982        #[inline]
3983        unsafe fn encode(
3984            self,
3985            encoder: &mut fidl::encoding::Encoder<'_, D>,
3986            offset: usize,
3987            depth: fidl::encoding::Depth,
3988        ) -> fidl::Result<()> {
3989            encoder.debug_check_bounds::<BufferArgs>(offset);
3990            // Zero out padding regions. There's no need to apply masks
3991            // because the unmasked parts will be overwritten by fields.
3992            // Write the fields.
3993            self.0.encode(encoder, offset + 0, depth)?;
3994            self.1.encode(encoder, offset + 4, depth)?;
3995            self.2.encode(encoder, offset + 8, depth)?;
3996            Ok(())
3997        }
3998    }
3999
4000    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BufferArgs {
4001        #[inline(always)]
4002        fn new_empty() -> Self {
4003            Self {
4004                memory_id: fidl::new_empty!(u32, D),
4005                memory_offset: fidl::new_empty!(u32, D),
4006                num_bytes: fidl::new_empty!(u32, D),
4007            }
4008        }
4009
4010        #[inline]
4011        unsafe fn decode(
4012            &mut self,
4013            decoder: &mut fidl::encoding::Decoder<'_, D>,
4014            offset: usize,
4015            _depth: fidl::encoding::Depth,
4016        ) -> fidl::Result<()> {
4017            decoder.debug_check_bounds::<Self>(offset);
4018            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4019            // Verify that padding bytes are zero.
4020            // Copy from the buffer into the object.
4021            unsafe {
4022                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
4023            }
4024            Ok(())
4025        }
4026    }
4027
4028    impl fidl::encoding::ValueTypeMarker for CameraArgs {
4029        type Borrowed<'a> = &'a Self;
4030        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4031            value
4032        }
4033    }
4034
4035    unsafe impl fidl::encoding::TypeMarker for CameraArgs {
4036        type Owned = Self;
4037
4038        #[inline(always)]
4039        fn inline_align(_context: fidl::encoding::Context) -> usize {
4040            4
4041        }
4042
4043        #[inline(always)]
4044        fn inline_size(_context: fidl::encoding::Context) -> usize {
4045            4
4046        }
4047        #[inline(always)]
4048        fn encode_is_copy() -> bool {
4049            true
4050        }
4051
4052        #[inline(always)]
4053        fn decode_is_copy() -> bool {
4054            true
4055        }
4056    }
4057
4058    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CameraArgs, D>
4059        for &CameraArgs
4060    {
4061        #[inline]
4062        unsafe fn encode(
4063            self,
4064            encoder: &mut fidl::encoding::Encoder<'_, D>,
4065            offset: usize,
4066            _depth: fidl::encoding::Depth,
4067        ) -> fidl::Result<()> {
4068            encoder.debug_check_bounds::<CameraArgs>(offset);
4069            unsafe {
4070                // Copy the object into the buffer.
4071                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4072                (buf_ptr as *mut CameraArgs).write_unaligned((self as *const CameraArgs).read());
4073                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4074                // done second because the memcpy will write garbage to these bytes.
4075            }
4076            Ok(())
4077        }
4078    }
4079    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4080        fidl::encoding::Encode<CameraArgs, D> for (T0,)
4081    {
4082        #[inline]
4083        unsafe fn encode(
4084            self,
4085            encoder: &mut fidl::encoding::Encoder<'_, D>,
4086            offset: usize,
4087            depth: fidl::encoding::Depth,
4088        ) -> fidl::Result<()> {
4089            encoder.debug_check_bounds::<CameraArgs>(offset);
4090            // Zero out padding regions. There's no need to apply masks
4091            // because the unmasked parts will be overwritten by fields.
4092            // Write the fields.
4093            self.0.encode(encoder, offset + 0, depth)?;
4094            Ok(())
4095        }
4096    }
4097
4098    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CameraArgs {
4099        #[inline(always)]
4100        fn new_empty() -> Self {
4101            Self { scene_id: fidl::new_empty!(u32, D) }
4102        }
4103
4104        #[inline]
4105        unsafe fn decode(
4106            &mut self,
4107            decoder: &mut fidl::encoding::Decoder<'_, D>,
4108            offset: usize,
4109            _depth: fidl::encoding::Depth,
4110        ) -> fidl::Result<()> {
4111            decoder.debug_check_bounds::<Self>(offset);
4112            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4113            // Verify that padding bytes are zero.
4114            // Copy from the buffer into the object.
4115            unsafe {
4116                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4117            }
4118            Ok(())
4119        }
4120    }
4121
4122    impl fidl::encoding::ValueTypeMarker for CircleArgs {
4123        type Borrowed<'a> = &'a Self;
4124        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4125            value
4126        }
4127    }
4128
4129    unsafe impl fidl::encoding::TypeMarker for CircleArgs {
4130        type Owned = Self;
4131
4132        #[inline(always)]
4133        fn inline_align(_context: fidl::encoding::Context) -> usize {
4134            8
4135        }
4136
4137        #[inline(always)]
4138        fn inline_size(_context: fidl::encoding::Context) -> usize {
4139            16
4140        }
4141    }
4142
4143    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CircleArgs, D>
4144        for &CircleArgs
4145    {
4146        #[inline]
4147        unsafe fn encode(
4148            self,
4149            encoder: &mut fidl::encoding::Encoder<'_, D>,
4150            offset: usize,
4151            _depth: fidl::encoding::Depth,
4152        ) -> fidl::Result<()> {
4153            encoder.debug_check_bounds::<CircleArgs>(offset);
4154            // Delegate to tuple encoding.
4155            fidl::encoding::Encode::<CircleArgs, D>::encode(
4156                (<Value as fidl::encoding::ValueTypeMarker>::borrow(&self.radius),),
4157                encoder,
4158                offset,
4159                _depth,
4160            )
4161        }
4162    }
4163    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Value, D>>
4164        fidl::encoding::Encode<CircleArgs, D> for (T0,)
4165    {
4166        #[inline]
4167        unsafe fn encode(
4168            self,
4169            encoder: &mut fidl::encoding::Encoder<'_, D>,
4170            offset: usize,
4171            depth: fidl::encoding::Depth,
4172        ) -> fidl::Result<()> {
4173            encoder.debug_check_bounds::<CircleArgs>(offset);
4174            // Zero out padding regions. There's no need to apply masks
4175            // because the unmasked parts will be overwritten by fields.
4176            // Write the fields.
4177            self.0.encode(encoder, offset + 0, depth)?;
4178            Ok(())
4179        }
4180    }
4181
4182    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CircleArgs {
4183        #[inline(always)]
4184        fn new_empty() -> Self {
4185            Self { radius: fidl::new_empty!(Value, D) }
4186        }
4187
4188        #[inline]
4189        unsafe fn decode(
4190            &mut self,
4191            decoder: &mut fidl::encoding::Decoder<'_, D>,
4192            offset: usize,
4193            _depth: fidl::encoding::Depth,
4194        ) -> fidl::Result<()> {
4195            decoder.debug_check_bounds::<Self>(offset);
4196            // Verify that padding bytes are zero.
4197            fidl::decode!(Value, D, &mut self.radius, decoder, offset + 0, _depth)?;
4198            Ok(())
4199        }
4200    }
4201
4202    impl fidl::encoding::ValueTypeMarker for ClipNodeArgs {
4203        type Borrowed<'a> = &'a Self;
4204        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4205            value
4206        }
4207    }
4208
4209    unsafe impl fidl::encoding::TypeMarker for ClipNodeArgs {
4210        type Owned = Self;
4211
4212        #[inline(always)]
4213        fn inline_align(_context: fidl::encoding::Context) -> usize {
4214            4
4215        }
4216
4217        #[inline(always)]
4218        fn inline_size(_context: fidl::encoding::Context) -> usize {
4219            4
4220        }
4221        #[inline(always)]
4222        fn encode_is_copy() -> bool {
4223            true
4224        }
4225
4226        #[inline(always)]
4227        fn decode_is_copy() -> bool {
4228            true
4229        }
4230    }
4231
4232    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClipNodeArgs, D>
4233        for &ClipNodeArgs
4234    {
4235        #[inline]
4236        unsafe fn encode(
4237            self,
4238            encoder: &mut fidl::encoding::Encoder<'_, D>,
4239            offset: usize,
4240            _depth: fidl::encoding::Depth,
4241        ) -> fidl::Result<()> {
4242            encoder.debug_check_bounds::<ClipNodeArgs>(offset);
4243            unsafe {
4244                // Copy the object into the buffer.
4245                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4246                (buf_ptr as *mut ClipNodeArgs)
4247                    .write_unaligned((self as *const ClipNodeArgs).read());
4248                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4249                // done second because the memcpy will write garbage to these bytes.
4250            }
4251            Ok(())
4252        }
4253    }
4254    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4255        fidl::encoding::Encode<ClipNodeArgs, D> for (T0,)
4256    {
4257        #[inline]
4258        unsafe fn encode(
4259            self,
4260            encoder: &mut fidl::encoding::Encoder<'_, D>,
4261            offset: usize,
4262            depth: fidl::encoding::Depth,
4263        ) -> fidl::Result<()> {
4264            encoder.debug_check_bounds::<ClipNodeArgs>(offset);
4265            // Zero out padding regions. There's no need to apply masks
4266            // because the unmasked parts will be overwritten by fields.
4267            // Write the fields.
4268            self.0.encode(encoder, offset + 0, depth)?;
4269            Ok(())
4270        }
4271    }
4272
4273    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClipNodeArgs {
4274        #[inline(always)]
4275        fn new_empty() -> Self {
4276            Self { unused: fidl::new_empty!(u32, D) }
4277        }
4278
4279        #[inline]
4280        unsafe fn decode(
4281            &mut self,
4282            decoder: &mut fidl::encoding::Decoder<'_, D>,
4283            offset: usize,
4284            _depth: fidl::encoding::Depth,
4285        ) -> fidl::Result<()> {
4286            decoder.debug_check_bounds::<Self>(offset);
4287            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4288            // Verify that padding bytes are zero.
4289            // Copy from the buffer into the object.
4290            unsafe {
4291                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4292            }
4293            Ok(())
4294        }
4295    }
4296
4297    impl fidl::encoding::ValueTypeMarker for ColorRgb {
4298        type Borrowed<'a> = &'a Self;
4299        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4300            value
4301        }
4302    }
4303
4304    unsafe impl fidl::encoding::TypeMarker for ColorRgb {
4305        type Owned = Self;
4306
4307        #[inline(always)]
4308        fn inline_align(_context: fidl::encoding::Context) -> usize {
4309            4
4310        }
4311
4312        #[inline(always)]
4313        fn inline_size(_context: fidl::encoding::Context) -> usize {
4314            12
4315        }
4316    }
4317
4318    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ColorRgb, D> for &ColorRgb {
4319        #[inline]
4320        unsafe fn encode(
4321            self,
4322            encoder: &mut fidl::encoding::Encoder<'_, D>,
4323            offset: usize,
4324            _depth: fidl::encoding::Depth,
4325        ) -> fidl::Result<()> {
4326            encoder.debug_check_bounds::<ColorRgb>(offset);
4327            // Delegate to tuple encoding.
4328            fidl::encoding::Encode::<ColorRgb, D>::encode(
4329                (
4330                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.red),
4331                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.green),
4332                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.blue),
4333                ),
4334                encoder,
4335                offset,
4336                _depth,
4337            )
4338        }
4339    }
4340    unsafe impl<
4341            D: fidl::encoding::ResourceDialect,
4342            T0: fidl::encoding::Encode<f32, D>,
4343            T1: fidl::encoding::Encode<f32, D>,
4344            T2: fidl::encoding::Encode<f32, D>,
4345        > fidl::encoding::Encode<ColorRgb, D> for (T0, T1, T2)
4346    {
4347        #[inline]
4348        unsafe fn encode(
4349            self,
4350            encoder: &mut fidl::encoding::Encoder<'_, D>,
4351            offset: usize,
4352            depth: fidl::encoding::Depth,
4353        ) -> fidl::Result<()> {
4354            encoder.debug_check_bounds::<ColorRgb>(offset);
4355            // Zero out padding regions. There's no need to apply masks
4356            // because the unmasked parts will be overwritten by fields.
4357            // Write the fields.
4358            self.0.encode(encoder, offset + 0, depth)?;
4359            self.1.encode(encoder, offset + 4, depth)?;
4360            self.2.encode(encoder, offset + 8, depth)?;
4361            Ok(())
4362        }
4363    }
4364
4365    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ColorRgb {
4366        #[inline(always)]
4367        fn new_empty() -> Self {
4368            Self {
4369                red: fidl::new_empty!(f32, D),
4370                green: fidl::new_empty!(f32, D),
4371                blue: fidl::new_empty!(f32, D),
4372            }
4373        }
4374
4375        #[inline]
4376        unsafe fn decode(
4377            &mut self,
4378            decoder: &mut fidl::encoding::Decoder<'_, D>,
4379            offset: usize,
4380            _depth: fidl::encoding::Depth,
4381        ) -> fidl::Result<()> {
4382            decoder.debug_check_bounds::<Self>(offset);
4383            // Verify that padding bytes are zero.
4384            fidl::decode!(f32, D, &mut self.red, decoder, offset + 0, _depth)?;
4385            fidl::decode!(f32, D, &mut self.green, decoder, offset + 4, _depth)?;
4386            fidl::decode!(f32, D, &mut self.blue, decoder, offset + 8, _depth)?;
4387            Ok(())
4388        }
4389    }
4390
4391    impl fidl::encoding::ValueTypeMarker for ColorRgbValue {
4392        type Borrowed<'a> = &'a Self;
4393        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4394            value
4395        }
4396    }
4397
4398    unsafe impl fidl::encoding::TypeMarker for ColorRgbValue {
4399        type Owned = Self;
4400
4401        #[inline(always)]
4402        fn inline_align(_context: fidl::encoding::Context) -> usize {
4403            4
4404        }
4405
4406        #[inline(always)]
4407        fn inline_size(_context: fidl::encoding::Context) -> usize {
4408            16
4409        }
4410    }
4411
4412    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ColorRgbValue, D>
4413        for &ColorRgbValue
4414    {
4415        #[inline]
4416        unsafe fn encode(
4417            self,
4418            encoder: &mut fidl::encoding::Encoder<'_, D>,
4419            offset: usize,
4420            _depth: fidl::encoding::Depth,
4421        ) -> fidl::Result<()> {
4422            encoder.debug_check_bounds::<ColorRgbValue>(offset);
4423            // Delegate to tuple encoding.
4424            fidl::encoding::Encode::<ColorRgbValue, D>::encode(
4425                (
4426                    <ColorRgb as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
4427                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
4428                ),
4429                encoder,
4430                offset,
4431                _depth,
4432            )
4433        }
4434    }
4435    unsafe impl<
4436            D: fidl::encoding::ResourceDialect,
4437            T0: fidl::encoding::Encode<ColorRgb, D>,
4438            T1: fidl::encoding::Encode<u32, D>,
4439        > fidl::encoding::Encode<ColorRgbValue, D> for (T0, T1)
4440    {
4441        #[inline]
4442        unsafe fn encode(
4443            self,
4444            encoder: &mut fidl::encoding::Encoder<'_, D>,
4445            offset: usize,
4446            depth: fidl::encoding::Depth,
4447        ) -> fidl::Result<()> {
4448            encoder.debug_check_bounds::<ColorRgbValue>(offset);
4449            // Zero out padding regions. There's no need to apply masks
4450            // because the unmasked parts will be overwritten by fields.
4451            // Write the fields.
4452            self.0.encode(encoder, offset + 0, depth)?;
4453            self.1.encode(encoder, offset + 12, depth)?;
4454            Ok(())
4455        }
4456    }
4457
4458    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ColorRgbValue {
4459        #[inline(always)]
4460        fn new_empty() -> Self {
4461            Self { value: fidl::new_empty!(ColorRgb, D), variable_id: fidl::new_empty!(u32, D) }
4462        }
4463
4464        #[inline]
4465        unsafe fn decode(
4466            &mut self,
4467            decoder: &mut fidl::encoding::Decoder<'_, D>,
4468            offset: usize,
4469            _depth: fidl::encoding::Depth,
4470        ) -> fidl::Result<()> {
4471            decoder.debug_check_bounds::<Self>(offset);
4472            // Verify that padding bytes are zero.
4473            fidl::decode!(ColorRgb, D, &mut self.value, decoder, offset + 0, _depth)?;
4474            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 12, _depth)?;
4475            Ok(())
4476        }
4477    }
4478
4479    impl fidl::encoding::ValueTypeMarker for ColorRgba {
4480        type Borrowed<'a> = &'a Self;
4481        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4482            value
4483        }
4484    }
4485
4486    unsafe impl fidl::encoding::TypeMarker for ColorRgba {
4487        type Owned = Self;
4488
4489        #[inline(always)]
4490        fn inline_align(_context: fidl::encoding::Context) -> usize {
4491            1
4492        }
4493
4494        #[inline(always)]
4495        fn inline_size(_context: fidl::encoding::Context) -> usize {
4496            4
4497        }
4498        #[inline(always)]
4499        fn encode_is_copy() -> bool {
4500            true
4501        }
4502
4503        #[inline(always)]
4504        fn decode_is_copy() -> bool {
4505            true
4506        }
4507    }
4508
4509    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ColorRgba, D>
4510        for &ColorRgba
4511    {
4512        #[inline]
4513        unsafe fn encode(
4514            self,
4515            encoder: &mut fidl::encoding::Encoder<'_, D>,
4516            offset: usize,
4517            _depth: fidl::encoding::Depth,
4518        ) -> fidl::Result<()> {
4519            encoder.debug_check_bounds::<ColorRgba>(offset);
4520            unsafe {
4521                // Copy the object into the buffer.
4522                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4523                (buf_ptr as *mut ColorRgba).write_unaligned((self as *const ColorRgba).read());
4524                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4525                // done second because the memcpy will write garbage to these bytes.
4526            }
4527            Ok(())
4528        }
4529    }
4530    unsafe impl<
4531            D: fidl::encoding::ResourceDialect,
4532            T0: fidl::encoding::Encode<u8, D>,
4533            T1: fidl::encoding::Encode<u8, D>,
4534            T2: fidl::encoding::Encode<u8, D>,
4535            T3: fidl::encoding::Encode<u8, D>,
4536        > fidl::encoding::Encode<ColorRgba, D> for (T0, T1, T2, T3)
4537    {
4538        #[inline]
4539        unsafe fn encode(
4540            self,
4541            encoder: &mut fidl::encoding::Encoder<'_, D>,
4542            offset: usize,
4543            depth: fidl::encoding::Depth,
4544        ) -> fidl::Result<()> {
4545            encoder.debug_check_bounds::<ColorRgba>(offset);
4546            // Zero out padding regions. There's no need to apply masks
4547            // because the unmasked parts will be overwritten by fields.
4548            // Write the fields.
4549            self.0.encode(encoder, offset + 0, depth)?;
4550            self.1.encode(encoder, offset + 1, depth)?;
4551            self.2.encode(encoder, offset + 2, depth)?;
4552            self.3.encode(encoder, offset + 3, depth)?;
4553            Ok(())
4554        }
4555    }
4556
4557    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ColorRgba {
4558        #[inline(always)]
4559        fn new_empty() -> Self {
4560            Self {
4561                red: fidl::new_empty!(u8, D),
4562                green: fidl::new_empty!(u8, D),
4563                blue: fidl::new_empty!(u8, D),
4564                alpha: fidl::new_empty!(u8, D),
4565            }
4566        }
4567
4568        #[inline]
4569        unsafe fn decode(
4570            &mut self,
4571            decoder: &mut fidl::encoding::Decoder<'_, D>,
4572            offset: usize,
4573            _depth: fidl::encoding::Depth,
4574        ) -> fidl::Result<()> {
4575            decoder.debug_check_bounds::<Self>(offset);
4576            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4577            // Verify that padding bytes are zero.
4578            // Copy from the buffer into the object.
4579            unsafe {
4580                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4581            }
4582            Ok(())
4583        }
4584    }
4585
4586    impl fidl::encoding::ValueTypeMarker for ColorRgbaValue {
4587        type Borrowed<'a> = &'a Self;
4588        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4589            value
4590        }
4591    }
4592
4593    unsafe impl fidl::encoding::TypeMarker for ColorRgbaValue {
4594        type Owned = Self;
4595
4596        #[inline(always)]
4597        fn inline_align(_context: fidl::encoding::Context) -> usize {
4598            4
4599        }
4600
4601        #[inline(always)]
4602        fn inline_size(_context: fidl::encoding::Context) -> usize {
4603            8
4604        }
4605        #[inline(always)]
4606        fn encode_is_copy() -> bool {
4607            true
4608        }
4609
4610        #[inline(always)]
4611        fn decode_is_copy() -> bool {
4612            true
4613        }
4614    }
4615
4616    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ColorRgbaValue, D>
4617        for &ColorRgbaValue
4618    {
4619        #[inline]
4620        unsafe fn encode(
4621            self,
4622            encoder: &mut fidl::encoding::Encoder<'_, D>,
4623            offset: usize,
4624            _depth: fidl::encoding::Depth,
4625        ) -> fidl::Result<()> {
4626            encoder.debug_check_bounds::<ColorRgbaValue>(offset);
4627            unsafe {
4628                // Copy the object into the buffer.
4629                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4630                (buf_ptr as *mut ColorRgbaValue)
4631                    .write_unaligned((self as *const ColorRgbaValue).read());
4632                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4633                // done second because the memcpy will write garbage to these bytes.
4634            }
4635            Ok(())
4636        }
4637    }
4638    unsafe impl<
4639            D: fidl::encoding::ResourceDialect,
4640            T0: fidl::encoding::Encode<ColorRgba, D>,
4641            T1: fidl::encoding::Encode<u32, D>,
4642        > fidl::encoding::Encode<ColorRgbaValue, D> for (T0, T1)
4643    {
4644        #[inline]
4645        unsafe fn encode(
4646            self,
4647            encoder: &mut fidl::encoding::Encoder<'_, D>,
4648            offset: usize,
4649            depth: fidl::encoding::Depth,
4650        ) -> fidl::Result<()> {
4651            encoder.debug_check_bounds::<ColorRgbaValue>(offset);
4652            // Zero out padding regions. There's no need to apply masks
4653            // because the unmasked parts will be overwritten by fields.
4654            // Write the fields.
4655            self.0.encode(encoder, offset + 0, depth)?;
4656            self.1.encode(encoder, offset + 4, depth)?;
4657            Ok(())
4658        }
4659    }
4660
4661    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ColorRgbaValue {
4662        #[inline(always)]
4663        fn new_empty() -> Self {
4664            Self { value: fidl::new_empty!(ColorRgba, D), variable_id: fidl::new_empty!(u32, D) }
4665        }
4666
4667        #[inline]
4668        unsafe fn decode(
4669            &mut self,
4670            decoder: &mut fidl::encoding::Decoder<'_, D>,
4671            offset: usize,
4672            _depth: fidl::encoding::Depth,
4673        ) -> fidl::Result<()> {
4674            decoder.debug_check_bounds::<Self>(offset);
4675            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4676            // Verify that padding bytes are zero.
4677            // Copy from the buffer into the object.
4678            unsafe {
4679                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
4680            }
4681            Ok(())
4682        }
4683    }
4684
4685    impl fidl::encoding::ValueTypeMarker for CompositorArgs {
4686        type Borrowed<'a> = &'a Self;
4687        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4688            value
4689        }
4690    }
4691
4692    unsafe impl fidl::encoding::TypeMarker for CompositorArgs {
4693        type Owned = Self;
4694
4695        #[inline(always)]
4696        fn inline_align(_context: fidl::encoding::Context) -> usize {
4697            4
4698        }
4699
4700        #[inline(always)]
4701        fn inline_size(_context: fidl::encoding::Context) -> usize {
4702            4
4703        }
4704        #[inline(always)]
4705        fn encode_is_copy() -> bool {
4706            true
4707        }
4708
4709        #[inline(always)]
4710        fn decode_is_copy() -> bool {
4711            true
4712        }
4713    }
4714
4715    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompositorArgs, D>
4716        for &CompositorArgs
4717    {
4718        #[inline]
4719        unsafe fn encode(
4720            self,
4721            encoder: &mut fidl::encoding::Encoder<'_, D>,
4722            offset: usize,
4723            _depth: fidl::encoding::Depth,
4724        ) -> fidl::Result<()> {
4725            encoder.debug_check_bounds::<CompositorArgs>(offset);
4726            unsafe {
4727                // Copy the object into the buffer.
4728                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4729                (buf_ptr as *mut CompositorArgs)
4730                    .write_unaligned((self as *const CompositorArgs).read());
4731                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4732                // done second because the memcpy will write garbage to these bytes.
4733            }
4734            Ok(())
4735        }
4736    }
4737    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4738        fidl::encoding::Encode<CompositorArgs, D> for (T0,)
4739    {
4740        #[inline]
4741        unsafe fn encode(
4742            self,
4743            encoder: &mut fidl::encoding::Encoder<'_, D>,
4744            offset: usize,
4745            depth: fidl::encoding::Depth,
4746        ) -> fidl::Result<()> {
4747            encoder.debug_check_bounds::<CompositorArgs>(offset);
4748            // Zero out padding regions. There's no need to apply masks
4749            // because the unmasked parts will be overwritten by fields.
4750            // Write the fields.
4751            self.0.encode(encoder, offset + 0, depth)?;
4752            Ok(())
4753        }
4754    }
4755
4756    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompositorArgs {
4757        #[inline(always)]
4758        fn new_empty() -> Self {
4759            Self { dummy: fidl::new_empty!(u32, D) }
4760        }
4761
4762        #[inline]
4763        unsafe fn decode(
4764            &mut self,
4765            decoder: &mut fidl::encoding::Decoder<'_, D>,
4766            offset: usize,
4767            _depth: fidl::encoding::Depth,
4768        ) -> fidl::Result<()> {
4769            decoder.debug_check_bounds::<Self>(offset);
4770            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4771            // Verify that padding bytes are zero.
4772            // Copy from the buffer into the object.
4773            unsafe {
4774                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4775            }
4776            Ok(())
4777        }
4778    }
4779
4780    impl fidl::encoding::ResourceTypeMarker for CreateResourceCmd {
4781        type Borrowed<'a> = &'a mut Self;
4782        fn take_or_borrow<'a>(
4783            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4784        ) -> Self::Borrowed<'a> {
4785            value
4786        }
4787    }
4788
4789    unsafe impl fidl::encoding::TypeMarker for CreateResourceCmd {
4790        type Owned = Self;
4791
4792        #[inline(always)]
4793        fn inline_align(_context: fidl::encoding::Context) -> usize {
4794            8
4795        }
4796
4797        #[inline(always)]
4798        fn inline_size(_context: fidl::encoding::Context) -> usize {
4799            24
4800        }
4801    }
4802
4803    unsafe impl
4804        fidl::encoding::Encode<CreateResourceCmd, fidl::encoding::DefaultFuchsiaResourceDialect>
4805        for &mut CreateResourceCmd
4806    {
4807        #[inline]
4808        unsafe fn encode(
4809            self,
4810            encoder: &mut fidl::encoding::Encoder<
4811                '_,
4812                fidl::encoding::DefaultFuchsiaResourceDialect,
4813            >,
4814            offset: usize,
4815            _depth: fidl::encoding::Depth,
4816        ) -> fidl::Result<()> {
4817            encoder.debug_check_bounds::<CreateResourceCmd>(offset);
4818            // Delegate to tuple encoding.
4819            fidl::encoding::Encode::<CreateResourceCmd, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4820                (
4821                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
4822                    <ResourceArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.resource),
4823                ),
4824                encoder, offset, _depth
4825            )
4826        }
4827    }
4828    unsafe impl<
4829            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4830            T1: fidl::encoding::Encode<ResourceArgs, fidl::encoding::DefaultFuchsiaResourceDialect>,
4831        >
4832        fidl::encoding::Encode<CreateResourceCmd, fidl::encoding::DefaultFuchsiaResourceDialect>
4833        for (T0, T1)
4834    {
4835        #[inline]
4836        unsafe fn encode(
4837            self,
4838            encoder: &mut fidl::encoding::Encoder<
4839                '_,
4840                fidl::encoding::DefaultFuchsiaResourceDialect,
4841            >,
4842            offset: usize,
4843            depth: fidl::encoding::Depth,
4844        ) -> fidl::Result<()> {
4845            encoder.debug_check_bounds::<CreateResourceCmd>(offset);
4846            // Zero out padding regions. There's no need to apply masks
4847            // because the unmasked parts will be overwritten by fields.
4848            unsafe {
4849                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
4850                (ptr as *mut u64).write_unaligned(0);
4851            }
4852            // Write the fields.
4853            self.0.encode(encoder, offset + 0, depth)?;
4854            self.1.encode(encoder, offset + 8, depth)?;
4855            Ok(())
4856        }
4857    }
4858
4859    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4860        for CreateResourceCmd
4861    {
4862        #[inline(always)]
4863        fn new_empty() -> Self {
4864            Self {
4865                id: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
4866                resource: fidl::new_empty!(
4867                    ResourceArgs,
4868                    fidl::encoding::DefaultFuchsiaResourceDialect
4869                ),
4870            }
4871        }
4872
4873        #[inline]
4874        unsafe fn decode(
4875            &mut self,
4876            decoder: &mut fidl::encoding::Decoder<
4877                '_,
4878                fidl::encoding::DefaultFuchsiaResourceDialect,
4879            >,
4880            offset: usize,
4881            _depth: fidl::encoding::Depth,
4882        ) -> fidl::Result<()> {
4883            decoder.debug_check_bounds::<Self>(offset);
4884            // Verify that padding bytes are zero.
4885            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
4886            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4887            let mask = 0xffffffff00000000u64;
4888            let maskedval = padval & mask;
4889            if maskedval != 0 {
4890                return Err(fidl::Error::NonZeroPadding {
4891                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
4892                });
4893            }
4894            fidl::decode!(
4895                u32,
4896                fidl::encoding::DefaultFuchsiaResourceDialect,
4897                &mut self.id,
4898                decoder,
4899                offset + 0,
4900                _depth
4901            )?;
4902            fidl::decode!(
4903                ResourceArgs,
4904                fidl::encoding::DefaultFuchsiaResourceDialect,
4905                &mut self.resource,
4906                decoder,
4907                offset + 8,
4908                _depth
4909            )?;
4910            Ok(())
4911        }
4912    }
4913
4914    impl fidl::encoding::ValueTypeMarker for DetachChildrenCmd {
4915        type Borrowed<'a> = &'a Self;
4916        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4917            value
4918        }
4919    }
4920
4921    unsafe impl fidl::encoding::TypeMarker for DetachChildrenCmd {
4922        type Owned = Self;
4923
4924        #[inline(always)]
4925        fn inline_align(_context: fidl::encoding::Context) -> usize {
4926            4
4927        }
4928
4929        #[inline(always)]
4930        fn inline_size(_context: fidl::encoding::Context) -> usize {
4931            4
4932        }
4933        #[inline(always)]
4934        fn encode_is_copy() -> bool {
4935            true
4936        }
4937
4938        #[inline(always)]
4939        fn decode_is_copy() -> bool {
4940            true
4941        }
4942    }
4943
4944    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DetachChildrenCmd, D>
4945        for &DetachChildrenCmd
4946    {
4947        #[inline]
4948        unsafe fn encode(
4949            self,
4950            encoder: &mut fidl::encoding::Encoder<'_, D>,
4951            offset: usize,
4952            _depth: fidl::encoding::Depth,
4953        ) -> fidl::Result<()> {
4954            encoder.debug_check_bounds::<DetachChildrenCmd>(offset);
4955            unsafe {
4956                // Copy the object into the buffer.
4957                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4958                (buf_ptr as *mut DetachChildrenCmd)
4959                    .write_unaligned((self as *const DetachChildrenCmd).read());
4960                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4961                // done second because the memcpy will write garbage to these bytes.
4962            }
4963            Ok(())
4964        }
4965    }
4966    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4967        fidl::encoding::Encode<DetachChildrenCmd, D> for (T0,)
4968    {
4969        #[inline]
4970        unsafe fn encode(
4971            self,
4972            encoder: &mut fidl::encoding::Encoder<'_, D>,
4973            offset: usize,
4974            depth: fidl::encoding::Depth,
4975        ) -> fidl::Result<()> {
4976            encoder.debug_check_bounds::<DetachChildrenCmd>(offset);
4977            // Zero out padding regions. There's no need to apply masks
4978            // because the unmasked parts will be overwritten by fields.
4979            // Write the fields.
4980            self.0.encode(encoder, offset + 0, depth)?;
4981            Ok(())
4982        }
4983    }
4984
4985    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DetachChildrenCmd {
4986        #[inline(always)]
4987        fn new_empty() -> Self {
4988            Self { node_id: fidl::new_empty!(u32, D) }
4989        }
4990
4991        #[inline]
4992        unsafe fn decode(
4993            &mut self,
4994            decoder: &mut fidl::encoding::Decoder<'_, D>,
4995            offset: usize,
4996            _depth: fidl::encoding::Depth,
4997        ) -> fidl::Result<()> {
4998            decoder.debug_check_bounds::<Self>(offset);
4999            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5000            // Verify that padding bytes are zero.
5001            // Copy from the buffer into the object.
5002            unsafe {
5003                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5004            }
5005            Ok(())
5006        }
5007    }
5008
5009    impl fidl::encoding::ValueTypeMarker for DetachCmd {
5010        type Borrowed<'a> = &'a Self;
5011        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5012            value
5013        }
5014    }
5015
5016    unsafe impl fidl::encoding::TypeMarker for DetachCmd {
5017        type Owned = Self;
5018
5019        #[inline(always)]
5020        fn inline_align(_context: fidl::encoding::Context) -> usize {
5021            4
5022        }
5023
5024        #[inline(always)]
5025        fn inline_size(_context: fidl::encoding::Context) -> usize {
5026            4
5027        }
5028        #[inline(always)]
5029        fn encode_is_copy() -> bool {
5030            true
5031        }
5032
5033        #[inline(always)]
5034        fn decode_is_copy() -> bool {
5035            true
5036        }
5037    }
5038
5039    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DetachCmd, D>
5040        for &DetachCmd
5041    {
5042        #[inline]
5043        unsafe fn encode(
5044            self,
5045            encoder: &mut fidl::encoding::Encoder<'_, D>,
5046            offset: usize,
5047            _depth: fidl::encoding::Depth,
5048        ) -> fidl::Result<()> {
5049            encoder.debug_check_bounds::<DetachCmd>(offset);
5050            unsafe {
5051                // Copy the object into the buffer.
5052                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5053                (buf_ptr as *mut DetachCmd).write_unaligned((self as *const DetachCmd).read());
5054                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5055                // done second because the memcpy will write garbage to these bytes.
5056            }
5057            Ok(())
5058        }
5059    }
5060    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5061        fidl::encoding::Encode<DetachCmd, D> for (T0,)
5062    {
5063        #[inline]
5064        unsafe fn encode(
5065            self,
5066            encoder: &mut fidl::encoding::Encoder<'_, D>,
5067            offset: usize,
5068            depth: fidl::encoding::Depth,
5069        ) -> fidl::Result<()> {
5070            encoder.debug_check_bounds::<DetachCmd>(offset);
5071            // Zero out padding regions. There's no need to apply masks
5072            // because the unmasked parts will be overwritten by fields.
5073            // Write the fields.
5074            self.0.encode(encoder, offset + 0, depth)?;
5075            Ok(())
5076        }
5077    }
5078
5079    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DetachCmd {
5080        #[inline(always)]
5081        fn new_empty() -> Self {
5082            Self { id: fidl::new_empty!(u32, D) }
5083        }
5084
5085        #[inline]
5086        unsafe fn decode(
5087            &mut self,
5088            decoder: &mut fidl::encoding::Decoder<'_, D>,
5089            offset: usize,
5090            _depth: fidl::encoding::Depth,
5091        ) -> fidl::Result<()> {
5092            decoder.debug_check_bounds::<Self>(offset);
5093            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5094            // Verify that padding bytes are zero.
5095            // Copy from the buffer into the object.
5096            unsafe {
5097                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5098            }
5099            Ok(())
5100        }
5101    }
5102
5103    impl fidl::encoding::ValueTypeMarker for DetachLightCmd {
5104        type Borrowed<'a> = &'a Self;
5105        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5106            value
5107        }
5108    }
5109
5110    unsafe impl fidl::encoding::TypeMarker for DetachLightCmd {
5111        type Owned = Self;
5112
5113        #[inline(always)]
5114        fn inline_align(_context: fidl::encoding::Context) -> usize {
5115            4
5116        }
5117
5118        #[inline(always)]
5119        fn inline_size(_context: fidl::encoding::Context) -> usize {
5120            4
5121        }
5122        #[inline(always)]
5123        fn encode_is_copy() -> bool {
5124            true
5125        }
5126
5127        #[inline(always)]
5128        fn decode_is_copy() -> bool {
5129            true
5130        }
5131    }
5132
5133    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DetachLightCmd, D>
5134        for &DetachLightCmd
5135    {
5136        #[inline]
5137        unsafe fn encode(
5138            self,
5139            encoder: &mut fidl::encoding::Encoder<'_, D>,
5140            offset: usize,
5141            _depth: fidl::encoding::Depth,
5142        ) -> fidl::Result<()> {
5143            encoder.debug_check_bounds::<DetachLightCmd>(offset);
5144            unsafe {
5145                // Copy the object into the buffer.
5146                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5147                (buf_ptr as *mut DetachLightCmd)
5148                    .write_unaligned((self as *const DetachLightCmd).read());
5149                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5150                // done second because the memcpy will write garbage to these bytes.
5151            }
5152            Ok(())
5153        }
5154    }
5155    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5156        fidl::encoding::Encode<DetachLightCmd, D> for (T0,)
5157    {
5158        #[inline]
5159        unsafe fn encode(
5160            self,
5161            encoder: &mut fidl::encoding::Encoder<'_, D>,
5162            offset: usize,
5163            depth: fidl::encoding::Depth,
5164        ) -> fidl::Result<()> {
5165            encoder.debug_check_bounds::<DetachLightCmd>(offset);
5166            // Zero out padding regions. There's no need to apply masks
5167            // because the unmasked parts will be overwritten by fields.
5168            // Write the fields.
5169            self.0.encode(encoder, offset + 0, depth)?;
5170            Ok(())
5171        }
5172    }
5173
5174    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DetachLightCmd {
5175        #[inline(always)]
5176        fn new_empty() -> Self {
5177            Self { light_id: fidl::new_empty!(u32, D) }
5178        }
5179
5180        #[inline]
5181        unsafe fn decode(
5182            &mut self,
5183            decoder: &mut fidl::encoding::Decoder<'_, D>,
5184            offset: usize,
5185            _depth: fidl::encoding::Depth,
5186        ) -> fidl::Result<()> {
5187            decoder.debug_check_bounds::<Self>(offset);
5188            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5189            // Verify that padding bytes are zero.
5190            // Copy from the buffer into the object.
5191            unsafe {
5192                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5193            }
5194            Ok(())
5195        }
5196    }
5197
5198    impl fidl::encoding::ValueTypeMarker for DetachLightsCmd {
5199        type Borrowed<'a> = &'a Self;
5200        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5201            value
5202        }
5203    }
5204
5205    unsafe impl fidl::encoding::TypeMarker for DetachLightsCmd {
5206        type Owned = Self;
5207
5208        #[inline(always)]
5209        fn inline_align(_context: fidl::encoding::Context) -> usize {
5210            4
5211        }
5212
5213        #[inline(always)]
5214        fn inline_size(_context: fidl::encoding::Context) -> usize {
5215            4
5216        }
5217        #[inline(always)]
5218        fn encode_is_copy() -> bool {
5219            true
5220        }
5221
5222        #[inline(always)]
5223        fn decode_is_copy() -> bool {
5224            true
5225        }
5226    }
5227
5228    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DetachLightsCmd, D>
5229        for &DetachLightsCmd
5230    {
5231        #[inline]
5232        unsafe fn encode(
5233            self,
5234            encoder: &mut fidl::encoding::Encoder<'_, D>,
5235            offset: usize,
5236            _depth: fidl::encoding::Depth,
5237        ) -> fidl::Result<()> {
5238            encoder.debug_check_bounds::<DetachLightsCmd>(offset);
5239            unsafe {
5240                // Copy the object into the buffer.
5241                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5242                (buf_ptr as *mut DetachLightsCmd)
5243                    .write_unaligned((self as *const DetachLightsCmd).read());
5244                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5245                // done second because the memcpy will write garbage to these bytes.
5246            }
5247            Ok(())
5248        }
5249    }
5250    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5251        fidl::encoding::Encode<DetachLightsCmd, D> for (T0,)
5252    {
5253        #[inline]
5254        unsafe fn encode(
5255            self,
5256            encoder: &mut fidl::encoding::Encoder<'_, D>,
5257            offset: usize,
5258            depth: fidl::encoding::Depth,
5259        ) -> fidl::Result<()> {
5260            encoder.debug_check_bounds::<DetachLightsCmd>(offset);
5261            // Zero out padding regions. There's no need to apply masks
5262            // because the unmasked parts will be overwritten by fields.
5263            // Write the fields.
5264            self.0.encode(encoder, offset + 0, depth)?;
5265            Ok(())
5266        }
5267    }
5268
5269    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DetachLightsCmd {
5270        #[inline(always)]
5271        fn new_empty() -> Self {
5272            Self { scene_id: fidl::new_empty!(u32, D) }
5273        }
5274
5275        #[inline]
5276        unsafe fn decode(
5277            &mut self,
5278            decoder: &mut fidl::encoding::Decoder<'_, D>,
5279            offset: usize,
5280            _depth: fidl::encoding::Depth,
5281        ) -> fidl::Result<()> {
5282            decoder.debug_check_bounds::<Self>(offset);
5283            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5284            // Verify that padding bytes are zero.
5285            // Copy from the buffer into the object.
5286            unsafe {
5287                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5288            }
5289            Ok(())
5290        }
5291    }
5292
5293    impl fidl::encoding::ValueTypeMarker for DirectionalLightArgs {
5294        type Borrowed<'a> = &'a Self;
5295        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5296            value
5297        }
5298    }
5299
5300    unsafe impl fidl::encoding::TypeMarker for DirectionalLightArgs {
5301        type Owned = Self;
5302
5303        #[inline(always)]
5304        fn inline_align(_context: fidl::encoding::Context) -> usize {
5305            4
5306        }
5307
5308        #[inline(always)]
5309        fn inline_size(_context: fidl::encoding::Context) -> usize {
5310            4
5311        }
5312        #[inline(always)]
5313        fn encode_is_copy() -> bool {
5314            true
5315        }
5316
5317        #[inline(always)]
5318        fn decode_is_copy() -> bool {
5319            true
5320        }
5321    }
5322
5323    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DirectionalLightArgs, D>
5324        for &DirectionalLightArgs
5325    {
5326        #[inline]
5327        unsafe fn encode(
5328            self,
5329            encoder: &mut fidl::encoding::Encoder<'_, D>,
5330            offset: usize,
5331            _depth: fidl::encoding::Depth,
5332        ) -> fidl::Result<()> {
5333            encoder.debug_check_bounds::<DirectionalLightArgs>(offset);
5334            unsafe {
5335                // Copy the object into the buffer.
5336                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5337                (buf_ptr as *mut DirectionalLightArgs)
5338                    .write_unaligned((self as *const DirectionalLightArgs).read());
5339                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5340                // done second because the memcpy will write garbage to these bytes.
5341            }
5342            Ok(())
5343        }
5344    }
5345    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5346        fidl::encoding::Encode<DirectionalLightArgs, D> for (T0,)
5347    {
5348        #[inline]
5349        unsafe fn encode(
5350            self,
5351            encoder: &mut fidl::encoding::Encoder<'_, D>,
5352            offset: usize,
5353            depth: fidl::encoding::Depth,
5354        ) -> fidl::Result<()> {
5355            encoder.debug_check_bounds::<DirectionalLightArgs>(offset);
5356            // Zero out padding regions. There's no need to apply masks
5357            // because the unmasked parts will be overwritten by fields.
5358            // Write the fields.
5359            self.0.encode(encoder, offset + 0, depth)?;
5360            Ok(())
5361        }
5362    }
5363
5364    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DirectionalLightArgs {
5365        #[inline(always)]
5366        fn new_empty() -> Self {
5367            Self { dummy: fidl::new_empty!(u32, D) }
5368        }
5369
5370        #[inline]
5371        unsafe fn decode(
5372            &mut self,
5373            decoder: &mut fidl::encoding::Decoder<'_, D>,
5374            offset: usize,
5375            _depth: fidl::encoding::Depth,
5376        ) -> fidl::Result<()> {
5377            decoder.debug_check_bounds::<Self>(offset);
5378            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5379            // Verify that padding bytes are zero.
5380            // Copy from the buffer into the object.
5381            unsafe {
5382                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5383            }
5384            Ok(())
5385        }
5386    }
5387
5388    impl fidl::encoding::ValueTypeMarker for DisplayCompositorArgs {
5389        type Borrowed<'a> = &'a Self;
5390        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5391            value
5392        }
5393    }
5394
5395    unsafe impl fidl::encoding::TypeMarker for DisplayCompositorArgs {
5396        type Owned = Self;
5397
5398        #[inline(always)]
5399        fn inline_align(_context: fidl::encoding::Context) -> usize {
5400            4
5401        }
5402
5403        #[inline(always)]
5404        fn inline_size(_context: fidl::encoding::Context) -> usize {
5405            4
5406        }
5407        #[inline(always)]
5408        fn encode_is_copy() -> bool {
5409            true
5410        }
5411
5412        #[inline(always)]
5413        fn decode_is_copy() -> bool {
5414            true
5415        }
5416    }
5417
5418    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisplayCompositorArgs, D>
5419        for &DisplayCompositorArgs
5420    {
5421        #[inline]
5422        unsafe fn encode(
5423            self,
5424            encoder: &mut fidl::encoding::Encoder<'_, D>,
5425            offset: usize,
5426            _depth: fidl::encoding::Depth,
5427        ) -> fidl::Result<()> {
5428            encoder.debug_check_bounds::<DisplayCompositorArgs>(offset);
5429            unsafe {
5430                // Copy the object into the buffer.
5431                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5432                (buf_ptr as *mut DisplayCompositorArgs)
5433                    .write_unaligned((self as *const DisplayCompositorArgs).read());
5434                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5435                // done second because the memcpy will write garbage to these bytes.
5436            }
5437            Ok(())
5438        }
5439    }
5440    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5441        fidl::encoding::Encode<DisplayCompositorArgs, D> for (T0,)
5442    {
5443        #[inline]
5444        unsafe fn encode(
5445            self,
5446            encoder: &mut fidl::encoding::Encoder<'_, D>,
5447            offset: usize,
5448            depth: fidl::encoding::Depth,
5449        ) -> fidl::Result<()> {
5450            encoder.debug_check_bounds::<DisplayCompositorArgs>(offset);
5451            // Zero out padding regions. There's no need to apply masks
5452            // because the unmasked parts will be overwritten by fields.
5453            // Write the fields.
5454            self.0.encode(encoder, offset + 0, depth)?;
5455            Ok(())
5456        }
5457    }
5458
5459    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisplayCompositorArgs {
5460        #[inline(always)]
5461        fn new_empty() -> Self {
5462            Self { dummy: fidl::new_empty!(u32, D) }
5463        }
5464
5465        #[inline]
5466        unsafe fn decode(
5467            &mut self,
5468            decoder: &mut fidl::encoding::Decoder<'_, D>,
5469            offset: usize,
5470            _depth: fidl::encoding::Depth,
5471        ) -> fidl::Result<()> {
5472            decoder.debug_check_bounds::<Self>(offset);
5473            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5474            // Verify that padding bytes are zero.
5475            // Copy from the buffer into the object.
5476            unsafe {
5477                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5478            }
5479            Ok(())
5480        }
5481    }
5482
5483    impl fidl::encoding::ValueTypeMarker for DisplayInfo {
5484        type Borrowed<'a> = &'a Self;
5485        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5486            value
5487        }
5488    }
5489
5490    unsafe impl fidl::encoding::TypeMarker for DisplayInfo {
5491        type Owned = Self;
5492
5493        #[inline(always)]
5494        fn inline_align(_context: fidl::encoding::Context) -> usize {
5495            4
5496        }
5497
5498        #[inline(always)]
5499        fn inline_size(_context: fidl::encoding::Context) -> usize {
5500            8
5501        }
5502        #[inline(always)]
5503        fn encode_is_copy() -> bool {
5504            true
5505        }
5506
5507        #[inline(always)]
5508        fn decode_is_copy() -> bool {
5509            true
5510        }
5511    }
5512
5513    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisplayInfo, D>
5514        for &DisplayInfo
5515    {
5516        #[inline]
5517        unsafe fn encode(
5518            self,
5519            encoder: &mut fidl::encoding::Encoder<'_, D>,
5520            offset: usize,
5521            _depth: fidl::encoding::Depth,
5522        ) -> fidl::Result<()> {
5523            encoder.debug_check_bounds::<DisplayInfo>(offset);
5524            unsafe {
5525                // Copy the object into the buffer.
5526                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5527                (buf_ptr as *mut DisplayInfo).write_unaligned((self as *const DisplayInfo).read());
5528                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5529                // done second because the memcpy will write garbage to these bytes.
5530            }
5531            Ok(())
5532        }
5533    }
5534    unsafe impl<
5535            D: fidl::encoding::ResourceDialect,
5536            T0: fidl::encoding::Encode<u32, D>,
5537            T1: fidl::encoding::Encode<u32, D>,
5538        > fidl::encoding::Encode<DisplayInfo, D> for (T0, T1)
5539    {
5540        #[inline]
5541        unsafe fn encode(
5542            self,
5543            encoder: &mut fidl::encoding::Encoder<'_, D>,
5544            offset: usize,
5545            depth: fidl::encoding::Depth,
5546        ) -> fidl::Result<()> {
5547            encoder.debug_check_bounds::<DisplayInfo>(offset);
5548            // Zero out padding regions. There's no need to apply masks
5549            // because the unmasked parts will be overwritten by fields.
5550            // Write the fields.
5551            self.0.encode(encoder, offset + 0, depth)?;
5552            self.1.encode(encoder, offset + 4, depth)?;
5553            Ok(())
5554        }
5555    }
5556
5557    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisplayInfo {
5558        #[inline(always)]
5559        fn new_empty() -> Self {
5560            Self { width_in_px: fidl::new_empty!(u32, D), height_in_px: fidl::new_empty!(u32, D) }
5561        }
5562
5563        #[inline]
5564        unsafe fn decode(
5565            &mut self,
5566            decoder: &mut fidl::encoding::Decoder<'_, D>,
5567            offset: usize,
5568            _depth: fidl::encoding::Depth,
5569        ) -> fidl::Result<()> {
5570            decoder.debug_check_bounds::<Self>(offset);
5571            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5572            // Verify that padding bytes are zero.
5573            // Copy from the buffer into the object.
5574            unsafe {
5575                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
5576            }
5577            Ok(())
5578        }
5579    }
5580
5581    impl fidl::encoding::ValueTypeMarker for EntityNodeArgs {
5582        type Borrowed<'a> = &'a Self;
5583        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5584            value
5585        }
5586    }
5587
5588    unsafe impl fidl::encoding::TypeMarker for EntityNodeArgs {
5589        type Owned = Self;
5590
5591        #[inline(always)]
5592        fn inline_align(_context: fidl::encoding::Context) -> usize {
5593            4
5594        }
5595
5596        #[inline(always)]
5597        fn inline_size(_context: fidl::encoding::Context) -> usize {
5598            4
5599        }
5600        #[inline(always)]
5601        fn encode_is_copy() -> bool {
5602            true
5603        }
5604
5605        #[inline(always)]
5606        fn decode_is_copy() -> bool {
5607            true
5608        }
5609    }
5610
5611    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EntityNodeArgs, D>
5612        for &EntityNodeArgs
5613    {
5614        #[inline]
5615        unsafe fn encode(
5616            self,
5617            encoder: &mut fidl::encoding::Encoder<'_, D>,
5618            offset: usize,
5619            _depth: fidl::encoding::Depth,
5620        ) -> fidl::Result<()> {
5621            encoder.debug_check_bounds::<EntityNodeArgs>(offset);
5622            unsafe {
5623                // Copy the object into the buffer.
5624                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5625                (buf_ptr as *mut EntityNodeArgs)
5626                    .write_unaligned((self as *const EntityNodeArgs).read());
5627                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5628                // done second because the memcpy will write garbage to these bytes.
5629            }
5630            Ok(())
5631        }
5632    }
5633    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5634        fidl::encoding::Encode<EntityNodeArgs, D> for (T0,)
5635    {
5636        #[inline]
5637        unsafe fn encode(
5638            self,
5639            encoder: &mut fidl::encoding::Encoder<'_, D>,
5640            offset: usize,
5641            depth: fidl::encoding::Depth,
5642        ) -> fidl::Result<()> {
5643            encoder.debug_check_bounds::<EntityNodeArgs>(offset);
5644            // Zero out padding regions. There's no need to apply masks
5645            // because the unmasked parts will be overwritten by fields.
5646            // Write the fields.
5647            self.0.encode(encoder, offset + 0, depth)?;
5648            Ok(())
5649        }
5650    }
5651
5652    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EntityNodeArgs {
5653        #[inline(always)]
5654        fn new_empty() -> Self {
5655            Self { unused: fidl::new_empty!(u32, D) }
5656        }
5657
5658        #[inline]
5659        unsafe fn decode(
5660            &mut self,
5661            decoder: &mut fidl::encoding::Decoder<'_, D>,
5662            offset: usize,
5663            _depth: fidl::encoding::Depth,
5664        ) -> fidl::Result<()> {
5665            decoder.debug_check_bounds::<Self>(offset);
5666            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5667            // Verify that padding bytes are zero.
5668            // Copy from the buffer into the object.
5669            unsafe {
5670                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5671            }
5672            Ok(())
5673        }
5674    }
5675
5676    impl fidl::encoding::ResourceTypeMarker for ExportResourceCmdDeprecated {
5677        type Borrowed<'a> = &'a mut Self;
5678        fn take_or_borrow<'a>(
5679            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5680        ) -> Self::Borrowed<'a> {
5681            value
5682        }
5683    }
5684
5685    unsafe impl fidl::encoding::TypeMarker for ExportResourceCmdDeprecated {
5686        type Owned = Self;
5687
5688        #[inline(always)]
5689        fn inline_align(_context: fidl::encoding::Context) -> usize {
5690            4
5691        }
5692
5693        #[inline(always)]
5694        fn inline_size(_context: fidl::encoding::Context) -> usize {
5695            8
5696        }
5697    }
5698
5699    unsafe impl
5700        fidl::encoding::Encode<
5701            ExportResourceCmdDeprecated,
5702            fidl::encoding::DefaultFuchsiaResourceDialect,
5703        > for &mut ExportResourceCmdDeprecated
5704    {
5705        #[inline]
5706        unsafe fn encode(
5707            self,
5708            encoder: &mut fidl::encoding::Encoder<
5709                '_,
5710                fidl::encoding::DefaultFuchsiaResourceDialect,
5711            >,
5712            offset: usize,
5713            _depth: fidl::encoding::Depth,
5714        ) -> fidl::Result<()> {
5715            encoder.debug_check_bounds::<ExportResourceCmdDeprecated>(offset);
5716            // Delegate to tuple encoding.
5717            fidl::encoding::Encode::<
5718                ExportResourceCmdDeprecated,
5719                fidl::encoding::DefaultFuchsiaResourceDialect,
5720            >::encode(
5721                (
5722                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
5723                    <fidl::encoding::HandleType<
5724                        fidl::EventPair,
5725                        { fidl::ObjectType::EVENTPAIR.into_raw() },
5726                        2147483648,
5727                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5728                        &mut self.token
5729                    ),
5730                ),
5731                encoder,
5732                offset,
5733                _depth,
5734            )
5735        }
5736    }
5737    unsafe impl<
5738            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
5739            T1: fidl::encoding::Encode<
5740                fidl::encoding::HandleType<
5741                    fidl::EventPair,
5742                    { fidl::ObjectType::EVENTPAIR.into_raw() },
5743                    2147483648,
5744                >,
5745                fidl::encoding::DefaultFuchsiaResourceDialect,
5746            >,
5747        >
5748        fidl::encoding::Encode<
5749            ExportResourceCmdDeprecated,
5750            fidl::encoding::DefaultFuchsiaResourceDialect,
5751        > for (T0, T1)
5752    {
5753        #[inline]
5754        unsafe fn encode(
5755            self,
5756            encoder: &mut fidl::encoding::Encoder<
5757                '_,
5758                fidl::encoding::DefaultFuchsiaResourceDialect,
5759            >,
5760            offset: usize,
5761            depth: fidl::encoding::Depth,
5762        ) -> fidl::Result<()> {
5763            encoder.debug_check_bounds::<ExportResourceCmdDeprecated>(offset);
5764            // Zero out padding regions. There's no need to apply masks
5765            // because the unmasked parts will be overwritten by fields.
5766            // Write the fields.
5767            self.0.encode(encoder, offset + 0, depth)?;
5768            self.1.encode(encoder, offset + 4, depth)?;
5769            Ok(())
5770        }
5771    }
5772
5773    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5774        for ExportResourceCmdDeprecated
5775    {
5776        #[inline(always)]
5777        fn new_empty() -> Self {
5778            Self {
5779                id: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
5780                token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
5781            }
5782        }
5783
5784        #[inline]
5785        unsafe fn decode(
5786            &mut self,
5787            decoder: &mut fidl::encoding::Decoder<
5788                '_,
5789                fidl::encoding::DefaultFuchsiaResourceDialect,
5790            >,
5791            offset: usize,
5792            _depth: fidl::encoding::Depth,
5793        ) -> fidl::Result<()> {
5794            decoder.debug_check_bounds::<Self>(offset);
5795            // Verify that padding bytes are zero.
5796            fidl::decode!(
5797                u32,
5798                fidl::encoding::DefaultFuchsiaResourceDialect,
5799                &mut self.id,
5800                decoder,
5801                offset + 0,
5802                _depth
5803            )?;
5804            fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 4, _depth)?;
5805            Ok(())
5806        }
5807    }
5808
5809    impl fidl::encoding::ResourceTypeMarker for ExportToken {
5810        type Borrowed<'a> = &'a mut Self;
5811        fn take_or_borrow<'a>(
5812            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5813        ) -> Self::Borrowed<'a> {
5814            value
5815        }
5816    }
5817
5818    unsafe impl fidl::encoding::TypeMarker for ExportToken {
5819        type Owned = Self;
5820
5821        #[inline(always)]
5822        fn inline_align(_context: fidl::encoding::Context) -> usize {
5823            4
5824        }
5825
5826        #[inline(always)]
5827        fn inline_size(_context: fidl::encoding::Context) -> usize {
5828            4
5829        }
5830    }
5831
5832    unsafe impl fidl::encoding::Encode<ExportToken, fidl::encoding::DefaultFuchsiaResourceDialect>
5833        for &mut ExportToken
5834    {
5835        #[inline]
5836        unsafe fn encode(
5837            self,
5838            encoder: &mut fidl::encoding::Encoder<
5839                '_,
5840                fidl::encoding::DefaultFuchsiaResourceDialect,
5841            >,
5842            offset: usize,
5843            _depth: fidl::encoding::Depth,
5844        ) -> fidl::Result<()> {
5845            encoder.debug_check_bounds::<ExportToken>(offset);
5846            // Delegate to tuple encoding.
5847            fidl::encoding::Encode::<ExportToken, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5848                (
5849                    <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),
5850                ),
5851                encoder, offset, _depth
5852            )
5853        }
5854    }
5855    unsafe impl<
5856            T0: fidl::encoding::Encode<
5857                fidl::encoding::HandleType<
5858                    fidl::EventPair,
5859                    { fidl::ObjectType::EVENTPAIR.into_raw() },
5860                    2147483648,
5861                >,
5862                fidl::encoding::DefaultFuchsiaResourceDialect,
5863            >,
5864        > fidl::encoding::Encode<ExportToken, fidl::encoding::DefaultFuchsiaResourceDialect>
5865        for (T0,)
5866    {
5867        #[inline]
5868        unsafe fn encode(
5869            self,
5870            encoder: &mut fidl::encoding::Encoder<
5871                '_,
5872                fidl::encoding::DefaultFuchsiaResourceDialect,
5873            >,
5874            offset: usize,
5875            depth: fidl::encoding::Depth,
5876        ) -> fidl::Result<()> {
5877            encoder.debug_check_bounds::<ExportToken>(offset);
5878            // Zero out padding regions. There's no need to apply masks
5879            // because the unmasked parts will be overwritten by fields.
5880            // Write the fields.
5881            self.0.encode(encoder, offset + 0, depth)?;
5882            Ok(())
5883        }
5884    }
5885
5886    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for ExportToken {
5887        #[inline(always)]
5888        fn new_empty() -> Self {
5889            Self {
5890                value: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
5891            }
5892        }
5893
5894        #[inline]
5895        unsafe fn decode(
5896            &mut self,
5897            decoder: &mut fidl::encoding::Decoder<
5898                '_,
5899                fidl::encoding::DefaultFuchsiaResourceDialect,
5900            >,
5901            offset: usize,
5902            _depth: fidl::encoding::Depth,
5903        ) -> fidl::Result<()> {
5904            decoder.debug_check_bounds::<Self>(offset);
5905            // Verify that padding bytes are zero.
5906            fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.value, decoder, offset + 0, _depth)?;
5907            Ok(())
5908        }
5909    }
5910
5911    impl fidl::encoding::ValueTypeMarker for FactoredTransform {
5912        type Borrowed<'a> = &'a Self;
5913        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5914            value
5915        }
5916    }
5917
5918    unsafe impl fidl::encoding::TypeMarker for FactoredTransform {
5919        type Owned = Self;
5920
5921        #[inline(always)]
5922        fn inline_align(_context: fidl::encoding::Context) -> usize {
5923            4
5924        }
5925
5926        #[inline(always)]
5927        fn inline_size(_context: fidl::encoding::Context) -> usize {
5928            52
5929        }
5930    }
5931
5932    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FactoredTransform, D>
5933        for &FactoredTransform
5934    {
5935        #[inline]
5936        unsafe fn encode(
5937            self,
5938            encoder: &mut fidl::encoding::Encoder<'_, D>,
5939            offset: usize,
5940            _depth: fidl::encoding::Depth,
5941        ) -> fidl::Result<()> {
5942            encoder.debug_check_bounds::<FactoredTransform>(offset);
5943            // Delegate to tuple encoding.
5944            fidl::encoding::Encode::<FactoredTransform, D>::encode(
5945                (
5946                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.translation),
5947                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.scale),
5948                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.anchor),
5949                    <Quaternion as fidl::encoding::ValueTypeMarker>::borrow(&self.rotation),
5950                ),
5951                encoder,
5952                offset,
5953                _depth,
5954            )
5955        }
5956    }
5957    unsafe impl<
5958            D: fidl::encoding::ResourceDialect,
5959            T0: fidl::encoding::Encode<Vec3, D>,
5960            T1: fidl::encoding::Encode<Vec3, D>,
5961            T2: fidl::encoding::Encode<Vec3, D>,
5962            T3: fidl::encoding::Encode<Quaternion, D>,
5963        > fidl::encoding::Encode<FactoredTransform, D> for (T0, T1, T2, T3)
5964    {
5965        #[inline]
5966        unsafe fn encode(
5967            self,
5968            encoder: &mut fidl::encoding::Encoder<'_, D>,
5969            offset: usize,
5970            depth: fidl::encoding::Depth,
5971        ) -> fidl::Result<()> {
5972            encoder.debug_check_bounds::<FactoredTransform>(offset);
5973            // Zero out padding regions. There's no need to apply masks
5974            // because the unmasked parts will be overwritten by fields.
5975            // Write the fields.
5976            self.0.encode(encoder, offset + 0, depth)?;
5977            self.1.encode(encoder, offset + 12, depth)?;
5978            self.2.encode(encoder, offset + 24, depth)?;
5979            self.3.encode(encoder, offset + 36, depth)?;
5980            Ok(())
5981        }
5982    }
5983
5984    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FactoredTransform {
5985        #[inline(always)]
5986        fn new_empty() -> Self {
5987            Self {
5988                translation: fidl::new_empty!(Vec3, D),
5989                scale: fidl::new_empty!(Vec3, D),
5990                anchor: fidl::new_empty!(Vec3, D),
5991                rotation: fidl::new_empty!(Quaternion, D),
5992            }
5993        }
5994
5995        #[inline]
5996        unsafe fn decode(
5997            &mut self,
5998            decoder: &mut fidl::encoding::Decoder<'_, D>,
5999            offset: usize,
6000            _depth: fidl::encoding::Depth,
6001        ) -> fidl::Result<()> {
6002            decoder.debug_check_bounds::<Self>(offset);
6003            // Verify that padding bytes are zero.
6004            fidl::decode!(Vec3, D, &mut self.translation, decoder, offset + 0, _depth)?;
6005            fidl::decode!(Vec3, D, &mut self.scale, decoder, offset + 12, _depth)?;
6006            fidl::decode!(Vec3, D, &mut self.anchor, decoder, offset + 24, _depth)?;
6007            fidl::decode!(Quaternion, D, &mut self.rotation, decoder, offset + 36, _depth)?;
6008            Ok(())
6009        }
6010    }
6011
6012    impl fidl::encoding::ValueTypeMarker for FloatValue {
6013        type Borrowed<'a> = &'a Self;
6014        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6015            value
6016        }
6017    }
6018
6019    unsafe impl fidl::encoding::TypeMarker for FloatValue {
6020        type Owned = Self;
6021
6022        #[inline(always)]
6023        fn inline_align(_context: fidl::encoding::Context) -> usize {
6024            4
6025        }
6026
6027        #[inline(always)]
6028        fn inline_size(_context: fidl::encoding::Context) -> usize {
6029            8
6030        }
6031    }
6032
6033    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FloatValue, D>
6034        for &FloatValue
6035    {
6036        #[inline]
6037        unsafe fn encode(
6038            self,
6039            encoder: &mut fidl::encoding::Encoder<'_, D>,
6040            offset: usize,
6041            _depth: fidl::encoding::Depth,
6042        ) -> fidl::Result<()> {
6043            encoder.debug_check_bounds::<FloatValue>(offset);
6044            // Delegate to tuple encoding.
6045            fidl::encoding::Encode::<FloatValue, D>::encode(
6046                (
6047                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
6048                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
6049                ),
6050                encoder,
6051                offset,
6052                _depth,
6053            )
6054        }
6055    }
6056    unsafe impl<
6057            D: fidl::encoding::ResourceDialect,
6058            T0: fidl::encoding::Encode<f32, D>,
6059            T1: fidl::encoding::Encode<u32, D>,
6060        > fidl::encoding::Encode<FloatValue, D> for (T0, T1)
6061    {
6062        #[inline]
6063        unsafe fn encode(
6064            self,
6065            encoder: &mut fidl::encoding::Encoder<'_, D>,
6066            offset: usize,
6067            depth: fidl::encoding::Depth,
6068        ) -> fidl::Result<()> {
6069            encoder.debug_check_bounds::<FloatValue>(offset);
6070            // Zero out padding regions. There's no need to apply masks
6071            // because the unmasked parts will be overwritten by fields.
6072            // Write the fields.
6073            self.0.encode(encoder, offset + 0, depth)?;
6074            self.1.encode(encoder, offset + 4, depth)?;
6075            Ok(())
6076        }
6077    }
6078
6079    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FloatValue {
6080        #[inline(always)]
6081        fn new_empty() -> Self {
6082            Self { value: fidl::new_empty!(f32, D), variable_id: fidl::new_empty!(u32, D) }
6083        }
6084
6085        #[inline]
6086        unsafe fn decode(
6087            &mut self,
6088            decoder: &mut fidl::encoding::Decoder<'_, D>,
6089            offset: usize,
6090            _depth: fidl::encoding::Depth,
6091        ) -> fidl::Result<()> {
6092            decoder.debug_check_bounds::<Self>(offset);
6093            // Verify that padding bytes are zero.
6094            fidl::decode!(f32, D, &mut self.value, decoder, offset + 0, _depth)?;
6095            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 4, _depth)?;
6096            Ok(())
6097        }
6098    }
6099
6100    impl fidl::encoding::ValueTypeMarker for ImageArgs {
6101        type Borrowed<'a> = &'a Self;
6102        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6103            value
6104        }
6105    }
6106
6107    unsafe impl fidl::encoding::TypeMarker for ImageArgs {
6108        type Owned = Self;
6109
6110        #[inline(always)]
6111        fn inline_align(_context: fidl::encoding::Context) -> usize {
6112            4
6113        }
6114
6115        #[inline(always)]
6116        fn inline_size(_context: fidl::encoding::Context) -> usize {
6117            40
6118        }
6119    }
6120
6121    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ImageArgs, D>
6122        for &ImageArgs
6123    {
6124        #[inline]
6125        unsafe fn encode(
6126            self,
6127            encoder: &mut fidl::encoding::Encoder<'_, D>,
6128            offset: usize,
6129            _depth: fidl::encoding::Depth,
6130        ) -> fidl::Result<()> {
6131            encoder.debug_check_bounds::<ImageArgs>(offset);
6132            // Delegate to tuple encoding.
6133            fidl::encoding::Encode::<ImageArgs, D>::encode(
6134                (
6135                    <fidl_fuchsia_images::ImageInfo as fidl::encoding::ValueTypeMarker>::borrow(
6136                        &self.info,
6137                    ),
6138                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.memory_id),
6139                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.memory_offset),
6140                ),
6141                encoder,
6142                offset,
6143                _depth,
6144            )
6145        }
6146    }
6147    unsafe impl<
6148            D: fidl::encoding::ResourceDialect,
6149            T0: fidl::encoding::Encode<fidl_fuchsia_images::ImageInfo, D>,
6150            T1: fidl::encoding::Encode<u32, D>,
6151            T2: fidl::encoding::Encode<u32, D>,
6152        > fidl::encoding::Encode<ImageArgs, D> for (T0, T1, T2)
6153    {
6154        #[inline]
6155        unsafe fn encode(
6156            self,
6157            encoder: &mut fidl::encoding::Encoder<'_, D>,
6158            offset: usize,
6159            depth: fidl::encoding::Depth,
6160        ) -> fidl::Result<()> {
6161            encoder.debug_check_bounds::<ImageArgs>(offset);
6162            // Zero out padding regions. There's no need to apply masks
6163            // because the unmasked parts will be overwritten by fields.
6164            // Write the fields.
6165            self.0.encode(encoder, offset + 0, depth)?;
6166            self.1.encode(encoder, offset + 32, depth)?;
6167            self.2.encode(encoder, offset + 36, depth)?;
6168            Ok(())
6169        }
6170    }
6171
6172    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ImageArgs {
6173        #[inline(always)]
6174        fn new_empty() -> Self {
6175            Self {
6176                info: fidl::new_empty!(fidl_fuchsia_images::ImageInfo, D),
6177                memory_id: fidl::new_empty!(u32, D),
6178                memory_offset: fidl::new_empty!(u32, D),
6179            }
6180        }
6181
6182        #[inline]
6183        unsafe fn decode(
6184            &mut self,
6185            decoder: &mut fidl::encoding::Decoder<'_, D>,
6186            offset: usize,
6187            _depth: fidl::encoding::Depth,
6188        ) -> fidl::Result<()> {
6189            decoder.debug_check_bounds::<Self>(offset);
6190            // Verify that padding bytes are zero.
6191            fidl::decode!(
6192                fidl_fuchsia_images::ImageInfo,
6193                D,
6194                &mut self.info,
6195                decoder,
6196                offset + 0,
6197                _depth
6198            )?;
6199            fidl::decode!(u32, D, &mut self.memory_id, decoder, offset + 32, _depth)?;
6200            fidl::decode!(u32, D, &mut self.memory_offset, decoder, offset + 36, _depth)?;
6201            Ok(())
6202        }
6203    }
6204
6205    impl fidl::encoding::ValueTypeMarker for ImageArgs2 {
6206        type Borrowed<'a> = &'a Self;
6207        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6208            value
6209        }
6210    }
6211
6212    unsafe impl fidl::encoding::TypeMarker for ImageArgs2 {
6213        type Owned = Self;
6214
6215        #[inline(always)]
6216        fn inline_align(_context: fidl::encoding::Context) -> usize {
6217            4
6218        }
6219
6220        #[inline(always)]
6221        fn inline_size(_context: fidl::encoding::Context) -> usize {
6222            16
6223        }
6224        #[inline(always)]
6225        fn encode_is_copy() -> bool {
6226            true
6227        }
6228
6229        #[inline(always)]
6230        fn decode_is_copy() -> bool {
6231            true
6232        }
6233    }
6234
6235    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ImageArgs2, D>
6236        for &ImageArgs2
6237    {
6238        #[inline]
6239        unsafe fn encode(
6240            self,
6241            encoder: &mut fidl::encoding::Encoder<'_, D>,
6242            offset: usize,
6243            _depth: fidl::encoding::Depth,
6244        ) -> fidl::Result<()> {
6245            encoder.debug_check_bounds::<ImageArgs2>(offset);
6246            unsafe {
6247                // Copy the object into the buffer.
6248                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6249                (buf_ptr as *mut ImageArgs2).write_unaligned((self as *const ImageArgs2).read());
6250                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6251                // done second because the memcpy will write garbage to these bytes.
6252            }
6253            Ok(())
6254        }
6255    }
6256    unsafe impl<
6257            D: fidl::encoding::ResourceDialect,
6258            T0: fidl::encoding::Encode<u32, D>,
6259            T1: fidl::encoding::Encode<u32, D>,
6260            T2: fidl::encoding::Encode<u32, D>,
6261            T3: fidl::encoding::Encode<u32, D>,
6262        > fidl::encoding::Encode<ImageArgs2, D> for (T0, T1, T2, T3)
6263    {
6264        #[inline]
6265        unsafe fn encode(
6266            self,
6267            encoder: &mut fidl::encoding::Encoder<'_, D>,
6268            offset: usize,
6269            depth: fidl::encoding::Depth,
6270        ) -> fidl::Result<()> {
6271            encoder.debug_check_bounds::<ImageArgs2>(offset);
6272            // Zero out padding regions. There's no need to apply masks
6273            // because the unmasked parts will be overwritten by fields.
6274            // Write the fields.
6275            self.0.encode(encoder, offset + 0, depth)?;
6276            self.1.encode(encoder, offset + 4, depth)?;
6277            self.2.encode(encoder, offset + 8, depth)?;
6278            self.3.encode(encoder, offset + 12, depth)?;
6279            Ok(())
6280        }
6281    }
6282
6283    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ImageArgs2 {
6284        #[inline(always)]
6285        fn new_empty() -> Self {
6286            Self {
6287                width: fidl::new_empty!(u32, D),
6288                height: fidl::new_empty!(u32, D),
6289                buffer_collection_id: fidl::new_empty!(u32, D),
6290                buffer_collection_index: fidl::new_empty!(u32, D),
6291            }
6292        }
6293
6294        #[inline]
6295        unsafe fn decode(
6296            &mut self,
6297            decoder: &mut fidl::encoding::Decoder<'_, D>,
6298            offset: usize,
6299            _depth: fidl::encoding::Depth,
6300        ) -> fidl::Result<()> {
6301            decoder.debug_check_bounds::<Self>(offset);
6302            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6303            // Verify that padding bytes are zero.
6304            // Copy from the buffer into the object.
6305            unsafe {
6306                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
6307            }
6308            Ok(())
6309        }
6310    }
6311
6312    impl fidl::encoding::ResourceTypeMarker for ImageArgs3 {
6313        type Borrowed<'a> = &'a mut Self;
6314        fn take_or_borrow<'a>(
6315            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6316        ) -> Self::Borrowed<'a> {
6317            value
6318        }
6319    }
6320
6321    unsafe impl fidl::encoding::TypeMarker for ImageArgs3 {
6322        type Owned = Self;
6323
6324        #[inline(always)]
6325        fn inline_align(_context: fidl::encoding::Context) -> usize {
6326            4
6327        }
6328
6329        #[inline(always)]
6330        fn inline_size(_context: fidl::encoding::Context) -> usize {
6331            16
6332        }
6333    }
6334
6335    unsafe impl fidl::encoding::Encode<ImageArgs3, fidl::encoding::DefaultFuchsiaResourceDialect>
6336        for &mut ImageArgs3
6337    {
6338        #[inline]
6339        unsafe fn encode(
6340            self,
6341            encoder: &mut fidl::encoding::Encoder<
6342                '_,
6343                fidl::encoding::DefaultFuchsiaResourceDialect,
6344            >,
6345            offset: usize,
6346            _depth: fidl::encoding::Depth,
6347        ) -> fidl::Result<()> {
6348            encoder.debug_check_bounds::<ImageArgs3>(offset);
6349            // Delegate to tuple encoding.
6350            fidl::encoding::Encode::<ImageArgs3, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6351                (
6352                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.width),
6353                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.height),
6354                    <fidl_fuchsia_ui_composition::BufferCollectionImportToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.import_token),
6355                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.buffer_collection_index),
6356                ),
6357                encoder, offset, _depth
6358            )
6359        }
6360    }
6361    unsafe impl<
6362            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6363            T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6364            T2: fidl::encoding::Encode<
6365                fidl_fuchsia_ui_composition::BufferCollectionImportToken,
6366                fidl::encoding::DefaultFuchsiaResourceDialect,
6367            >,
6368            T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6369        > fidl::encoding::Encode<ImageArgs3, fidl::encoding::DefaultFuchsiaResourceDialect>
6370        for (T0, T1, T2, T3)
6371    {
6372        #[inline]
6373        unsafe fn encode(
6374            self,
6375            encoder: &mut fidl::encoding::Encoder<
6376                '_,
6377                fidl::encoding::DefaultFuchsiaResourceDialect,
6378            >,
6379            offset: usize,
6380            depth: fidl::encoding::Depth,
6381        ) -> fidl::Result<()> {
6382            encoder.debug_check_bounds::<ImageArgs3>(offset);
6383            // Zero out padding regions. There's no need to apply masks
6384            // because the unmasked parts will be overwritten by fields.
6385            // Write the fields.
6386            self.0.encode(encoder, offset + 0, depth)?;
6387            self.1.encode(encoder, offset + 4, depth)?;
6388            self.2.encode(encoder, offset + 8, depth)?;
6389            self.3.encode(encoder, offset + 12, depth)?;
6390            Ok(())
6391        }
6392    }
6393
6394    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for ImageArgs3 {
6395        #[inline(always)]
6396        fn new_empty() -> Self {
6397            Self {
6398                width: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6399                height: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6400                import_token: fidl::new_empty!(
6401                    fidl_fuchsia_ui_composition::BufferCollectionImportToken,
6402                    fidl::encoding::DefaultFuchsiaResourceDialect
6403                ),
6404                buffer_collection_index: fidl::new_empty!(
6405                    u32,
6406                    fidl::encoding::DefaultFuchsiaResourceDialect
6407                ),
6408            }
6409        }
6410
6411        #[inline]
6412        unsafe fn decode(
6413            &mut self,
6414            decoder: &mut fidl::encoding::Decoder<
6415                '_,
6416                fidl::encoding::DefaultFuchsiaResourceDialect,
6417            >,
6418            offset: usize,
6419            _depth: fidl::encoding::Depth,
6420        ) -> fidl::Result<()> {
6421            decoder.debug_check_bounds::<Self>(offset);
6422            // Verify that padding bytes are zero.
6423            fidl::decode!(
6424                u32,
6425                fidl::encoding::DefaultFuchsiaResourceDialect,
6426                &mut self.width,
6427                decoder,
6428                offset + 0,
6429                _depth
6430            )?;
6431            fidl::decode!(
6432                u32,
6433                fidl::encoding::DefaultFuchsiaResourceDialect,
6434                &mut self.height,
6435                decoder,
6436                offset + 4,
6437                _depth
6438            )?;
6439            fidl::decode!(
6440                fidl_fuchsia_ui_composition::BufferCollectionImportToken,
6441                fidl::encoding::DefaultFuchsiaResourceDialect,
6442                &mut self.import_token,
6443                decoder,
6444                offset + 8,
6445                _depth
6446            )?;
6447            fidl::decode!(
6448                u32,
6449                fidl::encoding::DefaultFuchsiaResourceDialect,
6450                &mut self.buffer_collection_index,
6451                decoder,
6452                offset + 12,
6453                _depth
6454            )?;
6455            Ok(())
6456        }
6457    }
6458
6459    impl fidl::encoding::ResourceTypeMarker for ImagePipe2Args {
6460        type Borrowed<'a> = &'a mut Self;
6461        fn take_or_borrow<'a>(
6462            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6463        ) -> Self::Borrowed<'a> {
6464            value
6465        }
6466    }
6467
6468    unsafe impl fidl::encoding::TypeMarker for ImagePipe2Args {
6469        type Owned = Self;
6470
6471        #[inline(always)]
6472        fn inline_align(_context: fidl::encoding::Context) -> usize {
6473            4
6474        }
6475
6476        #[inline(always)]
6477        fn inline_size(_context: fidl::encoding::Context) -> usize {
6478            4
6479        }
6480    }
6481
6482    unsafe impl
6483        fidl::encoding::Encode<ImagePipe2Args, fidl::encoding::DefaultFuchsiaResourceDialect>
6484        for &mut ImagePipe2Args
6485    {
6486        #[inline]
6487        unsafe fn encode(
6488            self,
6489            encoder: &mut fidl::encoding::Encoder<
6490                '_,
6491                fidl::encoding::DefaultFuchsiaResourceDialect,
6492            >,
6493            offset: usize,
6494            _depth: fidl::encoding::Depth,
6495        ) -> fidl::Result<()> {
6496            encoder.debug_check_bounds::<ImagePipe2Args>(offset);
6497            // Delegate to tuple encoding.
6498            fidl::encoding::Encode::<ImagePipe2Args, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6499                (
6500                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<fidl_fuchsia_images::ImagePipe2Marker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.image_pipe_request),
6501                ),
6502                encoder, offset, _depth
6503            )
6504        }
6505    }
6506    unsafe impl<
6507            T0: fidl::encoding::Encode<
6508                fidl::encoding::Endpoint<
6509                    fidl::endpoints::ServerEnd<fidl_fuchsia_images::ImagePipe2Marker>,
6510                >,
6511                fidl::encoding::DefaultFuchsiaResourceDialect,
6512            >,
6513        > fidl::encoding::Encode<ImagePipe2Args, fidl::encoding::DefaultFuchsiaResourceDialect>
6514        for (T0,)
6515    {
6516        #[inline]
6517        unsafe fn encode(
6518            self,
6519            encoder: &mut fidl::encoding::Encoder<
6520                '_,
6521                fidl::encoding::DefaultFuchsiaResourceDialect,
6522            >,
6523            offset: usize,
6524            depth: fidl::encoding::Depth,
6525        ) -> fidl::Result<()> {
6526            encoder.debug_check_bounds::<ImagePipe2Args>(offset);
6527            // Zero out padding regions. There's no need to apply masks
6528            // because the unmasked parts will be overwritten by fields.
6529            // Write the fields.
6530            self.0.encode(encoder, offset + 0, depth)?;
6531            Ok(())
6532        }
6533    }
6534
6535    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6536        for ImagePipe2Args
6537    {
6538        #[inline(always)]
6539        fn new_empty() -> Self {
6540            Self {
6541                image_pipe_request: fidl::new_empty!(
6542                    fidl::encoding::Endpoint<
6543                        fidl::endpoints::ServerEnd<fidl_fuchsia_images::ImagePipe2Marker>,
6544                    >,
6545                    fidl::encoding::DefaultFuchsiaResourceDialect
6546                ),
6547            }
6548        }
6549
6550        #[inline]
6551        unsafe fn decode(
6552            &mut self,
6553            decoder: &mut fidl::encoding::Decoder<
6554                '_,
6555                fidl::encoding::DefaultFuchsiaResourceDialect,
6556            >,
6557            offset: usize,
6558            _depth: fidl::encoding::Depth,
6559        ) -> fidl::Result<()> {
6560            decoder.debug_check_bounds::<Self>(offset);
6561            // Verify that padding bytes are zero.
6562            fidl::decode!(
6563                fidl::encoding::Endpoint<
6564                    fidl::endpoints::ServerEnd<fidl_fuchsia_images::ImagePipe2Marker>,
6565                >,
6566                fidl::encoding::DefaultFuchsiaResourceDialect,
6567                &mut self.image_pipe_request,
6568                decoder,
6569                offset + 0,
6570                _depth
6571            )?;
6572            Ok(())
6573        }
6574    }
6575
6576    impl fidl::encoding::ResourceTypeMarker for ImportResourceCmdDeprecated {
6577        type Borrowed<'a> = &'a mut Self;
6578        fn take_or_borrow<'a>(
6579            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6580        ) -> Self::Borrowed<'a> {
6581            value
6582        }
6583    }
6584
6585    unsafe impl fidl::encoding::TypeMarker for ImportResourceCmdDeprecated {
6586        type Owned = Self;
6587
6588        #[inline(always)]
6589        fn inline_align(_context: fidl::encoding::Context) -> usize {
6590            4
6591        }
6592
6593        #[inline(always)]
6594        fn inline_size(_context: fidl::encoding::Context) -> usize {
6595            12
6596        }
6597    }
6598
6599    unsafe impl
6600        fidl::encoding::Encode<
6601            ImportResourceCmdDeprecated,
6602            fidl::encoding::DefaultFuchsiaResourceDialect,
6603        > for &mut ImportResourceCmdDeprecated
6604    {
6605        #[inline]
6606        unsafe fn encode(
6607            self,
6608            encoder: &mut fidl::encoding::Encoder<
6609                '_,
6610                fidl::encoding::DefaultFuchsiaResourceDialect,
6611            >,
6612            offset: usize,
6613            _depth: fidl::encoding::Depth,
6614        ) -> fidl::Result<()> {
6615            encoder.debug_check_bounds::<ImportResourceCmdDeprecated>(offset);
6616            // Delegate to tuple encoding.
6617            fidl::encoding::Encode::<
6618                ImportResourceCmdDeprecated,
6619                fidl::encoding::DefaultFuchsiaResourceDialect,
6620            >::encode(
6621                (
6622                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
6623                    <fidl::encoding::HandleType<
6624                        fidl::EventPair,
6625                        { fidl::ObjectType::EVENTPAIR.into_raw() },
6626                        2147483648,
6627                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6628                        &mut self.token
6629                    ),
6630                    <ImportSpec as fidl::encoding::ValueTypeMarker>::borrow(&self.spec),
6631                ),
6632                encoder,
6633                offset,
6634                _depth,
6635            )
6636        }
6637    }
6638    unsafe impl<
6639            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6640            T1: fidl::encoding::Encode<
6641                fidl::encoding::HandleType<
6642                    fidl::EventPair,
6643                    { fidl::ObjectType::EVENTPAIR.into_raw() },
6644                    2147483648,
6645                >,
6646                fidl::encoding::DefaultFuchsiaResourceDialect,
6647            >,
6648            T2: fidl::encoding::Encode<ImportSpec, fidl::encoding::DefaultFuchsiaResourceDialect>,
6649        >
6650        fidl::encoding::Encode<
6651            ImportResourceCmdDeprecated,
6652            fidl::encoding::DefaultFuchsiaResourceDialect,
6653        > for (T0, T1, T2)
6654    {
6655        #[inline]
6656        unsafe fn encode(
6657            self,
6658            encoder: &mut fidl::encoding::Encoder<
6659                '_,
6660                fidl::encoding::DefaultFuchsiaResourceDialect,
6661            >,
6662            offset: usize,
6663            depth: fidl::encoding::Depth,
6664        ) -> fidl::Result<()> {
6665            encoder.debug_check_bounds::<ImportResourceCmdDeprecated>(offset);
6666            // Zero out padding regions. There's no need to apply masks
6667            // because the unmasked parts will be overwritten by fields.
6668            // Write the fields.
6669            self.0.encode(encoder, offset + 0, depth)?;
6670            self.1.encode(encoder, offset + 4, depth)?;
6671            self.2.encode(encoder, offset + 8, depth)?;
6672            Ok(())
6673        }
6674    }
6675
6676    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6677        for ImportResourceCmdDeprecated
6678    {
6679        #[inline(always)]
6680        fn new_empty() -> Self {
6681            Self {
6682                id: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6683                token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6684                spec: fidl::new_empty!(ImportSpec, fidl::encoding::DefaultFuchsiaResourceDialect),
6685            }
6686        }
6687
6688        #[inline]
6689        unsafe fn decode(
6690            &mut self,
6691            decoder: &mut fidl::encoding::Decoder<
6692                '_,
6693                fidl::encoding::DefaultFuchsiaResourceDialect,
6694            >,
6695            offset: usize,
6696            _depth: fidl::encoding::Depth,
6697        ) -> fidl::Result<()> {
6698            decoder.debug_check_bounds::<Self>(offset);
6699            // Verify that padding bytes are zero.
6700            fidl::decode!(
6701                u32,
6702                fidl::encoding::DefaultFuchsiaResourceDialect,
6703                &mut self.id,
6704                decoder,
6705                offset + 0,
6706                _depth
6707            )?;
6708            fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 4, _depth)?;
6709            fidl::decode!(
6710                ImportSpec,
6711                fidl::encoding::DefaultFuchsiaResourceDialect,
6712                &mut self.spec,
6713                decoder,
6714                offset + 8,
6715                _depth
6716            )?;
6717            Ok(())
6718        }
6719    }
6720
6721    impl fidl::encoding::ResourceTypeMarker for ImportToken {
6722        type Borrowed<'a> = &'a mut Self;
6723        fn take_or_borrow<'a>(
6724            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6725        ) -> Self::Borrowed<'a> {
6726            value
6727        }
6728    }
6729
6730    unsafe impl fidl::encoding::TypeMarker for ImportToken {
6731        type Owned = Self;
6732
6733        #[inline(always)]
6734        fn inline_align(_context: fidl::encoding::Context) -> usize {
6735            4
6736        }
6737
6738        #[inline(always)]
6739        fn inline_size(_context: fidl::encoding::Context) -> usize {
6740            4
6741        }
6742    }
6743
6744    unsafe impl fidl::encoding::Encode<ImportToken, fidl::encoding::DefaultFuchsiaResourceDialect>
6745        for &mut ImportToken
6746    {
6747        #[inline]
6748        unsafe fn encode(
6749            self,
6750            encoder: &mut fidl::encoding::Encoder<
6751                '_,
6752                fidl::encoding::DefaultFuchsiaResourceDialect,
6753            >,
6754            offset: usize,
6755            _depth: fidl::encoding::Depth,
6756        ) -> fidl::Result<()> {
6757            encoder.debug_check_bounds::<ImportToken>(offset);
6758            // Delegate to tuple encoding.
6759            fidl::encoding::Encode::<ImportToken, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6760                (
6761                    <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),
6762                ),
6763                encoder, offset, _depth
6764            )
6765        }
6766    }
6767    unsafe impl<
6768            T0: fidl::encoding::Encode<
6769                fidl::encoding::HandleType<
6770                    fidl::EventPair,
6771                    { fidl::ObjectType::EVENTPAIR.into_raw() },
6772                    2147483648,
6773                >,
6774                fidl::encoding::DefaultFuchsiaResourceDialect,
6775            >,
6776        > fidl::encoding::Encode<ImportToken, fidl::encoding::DefaultFuchsiaResourceDialect>
6777        for (T0,)
6778    {
6779        #[inline]
6780        unsafe fn encode(
6781            self,
6782            encoder: &mut fidl::encoding::Encoder<
6783                '_,
6784                fidl::encoding::DefaultFuchsiaResourceDialect,
6785            >,
6786            offset: usize,
6787            depth: fidl::encoding::Depth,
6788        ) -> fidl::Result<()> {
6789            encoder.debug_check_bounds::<ImportToken>(offset);
6790            // Zero out padding regions. There's no need to apply masks
6791            // because the unmasked parts will be overwritten by fields.
6792            // Write the fields.
6793            self.0.encode(encoder, offset + 0, depth)?;
6794            Ok(())
6795        }
6796    }
6797
6798    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for ImportToken {
6799        #[inline(always)]
6800        fn new_empty() -> Self {
6801            Self {
6802                value: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6803            }
6804        }
6805
6806        #[inline]
6807        unsafe fn decode(
6808            &mut self,
6809            decoder: &mut fidl::encoding::Decoder<
6810                '_,
6811                fidl::encoding::DefaultFuchsiaResourceDialect,
6812            >,
6813            offset: usize,
6814            _depth: fidl::encoding::Depth,
6815        ) -> fidl::Result<()> {
6816            decoder.debug_check_bounds::<Self>(offset);
6817            // Verify that padding bytes are zero.
6818            fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.value, decoder, offset + 0, _depth)?;
6819            Ok(())
6820        }
6821    }
6822
6823    impl fidl::encoding::ValueTypeMarker for ImportUnboundEvent {
6824        type Borrowed<'a> = &'a Self;
6825        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6826            value
6827        }
6828    }
6829
6830    unsafe impl fidl::encoding::TypeMarker for ImportUnboundEvent {
6831        type Owned = Self;
6832
6833        #[inline(always)]
6834        fn inline_align(_context: fidl::encoding::Context) -> usize {
6835            4
6836        }
6837
6838        #[inline(always)]
6839        fn inline_size(_context: fidl::encoding::Context) -> usize {
6840            4
6841        }
6842        #[inline(always)]
6843        fn encode_is_copy() -> bool {
6844            true
6845        }
6846
6847        #[inline(always)]
6848        fn decode_is_copy() -> bool {
6849            true
6850        }
6851    }
6852
6853    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ImportUnboundEvent, D>
6854        for &ImportUnboundEvent
6855    {
6856        #[inline]
6857        unsafe fn encode(
6858            self,
6859            encoder: &mut fidl::encoding::Encoder<'_, D>,
6860            offset: usize,
6861            _depth: fidl::encoding::Depth,
6862        ) -> fidl::Result<()> {
6863            encoder.debug_check_bounds::<ImportUnboundEvent>(offset);
6864            unsafe {
6865                // Copy the object into the buffer.
6866                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6867                (buf_ptr as *mut ImportUnboundEvent)
6868                    .write_unaligned((self as *const ImportUnboundEvent).read());
6869                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6870                // done second because the memcpy will write garbage to these bytes.
6871            }
6872            Ok(())
6873        }
6874    }
6875    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
6876        fidl::encoding::Encode<ImportUnboundEvent, D> for (T0,)
6877    {
6878        #[inline]
6879        unsafe fn encode(
6880            self,
6881            encoder: &mut fidl::encoding::Encoder<'_, D>,
6882            offset: usize,
6883            depth: fidl::encoding::Depth,
6884        ) -> fidl::Result<()> {
6885            encoder.debug_check_bounds::<ImportUnboundEvent>(offset);
6886            // Zero out padding regions. There's no need to apply masks
6887            // because the unmasked parts will be overwritten by fields.
6888            // Write the fields.
6889            self.0.encode(encoder, offset + 0, depth)?;
6890            Ok(())
6891        }
6892    }
6893
6894    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ImportUnboundEvent {
6895        #[inline(always)]
6896        fn new_empty() -> Self {
6897            Self { resource_id: fidl::new_empty!(u32, D) }
6898        }
6899
6900        #[inline]
6901        unsafe fn decode(
6902            &mut self,
6903            decoder: &mut fidl::encoding::Decoder<'_, D>,
6904            offset: usize,
6905            _depth: fidl::encoding::Depth,
6906        ) -> fidl::Result<()> {
6907            decoder.debug_check_bounds::<Self>(offset);
6908            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6909            // Verify that padding bytes are zero.
6910            // Copy from the buffer into the object.
6911            unsafe {
6912                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
6913            }
6914            Ok(())
6915        }
6916    }
6917
6918    impl fidl::encoding::ValueTypeMarker for LayerArgs {
6919        type Borrowed<'a> = &'a Self;
6920        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6921            value
6922        }
6923    }
6924
6925    unsafe impl fidl::encoding::TypeMarker for LayerArgs {
6926        type Owned = Self;
6927
6928        #[inline(always)]
6929        fn inline_align(_context: fidl::encoding::Context) -> usize {
6930            4
6931        }
6932
6933        #[inline(always)]
6934        fn inline_size(_context: fidl::encoding::Context) -> usize {
6935            4
6936        }
6937        #[inline(always)]
6938        fn encode_is_copy() -> bool {
6939            true
6940        }
6941
6942        #[inline(always)]
6943        fn decode_is_copy() -> bool {
6944            true
6945        }
6946    }
6947
6948    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LayerArgs, D>
6949        for &LayerArgs
6950    {
6951        #[inline]
6952        unsafe fn encode(
6953            self,
6954            encoder: &mut fidl::encoding::Encoder<'_, D>,
6955            offset: usize,
6956            _depth: fidl::encoding::Depth,
6957        ) -> fidl::Result<()> {
6958            encoder.debug_check_bounds::<LayerArgs>(offset);
6959            unsafe {
6960                // Copy the object into the buffer.
6961                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6962                (buf_ptr as *mut LayerArgs).write_unaligned((self as *const LayerArgs).read());
6963                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6964                // done second because the memcpy will write garbage to these bytes.
6965            }
6966            Ok(())
6967        }
6968    }
6969    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
6970        fidl::encoding::Encode<LayerArgs, D> for (T0,)
6971    {
6972        #[inline]
6973        unsafe fn encode(
6974            self,
6975            encoder: &mut fidl::encoding::Encoder<'_, D>,
6976            offset: usize,
6977            depth: fidl::encoding::Depth,
6978        ) -> fidl::Result<()> {
6979            encoder.debug_check_bounds::<LayerArgs>(offset);
6980            // Zero out padding regions. There's no need to apply masks
6981            // because the unmasked parts will be overwritten by fields.
6982            // Write the fields.
6983            self.0.encode(encoder, offset + 0, depth)?;
6984            Ok(())
6985        }
6986    }
6987
6988    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LayerArgs {
6989        #[inline(always)]
6990        fn new_empty() -> Self {
6991            Self { dummy: fidl::new_empty!(u32, D) }
6992        }
6993
6994        #[inline]
6995        unsafe fn decode(
6996            &mut self,
6997            decoder: &mut fidl::encoding::Decoder<'_, D>,
6998            offset: usize,
6999            _depth: fidl::encoding::Depth,
7000        ) -> fidl::Result<()> {
7001            decoder.debug_check_bounds::<Self>(offset);
7002            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7003            // Verify that padding bytes are zero.
7004            // Copy from the buffer into the object.
7005            unsafe {
7006                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
7007            }
7008            Ok(())
7009        }
7010    }
7011
7012    impl fidl::encoding::ValueTypeMarker for LayerStackArgs {
7013        type Borrowed<'a> = &'a Self;
7014        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7015            value
7016        }
7017    }
7018
7019    unsafe impl fidl::encoding::TypeMarker for LayerStackArgs {
7020        type Owned = Self;
7021
7022        #[inline(always)]
7023        fn inline_align(_context: fidl::encoding::Context) -> usize {
7024            4
7025        }
7026
7027        #[inline(always)]
7028        fn inline_size(_context: fidl::encoding::Context) -> usize {
7029            4
7030        }
7031        #[inline(always)]
7032        fn encode_is_copy() -> bool {
7033            true
7034        }
7035
7036        #[inline(always)]
7037        fn decode_is_copy() -> bool {
7038            true
7039        }
7040    }
7041
7042    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LayerStackArgs, D>
7043        for &LayerStackArgs
7044    {
7045        #[inline]
7046        unsafe fn encode(
7047            self,
7048            encoder: &mut fidl::encoding::Encoder<'_, D>,
7049            offset: usize,
7050            _depth: fidl::encoding::Depth,
7051        ) -> fidl::Result<()> {
7052            encoder.debug_check_bounds::<LayerStackArgs>(offset);
7053            unsafe {
7054                // Copy the object into the buffer.
7055                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7056                (buf_ptr as *mut LayerStackArgs)
7057                    .write_unaligned((self as *const LayerStackArgs).read());
7058                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7059                // done second because the memcpy will write garbage to these bytes.
7060            }
7061            Ok(())
7062        }
7063    }
7064    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
7065        fidl::encoding::Encode<LayerStackArgs, D> for (T0,)
7066    {
7067        #[inline]
7068        unsafe fn encode(
7069            self,
7070            encoder: &mut fidl::encoding::Encoder<'_, D>,
7071            offset: usize,
7072            depth: fidl::encoding::Depth,
7073        ) -> fidl::Result<()> {
7074            encoder.debug_check_bounds::<LayerStackArgs>(offset);
7075            // Zero out padding regions. There's no need to apply masks
7076            // because the unmasked parts will be overwritten by fields.
7077            // Write the fields.
7078            self.0.encode(encoder, offset + 0, depth)?;
7079            Ok(())
7080        }
7081    }
7082
7083    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LayerStackArgs {
7084        #[inline(always)]
7085        fn new_empty() -> Self {
7086            Self { dummy: fidl::new_empty!(u32, D) }
7087        }
7088
7089        #[inline]
7090        unsafe fn decode(
7091            &mut self,
7092            decoder: &mut fidl::encoding::Decoder<'_, D>,
7093            offset: usize,
7094            _depth: fidl::encoding::Depth,
7095        ) -> fidl::Result<()> {
7096            decoder.debug_check_bounds::<Self>(offset);
7097            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7098            // Verify that padding bytes are zero.
7099            // Copy from the buffer into the object.
7100            unsafe {
7101                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
7102            }
7103            Ok(())
7104        }
7105    }
7106
7107    impl fidl::encoding::ValueTypeMarker for MaterialArgs {
7108        type Borrowed<'a> = &'a Self;
7109        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7110            value
7111        }
7112    }
7113
7114    unsafe impl fidl::encoding::TypeMarker for MaterialArgs {
7115        type Owned = Self;
7116
7117        #[inline(always)]
7118        fn inline_align(_context: fidl::encoding::Context) -> usize {
7119            4
7120        }
7121
7122        #[inline(always)]
7123        fn inline_size(_context: fidl::encoding::Context) -> usize {
7124            4
7125        }
7126        #[inline(always)]
7127        fn encode_is_copy() -> bool {
7128            true
7129        }
7130
7131        #[inline(always)]
7132        fn decode_is_copy() -> bool {
7133            true
7134        }
7135    }
7136
7137    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MaterialArgs, D>
7138        for &MaterialArgs
7139    {
7140        #[inline]
7141        unsafe fn encode(
7142            self,
7143            encoder: &mut fidl::encoding::Encoder<'_, D>,
7144            offset: usize,
7145            _depth: fidl::encoding::Depth,
7146        ) -> fidl::Result<()> {
7147            encoder.debug_check_bounds::<MaterialArgs>(offset);
7148            unsafe {
7149                // Copy the object into the buffer.
7150                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7151                (buf_ptr as *mut MaterialArgs)
7152                    .write_unaligned((self as *const MaterialArgs).read());
7153                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7154                // done second because the memcpy will write garbage to these bytes.
7155            }
7156            Ok(())
7157        }
7158    }
7159    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
7160        fidl::encoding::Encode<MaterialArgs, D> for (T0,)
7161    {
7162        #[inline]
7163        unsafe fn encode(
7164            self,
7165            encoder: &mut fidl::encoding::Encoder<'_, D>,
7166            offset: usize,
7167            depth: fidl::encoding::Depth,
7168        ) -> fidl::Result<()> {
7169            encoder.debug_check_bounds::<MaterialArgs>(offset);
7170            // Zero out padding regions. There's no need to apply masks
7171            // because the unmasked parts will be overwritten by fields.
7172            // Write the fields.
7173            self.0.encode(encoder, offset + 0, depth)?;
7174            Ok(())
7175        }
7176    }
7177
7178    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MaterialArgs {
7179        #[inline(always)]
7180        fn new_empty() -> Self {
7181            Self { dummy: fidl::new_empty!(u32, D) }
7182        }
7183
7184        #[inline]
7185        unsafe fn decode(
7186            &mut self,
7187            decoder: &mut fidl::encoding::Decoder<'_, D>,
7188            offset: usize,
7189            _depth: fidl::encoding::Depth,
7190        ) -> fidl::Result<()> {
7191            decoder.debug_check_bounds::<Self>(offset);
7192            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7193            // Verify that padding bytes are zero.
7194            // Copy from the buffer into the object.
7195            unsafe {
7196                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
7197            }
7198            Ok(())
7199        }
7200    }
7201
7202    impl fidl::encoding::ValueTypeMarker for Matrix4Value {
7203        type Borrowed<'a> = &'a Self;
7204        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7205            value
7206        }
7207    }
7208
7209    unsafe impl fidl::encoding::TypeMarker for Matrix4Value {
7210        type Owned = Self;
7211
7212        #[inline(always)]
7213        fn inline_align(_context: fidl::encoding::Context) -> usize {
7214            4
7215        }
7216
7217        #[inline(always)]
7218        fn inline_size(_context: fidl::encoding::Context) -> usize {
7219            68
7220        }
7221    }
7222
7223    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Matrix4Value, D>
7224        for &Matrix4Value
7225    {
7226        #[inline]
7227        unsafe fn encode(
7228            self,
7229            encoder: &mut fidl::encoding::Encoder<'_, D>,
7230            offset: usize,
7231            _depth: fidl::encoding::Depth,
7232        ) -> fidl::Result<()> {
7233            encoder.debug_check_bounds::<Matrix4Value>(offset);
7234            // Delegate to tuple encoding.
7235            fidl::encoding::Encode::<Matrix4Value, D>::encode(
7236                (
7237                    <Mat4 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
7238                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
7239                ),
7240                encoder,
7241                offset,
7242                _depth,
7243            )
7244        }
7245    }
7246    unsafe impl<
7247            D: fidl::encoding::ResourceDialect,
7248            T0: fidl::encoding::Encode<Mat4, D>,
7249            T1: fidl::encoding::Encode<u32, D>,
7250        > fidl::encoding::Encode<Matrix4Value, D> for (T0, T1)
7251    {
7252        #[inline]
7253        unsafe fn encode(
7254            self,
7255            encoder: &mut fidl::encoding::Encoder<'_, D>,
7256            offset: usize,
7257            depth: fidl::encoding::Depth,
7258        ) -> fidl::Result<()> {
7259            encoder.debug_check_bounds::<Matrix4Value>(offset);
7260            // Zero out padding regions. There's no need to apply masks
7261            // because the unmasked parts will be overwritten by fields.
7262            // Write the fields.
7263            self.0.encode(encoder, offset + 0, depth)?;
7264            self.1.encode(encoder, offset + 64, depth)?;
7265            Ok(())
7266        }
7267    }
7268
7269    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Matrix4Value {
7270        #[inline(always)]
7271        fn new_empty() -> Self {
7272            Self { value: fidl::new_empty!(Mat4, D), variable_id: fidl::new_empty!(u32, D) }
7273        }
7274
7275        #[inline]
7276        unsafe fn decode(
7277            &mut self,
7278            decoder: &mut fidl::encoding::Decoder<'_, D>,
7279            offset: usize,
7280            _depth: fidl::encoding::Depth,
7281        ) -> fidl::Result<()> {
7282            decoder.debug_check_bounds::<Self>(offset);
7283            // Verify that padding bytes are zero.
7284            fidl::decode!(Mat4, D, &mut self.value, decoder, offset + 0, _depth)?;
7285            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 64, _depth)?;
7286            Ok(())
7287        }
7288    }
7289
7290    impl fidl::encoding::ResourceTypeMarker for MemoryArgs {
7291        type Borrowed<'a> = &'a mut Self;
7292        fn take_or_borrow<'a>(
7293            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7294        ) -> Self::Borrowed<'a> {
7295            value
7296        }
7297    }
7298
7299    unsafe impl fidl::encoding::TypeMarker for MemoryArgs {
7300        type Owned = Self;
7301
7302        #[inline(always)]
7303        fn inline_align(_context: fidl::encoding::Context) -> usize {
7304            8
7305        }
7306
7307        #[inline(always)]
7308        fn inline_size(_context: fidl::encoding::Context) -> usize {
7309            24
7310        }
7311    }
7312
7313    unsafe impl fidl::encoding::Encode<MemoryArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
7314        for &mut MemoryArgs
7315    {
7316        #[inline]
7317        unsafe fn encode(
7318            self,
7319            encoder: &mut fidl::encoding::Encoder<
7320                '_,
7321                fidl::encoding::DefaultFuchsiaResourceDialect,
7322            >,
7323            offset: usize,
7324            _depth: fidl::encoding::Depth,
7325        ) -> fidl::Result<()> {
7326            encoder.debug_check_bounds::<MemoryArgs>(offset);
7327            // Delegate to tuple encoding.
7328            fidl::encoding::Encode::<MemoryArgs, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7329                (
7330                    <fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.vmo),
7331                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.allocation_size),
7332                    <fidl_fuchsia_images::MemoryType as fidl::encoding::ValueTypeMarker>::borrow(&self.memory_type),
7333                ),
7334                encoder, offset, _depth
7335            )
7336        }
7337    }
7338    unsafe impl<
7339            T0: fidl::encoding::Encode<
7340                fidl::encoding::HandleType<
7341                    fidl::Vmo,
7342                    { fidl::ObjectType::VMO.into_raw() },
7343                    2147483648,
7344                >,
7345                fidl::encoding::DefaultFuchsiaResourceDialect,
7346            >,
7347            T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
7348            T2: fidl::encoding::Encode<
7349                fidl_fuchsia_images::MemoryType,
7350                fidl::encoding::DefaultFuchsiaResourceDialect,
7351            >,
7352        > fidl::encoding::Encode<MemoryArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
7353        for (T0, T1, T2)
7354    {
7355        #[inline]
7356        unsafe fn encode(
7357            self,
7358            encoder: &mut fidl::encoding::Encoder<
7359                '_,
7360                fidl::encoding::DefaultFuchsiaResourceDialect,
7361            >,
7362            offset: usize,
7363            depth: fidl::encoding::Depth,
7364        ) -> fidl::Result<()> {
7365            encoder.debug_check_bounds::<MemoryArgs>(offset);
7366            // Zero out padding regions. There's no need to apply masks
7367            // because the unmasked parts will be overwritten by fields.
7368            unsafe {
7369                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7370                (ptr as *mut u64).write_unaligned(0);
7371            }
7372            unsafe {
7373                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7374                (ptr as *mut u64).write_unaligned(0);
7375            }
7376            // Write the fields.
7377            self.0.encode(encoder, offset + 0, depth)?;
7378            self.1.encode(encoder, offset + 8, depth)?;
7379            self.2.encode(encoder, offset + 16, depth)?;
7380            Ok(())
7381        }
7382    }
7383
7384    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for MemoryArgs {
7385        #[inline(always)]
7386        fn new_empty() -> Self {
7387            Self {
7388                vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7389                allocation_size: fidl::new_empty!(
7390                    u64,
7391                    fidl::encoding::DefaultFuchsiaResourceDialect
7392                ),
7393                memory_type: fidl::new_empty!(
7394                    fidl_fuchsia_images::MemoryType,
7395                    fidl::encoding::DefaultFuchsiaResourceDialect
7396                ),
7397            }
7398        }
7399
7400        #[inline]
7401        unsafe fn decode(
7402            &mut self,
7403            decoder: &mut fidl::encoding::Decoder<
7404                '_,
7405                fidl::encoding::DefaultFuchsiaResourceDialect,
7406            >,
7407            offset: usize,
7408            _depth: fidl::encoding::Depth,
7409        ) -> fidl::Result<()> {
7410            decoder.debug_check_bounds::<Self>(offset);
7411            // Verify that padding bytes are zero.
7412            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7413            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7414            let mask = 0xffffffff00000000u64;
7415            let maskedval = padval & mask;
7416            if maskedval != 0 {
7417                return Err(fidl::Error::NonZeroPadding {
7418                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7419                });
7420            }
7421            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7422            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7423            let mask = 0xffffffff00000000u64;
7424            let maskedval = padval & mask;
7425            if maskedval != 0 {
7426                return Err(fidl::Error::NonZeroPadding {
7427                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7428                });
7429            }
7430            fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
7431            fidl::decode!(
7432                u64,
7433                fidl::encoding::DefaultFuchsiaResourceDialect,
7434                &mut self.allocation_size,
7435                decoder,
7436                offset + 8,
7437                _depth
7438            )?;
7439            fidl::decode!(
7440                fidl_fuchsia_images::MemoryType,
7441                fidl::encoding::DefaultFuchsiaResourceDialect,
7442                &mut self.memory_type,
7443                decoder,
7444                offset + 16,
7445                _depth
7446            )?;
7447            Ok(())
7448        }
7449    }
7450
7451    impl fidl::encoding::ValueTypeMarker for MeshArgs {
7452        type Borrowed<'a> = &'a Self;
7453        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7454            value
7455        }
7456    }
7457
7458    unsafe impl fidl::encoding::TypeMarker for MeshArgs {
7459        type Owned = Self;
7460
7461        #[inline(always)]
7462        fn inline_align(_context: fidl::encoding::Context) -> usize {
7463            1
7464        }
7465
7466        #[inline(always)]
7467        fn inline_size(_context: fidl::encoding::Context) -> usize {
7468            1
7469        }
7470    }
7471
7472    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MeshArgs, D> for &MeshArgs {
7473        #[inline]
7474        unsafe fn encode(
7475            self,
7476            encoder: &mut fidl::encoding::Encoder<'_, D>,
7477            offset: usize,
7478            _depth: fidl::encoding::Depth,
7479        ) -> fidl::Result<()> {
7480            encoder.debug_check_bounds::<MeshArgs>(offset);
7481            encoder.write_num(0u8, offset);
7482            Ok(())
7483        }
7484    }
7485
7486    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MeshArgs {
7487        #[inline(always)]
7488        fn new_empty() -> Self {
7489            Self
7490        }
7491
7492        #[inline]
7493        unsafe fn decode(
7494            &mut self,
7495            decoder: &mut fidl::encoding::Decoder<'_, D>,
7496            offset: usize,
7497            _depth: fidl::encoding::Depth,
7498        ) -> fidl::Result<()> {
7499            decoder.debug_check_bounds::<Self>(offset);
7500            match decoder.read_num::<u8>(offset) {
7501                0 => Ok(()),
7502                _ => Err(fidl::Error::Invalid),
7503            }
7504        }
7505    }
7506
7507    impl fidl::encoding::ValueTypeMarker for MeshVertexFormat {
7508        type Borrowed<'a> = &'a Self;
7509        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7510            value
7511        }
7512    }
7513
7514    unsafe impl fidl::encoding::TypeMarker for MeshVertexFormat {
7515        type Owned = Self;
7516
7517        #[inline(always)]
7518        fn inline_align(_context: fidl::encoding::Context) -> usize {
7519            4
7520        }
7521
7522        #[inline(always)]
7523        fn inline_size(_context: fidl::encoding::Context) -> usize {
7524            12
7525        }
7526    }
7527
7528    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MeshVertexFormat, D>
7529        for &MeshVertexFormat
7530    {
7531        #[inline]
7532        unsafe fn encode(
7533            self,
7534            encoder: &mut fidl::encoding::Encoder<'_, D>,
7535            offset: usize,
7536            _depth: fidl::encoding::Depth,
7537        ) -> fidl::Result<()> {
7538            encoder.debug_check_bounds::<MeshVertexFormat>(offset);
7539            // Delegate to tuple encoding.
7540            fidl::encoding::Encode::<MeshVertexFormat, D>::encode(
7541                (
7542                    <ValueType as fidl::encoding::ValueTypeMarker>::borrow(&self.position_type),
7543                    <ValueType as fidl::encoding::ValueTypeMarker>::borrow(&self.normal_type),
7544                    <ValueType as fidl::encoding::ValueTypeMarker>::borrow(&self.tex_coord_type),
7545                ),
7546                encoder,
7547                offset,
7548                _depth,
7549            )
7550        }
7551    }
7552    unsafe impl<
7553            D: fidl::encoding::ResourceDialect,
7554            T0: fidl::encoding::Encode<ValueType, D>,
7555            T1: fidl::encoding::Encode<ValueType, D>,
7556            T2: fidl::encoding::Encode<ValueType, D>,
7557        > fidl::encoding::Encode<MeshVertexFormat, D> for (T0, T1, T2)
7558    {
7559        #[inline]
7560        unsafe fn encode(
7561            self,
7562            encoder: &mut fidl::encoding::Encoder<'_, D>,
7563            offset: usize,
7564            depth: fidl::encoding::Depth,
7565        ) -> fidl::Result<()> {
7566            encoder.debug_check_bounds::<MeshVertexFormat>(offset);
7567            // Zero out padding regions. There's no need to apply masks
7568            // because the unmasked parts will be overwritten by fields.
7569            // Write the fields.
7570            self.0.encode(encoder, offset + 0, depth)?;
7571            self.1.encode(encoder, offset + 4, depth)?;
7572            self.2.encode(encoder, offset + 8, depth)?;
7573            Ok(())
7574        }
7575    }
7576
7577    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MeshVertexFormat {
7578        #[inline(always)]
7579        fn new_empty() -> Self {
7580            Self {
7581                position_type: fidl::new_empty!(ValueType, D),
7582                normal_type: fidl::new_empty!(ValueType, D),
7583                tex_coord_type: fidl::new_empty!(ValueType, D),
7584            }
7585        }
7586
7587        #[inline]
7588        unsafe fn decode(
7589            &mut self,
7590            decoder: &mut fidl::encoding::Decoder<'_, D>,
7591            offset: usize,
7592            _depth: fidl::encoding::Depth,
7593        ) -> fidl::Result<()> {
7594            decoder.debug_check_bounds::<Self>(offset);
7595            // Verify that padding bytes are zero.
7596            fidl::decode!(ValueType, D, &mut self.position_type, decoder, offset + 0, _depth)?;
7597            fidl::decode!(ValueType, D, &mut self.normal_type, decoder, offset + 4, _depth)?;
7598            fidl::decode!(ValueType, D, &mut self.tex_coord_type, decoder, offset + 8, _depth)?;
7599            Ok(())
7600        }
7601    }
7602
7603    impl fidl::encoding::ValueTypeMarker for Metrics {
7604        type Borrowed<'a> = &'a Self;
7605        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7606            value
7607        }
7608    }
7609
7610    unsafe impl fidl::encoding::TypeMarker for Metrics {
7611        type Owned = Self;
7612
7613        #[inline(always)]
7614        fn inline_align(_context: fidl::encoding::Context) -> usize {
7615            4
7616        }
7617
7618        #[inline(always)]
7619        fn inline_size(_context: fidl::encoding::Context) -> usize {
7620            12
7621        }
7622    }
7623
7624    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Metrics, D> for &Metrics {
7625        #[inline]
7626        unsafe fn encode(
7627            self,
7628            encoder: &mut fidl::encoding::Encoder<'_, D>,
7629            offset: usize,
7630            _depth: fidl::encoding::Depth,
7631        ) -> fidl::Result<()> {
7632            encoder.debug_check_bounds::<Metrics>(offset);
7633            // Delegate to tuple encoding.
7634            fidl::encoding::Encode::<Metrics, D>::encode(
7635                (
7636                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.scale_x),
7637                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.scale_y),
7638                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.scale_z),
7639                ),
7640                encoder,
7641                offset,
7642                _depth,
7643            )
7644        }
7645    }
7646    unsafe impl<
7647            D: fidl::encoding::ResourceDialect,
7648            T0: fidl::encoding::Encode<f32, D>,
7649            T1: fidl::encoding::Encode<f32, D>,
7650            T2: fidl::encoding::Encode<f32, D>,
7651        > fidl::encoding::Encode<Metrics, D> for (T0, T1, T2)
7652    {
7653        #[inline]
7654        unsafe fn encode(
7655            self,
7656            encoder: &mut fidl::encoding::Encoder<'_, D>,
7657            offset: usize,
7658            depth: fidl::encoding::Depth,
7659        ) -> fidl::Result<()> {
7660            encoder.debug_check_bounds::<Metrics>(offset);
7661            // Zero out padding regions. There's no need to apply masks
7662            // because the unmasked parts will be overwritten by fields.
7663            // Write the fields.
7664            self.0.encode(encoder, offset + 0, depth)?;
7665            self.1.encode(encoder, offset + 4, depth)?;
7666            self.2.encode(encoder, offset + 8, depth)?;
7667            Ok(())
7668        }
7669    }
7670
7671    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Metrics {
7672        #[inline(always)]
7673        fn new_empty() -> Self {
7674            Self {
7675                scale_x: fidl::new_empty!(f32, D),
7676                scale_y: fidl::new_empty!(f32, D),
7677                scale_z: fidl::new_empty!(f32, D),
7678            }
7679        }
7680
7681        #[inline]
7682        unsafe fn decode(
7683            &mut self,
7684            decoder: &mut fidl::encoding::Decoder<'_, D>,
7685            offset: usize,
7686            _depth: fidl::encoding::Depth,
7687        ) -> fidl::Result<()> {
7688            decoder.debug_check_bounds::<Self>(offset);
7689            // Verify that padding bytes are zero.
7690            fidl::decode!(f32, D, &mut self.scale_x, decoder, offset + 0, _depth)?;
7691            fidl::decode!(f32, D, &mut self.scale_y, decoder, offset + 4, _depth)?;
7692            fidl::decode!(f32, D, &mut self.scale_z, decoder, offset + 8, _depth)?;
7693            Ok(())
7694        }
7695    }
7696
7697    impl fidl::encoding::ValueTypeMarker for MetricsEvent {
7698        type Borrowed<'a> = &'a Self;
7699        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7700            value
7701        }
7702    }
7703
7704    unsafe impl fidl::encoding::TypeMarker for MetricsEvent {
7705        type Owned = Self;
7706
7707        #[inline(always)]
7708        fn inline_align(_context: fidl::encoding::Context) -> usize {
7709            4
7710        }
7711
7712        #[inline(always)]
7713        fn inline_size(_context: fidl::encoding::Context) -> usize {
7714            16
7715        }
7716    }
7717
7718    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MetricsEvent, D>
7719        for &MetricsEvent
7720    {
7721        #[inline]
7722        unsafe fn encode(
7723            self,
7724            encoder: &mut fidl::encoding::Encoder<'_, D>,
7725            offset: usize,
7726            _depth: fidl::encoding::Depth,
7727        ) -> fidl::Result<()> {
7728            encoder.debug_check_bounds::<MetricsEvent>(offset);
7729            // Delegate to tuple encoding.
7730            fidl::encoding::Encode::<MetricsEvent, D>::encode(
7731                (
7732                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
7733                    <Metrics as fidl::encoding::ValueTypeMarker>::borrow(&self.metrics),
7734                ),
7735                encoder,
7736                offset,
7737                _depth,
7738            )
7739        }
7740    }
7741    unsafe impl<
7742            D: fidl::encoding::ResourceDialect,
7743            T0: fidl::encoding::Encode<u32, D>,
7744            T1: fidl::encoding::Encode<Metrics, D>,
7745        > fidl::encoding::Encode<MetricsEvent, D> for (T0, T1)
7746    {
7747        #[inline]
7748        unsafe fn encode(
7749            self,
7750            encoder: &mut fidl::encoding::Encoder<'_, D>,
7751            offset: usize,
7752            depth: fidl::encoding::Depth,
7753        ) -> fidl::Result<()> {
7754            encoder.debug_check_bounds::<MetricsEvent>(offset);
7755            // Zero out padding regions. There's no need to apply masks
7756            // because the unmasked parts will be overwritten by fields.
7757            // Write the fields.
7758            self.0.encode(encoder, offset + 0, depth)?;
7759            self.1.encode(encoder, offset + 4, depth)?;
7760            Ok(())
7761        }
7762    }
7763
7764    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MetricsEvent {
7765        #[inline(always)]
7766        fn new_empty() -> Self {
7767            Self { node_id: fidl::new_empty!(u32, D), metrics: fidl::new_empty!(Metrics, D) }
7768        }
7769
7770        #[inline]
7771        unsafe fn decode(
7772            &mut self,
7773            decoder: &mut fidl::encoding::Decoder<'_, D>,
7774            offset: usize,
7775            _depth: fidl::encoding::Depth,
7776        ) -> fidl::Result<()> {
7777            decoder.debug_check_bounds::<Self>(offset);
7778            // Verify that padding bytes are zero.
7779            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
7780            fidl::decode!(Metrics, D, &mut self.metrics, decoder, offset + 4, _depth)?;
7781            Ok(())
7782        }
7783    }
7784
7785    impl fidl::encoding::ValueTypeMarker for OpacityNodeArgsHack {
7786        type Borrowed<'a> = &'a Self;
7787        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7788            value
7789        }
7790    }
7791
7792    unsafe impl fidl::encoding::TypeMarker for OpacityNodeArgsHack {
7793        type Owned = Self;
7794
7795        #[inline(always)]
7796        fn inline_align(_context: fidl::encoding::Context) -> usize {
7797            4
7798        }
7799
7800        #[inline(always)]
7801        fn inline_size(_context: fidl::encoding::Context) -> usize {
7802            4
7803        }
7804        #[inline(always)]
7805        fn encode_is_copy() -> bool {
7806            true
7807        }
7808
7809        #[inline(always)]
7810        fn decode_is_copy() -> bool {
7811            true
7812        }
7813    }
7814
7815    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OpacityNodeArgsHack, D>
7816        for &OpacityNodeArgsHack
7817    {
7818        #[inline]
7819        unsafe fn encode(
7820            self,
7821            encoder: &mut fidl::encoding::Encoder<'_, D>,
7822            offset: usize,
7823            _depth: fidl::encoding::Depth,
7824        ) -> fidl::Result<()> {
7825            encoder.debug_check_bounds::<OpacityNodeArgsHack>(offset);
7826            unsafe {
7827                // Copy the object into the buffer.
7828                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7829                (buf_ptr as *mut OpacityNodeArgsHack)
7830                    .write_unaligned((self as *const OpacityNodeArgsHack).read());
7831                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7832                // done second because the memcpy will write garbage to these bytes.
7833            }
7834            Ok(())
7835        }
7836    }
7837    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
7838        fidl::encoding::Encode<OpacityNodeArgsHack, D> for (T0,)
7839    {
7840        #[inline]
7841        unsafe fn encode(
7842            self,
7843            encoder: &mut fidl::encoding::Encoder<'_, D>,
7844            offset: usize,
7845            depth: fidl::encoding::Depth,
7846        ) -> fidl::Result<()> {
7847            encoder.debug_check_bounds::<OpacityNodeArgsHack>(offset);
7848            // Zero out padding regions. There's no need to apply masks
7849            // because the unmasked parts will be overwritten by fields.
7850            // Write the fields.
7851            self.0.encode(encoder, offset + 0, depth)?;
7852            Ok(())
7853        }
7854    }
7855
7856    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OpacityNodeArgsHack {
7857        #[inline(always)]
7858        fn new_empty() -> Self {
7859            Self { unused: fidl::new_empty!(u32, D) }
7860        }
7861
7862        #[inline]
7863        unsafe fn decode(
7864            &mut self,
7865            decoder: &mut fidl::encoding::Decoder<'_, D>,
7866            offset: usize,
7867            _depth: fidl::encoding::Depth,
7868        ) -> fidl::Result<()> {
7869            decoder.debug_check_bounds::<Self>(offset);
7870            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7871            // Verify that padding bytes are zero.
7872            // Copy from the buffer into the object.
7873            unsafe {
7874                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
7875            }
7876            Ok(())
7877        }
7878    }
7879
7880    impl fidl::encoding::ValueTypeMarker for Plane3 {
7881        type Borrowed<'a> = &'a Self;
7882        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7883            value
7884        }
7885    }
7886
7887    unsafe impl fidl::encoding::TypeMarker for Plane3 {
7888        type Owned = Self;
7889
7890        #[inline(always)]
7891        fn inline_align(_context: fidl::encoding::Context) -> usize {
7892            4
7893        }
7894
7895        #[inline(always)]
7896        fn inline_size(_context: fidl::encoding::Context) -> usize {
7897            16
7898        }
7899    }
7900
7901    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Plane3, D> for &Plane3 {
7902        #[inline]
7903        unsafe fn encode(
7904            self,
7905            encoder: &mut fidl::encoding::Encoder<'_, D>,
7906            offset: usize,
7907            _depth: fidl::encoding::Depth,
7908        ) -> fidl::Result<()> {
7909            encoder.debug_check_bounds::<Plane3>(offset);
7910            // Delegate to tuple encoding.
7911            fidl::encoding::Encode::<Plane3, D>::encode(
7912                (
7913                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.dir),
7914                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.dist),
7915                ),
7916                encoder,
7917                offset,
7918                _depth,
7919            )
7920        }
7921    }
7922    unsafe impl<
7923            D: fidl::encoding::ResourceDialect,
7924            T0: fidl::encoding::Encode<Vec3, D>,
7925            T1: fidl::encoding::Encode<f32, D>,
7926        > fidl::encoding::Encode<Plane3, D> for (T0, T1)
7927    {
7928        #[inline]
7929        unsafe fn encode(
7930            self,
7931            encoder: &mut fidl::encoding::Encoder<'_, D>,
7932            offset: usize,
7933            depth: fidl::encoding::Depth,
7934        ) -> fidl::Result<()> {
7935            encoder.debug_check_bounds::<Plane3>(offset);
7936            // Zero out padding regions. There's no need to apply masks
7937            // because the unmasked parts will be overwritten by fields.
7938            // Write the fields.
7939            self.0.encode(encoder, offset + 0, depth)?;
7940            self.1.encode(encoder, offset + 12, depth)?;
7941            Ok(())
7942        }
7943    }
7944
7945    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Plane3 {
7946        #[inline(always)]
7947        fn new_empty() -> Self {
7948            Self { dir: fidl::new_empty!(Vec3, D), dist: fidl::new_empty!(f32, D) }
7949        }
7950
7951        #[inline]
7952        unsafe fn decode(
7953            &mut self,
7954            decoder: &mut fidl::encoding::Decoder<'_, D>,
7955            offset: usize,
7956            _depth: fidl::encoding::Depth,
7957        ) -> fidl::Result<()> {
7958            decoder.debug_check_bounds::<Self>(offset);
7959            // Verify that padding bytes are zero.
7960            fidl::decode!(Vec3, D, &mut self.dir, decoder, offset + 0, _depth)?;
7961            fidl::decode!(f32, D, &mut self.dist, decoder, offset + 12, _depth)?;
7962            Ok(())
7963        }
7964    }
7965
7966    impl fidl::encoding::ValueTypeMarker for PointLightArgs {
7967        type Borrowed<'a> = &'a Self;
7968        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7969            value
7970        }
7971    }
7972
7973    unsafe impl fidl::encoding::TypeMarker for PointLightArgs {
7974        type Owned = Self;
7975
7976        #[inline(always)]
7977        fn inline_align(_context: fidl::encoding::Context) -> usize {
7978            4
7979        }
7980
7981        #[inline(always)]
7982        fn inline_size(_context: fidl::encoding::Context) -> usize {
7983            4
7984        }
7985        #[inline(always)]
7986        fn encode_is_copy() -> bool {
7987            true
7988        }
7989
7990        #[inline(always)]
7991        fn decode_is_copy() -> bool {
7992            true
7993        }
7994    }
7995
7996    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PointLightArgs, D>
7997        for &PointLightArgs
7998    {
7999        #[inline]
8000        unsafe fn encode(
8001            self,
8002            encoder: &mut fidl::encoding::Encoder<'_, D>,
8003            offset: usize,
8004            _depth: fidl::encoding::Depth,
8005        ) -> fidl::Result<()> {
8006            encoder.debug_check_bounds::<PointLightArgs>(offset);
8007            unsafe {
8008                // Copy the object into the buffer.
8009                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8010                (buf_ptr as *mut PointLightArgs)
8011                    .write_unaligned((self as *const PointLightArgs).read());
8012                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8013                // done second because the memcpy will write garbage to these bytes.
8014            }
8015            Ok(())
8016        }
8017    }
8018    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
8019        fidl::encoding::Encode<PointLightArgs, D> for (T0,)
8020    {
8021        #[inline]
8022        unsafe fn encode(
8023            self,
8024            encoder: &mut fidl::encoding::Encoder<'_, D>,
8025            offset: usize,
8026            depth: fidl::encoding::Depth,
8027        ) -> fidl::Result<()> {
8028            encoder.debug_check_bounds::<PointLightArgs>(offset);
8029            // Zero out padding regions. There's no need to apply masks
8030            // because the unmasked parts will be overwritten by fields.
8031            // Write the fields.
8032            self.0.encode(encoder, offset + 0, depth)?;
8033            Ok(())
8034        }
8035    }
8036
8037    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PointLightArgs {
8038        #[inline(always)]
8039        fn new_empty() -> Self {
8040            Self { dummy: fidl::new_empty!(u32, D) }
8041        }
8042
8043        #[inline]
8044        unsafe fn decode(
8045            &mut self,
8046            decoder: &mut fidl::encoding::Decoder<'_, D>,
8047            offset: usize,
8048            _depth: fidl::encoding::Depth,
8049        ) -> fidl::Result<()> {
8050            decoder.debug_check_bounds::<Self>(offset);
8051            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8052            // Verify that padding bytes are zero.
8053            // Copy from the buffer into the object.
8054            unsafe {
8055                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
8056            }
8057            Ok(())
8058        }
8059    }
8060
8061    impl fidl::encoding::ValueTypeMarker for Quaternion {
8062        type Borrowed<'a> = &'a Self;
8063        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8064            value
8065        }
8066    }
8067
8068    unsafe impl fidl::encoding::TypeMarker for Quaternion {
8069        type Owned = Self;
8070
8071        #[inline(always)]
8072        fn inline_align(_context: fidl::encoding::Context) -> usize {
8073            4
8074        }
8075
8076        #[inline(always)]
8077        fn inline_size(_context: fidl::encoding::Context) -> usize {
8078            16
8079        }
8080    }
8081
8082    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Quaternion, D>
8083        for &Quaternion
8084    {
8085        #[inline]
8086        unsafe fn encode(
8087            self,
8088            encoder: &mut fidl::encoding::Encoder<'_, D>,
8089            offset: usize,
8090            _depth: fidl::encoding::Depth,
8091        ) -> fidl::Result<()> {
8092            encoder.debug_check_bounds::<Quaternion>(offset);
8093            // Delegate to tuple encoding.
8094            fidl::encoding::Encode::<Quaternion, D>::encode(
8095                (
8096                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
8097                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
8098                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.z),
8099                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.w),
8100                ),
8101                encoder,
8102                offset,
8103                _depth,
8104            )
8105        }
8106    }
8107    unsafe impl<
8108            D: fidl::encoding::ResourceDialect,
8109            T0: fidl::encoding::Encode<f32, D>,
8110            T1: fidl::encoding::Encode<f32, D>,
8111            T2: fidl::encoding::Encode<f32, D>,
8112            T3: fidl::encoding::Encode<f32, D>,
8113        > fidl::encoding::Encode<Quaternion, D> for (T0, T1, T2, T3)
8114    {
8115        #[inline]
8116        unsafe fn encode(
8117            self,
8118            encoder: &mut fidl::encoding::Encoder<'_, D>,
8119            offset: usize,
8120            depth: fidl::encoding::Depth,
8121        ) -> fidl::Result<()> {
8122            encoder.debug_check_bounds::<Quaternion>(offset);
8123            // Zero out padding regions. There's no need to apply masks
8124            // because the unmasked parts will be overwritten by fields.
8125            // Write the fields.
8126            self.0.encode(encoder, offset + 0, depth)?;
8127            self.1.encode(encoder, offset + 4, depth)?;
8128            self.2.encode(encoder, offset + 8, depth)?;
8129            self.3.encode(encoder, offset + 12, depth)?;
8130            Ok(())
8131        }
8132    }
8133
8134    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Quaternion {
8135        #[inline(always)]
8136        fn new_empty() -> Self {
8137            Self {
8138                x: fidl::new_empty!(f32, D),
8139                y: fidl::new_empty!(f32, D),
8140                z: fidl::new_empty!(f32, D),
8141                w: fidl::new_empty!(f32, D),
8142            }
8143        }
8144
8145        #[inline]
8146        unsafe fn decode(
8147            &mut self,
8148            decoder: &mut fidl::encoding::Decoder<'_, D>,
8149            offset: usize,
8150            _depth: fidl::encoding::Depth,
8151        ) -> fidl::Result<()> {
8152            decoder.debug_check_bounds::<Self>(offset);
8153            // Verify that padding bytes are zero.
8154            fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
8155            fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
8156            fidl::decode!(f32, D, &mut self.z, decoder, offset + 8, _depth)?;
8157            fidl::decode!(f32, D, &mut self.w, decoder, offset + 12, _depth)?;
8158            Ok(())
8159        }
8160    }
8161
8162    impl fidl::encoding::ValueTypeMarker for QuaternionValue {
8163        type Borrowed<'a> = &'a Self;
8164        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8165            value
8166        }
8167    }
8168
8169    unsafe impl fidl::encoding::TypeMarker for QuaternionValue {
8170        type Owned = Self;
8171
8172        #[inline(always)]
8173        fn inline_align(_context: fidl::encoding::Context) -> usize {
8174            4
8175        }
8176
8177        #[inline(always)]
8178        fn inline_size(_context: fidl::encoding::Context) -> usize {
8179            20
8180        }
8181    }
8182
8183    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<QuaternionValue, D>
8184        for &QuaternionValue
8185    {
8186        #[inline]
8187        unsafe fn encode(
8188            self,
8189            encoder: &mut fidl::encoding::Encoder<'_, D>,
8190            offset: usize,
8191            _depth: fidl::encoding::Depth,
8192        ) -> fidl::Result<()> {
8193            encoder.debug_check_bounds::<QuaternionValue>(offset);
8194            // Delegate to tuple encoding.
8195            fidl::encoding::Encode::<QuaternionValue, D>::encode(
8196                (
8197                    <Quaternion as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
8198                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
8199                ),
8200                encoder,
8201                offset,
8202                _depth,
8203            )
8204        }
8205    }
8206    unsafe impl<
8207            D: fidl::encoding::ResourceDialect,
8208            T0: fidl::encoding::Encode<Quaternion, D>,
8209            T1: fidl::encoding::Encode<u32, D>,
8210        > fidl::encoding::Encode<QuaternionValue, D> for (T0, T1)
8211    {
8212        #[inline]
8213        unsafe fn encode(
8214            self,
8215            encoder: &mut fidl::encoding::Encoder<'_, D>,
8216            offset: usize,
8217            depth: fidl::encoding::Depth,
8218        ) -> fidl::Result<()> {
8219            encoder.debug_check_bounds::<QuaternionValue>(offset);
8220            // Zero out padding regions. There's no need to apply masks
8221            // because the unmasked parts will be overwritten by fields.
8222            // Write the fields.
8223            self.0.encode(encoder, offset + 0, depth)?;
8224            self.1.encode(encoder, offset + 16, depth)?;
8225            Ok(())
8226        }
8227    }
8228
8229    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for QuaternionValue {
8230        #[inline(always)]
8231        fn new_empty() -> Self {
8232            Self { value: fidl::new_empty!(Quaternion, D), variable_id: fidl::new_empty!(u32, D) }
8233        }
8234
8235        #[inline]
8236        unsafe fn decode(
8237            &mut self,
8238            decoder: &mut fidl::encoding::Decoder<'_, D>,
8239            offset: usize,
8240            _depth: fidl::encoding::Depth,
8241        ) -> fidl::Result<()> {
8242            decoder.debug_check_bounds::<Self>(offset);
8243            // Verify that padding bytes are zero.
8244            fidl::decode!(Quaternion, D, &mut self.value, decoder, offset + 0, _depth)?;
8245            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 16, _depth)?;
8246            Ok(())
8247        }
8248    }
8249
8250    impl fidl::encoding::ValueTypeMarker for RectangleArgs {
8251        type Borrowed<'a> = &'a Self;
8252        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8253            value
8254        }
8255    }
8256
8257    unsafe impl fidl::encoding::TypeMarker for RectangleArgs {
8258        type Owned = Self;
8259
8260        #[inline(always)]
8261        fn inline_align(_context: fidl::encoding::Context) -> usize {
8262            8
8263        }
8264
8265        #[inline(always)]
8266        fn inline_size(_context: fidl::encoding::Context) -> usize {
8267            32
8268        }
8269    }
8270
8271    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RectangleArgs, D>
8272        for &RectangleArgs
8273    {
8274        #[inline]
8275        unsafe fn encode(
8276            self,
8277            encoder: &mut fidl::encoding::Encoder<'_, D>,
8278            offset: usize,
8279            _depth: fidl::encoding::Depth,
8280        ) -> fidl::Result<()> {
8281            encoder.debug_check_bounds::<RectangleArgs>(offset);
8282            // Delegate to tuple encoding.
8283            fidl::encoding::Encode::<RectangleArgs, D>::encode(
8284                (
8285                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.width),
8286                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.height),
8287                ),
8288                encoder,
8289                offset,
8290                _depth,
8291            )
8292        }
8293    }
8294    unsafe impl<
8295            D: fidl::encoding::ResourceDialect,
8296            T0: fidl::encoding::Encode<Value, D>,
8297            T1: fidl::encoding::Encode<Value, D>,
8298        > fidl::encoding::Encode<RectangleArgs, D> for (T0, T1)
8299    {
8300        #[inline]
8301        unsafe fn encode(
8302            self,
8303            encoder: &mut fidl::encoding::Encoder<'_, D>,
8304            offset: usize,
8305            depth: fidl::encoding::Depth,
8306        ) -> fidl::Result<()> {
8307            encoder.debug_check_bounds::<RectangleArgs>(offset);
8308            // Zero out padding regions. There's no need to apply masks
8309            // because the unmasked parts will be overwritten by fields.
8310            // Write the fields.
8311            self.0.encode(encoder, offset + 0, depth)?;
8312            self.1.encode(encoder, offset + 16, depth)?;
8313            Ok(())
8314        }
8315    }
8316
8317    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RectangleArgs {
8318        #[inline(always)]
8319        fn new_empty() -> Self {
8320            Self { width: fidl::new_empty!(Value, D), height: fidl::new_empty!(Value, D) }
8321        }
8322
8323        #[inline]
8324        unsafe fn decode(
8325            &mut self,
8326            decoder: &mut fidl::encoding::Decoder<'_, D>,
8327            offset: usize,
8328            _depth: fidl::encoding::Depth,
8329        ) -> fidl::Result<()> {
8330            decoder.debug_check_bounds::<Self>(offset);
8331            // Verify that padding bytes are zero.
8332            fidl::decode!(Value, D, &mut self.width, decoder, offset + 0, _depth)?;
8333            fidl::decode!(Value, D, &mut self.height, decoder, offset + 16, _depth)?;
8334            Ok(())
8335        }
8336    }
8337
8338    impl fidl::encoding::ValueTypeMarker for ReleaseResourceCmd {
8339        type Borrowed<'a> = &'a Self;
8340        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8341            value
8342        }
8343    }
8344
8345    unsafe impl fidl::encoding::TypeMarker for ReleaseResourceCmd {
8346        type Owned = Self;
8347
8348        #[inline(always)]
8349        fn inline_align(_context: fidl::encoding::Context) -> usize {
8350            4
8351        }
8352
8353        #[inline(always)]
8354        fn inline_size(_context: fidl::encoding::Context) -> usize {
8355            4
8356        }
8357        #[inline(always)]
8358        fn encode_is_copy() -> bool {
8359            true
8360        }
8361
8362        #[inline(always)]
8363        fn decode_is_copy() -> bool {
8364            true
8365        }
8366    }
8367
8368    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReleaseResourceCmd, D>
8369        for &ReleaseResourceCmd
8370    {
8371        #[inline]
8372        unsafe fn encode(
8373            self,
8374            encoder: &mut fidl::encoding::Encoder<'_, D>,
8375            offset: usize,
8376            _depth: fidl::encoding::Depth,
8377        ) -> fidl::Result<()> {
8378            encoder.debug_check_bounds::<ReleaseResourceCmd>(offset);
8379            unsafe {
8380                // Copy the object into the buffer.
8381                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8382                (buf_ptr as *mut ReleaseResourceCmd)
8383                    .write_unaligned((self as *const ReleaseResourceCmd).read());
8384                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8385                // done second because the memcpy will write garbage to these bytes.
8386            }
8387            Ok(())
8388        }
8389    }
8390    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
8391        fidl::encoding::Encode<ReleaseResourceCmd, D> for (T0,)
8392    {
8393        #[inline]
8394        unsafe fn encode(
8395            self,
8396            encoder: &mut fidl::encoding::Encoder<'_, D>,
8397            offset: usize,
8398            depth: fidl::encoding::Depth,
8399        ) -> fidl::Result<()> {
8400            encoder.debug_check_bounds::<ReleaseResourceCmd>(offset);
8401            // Zero out padding regions. There's no need to apply masks
8402            // because the unmasked parts will be overwritten by fields.
8403            // Write the fields.
8404            self.0.encode(encoder, offset + 0, depth)?;
8405            Ok(())
8406        }
8407    }
8408
8409    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReleaseResourceCmd {
8410        #[inline(always)]
8411        fn new_empty() -> Self {
8412            Self { id: fidl::new_empty!(u32, D) }
8413        }
8414
8415        #[inline]
8416        unsafe fn decode(
8417            &mut self,
8418            decoder: &mut fidl::encoding::Decoder<'_, D>,
8419            offset: usize,
8420            _depth: fidl::encoding::Depth,
8421        ) -> fidl::Result<()> {
8422            decoder.debug_check_bounds::<Self>(offset);
8423            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8424            // Verify that padding bytes are zero.
8425            // Copy from the buffer into the object.
8426            unsafe {
8427                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
8428            }
8429            Ok(())
8430        }
8431    }
8432
8433    impl fidl::encoding::ValueTypeMarker for RemoveAllLayersCmd {
8434        type Borrowed<'a> = &'a Self;
8435        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8436            value
8437        }
8438    }
8439
8440    unsafe impl fidl::encoding::TypeMarker for RemoveAllLayersCmd {
8441        type Owned = Self;
8442
8443        #[inline(always)]
8444        fn inline_align(_context: fidl::encoding::Context) -> usize {
8445            4
8446        }
8447
8448        #[inline(always)]
8449        fn inline_size(_context: fidl::encoding::Context) -> usize {
8450            4
8451        }
8452        #[inline(always)]
8453        fn encode_is_copy() -> bool {
8454            true
8455        }
8456
8457        #[inline(always)]
8458        fn decode_is_copy() -> bool {
8459            true
8460        }
8461    }
8462
8463    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RemoveAllLayersCmd, D>
8464        for &RemoveAllLayersCmd
8465    {
8466        #[inline]
8467        unsafe fn encode(
8468            self,
8469            encoder: &mut fidl::encoding::Encoder<'_, D>,
8470            offset: usize,
8471            _depth: fidl::encoding::Depth,
8472        ) -> fidl::Result<()> {
8473            encoder.debug_check_bounds::<RemoveAllLayersCmd>(offset);
8474            unsafe {
8475                // Copy the object into the buffer.
8476                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8477                (buf_ptr as *mut RemoveAllLayersCmd)
8478                    .write_unaligned((self as *const RemoveAllLayersCmd).read());
8479                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8480                // done second because the memcpy will write garbage to these bytes.
8481            }
8482            Ok(())
8483        }
8484    }
8485    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
8486        fidl::encoding::Encode<RemoveAllLayersCmd, D> for (T0,)
8487    {
8488        #[inline]
8489        unsafe fn encode(
8490            self,
8491            encoder: &mut fidl::encoding::Encoder<'_, D>,
8492            offset: usize,
8493            depth: fidl::encoding::Depth,
8494        ) -> fidl::Result<()> {
8495            encoder.debug_check_bounds::<RemoveAllLayersCmd>(offset);
8496            // Zero out padding regions. There's no need to apply masks
8497            // because the unmasked parts will be overwritten by fields.
8498            // Write the fields.
8499            self.0.encode(encoder, offset + 0, depth)?;
8500            Ok(())
8501        }
8502    }
8503
8504    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RemoveAllLayersCmd {
8505        #[inline(always)]
8506        fn new_empty() -> Self {
8507            Self { layer_stack_id: fidl::new_empty!(u32, D) }
8508        }
8509
8510        #[inline]
8511        unsafe fn decode(
8512            &mut self,
8513            decoder: &mut fidl::encoding::Decoder<'_, D>,
8514            offset: usize,
8515            _depth: fidl::encoding::Depth,
8516        ) -> fidl::Result<()> {
8517            decoder.debug_check_bounds::<Self>(offset);
8518            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8519            // Verify that padding bytes are zero.
8520            // Copy from the buffer into the object.
8521            unsafe {
8522                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
8523            }
8524            Ok(())
8525        }
8526    }
8527
8528    impl fidl::encoding::ValueTypeMarker for RemoveLayerCmd {
8529        type Borrowed<'a> = &'a Self;
8530        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8531            value
8532        }
8533    }
8534
8535    unsafe impl fidl::encoding::TypeMarker for RemoveLayerCmd {
8536        type Owned = Self;
8537
8538        #[inline(always)]
8539        fn inline_align(_context: fidl::encoding::Context) -> usize {
8540            4
8541        }
8542
8543        #[inline(always)]
8544        fn inline_size(_context: fidl::encoding::Context) -> usize {
8545            8
8546        }
8547        #[inline(always)]
8548        fn encode_is_copy() -> bool {
8549            true
8550        }
8551
8552        #[inline(always)]
8553        fn decode_is_copy() -> bool {
8554            true
8555        }
8556    }
8557
8558    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RemoveLayerCmd, D>
8559        for &RemoveLayerCmd
8560    {
8561        #[inline]
8562        unsafe fn encode(
8563            self,
8564            encoder: &mut fidl::encoding::Encoder<'_, D>,
8565            offset: usize,
8566            _depth: fidl::encoding::Depth,
8567        ) -> fidl::Result<()> {
8568            encoder.debug_check_bounds::<RemoveLayerCmd>(offset);
8569            unsafe {
8570                // Copy the object into the buffer.
8571                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8572                (buf_ptr as *mut RemoveLayerCmd)
8573                    .write_unaligned((self as *const RemoveLayerCmd).read());
8574                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8575                // done second because the memcpy will write garbage to these bytes.
8576            }
8577            Ok(())
8578        }
8579    }
8580    unsafe impl<
8581            D: fidl::encoding::ResourceDialect,
8582            T0: fidl::encoding::Encode<u32, D>,
8583            T1: fidl::encoding::Encode<u32, D>,
8584        > fidl::encoding::Encode<RemoveLayerCmd, D> for (T0, T1)
8585    {
8586        #[inline]
8587        unsafe fn encode(
8588            self,
8589            encoder: &mut fidl::encoding::Encoder<'_, D>,
8590            offset: usize,
8591            depth: fidl::encoding::Depth,
8592        ) -> fidl::Result<()> {
8593            encoder.debug_check_bounds::<RemoveLayerCmd>(offset);
8594            // Zero out padding regions. There's no need to apply masks
8595            // because the unmasked parts will be overwritten by fields.
8596            // Write the fields.
8597            self.0.encode(encoder, offset + 0, depth)?;
8598            self.1.encode(encoder, offset + 4, depth)?;
8599            Ok(())
8600        }
8601    }
8602
8603    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RemoveLayerCmd {
8604        #[inline(always)]
8605        fn new_empty() -> Self {
8606            Self { layer_stack_id: fidl::new_empty!(u32, D), layer_id: fidl::new_empty!(u32, D) }
8607        }
8608
8609        #[inline]
8610        unsafe fn decode(
8611            &mut self,
8612            decoder: &mut fidl::encoding::Decoder<'_, D>,
8613            offset: usize,
8614            _depth: fidl::encoding::Depth,
8615        ) -> fidl::Result<()> {
8616            decoder.debug_check_bounds::<Self>(offset);
8617            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8618            // Verify that padding bytes are zero.
8619            // Copy from the buffer into the object.
8620            unsafe {
8621                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8622            }
8623            Ok(())
8624        }
8625    }
8626
8627    impl fidl::encoding::ValueTypeMarker for RendererArgs {
8628        type Borrowed<'a> = &'a Self;
8629        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8630            value
8631        }
8632    }
8633
8634    unsafe impl fidl::encoding::TypeMarker for RendererArgs {
8635        type Owned = Self;
8636
8637        #[inline(always)]
8638        fn inline_align(_context: fidl::encoding::Context) -> usize {
8639            4
8640        }
8641
8642        #[inline(always)]
8643        fn inline_size(_context: fidl::encoding::Context) -> usize {
8644            4
8645        }
8646        #[inline(always)]
8647        fn encode_is_copy() -> bool {
8648            true
8649        }
8650
8651        #[inline(always)]
8652        fn decode_is_copy() -> bool {
8653            true
8654        }
8655    }
8656
8657    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RendererArgs, D>
8658        for &RendererArgs
8659    {
8660        #[inline]
8661        unsafe fn encode(
8662            self,
8663            encoder: &mut fidl::encoding::Encoder<'_, D>,
8664            offset: usize,
8665            _depth: fidl::encoding::Depth,
8666        ) -> fidl::Result<()> {
8667            encoder.debug_check_bounds::<RendererArgs>(offset);
8668            unsafe {
8669                // Copy the object into the buffer.
8670                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8671                (buf_ptr as *mut RendererArgs)
8672                    .write_unaligned((self as *const RendererArgs).read());
8673                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8674                // done second because the memcpy will write garbage to these bytes.
8675            }
8676            Ok(())
8677        }
8678    }
8679    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
8680        fidl::encoding::Encode<RendererArgs, D> for (T0,)
8681    {
8682        #[inline]
8683        unsafe fn encode(
8684            self,
8685            encoder: &mut fidl::encoding::Encoder<'_, D>,
8686            offset: usize,
8687            depth: fidl::encoding::Depth,
8688        ) -> fidl::Result<()> {
8689            encoder.debug_check_bounds::<RendererArgs>(offset);
8690            // Zero out padding regions. There's no need to apply masks
8691            // because the unmasked parts will be overwritten by fields.
8692            // Write the fields.
8693            self.0.encode(encoder, offset + 0, depth)?;
8694            Ok(())
8695        }
8696    }
8697
8698    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RendererArgs {
8699        #[inline(always)]
8700        fn new_empty() -> Self {
8701            Self { dummy: fidl::new_empty!(u32, D) }
8702        }
8703
8704        #[inline]
8705        unsafe fn decode(
8706            &mut self,
8707            decoder: &mut fidl::encoding::Decoder<'_, D>,
8708            offset: usize,
8709            _depth: fidl::encoding::Depth,
8710        ) -> fidl::Result<()> {
8711            decoder.debug_check_bounds::<Self>(offset);
8712            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8713            // Verify that padding bytes are zero.
8714            // Copy from the buffer into the object.
8715            unsafe {
8716                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
8717            }
8718            Ok(())
8719        }
8720    }
8721
8722    impl fidl::encoding::ValueTypeMarker for RoundedRectangleArgs {
8723        type Borrowed<'a> = &'a Self;
8724        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8725            value
8726        }
8727    }
8728
8729    unsafe impl fidl::encoding::TypeMarker for RoundedRectangleArgs {
8730        type Owned = Self;
8731
8732        #[inline(always)]
8733        fn inline_align(_context: fidl::encoding::Context) -> usize {
8734            8
8735        }
8736
8737        #[inline(always)]
8738        fn inline_size(_context: fidl::encoding::Context) -> usize {
8739            96
8740        }
8741    }
8742
8743    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoundedRectangleArgs, D>
8744        for &RoundedRectangleArgs
8745    {
8746        #[inline]
8747        unsafe fn encode(
8748            self,
8749            encoder: &mut fidl::encoding::Encoder<'_, D>,
8750            offset: usize,
8751            _depth: fidl::encoding::Depth,
8752        ) -> fidl::Result<()> {
8753            encoder.debug_check_bounds::<RoundedRectangleArgs>(offset);
8754            // Delegate to tuple encoding.
8755            fidl::encoding::Encode::<RoundedRectangleArgs, D>::encode(
8756                (
8757                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.width),
8758                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.height),
8759                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.top_left_radius),
8760                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.top_right_radius),
8761                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.bottom_right_radius),
8762                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.bottom_left_radius),
8763                ),
8764                encoder,
8765                offset,
8766                _depth,
8767            )
8768        }
8769    }
8770    unsafe impl<
8771            D: fidl::encoding::ResourceDialect,
8772            T0: fidl::encoding::Encode<Value, D>,
8773            T1: fidl::encoding::Encode<Value, D>,
8774            T2: fidl::encoding::Encode<Value, D>,
8775            T3: fidl::encoding::Encode<Value, D>,
8776            T4: fidl::encoding::Encode<Value, D>,
8777            T5: fidl::encoding::Encode<Value, D>,
8778        > fidl::encoding::Encode<RoundedRectangleArgs, D> for (T0, T1, T2, T3, T4, T5)
8779    {
8780        #[inline]
8781        unsafe fn encode(
8782            self,
8783            encoder: &mut fidl::encoding::Encoder<'_, D>,
8784            offset: usize,
8785            depth: fidl::encoding::Depth,
8786        ) -> fidl::Result<()> {
8787            encoder.debug_check_bounds::<RoundedRectangleArgs>(offset);
8788            // Zero out padding regions. There's no need to apply masks
8789            // because the unmasked parts will be overwritten by fields.
8790            // Write the fields.
8791            self.0.encode(encoder, offset + 0, depth)?;
8792            self.1.encode(encoder, offset + 16, depth)?;
8793            self.2.encode(encoder, offset + 32, depth)?;
8794            self.3.encode(encoder, offset + 48, depth)?;
8795            self.4.encode(encoder, offset + 64, depth)?;
8796            self.5.encode(encoder, offset + 80, depth)?;
8797            Ok(())
8798        }
8799    }
8800
8801    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoundedRectangleArgs {
8802        #[inline(always)]
8803        fn new_empty() -> Self {
8804            Self {
8805                width: fidl::new_empty!(Value, D),
8806                height: fidl::new_empty!(Value, D),
8807                top_left_radius: fidl::new_empty!(Value, D),
8808                top_right_radius: fidl::new_empty!(Value, D),
8809                bottom_right_radius: fidl::new_empty!(Value, D),
8810                bottom_left_radius: fidl::new_empty!(Value, D),
8811            }
8812        }
8813
8814        #[inline]
8815        unsafe fn decode(
8816            &mut self,
8817            decoder: &mut fidl::encoding::Decoder<'_, D>,
8818            offset: usize,
8819            _depth: fidl::encoding::Depth,
8820        ) -> fidl::Result<()> {
8821            decoder.debug_check_bounds::<Self>(offset);
8822            // Verify that padding bytes are zero.
8823            fidl::decode!(Value, D, &mut self.width, decoder, offset + 0, _depth)?;
8824            fidl::decode!(Value, D, &mut self.height, decoder, offset + 16, _depth)?;
8825            fidl::decode!(Value, D, &mut self.top_left_radius, decoder, offset + 32, _depth)?;
8826            fidl::decode!(Value, D, &mut self.top_right_radius, decoder, offset + 48, _depth)?;
8827            fidl::decode!(Value, D, &mut self.bottom_right_radius, decoder, offset + 64, _depth)?;
8828            fidl::decode!(Value, D, &mut self.bottom_left_radius, decoder, offset + 80, _depth)?;
8829            Ok(())
8830        }
8831    }
8832
8833    impl fidl::encoding::ValueTypeMarker for SceneAddAmbientLightCmd {
8834        type Borrowed<'a> = &'a Self;
8835        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8836            value
8837        }
8838    }
8839
8840    unsafe impl fidl::encoding::TypeMarker for SceneAddAmbientLightCmd {
8841        type Owned = Self;
8842
8843        #[inline(always)]
8844        fn inline_align(_context: fidl::encoding::Context) -> usize {
8845            4
8846        }
8847
8848        #[inline(always)]
8849        fn inline_size(_context: fidl::encoding::Context) -> usize {
8850            8
8851        }
8852        #[inline(always)]
8853        fn encode_is_copy() -> bool {
8854            true
8855        }
8856
8857        #[inline(always)]
8858        fn decode_is_copy() -> bool {
8859            true
8860        }
8861    }
8862
8863    unsafe impl<D: fidl::encoding::ResourceDialect>
8864        fidl::encoding::Encode<SceneAddAmbientLightCmd, D> for &SceneAddAmbientLightCmd
8865    {
8866        #[inline]
8867        unsafe fn encode(
8868            self,
8869            encoder: &mut fidl::encoding::Encoder<'_, D>,
8870            offset: usize,
8871            _depth: fidl::encoding::Depth,
8872        ) -> fidl::Result<()> {
8873            encoder.debug_check_bounds::<SceneAddAmbientLightCmd>(offset);
8874            unsafe {
8875                // Copy the object into the buffer.
8876                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8877                (buf_ptr as *mut SceneAddAmbientLightCmd)
8878                    .write_unaligned((self as *const SceneAddAmbientLightCmd).read());
8879                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8880                // done second because the memcpy will write garbage to these bytes.
8881            }
8882            Ok(())
8883        }
8884    }
8885    unsafe impl<
8886            D: fidl::encoding::ResourceDialect,
8887            T0: fidl::encoding::Encode<u32, D>,
8888            T1: fidl::encoding::Encode<u32, D>,
8889        > fidl::encoding::Encode<SceneAddAmbientLightCmd, D> for (T0, T1)
8890    {
8891        #[inline]
8892        unsafe fn encode(
8893            self,
8894            encoder: &mut fidl::encoding::Encoder<'_, D>,
8895            offset: usize,
8896            depth: fidl::encoding::Depth,
8897        ) -> fidl::Result<()> {
8898            encoder.debug_check_bounds::<SceneAddAmbientLightCmd>(offset);
8899            // Zero out padding regions. There's no need to apply masks
8900            // because the unmasked parts will be overwritten by fields.
8901            // Write the fields.
8902            self.0.encode(encoder, offset + 0, depth)?;
8903            self.1.encode(encoder, offset + 4, depth)?;
8904            Ok(())
8905        }
8906    }
8907
8908    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8909        for SceneAddAmbientLightCmd
8910    {
8911        #[inline(always)]
8912        fn new_empty() -> Self {
8913            Self { scene_id: fidl::new_empty!(u32, D), light_id: fidl::new_empty!(u32, D) }
8914        }
8915
8916        #[inline]
8917        unsafe fn decode(
8918            &mut self,
8919            decoder: &mut fidl::encoding::Decoder<'_, D>,
8920            offset: usize,
8921            _depth: fidl::encoding::Depth,
8922        ) -> fidl::Result<()> {
8923            decoder.debug_check_bounds::<Self>(offset);
8924            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8925            // Verify that padding bytes are zero.
8926            // Copy from the buffer into the object.
8927            unsafe {
8928                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8929            }
8930            Ok(())
8931        }
8932    }
8933
8934    impl fidl::encoding::ValueTypeMarker for SceneAddDirectionalLightCmd {
8935        type Borrowed<'a> = &'a Self;
8936        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8937            value
8938        }
8939    }
8940
8941    unsafe impl fidl::encoding::TypeMarker for SceneAddDirectionalLightCmd {
8942        type Owned = Self;
8943
8944        #[inline(always)]
8945        fn inline_align(_context: fidl::encoding::Context) -> usize {
8946            4
8947        }
8948
8949        #[inline(always)]
8950        fn inline_size(_context: fidl::encoding::Context) -> usize {
8951            8
8952        }
8953        #[inline(always)]
8954        fn encode_is_copy() -> bool {
8955            true
8956        }
8957
8958        #[inline(always)]
8959        fn decode_is_copy() -> bool {
8960            true
8961        }
8962    }
8963
8964    unsafe impl<D: fidl::encoding::ResourceDialect>
8965        fidl::encoding::Encode<SceneAddDirectionalLightCmd, D> for &SceneAddDirectionalLightCmd
8966    {
8967        #[inline]
8968        unsafe fn encode(
8969            self,
8970            encoder: &mut fidl::encoding::Encoder<'_, D>,
8971            offset: usize,
8972            _depth: fidl::encoding::Depth,
8973        ) -> fidl::Result<()> {
8974            encoder.debug_check_bounds::<SceneAddDirectionalLightCmd>(offset);
8975            unsafe {
8976                // Copy the object into the buffer.
8977                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8978                (buf_ptr as *mut SceneAddDirectionalLightCmd)
8979                    .write_unaligned((self as *const SceneAddDirectionalLightCmd).read());
8980                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8981                // done second because the memcpy will write garbage to these bytes.
8982            }
8983            Ok(())
8984        }
8985    }
8986    unsafe impl<
8987            D: fidl::encoding::ResourceDialect,
8988            T0: fidl::encoding::Encode<u32, D>,
8989            T1: fidl::encoding::Encode<u32, D>,
8990        > fidl::encoding::Encode<SceneAddDirectionalLightCmd, D> for (T0, T1)
8991    {
8992        #[inline]
8993        unsafe fn encode(
8994            self,
8995            encoder: &mut fidl::encoding::Encoder<'_, D>,
8996            offset: usize,
8997            depth: fidl::encoding::Depth,
8998        ) -> fidl::Result<()> {
8999            encoder.debug_check_bounds::<SceneAddDirectionalLightCmd>(offset);
9000            // Zero out padding regions. There's no need to apply masks
9001            // because the unmasked parts will be overwritten by fields.
9002            // Write the fields.
9003            self.0.encode(encoder, offset + 0, depth)?;
9004            self.1.encode(encoder, offset + 4, depth)?;
9005            Ok(())
9006        }
9007    }
9008
9009    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9010        for SceneAddDirectionalLightCmd
9011    {
9012        #[inline(always)]
9013        fn new_empty() -> Self {
9014            Self { scene_id: fidl::new_empty!(u32, D), light_id: fidl::new_empty!(u32, D) }
9015        }
9016
9017        #[inline]
9018        unsafe fn decode(
9019            &mut self,
9020            decoder: &mut fidl::encoding::Decoder<'_, D>,
9021            offset: usize,
9022            _depth: fidl::encoding::Depth,
9023        ) -> fidl::Result<()> {
9024            decoder.debug_check_bounds::<Self>(offset);
9025            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9026            // Verify that padding bytes are zero.
9027            // Copy from the buffer into the object.
9028            unsafe {
9029                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9030            }
9031            Ok(())
9032        }
9033    }
9034
9035    impl fidl::encoding::ValueTypeMarker for SceneAddPointLightCmd {
9036        type Borrowed<'a> = &'a Self;
9037        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9038            value
9039        }
9040    }
9041
9042    unsafe impl fidl::encoding::TypeMarker for SceneAddPointLightCmd {
9043        type Owned = Self;
9044
9045        #[inline(always)]
9046        fn inline_align(_context: fidl::encoding::Context) -> usize {
9047            4
9048        }
9049
9050        #[inline(always)]
9051        fn inline_size(_context: fidl::encoding::Context) -> usize {
9052            8
9053        }
9054        #[inline(always)]
9055        fn encode_is_copy() -> bool {
9056            true
9057        }
9058
9059        #[inline(always)]
9060        fn decode_is_copy() -> bool {
9061            true
9062        }
9063    }
9064
9065    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SceneAddPointLightCmd, D>
9066        for &SceneAddPointLightCmd
9067    {
9068        #[inline]
9069        unsafe fn encode(
9070            self,
9071            encoder: &mut fidl::encoding::Encoder<'_, D>,
9072            offset: usize,
9073            _depth: fidl::encoding::Depth,
9074        ) -> fidl::Result<()> {
9075            encoder.debug_check_bounds::<SceneAddPointLightCmd>(offset);
9076            unsafe {
9077                // Copy the object into the buffer.
9078                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9079                (buf_ptr as *mut SceneAddPointLightCmd)
9080                    .write_unaligned((self as *const SceneAddPointLightCmd).read());
9081                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9082                // done second because the memcpy will write garbage to these bytes.
9083            }
9084            Ok(())
9085        }
9086    }
9087    unsafe impl<
9088            D: fidl::encoding::ResourceDialect,
9089            T0: fidl::encoding::Encode<u32, D>,
9090            T1: fidl::encoding::Encode<u32, D>,
9091        > fidl::encoding::Encode<SceneAddPointLightCmd, D> for (T0, T1)
9092    {
9093        #[inline]
9094        unsafe fn encode(
9095            self,
9096            encoder: &mut fidl::encoding::Encoder<'_, D>,
9097            offset: usize,
9098            depth: fidl::encoding::Depth,
9099        ) -> fidl::Result<()> {
9100            encoder.debug_check_bounds::<SceneAddPointLightCmd>(offset);
9101            // Zero out padding regions. There's no need to apply masks
9102            // because the unmasked parts will be overwritten by fields.
9103            // Write the fields.
9104            self.0.encode(encoder, offset + 0, depth)?;
9105            self.1.encode(encoder, offset + 4, depth)?;
9106            Ok(())
9107        }
9108    }
9109
9110    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SceneAddPointLightCmd {
9111        #[inline(always)]
9112        fn new_empty() -> Self {
9113            Self { scene_id: fidl::new_empty!(u32, D), light_id: fidl::new_empty!(u32, D) }
9114        }
9115
9116        #[inline]
9117        unsafe fn decode(
9118            &mut self,
9119            decoder: &mut fidl::encoding::Decoder<'_, D>,
9120            offset: usize,
9121            _depth: fidl::encoding::Depth,
9122        ) -> fidl::Result<()> {
9123            decoder.debug_check_bounds::<Self>(offset);
9124            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9125            // Verify that padding bytes are zero.
9126            // Copy from the buffer into the object.
9127            unsafe {
9128                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9129            }
9130            Ok(())
9131        }
9132    }
9133
9134    impl fidl::encoding::ValueTypeMarker for SceneArgs {
9135        type Borrowed<'a> = &'a Self;
9136        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9137            value
9138        }
9139    }
9140
9141    unsafe impl fidl::encoding::TypeMarker for SceneArgs {
9142        type Owned = Self;
9143
9144        #[inline(always)]
9145        fn inline_align(_context: fidl::encoding::Context) -> usize {
9146            4
9147        }
9148
9149        #[inline(always)]
9150        fn inline_size(_context: fidl::encoding::Context) -> usize {
9151            4
9152        }
9153        #[inline(always)]
9154        fn encode_is_copy() -> bool {
9155            true
9156        }
9157
9158        #[inline(always)]
9159        fn decode_is_copy() -> bool {
9160            true
9161        }
9162    }
9163
9164    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SceneArgs, D>
9165        for &SceneArgs
9166    {
9167        #[inline]
9168        unsafe fn encode(
9169            self,
9170            encoder: &mut fidl::encoding::Encoder<'_, D>,
9171            offset: usize,
9172            _depth: fidl::encoding::Depth,
9173        ) -> fidl::Result<()> {
9174            encoder.debug_check_bounds::<SceneArgs>(offset);
9175            unsafe {
9176                // Copy the object into the buffer.
9177                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9178                (buf_ptr as *mut SceneArgs).write_unaligned((self as *const SceneArgs).read());
9179                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9180                // done second because the memcpy will write garbage to these bytes.
9181            }
9182            Ok(())
9183        }
9184    }
9185    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
9186        fidl::encoding::Encode<SceneArgs, D> for (T0,)
9187    {
9188        #[inline]
9189        unsafe fn encode(
9190            self,
9191            encoder: &mut fidl::encoding::Encoder<'_, D>,
9192            offset: usize,
9193            depth: fidl::encoding::Depth,
9194        ) -> fidl::Result<()> {
9195            encoder.debug_check_bounds::<SceneArgs>(offset);
9196            // Zero out padding regions. There's no need to apply masks
9197            // because the unmasked parts will be overwritten by fields.
9198            // Write the fields.
9199            self.0.encode(encoder, offset + 0, depth)?;
9200            Ok(())
9201        }
9202    }
9203
9204    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SceneArgs {
9205        #[inline(always)]
9206        fn new_empty() -> Self {
9207            Self { dummy: fidl::new_empty!(u32, D) }
9208        }
9209
9210        #[inline]
9211        unsafe fn decode(
9212            &mut self,
9213            decoder: &mut fidl::encoding::Decoder<'_, D>,
9214            offset: usize,
9215            _depth: fidl::encoding::Depth,
9216        ) -> fidl::Result<()> {
9217            decoder.debug_check_bounds::<Self>(offset);
9218            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9219            // Verify that padding bytes are zero.
9220            // Copy from the buffer into the object.
9221            unsafe {
9222                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
9223            }
9224            Ok(())
9225        }
9226    }
9227
9228    impl fidl::encoding::ValueTypeMarker for SendSizeChangeHintCmdHack {
9229        type Borrowed<'a> = &'a Self;
9230        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9231            value
9232        }
9233    }
9234
9235    unsafe impl fidl::encoding::TypeMarker for SendSizeChangeHintCmdHack {
9236        type Owned = Self;
9237
9238        #[inline(always)]
9239        fn inline_align(_context: fidl::encoding::Context) -> usize {
9240            4
9241        }
9242
9243        #[inline(always)]
9244        fn inline_size(_context: fidl::encoding::Context) -> usize {
9245            12
9246        }
9247    }
9248
9249    unsafe impl<D: fidl::encoding::ResourceDialect>
9250        fidl::encoding::Encode<SendSizeChangeHintCmdHack, D> for &SendSizeChangeHintCmdHack
9251    {
9252        #[inline]
9253        unsafe fn encode(
9254            self,
9255            encoder: &mut fidl::encoding::Encoder<'_, D>,
9256            offset: usize,
9257            _depth: fidl::encoding::Depth,
9258        ) -> fidl::Result<()> {
9259            encoder.debug_check_bounds::<SendSizeChangeHintCmdHack>(offset);
9260            // Delegate to tuple encoding.
9261            fidl::encoding::Encode::<SendSizeChangeHintCmdHack, D>::encode(
9262                (
9263                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
9264                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.width_change_factor),
9265                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.height_change_factor),
9266                ),
9267                encoder,
9268                offset,
9269                _depth,
9270            )
9271        }
9272    }
9273    unsafe impl<
9274            D: fidl::encoding::ResourceDialect,
9275            T0: fidl::encoding::Encode<u32, D>,
9276            T1: fidl::encoding::Encode<f32, D>,
9277            T2: fidl::encoding::Encode<f32, D>,
9278        > fidl::encoding::Encode<SendSizeChangeHintCmdHack, D> for (T0, T1, T2)
9279    {
9280        #[inline]
9281        unsafe fn encode(
9282            self,
9283            encoder: &mut fidl::encoding::Encoder<'_, D>,
9284            offset: usize,
9285            depth: fidl::encoding::Depth,
9286        ) -> fidl::Result<()> {
9287            encoder.debug_check_bounds::<SendSizeChangeHintCmdHack>(offset);
9288            // Zero out padding regions. There's no need to apply masks
9289            // because the unmasked parts will be overwritten by fields.
9290            // Write the fields.
9291            self.0.encode(encoder, offset + 0, depth)?;
9292            self.1.encode(encoder, offset + 4, depth)?;
9293            self.2.encode(encoder, offset + 8, depth)?;
9294            Ok(())
9295        }
9296    }
9297
9298    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9299        for SendSizeChangeHintCmdHack
9300    {
9301        #[inline(always)]
9302        fn new_empty() -> Self {
9303            Self {
9304                node_id: fidl::new_empty!(u32, D),
9305                width_change_factor: fidl::new_empty!(f32, D),
9306                height_change_factor: fidl::new_empty!(f32, D),
9307            }
9308        }
9309
9310        #[inline]
9311        unsafe fn decode(
9312            &mut self,
9313            decoder: &mut fidl::encoding::Decoder<'_, D>,
9314            offset: usize,
9315            _depth: fidl::encoding::Depth,
9316        ) -> fidl::Result<()> {
9317            decoder.debug_check_bounds::<Self>(offset);
9318            // Verify that padding bytes are zero.
9319            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
9320            fidl::decode!(f32, D, &mut self.width_change_factor, decoder, offset + 4, _depth)?;
9321            fidl::decode!(f32, D, &mut self.height_change_factor, decoder, offset + 8, _depth)?;
9322            Ok(())
9323        }
9324    }
9325
9326    impl fidl::encoding::ValueTypeMarker for SetAnchorCmd {
9327        type Borrowed<'a> = &'a Self;
9328        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9329            value
9330        }
9331    }
9332
9333    unsafe impl fidl::encoding::TypeMarker for SetAnchorCmd {
9334        type Owned = Self;
9335
9336        #[inline(always)]
9337        fn inline_align(_context: fidl::encoding::Context) -> usize {
9338            4
9339        }
9340
9341        #[inline(always)]
9342        fn inline_size(_context: fidl::encoding::Context) -> usize {
9343            20
9344        }
9345    }
9346
9347    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetAnchorCmd, D>
9348        for &SetAnchorCmd
9349    {
9350        #[inline]
9351        unsafe fn encode(
9352            self,
9353            encoder: &mut fidl::encoding::Encoder<'_, D>,
9354            offset: usize,
9355            _depth: fidl::encoding::Depth,
9356        ) -> fidl::Result<()> {
9357            encoder.debug_check_bounds::<SetAnchorCmd>(offset);
9358            // Delegate to tuple encoding.
9359            fidl::encoding::Encode::<SetAnchorCmd, D>::encode(
9360                (
9361                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9362                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
9363                ),
9364                encoder,
9365                offset,
9366                _depth,
9367            )
9368        }
9369    }
9370    unsafe impl<
9371            D: fidl::encoding::ResourceDialect,
9372            T0: fidl::encoding::Encode<u32, D>,
9373            T1: fidl::encoding::Encode<Vector3Value, D>,
9374        > fidl::encoding::Encode<SetAnchorCmd, D> for (T0, T1)
9375    {
9376        #[inline]
9377        unsafe fn encode(
9378            self,
9379            encoder: &mut fidl::encoding::Encoder<'_, D>,
9380            offset: usize,
9381            depth: fidl::encoding::Depth,
9382        ) -> fidl::Result<()> {
9383            encoder.debug_check_bounds::<SetAnchorCmd>(offset);
9384            // Zero out padding regions. There's no need to apply masks
9385            // because the unmasked parts will be overwritten by fields.
9386            // Write the fields.
9387            self.0.encode(encoder, offset + 0, depth)?;
9388            self.1.encode(encoder, offset + 4, depth)?;
9389            Ok(())
9390        }
9391    }
9392
9393    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetAnchorCmd {
9394        #[inline(always)]
9395        fn new_empty() -> Self {
9396            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Vector3Value, D) }
9397        }
9398
9399        #[inline]
9400        unsafe fn decode(
9401            &mut self,
9402            decoder: &mut fidl::encoding::Decoder<'_, D>,
9403            offset: usize,
9404            _depth: fidl::encoding::Depth,
9405        ) -> fidl::Result<()> {
9406            decoder.debug_check_bounds::<Self>(offset);
9407            // Verify that padding bytes are zero.
9408            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
9409            fidl::decode!(Vector3Value, D, &mut self.value, decoder, offset + 4, _depth)?;
9410            Ok(())
9411        }
9412    }
9413
9414    impl fidl::encoding::ValueTypeMarker for SetCameraClipSpaceTransformCmd {
9415        type Borrowed<'a> = &'a Self;
9416        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9417            value
9418        }
9419    }
9420
9421    unsafe impl fidl::encoding::TypeMarker for SetCameraClipSpaceTransformCmd {
9422        type Owned = Self;
9423
9424        #[inline(always)]
9425        fn inline_align(_context: fidl::encoding::Context) -> usize {
9426            4
9427        }
9428
9429        #[inline(always)]
9430        fn inline_size(_context: fidl::encoding::Context) -> usize {
9431            16
9432        }
9433    }
9434
9435    unsafe impl<D: fidl::encoding::ResourceDialect>
9436        fidl::encoding::Encode<SetCameraClipSpaceTransformCmd, D>
9437        for &SetCameraClipSpaceTransformCmd
9438    {
9439        #[inline]
9440        unsafe fn encode(
9441            self,
9442            encoder: &mut fidl::encoding::Encoder<'_, D>,
9443            offset: usize,
9444            _depth: fidl::encoding::Depth,
9445        ) -> fidl::Result<()> {
9446            encoder.debug_check_bounds::<SetCameraClipSpaceTransformCmd>(offset);
9447            // Delegate to tuple encoding.
9448            fidl::encoding::Encode::<SetCameraClipSpaceTransformCmd, D>::encode(
9449                (
9450                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.camera_id),
9451                    <Vec2 as fidl::encoding::ValueTypeMarker>::borrow(&self.translation),
9452                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.scale),
9453                ),
9454                encoder,
9455                offset,
9456                _depth,
9457            )
9458        }
9459    }
9460    unsafe impl<
9461            D: fidl::encoding::ResourceDialect,
9462            T0: fidl::encoding::Encode<u32, D>,
9463            T1: fidl::encoding::Encode<Vec2, D>,
9464            T2: fidl::encoding::Encode<f32, D>,
9465        > fidl::encoding::Encode<SetCameraClipSpaceTransformCmd, D> for (T0, T1, T2)
9466    {
9467        #[inline]
9468        unsafe fn encode(
9469            self,
9470            encoder: &mut fidl::encoding::Encoder<'_, D>,
9471            offset: usize,
9472            depth: fidl::encoding::Depth,
9473        ) -> fidl::Result<()> {
9474            encoder.debug_check_bounds::<SetCameraClipSpaceTransformCmd>(offset);
9475            // Zero out padding regions. There's no need to apply masks
9476            // because the unmasked parts will be overwritten by fields.
9477            // Write the fields.
9478            self.0.encode(encoder, offset + 0, depth)?;
9479            self.1.encode(encoder, offset + 4, depth)?;
9480            self.2.encode(encoder, offset + 12, depth)?;
9481            Ok(())
9482        }
9483    }
9484
9485    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9486        for SetCameraClipSpaceTransformCmd
9487    {
9488        #[inline(always)]
9489        fn new_empty() -> Self {
9490            Self {
9491                camera_id: fidl::new_empty!(u32, D),
9492                translation: fidl::new_empty!(Vec2, D),
9493                scale: fidl::new_empty!(f32, D),
9494            }
9495        }
9496
9497        #[inline]
9498        unsafe fn decode(
9499            &mut self,
9500            decoder: &mut fidl::encoding::Decoder<'_, D>,
9501            offset: usize,
9502            _depth: fidl::encoding::Depth,
9503        ) -> fidl::Result<()> {
9504            decoder.debug_check_bounds::<Self>(offset);
9505            // Verify that padding bytes are zero.
9506            fidl::decode!(u32, D, &mut self.camera_id, decoder, offset + 0, _depth)?;
9507            fidl::decode!(Vec2, D, &mut self.translation, decoder, offset + 4, _depth)?;
9508            fidl::decode!(f32, D, &mut self.scale, decoder, offset + 12, _depth)?;
9509            Ok(())
9510        }
9511    }
9512
9513    impl fidl::encoding::ValueTypeMarker for SetCameraCmd {
9514        type Borrowed<'a> = &'a Self;
9515        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9516            value
9517        }
9518    }
9519
9520    unsafe impl fidl::encoding::TypeMarker for SetCameraCmd {
9521        type Owned = Self;
9522
9523        #[inline(always)]
9524        fn inline_align(_context: fidl::encoding::Context) -> usize {
9525            4
9526        }
9527
9528        #[inline(always)]
9529        fn inline_size(_context: fidl::encoding::Context) -> usize {
9530            8
9531        }
9532        #[inline(always)]
9533        fn encode_is_copy() -> bool {
9534            true
9535        }
9536
9537        #[inline(always)]
9538        fn decode_is_copy() -> bool {
9539            true
9540        }
9541    }
9542
9543    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetCameraCmd, D>
9544        for &SetCameraCmd
9545    {
9546        #[inline]
9547        unsafe fn encode(
9548            self,
9549            encoder: &mut fidl::encoding::Encoder<'_, D>,
9550            offset: usize,
9551            _depth: fidl::encoding::Depth,
9552        ) -> fidl::Result<()> {
9553            encoder.debug_check_bounds::<SetCameraCmd>(offset);
9554            unsafe {
9555                // Copy the object into the buffer.
9556                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9557                (buf_ptr as *mut SetCameraCmd)
9558                    .write_unaligned((self as *const SetCameraCmd).read());
9559                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9560                // done second because the memcpy will write garbage to these bytes.
9561            }
9562            Ok(())
9563        }
9564    }
9565    unsafe impl<
9566            D: fidl::encoding::ResourceDialect,
9567            T0: fidl::encoding::Encode<u32, D>,
9568            T1: fidl::encoding::Encode<u32, D>,
9569        > fidl::encoding::Encode<SetCameraCmd, D> for (T0, T1)
9570    {
9571        #[inline]
9572        unsafe fn encode(
9573            self,
9574            encoder: &mut fidl::encoding::Encoder<'_, D>,
9575            offset: usize,
9576            depth: fidl::encoding::Depth,
9577        ) -> fidl::Result<()> {
9578            encoder.debug_check_bounds::<SetCameraCmd>(offset);
9579            // Zero out padding regions. There's no need to apply masks
9580            // because the unmasked parts will be overwritten by fields.
9581            // Write the fields.
9582            self.0.encode(encoder, offset + 0, depth)?;
9583            self.1.encode(encoder, offset + 4, depth)?;
9584            Ok(())
9585        }
9586    }
9587
9588    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetCameraCmd {
9589        #[inline(always)]
9590        fn new_empty() -> Self {
9591            Self { renderer_id: fidl::new_empty!(u32, D), camera_id: fidl::new_empty!(u32, D) }
9592        }
9593
9594        #[inline]
9595        unsafe fn decode(
9596            &mut self,
9597            decoder: &mut fidl::encoding::Decoder<'_, D>,
9598            offset: usize,
9599            _depth: fidl::encoding::Depth,
9600        ) -> fidl::Result<()> {
9601            decoder.debug_check_bounds::<Self>(offset);
9602            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9603            // Verify that padding bytes are zero.
9604            // Copy from the buffer into the object.
9605            unsafe {
9606                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9607            }
9608            Ok(())
9609        }
9610    }
9611
9612    impl fidl::encoding::ValueTypeMarker for SetCameraPoseBufferCmd {
9613        type Borrowed<'a> = &'a Self;
9614        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9615            value
9616        }
9617    }
9618
9619    unsafe impl fidl::encoding::TypeMarker for SetCameraPoseBufferCmd {
9620        type Owned = Self;
9621
9622        #[inline(always)]
9623        fn inline_align(_context: fidl::encoding::Context) -> usize {
9624            8
9625        }
9626
9627        #[inline(always)]
9628        fn inline_size(_context: fidl::encoding::Context) -> usize {
9629            32
9630        }
9631    }
9632
9633    unsafe impl<D: fidl::encoding::ResourceDialect>
9634        fidl::encoding::Encode<SetCameraPoseBufferCmd, D> for &SetCameraPoseBufferCmd
9635    {
9636        #[inline]
9637        unsafe fn encode(
9638            self,
9639            encoder: &mut fidl::encoding::Encoder<'_, D>,
9640            offset: usize,
9641            _depth: fidl::encoding::Depth,
9642        ) -> fidl::Result<()> {
9643            encoder.debug_check_bounds::<SetCameraPoseBufferCmd>(offset);
9644            unsafe {
9645                // Copy the object into the buffer.
9646                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9647                (buf_ptr as *mut SetCameraPoseBufferCmd)
9648                    .write_unaligned((self as *const SetCameraPoseBufferCmd).read());
9649                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9650                // done second because the memcpy will write garbage to these bytes.
9651                let padding_ptr = buf_ptr.offset(8) as *mut u64;
9652                let padding_mask = 0xffffffff00000000u64;
9653                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
9654            }
9655            Ok(())
9656        }
9657    }
9658    unsafe impl<
9659            D: fidl::encoding::ResourceDialect,
9660            T0: fidl::encoding::Encode<u32, D>,
9661            T1: fidl::encoding::Encode<u32, D>,
9662            T2: fidl::encoding::Encode<u32, D>,
9663            T3: fidl::encoding::Encode<i64, D>,
9664            T4: fidl::encoding::Encode<u64, D>,
9665        > fidl::encoding::Encode<SetCameraPoseBufferCmd, D> for (T0, T1, T2, T3, T4)
9666    {
9667        #[inline]
9668        unsafe fn encode(
9669            self,
9670            encoder: &mut fidl::encoding::Encoder<'_, D>,
9671            offset: usize,
9672            depth: fidl::encoding::Depth,
9673        ) -> fidl::Result<()> {
9674            encoder.debug_check_bounds::<SetCameraPoseBufferCmd>(offset);
9675            // Zero out padding regions. There's no need to apply masks
9676            // because the unmasked parts will be overwritten by fields.
9677            unsafe {
9678                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9679                (ptr as *mut u64).write_unaligned(0);
9680            }
9681            // Write the fields.
9682            self.0.encode(encoder, offset + 0, depth)?;
9683            self.1.encode(encoder, offset + 4, depth)?;
9684            self.2.encode(encoder, offset + 8, depth)?;
9685            self.3.encode(encoder, offset + 16, depth)?;
9686            self.4.encode(encoder, offset + 24, depth)?;
9687            Ok(())
9688        }
9689    }
9690
9691    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9692        for SetCameraPoseBufferCmd
9693    {
9694        #[inline(always)]
9695        fn new_empty() -> Self {
9696            Self {
9697                camera_id: fidl::new_empty!(u32, D),
9698                buffer_id: fidl::new_empty!(u32, D),
9699                num_entries: fidl::new_empty!(u32, D),
9700                base_time: fidl::new_empty!(i64, D),
9701                time_interval: fidl::new_empty!(u64, D),
9702            }
9703        }
9704
9705        #[inline]
9706        unsafe fn decode(
9707            &mut self,
9708            decoder: &mut fidl::encoding::Decoder<'_, D>,
9709            offset: usize,
9710            _depth: fidl::encoding::Depth,
9711        ) -> fidl::Result<()> {
9712            decoder.debug_check_bounds::<Self>(offset);
9713            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9714            // Verify that padding bytes are zero.
9715            let ptr = unsafe { buf_ptr.offset(8) };
9716            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9717            let mask = 0xffffffff00000000u64;
9718            let maskedval = padval & mask;
9719            if maskedval != 0 {
9720                return Err(fidl::Error::NonZeroPadding {
9721                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
9722                });
9723            }
9724            // Copy from the buffer into the object.
9725            unsafe {
9726                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
9727            }
9728            Ok(())
9729        }
9730    }
9731
9732    impl fidl::encoding::ValueTypeMarker for SetCameraProjectionCmd {
9733        type Borrowed<'a> = &'a Self;
9734        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9735            value
9736        }
9737    }
9738
9739    unsafe impl fidl::encoding::TypeMarker for SetCameraProjectionCmd {
9740        type Owned = Self;
9741
9742        #[inline(always)]
9743        fn inline_align(_context: fidl::encoding::Context) -> usize {
9744            4
9745        }
9746
9747        #[inline(always)]
9748        fn inline_size(_context: fidl::encoding::Context) -> usize {
9749            12
9750        }
9751    }
9752
9753    unsafe impl<D: fidl::encoding::ResourceDialect>
9754        fidl::encoding::Encode<SetCameraProjectionCmd, D> for &SetCameraProjectionCmd
9755    {
9756        #[inline]
9757        unsafe fn encode(
9758            self,
9759            encoder: &mut fidl::encoding::Encoder<'_, D>,
9760            offset: usize,
9761            _depth: fidl::encoding::Depth,
9762        ) -> fidl::Result<()> {
9763            encoder.debug_check_bounds::<SetCameraProjectionCmd>(offset);
9764            // Delegate to tuple encoding.
9765            fidl::encoding::Encode::<SetCameraProjectionCmd, D>::encode(
9766                (
9767                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.camera_id),
9768                    <FloatValue as fidl::encoding::ValueTypeMarker>::borrow(&self.fovy),
9769                ),
9770                encoder,
9771                offset,
9772                _depth,
9773            )
9774        }
9775    }
9776    unsafe impl<
9777            D: fidl::encoding::ResourceDialect,
9778            T0: fidl::encoding::Encode<u32, D>,
9779            T1: fidl::encoding::Encode<FloatValue, D>,
9780        > fidl::encoding::Encode<SetCameraProjectionCmd, D> for (T0, T1)
9781    {
9782        #[inline]
9783        unsafe fn encode(
9784            self,
9785            encoder: &mut fidl::encoding::Encoder<'_, D>,
9786            offset: usize,
9787            depth: fidl::encoding::Depth,
9788        ) -> fidl::Result<()> {
9789            encoder.debug_check_bounds::<SetCameraProjectionCmd>(offset);
9790            // Zero out padding regions. There's no need to apply masks
9791            // because the unmasked parts will be overwritten by fields.
9792            // Write the fields.
9793            self.0.encode(encoder, offset + 0, depth)?;
9794            self.1.encode(encoder, offset + 4, depth)?;
9795            Ok(())
9796        }
9797    }
9798
9799    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9800        for SetCameraProjectionCmd
9801    {
9802        #[inline(always)]
9803        fn new_empty() -> Self {
9804            Self { camera_id: fidl::new_empty!(u32, D), fovy: fidl::new_empty!(FloatValue, D) }
9805        }
9806
9807        #[inline]
9808        unsafe fn decode(
9809            &mut self,
9810            decoder: &mut fidl::encoding::Decoder<'_, D>,
9811            offset: usize,
9812            _depth: fidl::encoding::Depth,
9813        ) -> fidl::Result<()> {
9814            decoder.debug_check_bounds::<Self>(offset);
9815            // Verify that padding bytes are zero.
9816            fidl::decode!(u32, D, &mut self.camera_id, decoder, offset + 0, _depth)?;
9817            fidl::decode!(FloatValue, D, &mut self.fovy, decoder, offset + 4, _depth)?;
9818            Ok(())
9819        }
9820    }
9821
9822    impl fidl::encoding::ValueTypeMarker for SetCameraTransformCmd {
9823        type Borrowed<'a> = &'a Self;
9824        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9825            value
9826        }
9827    }
9828
9829    unsafe impl fidl::encoding::TypeMarker for SetCameraTransformCmd {
9830        type Owned = Self;
9831
9832        #[inline(always)]
9833        fn inline_align(_context: fidl::encoding::Context) -> usize {
9834            4
9835        }
9836
9837        #[inline(always)]
9838        fn inline_size(_context: fidl::encoding::Context) -> usize {
9839            52
9840        }
9841    }
9842
9843    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetCameraTransformCmd, D>
9844        for &SetCameraTransformCmd
9845    {
9846        #[inline]
9847        unsafe fn encode(
9848            self,
9849            encoder: &mut fidl::encoding::Encoder<'_, D>,
9850            offset: usize,
9851            _depth: fidl::encoding::Depth,
9852        ) -> fidl::Result<()> {
9853            encoder.debug_check_bounds::<SetCameraTransformCmd>(offset);
9854            // Delegate to tuple encoding.
9855            fidl::encoding::Encode::<SetCameraTransformCmd, D>::encode(
9856                (
9857                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.camera_id),
9858                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.eye_position),
9859                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.eye_look_at),
9860                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.eye_up),
9861                ),
9862                encoder,
9863                offset,
9864                _depth,
9865            )
9866        }
9867    }
9868    unsafe impl<
9869            D: fidl::encoding::ResourceDialect,
9870            T0: fidl::encoding::Encode<u32, D>,
9871            T1: fidl::encoding::Encode<Vector3Value, D>,
9872            T2: fidl::encoding::Encode<Vector3Value, D>,
9873            T3: fidl::encoding::Encode<Vector3Value, D>,
9874        > fidl::encoding::Encode<SetCameraTransformCmd, D> for (T0, T1, T2, T3)
9875    {
9876        #[inline]
9877        unsafe fn encode(
9878            self,
9879            encoder: &mut fidl::encoding::Encoder<'_, D>,
9880            offset: usize,
9881            depth: fidl::encoding::Depth,
9882        ) -> fidl::Result<()> {
9883            encoder.debug_check_bounds::<SetCameraTransformCmd>(offset);
9884            // Zero out padding regions. There's no need to apply masks
9885            // because the unmasked parts will be overwritten by fields.
9886            // Write the fields.
9887            self.0.encode(encoder, offset + 0, depth)?;
9888            self.1.encode(encoder, offset + 4, depth)?;
9889            self.2.encode(encoder, offset + 20, depth)?;
9890            self.3.encode(encoder, offset + 36, depth)?;
9891            Ok(())
9892        }
9893    }
9894
9895    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetCameraTransformCmd {
9896        #[inline(always)]
9897        fn new_empty() -> Self {
9898            Self {
9899                camera_id: fidl::new_empty!(u32, D),
9900                eye_position: fidl::new_empty!(Vector3Value, D),
9901                eye_look_at: fidl::new_empty!(Vector3Value, D),
9902                eye_up: fidl::new_empty!(Vector3Value, D),
9903            }
9904        }
9905
9906        #[inline]
9907        unsafe fn decode(
9908            &mut self,
9909            decoder: &mut fidl::encoding::Decoder<'_, D>,
9910            offset: usize,
9911            _depth: fidl::encoding::Depth,
9912        ) -> fidl::Result<()> {
9913            decoder.debug_check_bounds::<Self>(offset);
9914            // Verify that padding bytes are zero.
9915            fidl::decode!(u32, D, &mut self.camera_id, decoder, offset + 0, _depth)?;
9916            fidl::decode!(Vector3Value, D, &mut self.eye_position, decoder, offset + 4, _depth)?;
9917            fidl::decode!(Vector3Value, D, &mut self.eye_look_at, decoder, offset + 20, _depth)?;
9918            fidl::decode!(Vector3Value, D, &mut self.eye_up, decoder, offset + 36, _depth)?;
9919            Ok(())
9920        }
9921    }
9922
9923    impl fidl::encoding::ValueTypeMarker for SetClipCmd {
9924        type Borrowed<'a> = &'a Self;
9925        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9926            value
9927        }
9928    }
9929
9930    unsafe impl fidl::encoding::TypeMarker for SetClipCmd {
9931        type Owned = Self;
9932
9933        #[inline(always)]
9934        fn inline_align(_context: fidl::encoding::Context) -> usize {
9935            4
9936        }
9937
9938        #[inline(always)]
9939        fn inline_size(_context: fidl::encoding::Context) -> usize {
9940            12
9941        }
9942    }
9943
9944    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetClipCmd, D>
9945        for &SetClipCmd
9946    {
9947        #[inline]
9948        unsafe fn encode(
9949            self,
9950            encoder: &mut fidl::encoding::Encoder<'_, D>,
9951            offset: usize,
9952            _depth: fidl::encoding::Depth,
9953        ) -> fidl::Result<()> {
9954            encoder.debug_check_bounds::<SetClipCmd>(offset);
9955            // Delegate to tuple encoding.
9956            fidl::encoding::Encode::<SetClipCmd, D>::encode(
9957                (
9958                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
9959                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.clip_id),
9960                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.clip_to_self),
9961                ),
9962                encoder,
9963                offset,
9964                _depth,
9965            )
9966        }
9967    }
9968    unsafe impl<
9969            D: fidl::encoding::ResourceDialect,
9970            T0: fidl::encoding::Encode<u32, D>,
9971            T1: fidl::encoding::Encode<u32, D>,
9972            T2: fidl::encoding::Encode<bool, D>,
9973        > fidl::encoding::Encode<SetClipCmd, D> for (T0, T1, T2)
9974    {
9975        #[inline]
9976        unsafe fn encode(
9977            self,
9978            encoder: &mut fidl::encoding::Encoder<'_, D>,
9979            offset: usize,
9980            depth: fidl::encoding::Depth,
9981        ) -> fidl::Result<()> {
9982            encoder.debug_check_bounds::<SetClipCmd>(offset);
9983            // Zero out padding regions. There's no need to apply masks
9984            // because the unmasked parts will be overwritten by fields.
9985            unsafe {
9986                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
9987                (ptr as *mut u32).write_unaligned(0);
9988            }
9989            // Write the fields.
9990            self.0.encode(encoder, offset + 0, depth)?;
9991            self.1.encode(encoder, offset + 4, depth)?;
9992            self.2.encode(encoder, offset + 8, depth)?;
9993            Ok(())
9994        }
9995    }
9996
9997    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetClipCmd {
9998        #[inline(always)]
9999        fn new_empty() -> Self {
10000            Self {
10001                node_id: fidl::new_empty!(u32, D),
10002                clip_id: fidl::new_empty!(u32, D),
10003                clip_to_self: fidl::new_empty!(bool, D),
10004            }
10005        }
10006
10007        #[inline]
10008        unsafe fn decode(
10009            &mut self,
10010            decoder: &mut fidl::encoding::Decoder<'_, D>,
10011            offset: usize,
10012            _depth: fidl::encoding::Depth,
10013        ) -> fidl::Result<()> {
10014            decoder.debug_check_bounds::<Self>(offset);
10015            // Verify that padding bytes are zero.
10016            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
10017            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10018            let mask = 0xffffff00u32;
10019            let maskedval = padval & mask;
10020            if maskedval != 0 {
10021                return Err(fidl::Error::NonZeroPadding {
10022                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
10023                });
10024            }
10025            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
10026            fidl::decode!(u32, D, &mut self.clip_id, decoder, offset + 4, _depth)?;
10027            fidl::decode!(bool, D, &mut self.clip_to_self, decoder, offset + 8, _depth)?;
10028            Ok(())
10029        }
10030    }
10031
10032    impl fidl::encoding::ValueTypeMarker for SetClipPlanesCmd {
10033        type Borrowed<'a> = &'a Self;
10034        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10035            value
10036        }
10037    }
10038
10039    unsafe impl fidl::encoding::TypeMarker for SetClipPlanesCmd {
10040        type Owned = Self;
10041
10042        #[inline(always)]
10043        fn inline_align(_context: fidl::encoding::Context) -> usize {
10044            8
10045        }
10046
10047        #[inline(always)]
10048        fn inline_size(_context: fidl::encoding::Context) -> usize {
10049            24
10050        }
10051    }
10052
10053    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetClipPlanesCmd, D>
10054        for &SetClipPlanesCmd
10055    {
10056        #[inline]
10057        unsafe fn encode(
10058            self,
10059            encoder: &mut fidl::encoding::Encoder<'_, D>,
10060            offset: usize,
10061            _depth: fidl::encoding::Depth,
10062        ) -> fidl::Result<()> {
10063            encoder.debug_check_bounds::<SetClipPlanesCmd>(offset);
10064            // Delegate to tuple encoding.
10065            fidl::encoding::Encode::<SetClipPlanesCmd, D>::encode(
10066                (
10067                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
10068                    <fidl::encoding::UnboundedVector<Plane3> as fidl::encoding::ValueTypeMarker>::borrow(&self.clip_planes),
10069                ),
10070                encoder, offset, _depth
10071            )
10072        }
10073    }
10074    unsafe impl<
10075            D: fidl::encoding::ResourceDialect,
10076            T0: fidl::encoding::Encode<u32, D>,
10077            T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Plane3>, D>,
10078        > fidl::encoding::Encode<SetClipPlanesCmd, D> for (T0, T1)
10079    {
10080        #[inline]
10081        unsafe fn encode(
10082            self,
10083            encoder: &mut fidl::encoding::Encoder<'_, D>,
10084            offset: usize,
10085            depth: fidl::encoding::Depth,
10086        ) -> fidl::Result<()> {
10087            encoder.debug_check_bounds::<SetClipPlanesCmd>(offset);
10088            // Zero out padding regions. There's no need to apply masks
10089            // because the unmasked parts will be overwritten by fields.
10090            unsafe {
10091                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10092                (ptr as *mut u64).write_unaligned(0);
10093            }
10094            // Write the fields.
10095            self.0.encode(encoder, offset + 0, depth)?;
10096            self.1.encode(encoder, offset + 8, depth)?;
10097            Ok(())
10098        }
10099    }
10100
10101    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetClipPlanesCmd {
10102        #[inline(always)]
10103        fn new_empty() -> Self {
10104            Self {
10105                node_id: fidl::new_empty!(u32, D),
10106                clip_planes: fidl::new_empty!(fidl::encoding::UnboundedVector<Plane3>, D),
10107            }
10108        }
10109
10110        #[inline]
10111        unsafe fn decode(
10112            &mut self,
10113            decoder: &mut fidl::encoding::Decoder<'_, D>,
10114            offset: usize,
10115            _depth: fidl::encoding::Depth,
10116        ) -> fidl::Result<()> {
10117            decoder.debug_check_bounds::<Self>(offset);
10118            // Verify that padding bytes are zero.
10119            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10120            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10121            let mask = 0xffffffff00000000u64;
10122            let maskedval = padval & mask;
10123            if maskedval != 0 {
10124                return Err(fidl::Error::NonZeroPadding {
10125                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10126                });
10127            }
10128            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
10129            fidl::decode!(
10130                fidl::encoding::UnboundedVector<Plane3>,
10131                D,
10132                &mut self.clip_planes,
10133                decoder,
10134                offset + 8,
10135                _depth
10136            )?;
10137            Ok(())
10138        }
10139    }
10140
10141    impl fidl::encoding::ValueTypeMarker for SetColorCmd {
10142        type Borrowed<'a> = &'a Self;
10143        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10144            value
10145        }
10146    }
10147
10148    unsafe impl fidl::encoding::TypeMarker for SetColorCmd {
10149        type Owned = Self;
10150
10151        #[inline(always)]
10152        fn inline_align(_context: fidl::encoding::Context) -> usize {
10153            4
10154        }
10155
10156        #[inline(always)]
10157        fn inline_size(_context: fidl::encoding::Context) -> usize {
10158            12
10159        }
10160        #[inline(always)]
10161        fn encode_is_copy() -> bool {
10162            true
10163        }
10164
10165        #[inline(always)]
10166        fn decode_is_copy() -> bool {
10167            true
10168        }
10169    }
10170
10171    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetColorCmd, D>
10172        for &SetColorCmd
10173    {
10174        #[inline]
10175        unsafe fn encode(
10176            self,
10177            encoder: &mut fidl::encoding::Encoder<'_, D>,
10178            offset: usize,
10179            _depth: fidl::encoding::Depth,
10180        ) -> fidl::Result<()> {
10181            encoder.debug_check_bounds::<SetColorCmd>(offset);
10182            unsafe {
10183                // Copy the object into the buffer.
10184                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10185                (buf_ptr as *mut SetColorCmd).write_unaligned((self as *const SetColorCmd).read());
10186                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10187                // done second because the memcpy will write garbage to these bytes.
10188            }
10189            Ok(())
10190        }
10191    }
10192    unsafe impl<
10193            D: fidl::encoding::ResourceDialect,
10194            T0: fidl::encoding::Encode<u32, D>,
10195            T1: fidl::encoding::Encode<ColorRgbaValue, D>,
10196        > fidl::encoding::Encode<SetColorCmd, D> for (T0, T1)
10197    {
10198        #[inline]
10199        unsafe fn encode(
10200            self,
10201            encoder: &mut fidl::encoding::Encoder<'_, D>,
10202            offset: usize,
10203            depth: fidl::encoding::Depth,
10204        ) -> fidl::Result<()> {
10205            encoder.debug_check_bounds::<SetColorCmd>(offset);
10206            // Zero out padding regions. There's no need to apply masks
10207            // because the unmasked parts will be overwritten by fields.
10208            // Write the fields.
10209            self.0.encode(encoder, offset + 0, depth)?;
10210            self.1.encode(encoder, offset + 4, depth)?;
10211            Ok(())
10212        }
10213    }
10214
10215    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetColorCmd {
10216        #[inline(always)]
10217        fn new_empty() -> Self {
10218            Self {
10219                material_id: fidl::new_empty!(u32, D),
10220                color: fidl::new_empty!(ColorRgbaValue, D),
10221            }
10222        }
10223
10224        #[inline]
10225        unsafe fn decode(
10226            &mut self,
10227            decoder: &mut fidl::encoding::Decoder<'_, D>,
10228            offset: usize,
10229            _depth: fidl::encoding::Depth,
10230        ) -> fidl::Result<()> {
10231            decoder.debug_check_bounds::<Self>(offset);
10232            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10233            // Verify that padding bytes are zero.
10234            // Copy from the buffer into the object.
10235            unsafe {
10236                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
10237            }
10238            Ok(())
10239        }
10240    }
10241
10242    impl fidl::encoding::ValueTypeMarker for SetDisableClippingCmd {
10243        type Borrowed<'a> = &'a Self;
10244        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10245            value
10246        }
10247    }
10248
10249    unsafe impl fidl::encoding::TypeMarker for SetDisableClippingCmd {
10250        type Owned = Self;
10251
10252        #[inline(always)]
10253        fn inline_align(_context: fidl::encoding::Context) -> usize {
10254            4
10255        }
10256
10257        #[inline(always)]
10258        fn inline_size(_context: fidl::encoding::Context) -> usize {
10259            8
10260        }
10261    }
10262
10263    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetDisableClippingCmd, D>
10264        for &SetDisableClippingCmd
10265    {
10266        #[inline]
10267        unsafe fn encode(
10268            self,
10269            encoder: &mut fidl::encoding::Encoder<'_, D>,
10270            offset: usize,
10271            _depth: fidl::encoding::Depth,
10272        ) -> fidl::Result<()> {
10273            encoder.debug_check_bounds::<SetDisableClippingCmd>(offset);
10274            // Delegate to tuple encoding.
10275            fidl::encoding::Encode::<SetDisableClippingCmd, D>::encode(
10276                (
10277                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.renderer_id),
10278                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.disable_clipping),
10279                ),
10280                encoder,
10281                offset,
10282                _depth,
10283            )
10284        }
10285    }
10286    unsafe impl<
10287            D: fidl::encoding::ResourceDialect,
10288            T0: fidl::encoding::Encode<u32, D>,
10289            T1: fidl::encoding::Encode<bool, D>,
10290        > fidl::encoding::Encode<SetDisableClippingCmd, D> for (T0, T1)
10291    {
10292        #[inline]
10293        unsafe fn encode(
10294            self,
10295            encoder: &mut fidl::encoding::Encoder<'_, D>,
10296            offset: usize,
10297            depth: fidl::encoding::Depth,
10298        ) -> fidl::Result<()> {
10299            encoder.debug_check_bounds::<SetDisableClippingCmd>(offset);
10300            // Zero out padding regions. There's no need to apply masks
10301            // because the unmasked parts will be overwritten by fields.
10302            unsafe {
10303                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
10304                (ptr as *mut u32).write_unaligned(0);
10305            }
10306            // Write the fields.
10307            self.0.encode(encoder, offset + 0, depth)?;
10308            self.1.encode(encoder, offset + 4, depth)?;
10309            Ok(())
10310        }
10311    }
10312
10313    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetDisableClippingCmd {
10314        #[inline(always)]
10315        fn new_empty() -> Self {
10316            Self {
10317                renderer_id: fidl::new_empty!(u32, D),
10318                disable_clipping: fidl::new_empty!(bool, D),
10319            }
10320        }
10321
10322        #[inline]
10323        unsafe fn decode(
10324            &mut self,
10325            decoder: &mut fidl::encoding::Decoder<'_, D>,
10326            offset: usize,
10327            _depth: fidl::encoding::Depth,
10328        ) -> fidl::Result<()> {
10329            decoder.debug_check_bounds::<Self>(offset);
10330            // Verify that padding bytes are zero.
10331            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
10332            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10333            let mask = 0xffffff00u32;
10334            let maskedval = padval & mask;
10335            if maskedval != 0 {
10336                return Err(fidl::Error::NonZeroPadding {
10337                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
10338                });
10339            }
10340            fidl::decode!(u32, D, &mut self.renderer_id, decoder, offset + 0, _depth)?;
10341            fidl::decode!(bool, D, &mut self.disable_clipping, decoder, offset + 4, _depth)?;
10342            Ok(())
10343        }
10344    }
10345
10346    impl fidl::encoding::ValueTypeMarker for SetDisplayColorConversionCmdHack {
10347        type Borrowed<'a> = &'a Self;
10348        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10349            value
10350        }
10351    }
10352
10353    unsafe impl fidl::encoding::TypeMarker for SetDisplayColorConversionCmdHack {
10354        type Owned = Self;
10355
10356        #[inline(always)]
10357        fn inline_align(_context: fidl::encoding::Context) -> usize {
10358            4
10359        }
10360
10361        #[inline(always)]
10362        fn inline_size(_context: fidl::encoding::Context) -> usize {
10363            64
10364        }
10365    }
10366
10367    unsafe impl<D: fidl::encoding::ResourceDialect>
10368        fidl::encoding::Encode<SetDisplayColorConversionCmdHack, D>
10369        for &SetDisplayColorConversionCmdHack
10370    {
10371        #[inline]
10372        unsafe fn encode(
10373            self,
10374            encoder: &mut fidl::encoding::Encoder<'_, D>,
10375            offset: usize,
10376            _depth: fidl::encoding::Depth,
10377        ) -> fidl::Result<()> {
10378            encoder.debug_check_bounds::<SetDisplayColorConversionCmdHack>(offset);
10379            // Delegate to tuple encoding.
10380            fidl::encoding::Encode::<SetDisplayColorConversionCmdHack, D>::encode(
10381                (
10382                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.compositor_id),
10383                    <fidl::encoding::Array<f32, 3> as fidl::encoding::ValueTypeMarker>::borrow(
10384                        &self.preoffsets,
10385                    ),
10386                    <fidl::encoding::Array<f32, 9> as fidl::encoding::ValueTypeMarker>::borrow(
10387                        &self.matrix,
10388                    ),
10389                    <fidl::encoding::Array<f32, 3> as fidl::encoding::ValueTypeMarker>::borrow(
10390                        &self.postoffsets,
10391                    ),
10392                ),
10393                encoder,
10394                offset,
10395                _depth,
10396            )
10397        }
10398    }
10399    unsafe impl<
10400            D: fidl::encoding::ResourceDialect,
10401            T0: fidl::encoding::Encode<u32, D>,
10402            T1: fidl::encoding::Encode<fidl::encoding::Array<f32, 3>, D>,
10403            T2: fidl::encoding::Encode<fidl::encoding::Array<f32, 9>, D>,
10404            T3: fidl::encoding::Encode<fidl::encoding::Array<f32, 3>, D>,
10405        > fidl::encoding::Encode<SetDisplayColorConversionCmdHack, D> for (T0, T1, T2, T3)
10406    {
10407        #[inline]
10408        unsafe fn encode(
10409            self,
10410            encoder: &mut fidl::encoding::Encoder<'_, D>,
10411            offset: usize,
10412            depth: fidl::encoding::Depth,
10413        ) -> fidl::Result<()> {
10414            encoder.debug_check_bounds::<SetDisplayColorConversionCmdHack>(offset);
10415            // Zero out padding regions. There's no need to apply masks
10416            // because the unmasked parts will be overwritten by fields.
10417            // Write the fields.
10418            self.0.encode(encoder, offset + 0, depth)?;
10419            self.1.encode(encoder, offset + 4, depth)?;
10420            self.2.encode(encoder, offset + 16, depth)?;
10421            self.3.encode(encoder, offset + 52, depth)?;
10422            Ok(())
10423        }
10424    }
10425
10426    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10427        for SetDisplayColorConversionCmdHack
10428    {
10429        #[inline(always)]
10430        fn new_empty() -> Self {
10431            Self {
10432                compositor_id: fidl::new_empty!(u32, D),
10433                preoffsets: fidl::new_empty!(fidl::encoding::Array<f32, 3>, D),
10434                matrix: fidl::new_empty!(fidl::encoding::Array<f32, 9>, D),
10435                postoffsets: fidl::new_empty!(fidl::encoding::Array<f32, 3>, D),
10436            }
10437        }
10438
10439        #[inline]
10440        unsafe fn decode(
10441            &mut self,
10442            decoder: &mut fidl::encoding::Decoder<'_, D>,
10443            offset: usize,
10444            _depth: fidl::encoding::Depth,
10445        ) -> fidl::Result<()> {
10446            decoder.debug_check_bounds::<Self>(offset);
10447            // Verify that padding bytes are zero.
10448            fidl::decode!(u32, D, &mut self.compositor_id, decoder, offset + 0, _depth)?;
10449            fidl::decode!(fidl::encoding::Array<f32, 3>, D, &mut self.preoffsets, decoder, offset + 4, _depth)?;
10450            fidl::decode!(fidl::encoding::Array<f32, 9>, D, &mut self.matrix, decoder, offset + 16, _depth)?;
10451            fidl::decode!(fidl::encoding::Array<f32, 3>, D, &mut self.postoffsets, decoder, offset + 52, _depth)?;
10452            Ok(())
10453        }
10454    }
10455
10456    impl fidl::encoding::ValueTypeMarker for SetDisplayMinimumRgbCmdHack {
10457        type Borrowed<'a> = &'a Self;
10458        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10459            value
10460        }
10461    }
10462
10463    unsafe impl fidl::encoding::TypeMarker for SetDisplayMinimumRgbCmdHack {
10464        type Owned = Self;
10465
10466        #[inline(always)]
10467        fn inline_align(_context: fidl::encoding::Context) -> usize {
10468            1
10469        }
10470
10471        #[inline(always)]
10472        fn inline_size(_context: fidl::encoding::Context) -> usize {
10473            1
10474        }
10475        #[inline(always)]
10476        fn encode_is_copy() -> bool {
10477            true
10478        }
10479
10480        #[inline(always)]
10481        fn decode_is_copy() -> bool {
10482            true
10483        }
10484    }
10485
10486    unsafe impl<D: fidl::encoding::ResourceDialect>
10487        fidl::encoding::Encode<SetDisplayMinimumRgbCmdHack, D> for &SetDisplayMinimumRgbCmdHack
10488    {
10489        #[inline]
10490        unsafe fn encode(
10491            self,
10492            encoder: &mut fidl::encoding::Encoder<'_, D>,
10493            offset: usize,
10494            _depth: fidl::encoding::Depth,
10495        ) -> fidl::Result<()> {
10496            encoder.debug_check_bounds::<SetDisplayMinimumRgbCmdHack>(offset);
10497            unsafe {
10498                // Copy the object into the buffer.
10499                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10500                (buf_ptr as *mut SetDisplayMinimumRgbCmdHack)
10501                    .write_unaligned((self as *const SetDisplayMinimumRgbCmdHack).read());
10502                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10503                // done second because the memcpy will write garbage to these bytes.
10504            }
10505            Ok(())
10506        }
10507    }
10508    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
10509        fidl::encoding::Encode<SetDisplayMinimumRgbCmdHack, D> for (T0,)
10510    {
10511        #[inline]
10512        unsafe fn encode(
10513            self,
10514            encoder: &mut fidl::encoding::Encoder<'_, D>,
10515            offset: usize,
10516            depth: fidl::encoding::Depth,
10517        ) -> fidl::Result<()> {
10518            encoder.debug_check_bounds::<SetDisplayMinimumRgbCmdHack>(offset);
10519            // Zero out padding regions. There's no need to apply masks
10520            // because the unmasked parts will be overwritten by fields.
10521            // Write the fields.
10522            self.0.encode(encoder, offset + 0, depth)?;
10523            Ok(())
10524        }
10525    }
10526
10527    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10528        for SetDisplayMinimumRgbCmdHack
10529    {
10530        #[inline(always)]
10531        fn new_empty() -> Self {
10532            Self { min_value: fidl::new_empty!(u8, D) }
10533        }
10534
10535        #[inline]
10536        unsafe fn decode(
10537            &mut self,
10538            decoder: &mut fidl::encoding::Decoder<'_, D>,
10539            offset: usize,
10540            _depth: fidl::encoding::Depth,
10541        ) -> fidl::Result<()> {
10542            decoder.debug_check_bounds::<Self>(offset);
10543            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10544            // Verify that padding bytes are zero.
10545            // Copy from the buffer into the object.
10546            unsafe {
10547                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
10548            }
10549            Ok(())
10550        }
10551    }
10552
10553    impl fidl::encoding::ValueTypeMarker for SetDisplayRotationCmdHack {
10554        type Borrowed<'a> = &'a Self;
10555        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10556            value
10557        }
10558    }
10559
10560    unsafe impl fidl::encoding::TypeMarker for SetDisplayRotationCmdHack {
10561        type Owned = Self;
10562
10563        #[inline(always)]
10564        fn inline_align(_context: fidl::encoding::Context) -> usize {
10565            4
10566        }
10567
10568        #[inline(always)]
10569        fn inline_size(_context: fidl::encoding::Context) -> usize {
10570            8
10571        }
10572        #[inline(always)]
10573        fn encode_is_copy() -> bool {
10574            true
10575        }
10576
10577        #[inline(always)]
10578        fn decode_is_copy() -> bool {
10579            true
10580        }
10581    }
10582
10583    unsafe impl<D: fidl::encoding::ResourceDialect>
10584        fidl::encoding::Encode<SetDisplayRotationCmdHack, D> for &SetDisplayRotationCmdHack
10585    {
10586        #[inline]
10587        unsafe fn encode(
10588            self,
10589            encoder: &mut fidl::encoding::Encoder<'_, D>,
10590            offset: usize,
10591            _depth: fidl::encoding::Depth,
10592        ) -> fidl::Result<()> {
10593            encoder.debug_check_bounds::<SetDisplayRotationCmdHack>(offset);
10594            unsafe {
10595                // Copy the object into the buffer.
10596                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10597                (buf_ptr as *mut SetDisplayRotationCmdHack)
10598                    .write_unaligned((self as *const SetDisplayRotationCmdHack).read());
10599                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10600                // done second because the memcpy will write garbage to these bytes.
10601            }
10602            Ok(())
10603        }
10604    }
10605    unsafe impl<
10606            D: fidl::encoding::ResourceDialect,
10607            T0: fidl::encoding::Encode<u32, D>,
10608            T1: fidl::encoding::Encode<u32, D>,
10609        > fidl::encoding::Encode<SetDisplayRotationCmdHack, D> for (T0, T1)
10610    {
10611        #[inline]
10612        unsafe fn encode(
10613            self,
10614            encoder: &mut fidl::encoding::Encoder<'_, D>,
10615            offset: usize,
10616            depth: fidl::encoding::Depth,
10617        ) -> fidl::Result<()> {
10618            encoder.debug_check_bounds::<SetDisplayRotationCmdHack>(offset);
10619            // Zero out padding regions. There's no need to apply masks
10620            // because the unmasked parts will be overwritten by fields.
10621            // Write the fields.
10622            self.0.encode(encoder, offset + 0, depth)?;
10623            self.1.encode(encoder, offset + 4, depth)?;
10624            Ok(())
10625        }
10626    }
10627
10628    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10629        for SetDisplayRotationCmdHack
10630    {
10631        #[inline(always)]
10632        fn new_empty() -> Self {
10633            Self {
10634                compositor_id: fidl::new_empty!(u32, D),
10635                rotation_degrees: fidl::new_empty!(u32, D),
10636            }
10637        }
10638
10639        #[inline]
10640        unsafe fn decode(
10641            &mut self,
10642            decoder: &mut fidl::encoding::Decoder<'_, D>,
10643            offset: usize,
10644            _depth: fidl::encoding::Depth,
10645        ) -> fidl::Result<()> {
10646            decoder.debug_check_bounds::<Self>(offset);
10647            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10648            // Verify that padding bytes are zero.
10649            // Copy from the buffer into the object.
10650            unsafe {
10651                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
10652            }
10653            Ok(())
10654        }
10655    }
10656
10657    impl fidl::encoding::ValueTypeMarker for SetEnableDebugViewBoundsCmd {
10658        type Borrowed<'a> = &'a Self;
10659        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10660            value
10661        }
10662    }
10663
10664    unsafe impl fidl::encoding::TypeMarker for SetEnableDebugViewBoundsCmd {
10665        type Owned = Self;
10666
10667        #[inline(always)]
10668        fn inline_align(_context: fidl::encoding::Context) -> usize {
10669            4
10670        }
10671
10672        #[inline(always)]
10673        fn inline_size(_context: fidl::encoding::Context) -> usize {
10674            8
10675        }
10676    }
10677
10678    unsafe impl<D: fidl::encoding::ResourceDialect>
10679        fidl::encoding::Encode<SetEnableDebugViewBoundsCmd, D> for &SetEnableDebugViewBoundsCmd
10680    {
10681        #[inline]
10682        unsafe fn encode(
10683            self,
10684            encoder: &mut fidl::encoding::Encoder<'_, D>,
10685            offset: usize,
10686            _depth: fidl::encoding::Depth,
10687        ) -> fidl::Result<()> {
10688            encoder.debug_check_bounds::<SetEnableDebugViewBoundsCmd>(offset);
10689            // Delegate to tuple encoding.
10690            fidl::encoding::Encode::<SetEnableDebugViewBoundsCmd, D>::encode(
10691                (
10692                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.view_id),
10693                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.enable),
10694                ),
10695                encoder,
10696                offset,
10697                _depth,
10698            )
10699        }
10700    }
10701    unsafe impl<
10702            D: fidl::encoding::ResourceDialect,
10703            T0: fidl::encoding::Encode<u32, D>,
10704            T1: fidl::encoding::Encode<bool, D>,
10705        > fidl::encoding::Encode<SetEnableDebugViewBoundsCmd, D> for (T0, T1)
10706    {
10707        #[inline]
10708        unsafe fn encode(
10709            self,
10710            encoder: &mut fidl::encoding::Encoder<'_, D>,
10711            offset: usize,
10712            depth: fidl::encoding::Depth,
10713        ) -> fidl::Result<()> {
10714            encoder.debug_check_bounds::<SetEnableDebugViewBoundsCmd>(offset);
10715            // Zero out padding regions. There's no need to apply masks
10716            // because the unmasked parts will be overwritten by fields.
10717            unsafe {
10718                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
10719                (ptr as *mut u32).write_unaligned(0);
10720            }
10721            // Write the fields.
10722            self.0.encode(encoder, offset + 0, depth)?;
10723            self.1.encode(encoder, offset + 4, depth)?;
10724            Ok(())
10725        }
10726    }
10727
10728    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10729        for SetEnableDebugViewBoundsCmd
10730    {
10731        #[inline(always)]
10732        fn new_empty() -> Self {
10733            Self { view_id: fidl::new_empty!(u32, D), enable: fidl::new_empty!(bool, D) }
10734        }
10735
10736        #[inline]
10737        unsafe fn decode(
10738            &mut self,
10739            decoder: &mut fidl::encoding::Decoder<'_, D>,
10740            offset: usize,
10741            _depth: fidl::encoding::Depth,
10742        ) -> fidl::Result<()> {
10743            decoder.debug_check_bounds::<Self>(offset);
10744            // Verify that padding bytes are zero.
10745            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
10746            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10747            let mask = 0xffffff00u32;
10748            let maskedval = padval & mask;
10749            if maskedval != 0 {
10750                return Err(fidl::Error::NonZeroPadding {
10751                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
10752                });
10753            }
10754            fidl::decode!(u32, D, &mut self.view_id, decoder, offset + 0, _depth)?;
10755            fidl::decode!(bool, D, &mut self.enable, decoder, offset + 4, _depth)?;
10756            Ok(())
10757        }
10758    }
10759
10760    impl fidl::encoding::ValueTypeMarker for SetEventMaskCmd {
10761        type Borrowed<'a> = &'a Self;
10762        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10763            value
10764        }
10765    }
10766
10767    unsafe impl fidl::encoding::TypeMarker for SetEventMaskCmd {
10768        type Owned = Self;
10769
10770        #[inline(always)]
10771        fn inline_align(_context: fidl::encoding::Context) -> usize {
10772            4
10773        }
10774
10775        #[inline(always)]
10776        fn inline_size(_context: fidl::encoding::Context) -> usize {
10777            8
10778        }
10779        #[inline(always)]
10780        fn encode_is_copy() -> bool {
10781            true
10782        }
10783
10784        #[inline(always)]
10785        fn decode_is_copy() -> bool {
10786            true
10787        }
10788    }
10789
10790    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetEventMaskCmd, D>
10791        for &SetEventMaskCmd
10792    {
10793        #[inline]
10794        unsafe fn encode(
10795            self,
10796            encoder: &mut fidl::encoding::Encoder<'_, D>,
10797            offset: usize,
10798            _depth: fidl::encoding::Depth,
10799        ) -> fidl::Result<()> {
10800            encoder.debug_check_bounds::<SetEventMaskCmd>(offset);
10801            unsafe {
10802                // Copy the object into the buffer.
10803                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10804                (buf_ptr as *mut SetEventMaskCmd)
10805                    .write_unaligned((self as *const SetEventMaskCmd).read());
10806                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10807                // done second because the memcpy will write garbage to these bytes.
10808            }
10809            Ok(())
10810        }
10811    }
10812    unsafe impl<
10813            D: fidl::encoding::ResourceDialect,
10814            T0: fidl::encoding::Encode<u32, D>,
10815            T1: fidl::encoding::Encode<u32, D>,
10816        > fidl::encoding::Encode<SetEventMaskCmd, D> for (T0, T1)
10817    {
10818        #[inline]
10819        unsafe fn encode(
10820            self,
10821            encoder: &mut fidl::encoding::Encoder<'_, D>,
10822            offset: usize,
10823            depth: fidl::encoding::Depth,
10824        ) -> fidl::Result<()> {
10825            encoder.debug_check_bounds::<SetEventMaskCmd>(offset);
10826            // Zero out padding regions. There's no need to apply masks
10827            // because the unmasked parts will be overwritten by fields.
10828            // Write the fields.
10829            self.0.encode(encoder, offset + 0, depth)?;
10830            self.1.encode(encoder, offset + 4, depth)?;
10831            Ok(())
10832        }
10833    }
10834
10835    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetEventMaskCmd {
10836        #[inline(always)]
10837        fn new_empty() -> Self {
10838            Self { id: fidl::new_empty!(u32, D), event_mask: fidl::new_empty!(u32, D) }
10839        }
10840
10841        #[inline]
10842        unsafe fn decode(
10843            &mut self,
10844            decoder: &mut fidl::encoding::Decoder<'_, D>,
10845            offset: usize,
10846            _depth: fidl::encoding::Depth,
10847        ) -> fidl::Result<()> {
10848            decoder.debug_check_bounds::<Self>(offset);
10849            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10850            // Verify that padding bytes are zero.
10851            // Copy from the buffer into the object.
10852            unsafe {
10853                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
10854            }
10855            Ok(())
10856        }
10857    }
10858
10859    impl fidl::encoding::ValueTypeMarker for SetHitTestBehaviorCmd {
10860        type Borrowed<'a> = &'a Self;
10861        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10862            value
10863        }
10864    }
10865
10866    unsafe impl fidl::encoding::TypeMarker for SetHitTestBehaviorCmd {
10867        type Owned = Self;
10868
10869        #[inline(always)]
10870        fn inline_align(_context: fidl::encoding::Context) -> usize {
10871            4
10872        }
10873
10874        #[inline(always)]
10875        fn inline_size(_context: fidl::encoding::Context) -> usize {
10876            8
10877        }
10878    }
10879
10880    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetHitTestBehaviorCmd, D>
10881        for &SetHitTestBehaviorCmd
10882    {
10883        #[inline]
10884        unsafe fn encode(
10885            self,
10886            encoder: &mut fidl::encoding::Encoder<'_, D>,
10887            offset: usize,
10888            _depth: fidl::encoding::Depth,
10889        ) -> fidl::Result<()> {
10890            encoder.debug_check_bounds::<SetHitTestBehaviorCmd>(offset);
10891            // Delegate to tuple encoding.
10892            fidl::encoding::Encode::<SetHitTestBehaviorCmd, D>::encode(
10893                (
10894                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
10895                    <HitTestBehavior as fidl::encoding::ValueTypeMarker>::borrow(
10896                        &self.hit_test_behavior,
10897                    ),
10898                ),
10899                encoder,
10900                offset,
10901                _depth,
10902            )
10903        }
10904    }
10905    unsafe impl<
10906            D: fidl::encoding::ResourceDialect,
10907            T0: fidl::encoding::Encode<u32, D>,
10908            T1: fidl::encoding::Encode<HitTestBehavior, D>,
10909        > fidl::encoding::Encode<SetHitTestBehaviorCmd, D> for (T0, T1)
10910    {
10911        #[inline]
10912        unsafe fn encode(
10913            self,
10914            encoder: &mut fidl::encoding::Encoder<'_, D>,
10915            offset: usize,
10916            depth: fidl::encoding::Depth,
10917        ) -> fidl::Result<()> {
10918            encoder.debug_check_bounds::<SetHitTestBehaviorCmd>(offset);
10919            // Zero out padding regions. There's no need to apply masks
10920            // because the unmasked parts will be overwritten by fields.
10921            // Write the fields.
10922            self.0.encode(encoder, offset + 0, depth)?;
10923            self.1.encode(encoder, offset + 4, depth)?;
10924            Ok(())
10925        }
10926    }
10927
10928    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetHitTestBehaviorCmd {
10929        #[inline(always)]
10930        fn new_empty() -> Self {
10931            Self {
10932                node_id: fidl::new_empty!(u32, D),
10933                hit_test_behavior: fidl::new_empty!(HitTestBehavior, D),
10934            }
10935        }
10936
10937        #[inline]
10938        unsafe fn decode(
10939            &mut self,
10940            decoder: &mut fidl::encoding::Decoder<'_, D>,
10941            offset: usize,
10942            _depth: fidl::encoding::Depth,
10943        ) -> fidl::Result<()> {
10944            decoder.debug_check_bounds::<Self>(offset);
10945            // Verify that padding bytes are zero.
10946            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
10947            fidl::decode!(
10948                HitTestBehavior,
10949                D,
10950                &mut self.hit_test_behavior,
10951                decoder,
10952                offset + 4,
10953                _depth
10954            )?;
10955            Ok(())
10956        }
10957    }
10958
10959    impl fidl::encoding::ValueTypeMarker for SetImportFocusCmdDeprecated {
10960        type Borrowed<'a> = &'a Self;
10961        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10962            value
10963        }
10964    }
10965
10966    unsafe impl fidl::encoding::TypeMarker for SetImportFocusCmdDeprecated {
10967        type Owned = Self;
10968
10969        #[inline(always)]
10970        fn inline_align(_context: fidl::encoding::Context) -> usize {
10971            1
10972        }
10973
10974        #[inline(always)]
10975        fn inline_size(_context: fidl::encoding::Context) -> usize {
10976            1
10977        }
10978    }
10979
10980    unsafe impl<D: fidl::encoding::ResourceDialect>
10981        fidl::encoding::Encode<SetImportFocusCmdDeprecated, D> for &SetImportFocusCmdDeprecated
10982    {
10983        #[inline]
10984        unsafe fn encode(
10985            self,
10986            encoder: &mut fidl::encoding::Encoder<'_, D>,
10987            offset: usize,
10988            _depth: fidl::encoding::Depth,
10989        ) -> fidl::Result<()> {
10990            encoder.debug_check_bounds::<SetImportFocusCmdDeprecated>(offset);
10991            encoder.write_num(0u8, offset);
10992            Ok(())
10993        }
10994    }
10995
10996    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10997        for SetImportFocusCmdDeprecated
10998    {
10999        #[inline(always)]
11000        fn new_empty() -> Self {
11001            Self
11002        }
11003
11004        #[inline]
11005        unsafe fn decode(
11006            &mut self,
11007            decoder: &mut fidl::encoding::Decoder<'_, D>,
11008            offset: usize,
11009            _depth: fidl::encoding::Depth,
11010        ) -> fidl::Result<()> {
11011            decoder.debug_check_bounds::<Self>(offset);
11012            match decoder.read_num::<u8>(offset) {
11013                0 => Ok(()),
11014                _ => Err(fidl::Error::Invalid),
11015            }
11016        }
11017    }
11018
11019    impl fidl::encoding::ValueTypeMarker for SetLabelCmd {
11020        type Borrowed<'a> = &'a Self;
11021        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11022            value
11023        }
11024    }
11025
11026    unsafe impl fidl::encoding::TypeMarker for SetLabelCmd {
11027        type Owned = Self;
11028
11029        #[inline(always)]
11030        fn inline_align(_context: fidl::encoding::Context) -> usize {
11031            8
11032        }
11033
11034        #[inline(always)]
11035        fn inline_size(_context: fidl::encoding::Context) -> usize {
11036            24
11037        }
11038    }
11039
11040    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetLabelCmd, D>
11041        for &SetLabelCmd
11042    {
11043        #[inline]
11044        unsafe fn encode(
11045            self,
11046            encoder: &mut fidl::encoding::Encoder<'_, D>,
11047            offset: usize,
11048            _depth: fidl::encoding::Depth,
11049        ) -> fidl::Result<()> {
11050            encoder.debug_check_bounds::<SetLabelCmd>(offset);
11051            // Delegate to tuple encoding.
11052            fidl::encoding::Encode::<SetLabelCmd, D>::encode(
11053                (
11054                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
11055                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
11056                        &self.label,
11057                    ),
11058                ),
11059                encoder,
11060                offset,
11061                _depth,
11062            )
11063        }
11064    }
11065    unsafe impl<
11066            D: fidl::encoding::ResourceDialect,
11067            T0: fidl::encoding::Encode<u32, D>,
11068            T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
11069        > fidl::encoding::Encode<SetLabelCmd, D> for (T0, T1)
11070    {
11071        #[inline]
11072        unsafe fn encode(
11073            self,
11074            encoder: &mut fidl::encoding::Encoder<'_, D>,
11075            offset: usize,
11076            depth: fidl::encoding::Depth,
11077        ) -> fidl::Result<()> {
11078            encoder.debug_check_bounds::<SetLabelCmd>(offset);
11079            // Zero out padding regions. There's no need to apply masks
11080            // because the unmasked parts will be overwritten by fields.
11081            unsafe {
11082                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
11083                (ptr as *mut u64).write_unaligned(0);
11084            }
11085            // Write the fields.
11086            self.0.encode(encoder, offset + 0, depth)?;
11087            self.1.encode(encoder, offset + 8, depth)?;
11088            Ok(())
11089        }
11090    }
11091
11092    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetLabelCmd {
11093        #[inline(always)]
11094        fn new_empty() -> Self {
11095            Self {
11096                id: fidl::new_empty!(u32, D),
11097                label: fidl::new_empty!(fidl::encoding::UnboundedString, D),
11098            }
11099        }
11100
11101        #[inline]
11102        unsafe fn decode(
11103            &mut self,
11104            decoder: &mut fidl::encoding::Decoder<'_, D>,
11105            offset: usize,
11106            _depth: fidl::encoding::Depth,
11107        ) -> fidl::Result<()> {
11108            decoder.debug_check_bounds::<Self>(offset);
11109            // Verify that padding bytes are zero.
11110            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
11111            let padval = unsafe { (ptr as *const u64).read_unaligned() };
11112            let mask = 0xffffffff00000000u64;
11113            let maskedval = padval & mask;
11114            if maskedval != 0 {
11115                return Err(fidl::Error::NonZeroPadding {
11116                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
11117                });
11118            }
11119            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
11120            fidl::decode!(
11121                fidl::encoding::UnboundedString,
11122                D,
11123                &mut self.label,
11124                decoder,
11125                offset + 8,
11126                _depth
11127            )?;
11128            Ok(())
11129        }
11130    }
11131
11132    impl fidl::encoding::ValueTypeMarker for SetLayerStackCmd {
11133        type Borrowed<'a> = &'a Self;
11134        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11135            value
11136        }
11137    }
11138
11139    unsafe impl fidl::encoding::TypeMarker for SetLayerStackCmd {
11140        type Owned = Self;
11141
11142        #[inline(always)]
11143        fn inline_align(_context: fidl::encoding::Context) -> usize {
11144            4
11145        }
11146
11147        #[inline(always)]
11148        fn inline_size(_context: fidl::encoding::Context) -> usize {
11149            8
11150        }
11151        #[inline(always)]
11152        fn encode_is_copy() -> bool {
11153            true
11154        }
11155
11156        #[inline(always)]
11157        fn decode_is_copy() -> bool {
11158            true
11159        }
11160    }
11161
11162    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetLayerStackCmd, D>
11163        for &SetLayerStackCmd
11164    {
11165        #[inline]
11166        unsafe fn encode(
11167            self,
11168            encoder: &mut fidl::encoding::Encoder<'_, D>,
11169            offset: usize,
11170            _depth: fidl::encoding::Depth,
11171        ) -> fidl::Result<()> {
11172            encoder.debug_check_bounds::<SetLayerStackCmd>(offset);
11173            unsafe {
11174                // Copy the object into the buffer.
11175                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11176                (buf_ptr as *mut SetLayerStackCmd)
11177                    .write_unaligned((self as *const SetLayerStackCmd).read());
11178                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11179                // done second because the memcpy will write garbage to these bytes.
11180            }
11181            Ok(())
11182        }
11183    }
11184    unsafe impl<
11185            D: fidl::encoding::ResourceDialect,
11186            T0: fidl::encoding::Encode<u32, D>,
11187            T1: fidl::encoding::Encode<u32, D>,
11188        > fidl::encoding::Encode<SetLayerStackCmd, D> for (T0, T1)
11189    {
11190        #[inline]
11191        unsafe fn encode(
11192            self,
11193            encoder: &mut fidl::encoding::Encoder<'_, D>,
11194            offset: usize,
11195            depth: fidl::encoding::Depth,
11196        ) -> fidl::Result<()> {
11197            encoder.debug_check_bounds::<SetLayerStackCmd>(offset);
11198            // Zero out padding regions. There's no need to apply masks
11199            // because the unmasked parts will be overwritten by fields.
11200            // Write the fields.
11201            self.0.encode(encoder, offset + 0, depth)?;
11202            self.1.encode(encoder, offset + 4, depth)?;
11203            Ok(())
11204        }
11205    }
11206
11207    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetLayerStackCmd {
11208        #[inline(always)]
11209        fn new_empty() -> Self {
11210            Self {
11211                compositor_id: fidl::new_empty!(u32, D),
11212                layer_stack_id: fidl::new_empty!(u32, D),
11213            }
11214        }
11215
11216        #[inline]
11217        unsafe fn decode(
11218            &mut self,
11219            decoder: &mut fidl::encoding::Decoder<'_, D>,
11220            offset: usize,
11221            _depth: fidl::encoding::Depth,
11222        ) -> fidl::Result<()> {
11223            decoder.debug_check_bounds::<Self>(offset);
11224            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11225            // Verify that padding bytes are zero.
11226            // Copy from the buffer into the object.
11227            unsafe {
11228                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
11229            }
11230            Ok(())
11231        }
11232    }
11233
11234    impl fidl::encoding::ValueTypeMarker for SetLightColorCmd {
11235        type Borrowed<'a> = &'a Self;
11236        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11237            value
11238        }
11239    }
11240
11241    unsafe impl fidl::encoding::TypeMarker for SetLightColorCmd {
11242        type Owned = Self;
11243
11244        #[inline(always)]
11245        fn inline_align(_context: fidl::encoding::Context) -> usize {
11246            4
11247        }
11248
11249        #[inline(always)]
11250        fn inline_size(_context: fidl::encoding::Context) -> usize {
11251            20
11252        }
11253    }
11254
11255    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetLightColorCmd, D>
11256        for &SetLightColorCmd
11257    {
11258        #[inline]
11259        unsafe fn encode(
11260            self,
11261            encoder: &mut fidl::encoding::Encoder<'_, D>,
11262            offset: usize,
11263            _depth: fidl::encoding::Depth,
11264        ) -> fidl::Result<()> {
11265            encoder.debug_check_bounds::<SetLightColorCmd>(offset);
11266            // Delegate to tuple encoding.
11267            fidl::encoding::Encode::<SetLightColorCmd, D>::encode(
11268                (
11269                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.light_id),
11270                    <ColorRgbValue as fidl::encoding::ValueTypeMarker>::borrow(&self.color),
11271                ),
11272                encoder,
11273                offset,
11274                _depth,
11275            )
11276        }
11277    }
11278    unsafe impl<
11279            D: fidl::encoding::ResourceDialect,
11280            T0: fidl::encoding::Encode<u32, D>,
11281            T1: fidl::encoding::Encode<ColorRgbValue, D>,
11282        > fidl::encoding::Encode<SetLightColorCmd, D> for (T0, T1)
11283    {
11284        #[inline]
11285        unsafe fn encode(
11286            self,
11287            encoder: &mut fidl::encoding::Encoder<'_, D>,
11288            offset: usize,
11289            depth: fidl::encoding::Depth,
11290        ) -> fidl::Result<()> {
11291            encoder.debug_check_bounds::<SetLightColorCmd>(offset);
11292            // Zero out padding regions. There's no need to apply masks
11293            // because the unmasked parts will be overwritten by fields.
11294            // Write the fields.
11295            self.0.encode(encoder, offset + 0, depth)?;
11296            self.1.encode(encoder, offset + 4, depth)?;
11297            Ok(())
11298        }
11299    }
11300
11301    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetLightColorCmd {
11302        #[inline(always)]
11303        fn new_empty() -> Self {
11304            Self { light_id: fidl::new_empty!(u32, D), color: fidl::new_empty!(ColorRgbValue, D) }
11305        }
11306
11307        #[inline]
11308        unsafe fn decode(
11309            &mut self,
11310            decoder: &mut fidl::encoding::Decoder<'_, D>,
11311            offset: usize,
11312            _depth: fidl::encoding::Depth,
11313        ) -> fidl::Result<()> {
11314            decoder.debug_check_bounds::<Self>(offset);
11315            // Verify that padding bytes are zero.
11316            fidl::decode!(u32, D, &mut self.light_id, decoder, offset + 0, _depth)?;
11317            fidl::decode!(ColorRgbValue, D, &mut self.color, decoder, offset + 4, _depth)?;
11318            Ok(())
11319        }
11320    }
11321
11322    impl fidl::encoding::ValueTypeMarker for SetLightDirectionCmd {
11323        type Borrowed<'a> = &'a Self;
11324        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11325            value
11326        }
11327    }
11328
11329    unsafe impl fidl::encoding::TypeMarker for SetLightDirectionCmd {
11330        type Owned = Self;
11331
11332        #[inline(always)]
11333        fn inline_align(_context: fidl::encoding::Context) -> usize {
11334            4
11335        }
11336
11337        #[inline(always)]
11338        fn inline_size(_context: fidl::encoding::Context) -> usize {
11339            20
11340        }
11341    }
11342
11343    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetLightDirectionCmd, D>
11344        for &SetLightDirectionCmd
11345    {
11346        #[inline]
11347        unsafe fn encode(
11348            self,
11349            encoder: &mut fidl::encoding::Encoder<'_, D>,
11350            offset: usize,
11351            _depth: fidl::encoding::Depth,
11352        ) -> fidl::Result<()> {
11353            encoder.debug_check_bounds::<SetLightDirectionCmd>(offset);
11354            // Delegate to tuple encoding.
11355            fidl::encoding::Encode::<SetLightDirectionCmd, D>::encode(
11356                (
11357                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.light_id),
11358                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.direction),
11359                ),
11360                encoder,
11361                offset,
11362                _depth,
11363            )
11364        }
11365    }
11366    unsafe impl<
11367            D: fidl::encoding::ResourceDialect,
11368            T0: fidl::encoding::Encode<u32, D>,
11369            T1: fidl::encoding::Encode<Vector3Value, D>,
11370        > fidl::encoding::Encode<SetLightDirectionCmd, D> for (T0, T1)
11371    {
11372        #[inline]
11373        unsafe fn encode(
11374            self,
11375            encoder: &mut fidl::encoding::Encoder<'_, D>,
11376            offset: usize,
11377            depth: fidl::encoding::Depth,
11378        ) -> fidl::Result<()> {
11379            encoder.debug_check_bounds::<SetLightDirectionCmd>(offset);
11380            // Zero out padding regions. There's no need to apply masks
11381            // because the unmasked parts will be overwritten by fields.
11382            // Write the fields.
11383            self.0.encode(encoder, offset + 0, depth)?;
11384            self.1.encode(encoder, offset + 4, depth)?;
11385            Ok(())
11386        }
11387    }
11388
11389    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetLightDirectionCmd {
11390        #[inline(always)]
11391        fn new_empty() -> Self {
11392            Self {
11393                light_id: fidl::new_empty!(u32, D),
11394                direction: fidl::new_empty!(Vector3Value, D),
11395            }
11396        }
11397
11398        #[inline]
11399        unsafe fn decode(
11400            &mut self,
11401            decoder: &mut fidl::encoding::Decoder<'_, D>,
11402            offset: usize,
11403            _depth: fidl::encoding::Depth,
11404        ) -> fidl::Result<()> {
11405            decoder.debug_check_bounds::<Self>(offset);
11406            // Verify that padding bytes are zero.
11407            fidl::decode!(u32, D, &mut self.light_id, decoder, offset + 0, _depth)?;
11408            fidl::decode!(Vector3Value, D, &mut self.direction, decoder, offset + 4, _depth)?;
11409            Ok(())
11410        }
11411    }
11412
11413    impl fidl::encoding::ValueTypeMarker for SetMaterialCmd {
11414        type Borrowed<'a> = &'a Self;
11415        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11416            value
11417        }
11418    }
11419
11420    unsafe impl fidl::encoding::TypeMarker for SetMaterialCmd {
11421        type Owned = Self;
11422
11423        #[inline(always)]
11424        fn inline_align(_context: fidl::encoding::Context) -> usize {
11425            4
11426        }
11427
11428        #[inline(always)]
11429        fn inline_size(_context: fidl::encoding::Context) -> usize {
11430            8
11431        }
11432        #[inline(always)]
11433        fn encode_is_copy() -> bool {
11434            true
11435        }
11436
11437        #[inline(always)]
11438        fn decode_is_copy() -> bool {
11439            true
11440        }
11441    }
11442
11443    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetMaterialCmd, D>
11444        for &SetMaterialCmd
11445    {
11446        #[inline]
11447        unsafe fn encode(
11448            self,
11449            encoder: &mut fidl::encoding::Encoder<'_, D>,
11450            offset: usize,
11451            _depth: fidl::encoding::Depth,
11452        ) -> fidl::Result<()> {
11453            encoder.debug_check_bounds::<SetMaterialCmd>(offset);
11454            unsafe {
11455                // Copy the object into the buffer.
11456                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11457                (buf_ptr as *mut SetMaterialCmd)
11458                    .write_unaligned((self as *const SetMaterialCmd).read());
11459                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11460                // done second because the memcpy will write garbage to these bytes.
11461            }
11462            Ok(())
11463        }
11464    }
11465    unsafe impl<
11466            D: fidl::encoding::ResourceDialect,
11467            T0: fidl::encoding::Encode<u32, D>,
11468            T1: fidl::encoding::Encode<u32, D>,
11469        > fidl::encoding::Encode<SetMaterialCmd, D> for (T0, T1)
11470    {
11471        #[inline]
11472        unsafe fn encode(
11473            self,
11474            encoder: &mut fidl::encoding::Encoder<'_, D>,
11475            offset: usize,
11476            depth: fidl::encoding::Depth,
11477        ) -> fidl::Result<()> {
11478            encoder.debug_check_bounds::<SetMaterialCmd>(offset);
11479            // Zero out padding regions. There's no need to apply masks
11480            // because the unmasked parts will be overwritten by fields.
11481            // Write the fields.
11482            self.0.encode(encoder, offset + 0, depth)?;
11483            self.1.encode(encoder, offset + 4, depth)?;
11484            Ok(())
11485        }
11486    }
11487
11488    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetMaterialCmd {
11489        #[inline(always)]
11490        fn new_empty() -> Self {
11491            Self { node_id: fidl::new_empty!(u32, D), material_id: fidl::new_empty!(u32, D) }
11492        }
11493
11494        #[inline]
11495        unsafe fn decode(
11496            &mut self,
11497            decoder: &mut fidl::encoding::Decoder<'_, D>,
11498            offset: usize,
11499            _depth: fidl::encoding::Depth,
11500        ) -> fidl::Result<()> {
11501            decoder.debug_check_bounds::<Self>(offset);
11502            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11503            // Verify that padding bytes are zero.
11504            // Copy from the buffer into the object.
11505            unsafe {
11506                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
11507            }
11508            Ok(())
11509        }
11510    }
11511
11512    impl fidl::encoding::ValueTypeMarker for SetOpacityCmd {
11513        type Borrowed<'a> = &'a Self;
11514        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11515            value
11516        }
11517    }
11518
11519    unsafe impl fidl::encoding::TypeMarker for SetOpacityCmd {
11520        type Owned = Self;
11521
11522        #[inline(always)]
11523        fn inline_align(_context: fidl::encoding::Context) -> usize {
11524            4
11525        }
11526
11527        #[inline(always)]
11528        fn inline_size(_context: fidl::encoding::Context) -> usize {
11529            8
11530        }
11531    }
11532
11533    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetOpacityCmd, D>
11534        for &SetOpacityCmd
11535    {
11536        #[inline]
11537        unsafe fn encode(
11538            self,
11539            encoder: &mut fidl::encoding::Encoder<'_, D>,
11540            offset: usize,
11541            _depth: fidl::encoding::Depth,
11542        ) -> fidl::Result<()> {
11543            encoder.debug_check_bounds::<SetOpacityCmd>(offset);
11544            // Delegate to tuple encoding.
11545            fidl::encoding::Encode::<SetOpacityCmd, D>::encode(
11546                (
11547                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
11548                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.opacity),
11549                ),
11550                encoder,
11551                offset,
11552                _depth,
11553            )
11554        }
11555    }
11556    unsafe impl<
11557            D: fidl::encoding::ResourceDialect,
11558            T0: fidl::encoding::Encode<u32, D>,
11559            T1: fidl::encoding::Encode<f32, D>,
11560        > fidl::encoding::Encode<SetOpacityCmd, D> for (T0, T1)
11561    {
11562        #[inline]
11563        unsafe fn encode(
11564            self,
11565            encoder: &mut fidl::encoding::Encoder<'_, D>,
11566            offset: usize,
11567            depth: fidl::encoding::Depth,
11568        ) -> fidl::Result<()> {
11569            encoder.debug_check_bounds::<SetOpacityCmd>(offset);
11570            // Zero out padding regions. There's no need to apply masks
11571            // because the unmasked parts will be overwritten by fields.
11572            // Write the fields.
11573            self.0.encode(encoder, offset + 0, depth)?;
11574            self.1.encode(encoder, offset + 4, depth)?;
11575            Ok(())
11576        }
11577    }
11578
11579    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetOpacityCmd {
11580        #[inline(always)]
11581        fn new_empty() -> Self {
11582            Self { node_id: fidl::new_empty!(u32, D), opacity: fidl::new_empty!(f32, D) }
11583        }
11584
11585        #[inline]
11586        unsafe fn decode(
11587            &mut self,
11588            decoder: &mut fidl::encoding::Decoder<'_, D>,
11589            offset: usize,
11590            _depth: fidl::encoding::Depth,
11591        ) -> fidl::Result<()> {
11592            decoder.debug_check_bounds::<Self>(offset);
11593            // Verify that padding bytes are zero.
11594            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
11595            fidl::decode!(f32, D, &mut self.opacity, decoder, offset + 4, _depth)?;
11596            Ok(())
11597        }
11598    }
11599
11600    impl fidl::encoding::ValueTypeMarker for SetPointLightFalloffCmd {
11601        type Borrowed<'a> = &'a Self;
11602        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11603            value
11604        }
11605    }
11606
11607    unsafe impl fidl::encoding::TypeMarker for SetPointLightFalloffCmd {
11608        type Owned = Self;
11609
11610        #[inline(always)]
11611        fn inline_align(_context: fidl::encoding::Context) -> usize {
11612            4
11613        }
11614
11615        #[inline(always)]
11616        fn inline_size(_context: fidl::encoding::Context) -> usize {
11617            12
11618        }
11619    }
11620
11621    unsafe impl<D: fidl::encoding::ResourceDialect>
11622        fidl::encoding::Encode<SetPointLightFalloffCmd, D> for &SetPointLightFalloffCmd
11623    {
11624        #[inline]
11625        unsafe fn encode(
11626            self,
11627            encoder: &mut fidl::encoding::Encoder<'_, D>,
11628            offset: usize,
11629            _depth: fidl::encoding::Depth,
11630        ) -> fidl::Result<()> {
11631            encoder.debug_check_bounds::<SetPointLightFalloffCmd>(offset);
11632            // Delegate to tuple encoding.
11633            fidl::encoding::Encode::<SetPointLightFalloffCmd, D>::encode(
11634                (
11635                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.light_id),
11636                    <FloatValue as fidl::encoding::ValueTypeMarker>::borrow(&self.falloff),
11637                ),
11638                encoder,
11639                offset,
11640                _depth,
11641            )
11642        }
11643    }
11644    unsafe impl<
11645            D: fidl::encoding::ResourceDialect,
11646            T0: fidl::encoding::Encode<u32, D>,
11647            T1: fidl::encoding::Encode<FloatValue, D>,
11648        > fidl::encoding::Encode<SetPointLightFalloffCmd, D> for (T0, T1)
11649    {
11650        #[inline]
11651        unsafe fn encode(
11652            self,
11653            encoder: &mut fidl::encoding::Encoder<'_, D>,
11654            offset: usize,
11655            depth: fidl::encoding::Depth,
11656        ) -> fidl::Result<()> {
11657            encoder.debug_check_bounds::<SetPointLightFalloffCmd>(offset);
11658            // Zero out padding regions. There's no need to apply masks
11659            // because the unmasked parts will be overwritten by fields.
11660            // Write the fields.
11661            self.0.encode(encoder, offset + 0, depth)?;
11662            self.1.encode(encoder, offset + 4, depth)?;
11663            Ok(())
11664        }
11665    }
11666
11667    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11668        for SetPointLightFalloffCmd
11669    {
11670        #[inline(always)]
11671        fn new_empty() -> Self {
11672            Self { light_id: fidl::new_empty!(u32, D), falloff: fidl::new_empty!(FloatValue, D) }
11673        }
11674
11675        #[inline]
11676        unsafe fn decode(
11677            &mut self,
11678            decoder: &mut fidl::encoding::Decoder<'_, D>,
11679            offset: usize,
11680            _depth: fidl::encoding::Depth,
11681        ) -> fidl::Result<()> {
11682            decoder.debug_check_bounds::<Self>(offset);
11683            // Verify that padding bytes are zero.
11684            fidl::decode!(u32, D, &mut self.light_id, decoder, offset + 0, _depth)?;
11685            fidl::decode!(FloatValue, D, &mut self.falloff, decoder, offset + 4, _depth)?;
11686            Ok(())
11687        }
11688    }
11689
11690    impl fidl::encoding::ValueTypeMarker for SetPointLightPositionCmd {
11691        type Borrowed<'a> = &'a Self;
11692        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11693            value
11694        }
11695    }
11696
11697    unsafe impl fidl::encoding::TypeMarker for SetPointLightPositionCmd {
11698        type Owned = Self;
11699
11700        #[inline(always)]
11701        fn inline_align(_context: fidl::encoding::Context) -> usize {
11702            4
11703        }
11704
11705        #[inline(always)]
11706        fn inline_size(_context: fidl::encoding::Context) -> usize {
11707            20
11708        }
11709    }
11710
11711    unsafe impl<D: fidl::encoding::ResourceDialect>
11712        fidl::encoding::Encode<SetPointLightPositionCmd, D> for &SetPointLightPositionCmd
11713    {
11714        #[inline]
11715        unsafe fn encode(
11716            self,
11717            encoder: &mut fidl::encoding::Encoder<'_, D>,
11718            offset: usize,
11719            _depth: fidl::encoding::Depth,
11720        ) -> fidl::Result<()> {
11721            encoder.debug_check_bounds::<SetPointLightPositionCmd>(offset);
11722            // Delegate to tuple encoding.
11723            fidl::encoding::Encode::<SetPointLightPositionCmd, D>::encode(
11724                (
11725                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.light_id),
11726                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.position),
11727                ),
11728                encoder,
11729                offset,
11730                _depth,
11731            )
11732        }
11733    }
11734    unsafe impl<
11735            D: fidl::encoding::ResourceDialect,
11736            T0: fidl::encoding::Encode<u32, D>,
11737            T1: fidl::encoding::Encode<Vector3Value, D>,
11738        > fidl::encoding::Encode<SetPointLightPositionCmd, D> for (T0, T1)
11739    {
11740        #[inline]
11741        unsafe fn encode(
11742            self,
11743            encoder: &mut fidl::encoding::Encoder<'_, D>,
11744            offset: usize,
11745            depth: fidl::encoding::Depth,
11746        ) -> fidl::Result<()> {
11747            encoder.debug_check_bounds::<SetPointLightPositionCmd>(offset);
11748            // Zero out padding regions. There's no need to apply masks
11749            // because the unmasked parts will be overwritten by fields.
11750            // Write the fields.
11751            self.0.encode(encoder, offset + 0, depth)?;
11752            self.1.encode(encoder, offset + 4, depth)?;
11753            Ok(())
11754        }
11755    }
11756
11757    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11758        for SetPointLightPositionCmd
11759    {
11760        #[inline(always)]
11761        fn new_empty() -> Self {
11762            Self { light_id: fidl::new_empty!(u32, D), position: fidl::new_empty!(Vector3Value, D) }
11763        }
11764
11765        #[inline]
11766        unsafe fn decode(
11767            &mut self,
11768            decoder: &mut fidl::encoding::Decoder<'_, D>,
11769            offset: usize,
11770            _depth: fidl::encoding::Depth,
11771        ) -> fidl::Result<()> {
11772            decoder.debug_check_bounds::<Self>(offset);
11773            // Verify that padding bytes are zero.
11774            fidl::decode!(u32, D, &mut self.light_id, decoder, offset + 0, _depth)?;
11775            fidl::decode!(Vector3Value, D, &mut self.position, decoder, offset + 4, _depth)?;
11776            Ok(())
11777        }
11778    }
11779
11780    impl fidl::encoding::ValueTypeMarker for SetRendererCmd {
11781        type Borrowed<'a> = &'a Self;
11782        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11783            value
11784        }
11785    }
11786
11787    unsafe impl fidl::encoding::TypeMarker for SetRendererCmd {
11788        type Owned = Self;
11789
11790        #[inline(always)]
11791        fn inline_align(_context: fidl::encoding::Context) -> usize {
11792            4
11793        }
11794
11795        #[inline(always)]
11796        fn inline_size(_context: fidl::encoding::Context) -> usize {
11797            8
11798        }
11799        #[inline(always)]
11800        fn encode_is_copy() -> bool {
11801            true
11802        }
11803
11804        #[inline(always)]
11805        fn decode_is_copy() -> bool {
11806            true
11807        }
11808    }
11809
11810    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetRendererCmd, D>
11811        for &SetRendererCmd
11812    {
11813        #[inline]
11814        unsafe fn encode(
11815            self,
11816            encoder: &mut fidl::encoding::Encoder<'_, D>,
11817            offset: usize,
11818            _depth: fidl::encoding::Depth,
11819        ) -> fidl::Result<()> {
11820            encoder.debug_check_bounds::<SetRendererCmd>(offset);
11821            unsafe {
11822                // Copy the object into the buffer.
11823                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11824                (buf_ptr as *mut SetRendererCmd)
11825                    .write_unaligned((self as *const SetRendererCmd).read());
11826                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11827                // done second because the memcpy will write garbage to these bytes.
11828            }
11829            Ok(())
11830        }
11831    }
11832    unsafe impl<
11833            D: fidl::encoding::ResourceDialect,
11834            T0: fidl::encoding::Encode<u32, D>,
11835            T1: fidl::encoding::Encode<u32, D>,
11836        > fidl::encoding::Encode<SetRendererCmd, D> for (T0, T1)
11837    {
11838        #[inline]
11839        unsafe fn encode(
11840            self,
11841            encoder: &mut fidl::encoding::Encoder<'_, D>,
11842            offset: usize,
11843            depth: fidl::encoding::Depth,
11844        ) -> fidl::Result<()> {
11845            encoder.debug_check_bounds::<SetRendererCmd>(offset);
11846            // Zero out padding regions. There's no need to apply masks
11847            // because the unmasked parts will be overwritten by fields.
11848            // Write the fields.
11849            self.0.encode(encoder, offset + 0, depth)?;
11850            self.1.encode(encoder, offset + 4, depth)?;
11851            Ok(())
11852        }
11853    }
11854
11855    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetRendererCmd {
11856        #[inline(always)]
11857        fn new_empty() -> Self {
11858            Self { layer_id: fidl::new_empty!(u32, D), renderer_id: fidl::new_empty!(u32, D) }
11859        }
11860
11861        #[inline]
11862        unsafe fn decode(
11863            &mut self,
11864            decoder: &mut fidl::encoding::Decoder<'_, D>,
11865            offset: usize,
11866            _depth: fidl::encoding::Depth,
11867        ) -> fidl::Result<()> {
11868            decoder.debug_check_bounds::<Self>(offset);
11869            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11870            // Verify that padding bytes are zero.
11871            // Copy from the buffer into the object.
11872            unsafe {
11873                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
11874            }
11875            Ok(())
11876        }
11877    }
11878
11879    impl fidl::encoding::ValueTypeMarker for SetRendererParamCmd {
11880        type Borrowed<'a> = &'a Self;
11881        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11882            value
11883        }
11884    }
11885
11886    unsafe impl fidl::encoding::TypeMarker for SetRendererParamCmd {
11887        type Owned = Self;
11888
11889        #[inline(always)]
11890        fn inline_align(_context: fidl::encoding::Context) -> usize {
11891            8
11892        }
11893
11894        #[inline(always)]
11895        fn inline_size(_context: fidl::encoding::Context) -> usize {
11896            24
11897        }
11898    }
11899
11900    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetRendererParamCmd, D>
11901        for &SetRendererParamCmd
11902    {
11903        #[inline]
11904        unsafe fn encode(
11905            self,
11906            encoder: &mut fidl::encoding::Encoder<'_, D>,
11907            offset: usize,
11908            _depth: fidl::encoding::Depth,
11909        ) -> fidl::Result<()> {
11910            encoder.debug_check_bounds::<SetRendererParamCmd>(offset);
11911            // Delegate to tuple encoding.
11912            fidl::encoding::Encode::<SetRendererParamCmd, D>::encode(
11913                (
11914                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.renderer_id),
11915                    <RendererParam as fidl::encoding::ValueTypeMarker>::borrow(&self.param),
11916                ),
11917                encoder,
11918                offset,
11919                _depth,
11920            )
11921        }
11922    }
11923    unsafe impl<
11924            D: fidl::encoding::ResourceDialect,
11925            T0: fidl::encoding::Encode<u32, D>,
11926            T1: fidl::encoding::Encode<RendererParam, D>,
11927        > fidl::encoding::Encode<SetRendererParamCmd, D> for (T0, T1)
11928    {
11929        #[inline]
11930        unsafe fn encode(
11931            self,
11932            encoder: &mut fidl::encoding::Encoder<'_, D>,
11933            offset: usize,
11934            depth: fidl::encoding::Depth,
11935        ) -> fidl::Result<()> {
11936            encoder.debug_check_bounds::<SetRendererParamCmd>(offset);
11937            // Zero out padding regions. There's no need to apply masks
11938            // because the unmasked parts will be overwritten by fields.
11939            unsafe {
11940                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
11941                (ptr as *mut u64).write_unaligned(0);
11942            }
11943            // Write the fields.
11944            self.0.encode(encoder, offset + 0, depth)?;
11945            self.1.encode(encoder, offset + 8, depth)?;
11946            Ok(())
11947        }
11948    }
11949
11950    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetRendererParamCmd {
11951        #[inline(always)]
11952        fn new_empty() -> Self {
11953            Self {
11954                renderer_id: fidl::new_empty!(u32, D),
11955                param: fidl::new_empty!(RendererParam, D),
11956            }
11957        }
11958
11959        #[inline]
11960        unsafe fn decode(
11961            &mut self,
11962            decoder: &mut fidl::encoding::Decoder<'_, D>,
11963            offset: usize,
11964            _depth: fidl::encoding::Depth,
11965        ) -> fidl::Result<()> {
11966            decoder.debug_check_bounds::<Self>(offset);
11967            // Verify that padding bytes are zero.
11968            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
11969            let padval = unsafe { (ptr as *const u64).read_unaligned() };
11970            let mask = 0xffffffff00000000u64;
11971            let maskedval = padval & mask;
11972            if maskedval != 0 {
11973                return Err(fidl::Error::NonZeroPadding {
11974                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
11975                });
11976            }
11977            fidl::decode!(u32, D, &mut self.renderer_id, decoder, offset + 0, _depth)?;
11978            fidl::decode!(RendererParam, D, &mut self.param, decoder, offset + 8, _depth)?;
11979            Ok(())
11980        }
11981    }
11982
11983    impl fidl::encoding::ValueTypeMarker for SetRotationCmd {
11984        type Borrowed<'a> = &'a Self;
11985        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11986            value
11987        }
11988    }
11989
11990    unsafe impl fidl::encoding::TypeMarker for SetRotationCmd {
11991        type Owned = Self;
11992
11993        #[inline(always)]
11994        fn inline_align(_context: fidl::encoding::Context) -> usize {
11995            4
11996        }
11997
11998        #[inline(always)]
11999        fn inline_size(_context: fidl::encoding::Context) -> usize {
12000            24
12001        }
12002    }
12003
12004    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetRotationCmd, D>
12005        for &SetRotationCmd
12006    {
12007        #[inline]
12008        unsafe fn encode(
12009            self,
12010            encoder: &mut fidl::encoding::Encoder<'_, D>,
12011            offset: usize,
12012            _depth: fidl::encoding::Depth,
12013        ) -> fidl::Result<()> {
12014            encoder.debug_check_bounds::<SetRotationCmd>(offset);
12015            // Delegate to tuple encoding.
12016            fidl::encoding::Encode::<SetRotationCmd, D>::encode(
12017                (
12018                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
12019                    <QuaternionValue as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
12020                ),
12021                encoder,
12022                offset,
12023                _depth,
12024            )
12025        }
12026    }
12027    unsafe impl<
12028            D: fidl::encoding::ResourceDialect,
12029            T0: fidl::encoding::Encode<u32, D>,
12030            T1: fidl::encoding::Encode<QuaternionValue, D>,
12031        > fidl::encoding::Encode<SetRotationCmd, D> for (T0, T1)
12032    {
12033        #[inline]
12034        unsafe fn encode(
12035            self,
12036            encoder: &mut fidl::encoding::Encoder<'_, D>,
12037            offset: usize,
12038            depth: fidl::encoding::Depth,
12039        ) -> fidl::Result<()> {
12040            encoder.debug_check_bounds::<SetRotationCmd>(offset);
12041            // Zero out padding regions. There's no need to apply masks
12042            // because the unmasked parts will be overwritten by fields.
12043            // Write the fields.
12044            self.0.encode(encoder, offset + 0, depth)?;
12045            self.1.encode(encoder, offset + 4, depth)?;
12046            Ok(())
12047        }
12048    }
12049
12050    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetRotationCmd {
12051        #[inline(always)]
12052        fn new_empty() -> Self {
12053            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(QuaternionValue, D) }
12054        }
12055
12056        #[inline]
12057        unsafe fn decode(
12058            &mut self,
12059            decoder: &mut fidl::encoding::Decoder<'_, D>,
12060            offset: usize,
12061            _depth: fidl::encoding::Depth,
12062        ) -> fidl::Result<()> {
12063            decoder.debug_check_bounds::<Self>(offset);
12064            // Verify that padding bytes are zero.
12065            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
12066            fidl::decode!(QuaternionValue, D, &mut self.value, decoder, offset + 4, _depth)?;
12067            Ok(())
12068        }
12069    }
12070
12071    impl fidl::encoding::ValueTypeMarker for SetScaleCmd {
12072        type Borrowed<'a> = &'a Self;
12073        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12074            value
12075        }
12076    }
12077
12078    unsafe impl fidl::encoding::TypeMarker for SetScaleCmd {
12079        type Owned = Self;
12080
12081        #[inline(always)]
12082        fn inline_align(_context: fidl::encoding::Context) -> usize {
12083            4
12084        }
12085
12086        #[inline(always)]
12087        fn inline_size(_context: fidl::encoding::Context) -> usize {
12088            20
12089        }
12090    }
12091
12092    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetScaleCmd, D>
12093        for &SetScaleCmd
12094    {
12095        #[inline]
12096        unsafe fn encode(
12097            self,
12098            encoder: &mut fidl::encoding::Encoder<'_, D>,
12099            offset: usize,
12100            _depth: fidl::encoding::Depth,
12101        ) -> fidl::Result<()> {
12102            encoder.debug_check_bounds::<SetScaleCmd>(offset);
12103            // Delegate to tuple encoding.
12104            fidl::encoding::Encode::<SetScaleCmd, D>::encode(
12105                (
12106                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
12107                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
12108                ),
12109                encoder,
12110                offset,
12111                _depth,
12112            )
12113        }
12114    }
12115    unsafe impl<
12116            D: fidl::encoding::ResourceDialect,
12117            T0: fidl::encoding::Encode<u32, D>,
12118            T1: fidl::encoding::Encode<Vector3Value, D>,
12119        > fidl::encoding::Encode<SetScaleCmd, D> for (T0, T1)
12120    {
12121        #[inline]
12122        unsafe fn encode(
12123            self,
12124            encoder: &mut fidl::encoding::Encoder<'_, D>,
12125            offset: usize,
12126            depth: fidl::encoding::Depth,
12127        ) -> fidl::Result<()> {
12128            encoder.debug_check_bounds::<SetScaleCmd>(offset);
12129            // Zero out padding regions. There's no need to apply masks
12130            // because the unmasked parts will be overwritten by fields.
12131            // Write the fields.
12132            self.0.encode(encoder, offset + 0, depth)?;
12133            self.1.encode(encoder, offset + 4, depth)?;
12134            Ok(())
12135        }
12136    }
12137
12138    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetScaleCmd {
12139        #[inline(always)]
12140        fn new_empty() -> Self {
12141            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Vector3Value, D) }
12142        }
12143
12144        #[inline]
12145        unsafe fn decode(
12146            &mut self,
12147            decoder: &mut fidl::encoding::Decoder<'_, D>,
12148            offset: usize,
12149            _depth: fidl::encoding::Depth,
12150        ) -> fidl::Result<()> {
12151            decoder.debug_check_bounds::<Self>(offset);
12152            // Verify that padding bytes are zero.
12153            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
12154            fidl::decode!(Vector3Value, D, &mut self.value, decoder, offset + 4, _depth)?;
12155            Ok(())
12156        }
12157    }
12158
12159    impl fidl::encoding::ValueTypeMarker for SetSemanticVisibilityCmd {
12160        type Borrowed<'a> = &'a Self;
12161        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12162            value
12163        }
12164    }
12165
12166    unsafe impl fidl::encoding::TypeMarker for SetSemanticVisibilityCmd {
12167        type Owned = Self;
12168
12169        #[inline(always)]
12170        fn inline_align(_context: fidl::encoding::Context) -> usize {
12171            4
12172        }
12173
12174        #[inline(always)]
12175        fn inline_size(_context: fidl::encoding::Context) -> usize {
12176            8
12177        }
12178    }
12179
12180    unsafe impl<D: fidl::encoding::ResourceDialect>
12181        fidl::encoding::Encode<SetSemanticVisibilityCmd, D> for &SetSemanticVisibilityCmd
12182    {
12183        #[inline]
12184        unsafe fn encode(
12185            self,
12186            encoder: &mut fidl::encoding::Encoder<'_, D>,
12187            offset: usize,
12188            _depth: fidl::encoding::Depth,
12189        ) -> fidl::Result<()> {
12190            encoder.debug_check_bounds::<SetSemanticVisibilityCmd>(offset);
12191            // Delegate to tuple encoding.
12192            fidl::encoding::Encode::<SetSemanticVisibilityCmd, D>::encode(
12193                (
12194                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
12195                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.visible),
12196                ),
12197                encoder,
12198                offset,
12199                _depth,
12200            )
12201        }
12202    }
12203    unsafe impl<
12204            D: fidl::encoding::ResourceDialect,
12205            T0: fidl::encoding::Encode<u32, D>,
12206            T1: fidl::encoding::Encode<bool, D>,
12207        > fidl::encoding::Encode<SetSemanticVisibilityCmd, D> for (T0, T1)
12208    {
12209        #[inline]
12210        unsafe fn encode(
12211            self,
12212            encoder: &mut fidl::encoding::Encoder<'_, D>,
12213            offset: usize,
12214            depth: fidl::encoding::Depth,
12215        ) -> fidl::Result<()> {
12216            encoder.debug_check_bounds::<SetSemanticVisibilityCmd>(offset);
12217            // Zero out padding regions. There's no need to apply masks
12218            // because the unmasked parts will be overwritten by fields.
12219            unsafe {
12220                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
12221                (ptr as *mut u32).write_unaligned(0);
12222            }
12223            // Write the fields.
12224            self.0.encode(encoder, offset + 0, depth)?;
12225            self.1.encode(encoder, offset + 4, depth)?;
12226            Ok(())
12227        }
12228    }
12229
12230    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12231        for SetSemanticVisibilityCmd
12232    {
12233        #[inline(always)]
12234        fn new_empty() -> Self {
12235            Self { node_id: fidl::new_empty!(u32, D), visible: fidl::new_empty!(bool, D) }
12236        }
12237
12238        #[inline]
12239        unsafe fn decode(
12240            &mut self,
12241            decoder: &mut fidl::encoding::Decoder<'_, D>,
12242            offset: usize,
12243            _depth: fidl::encoding::Depth,
12244        ) -> fidl::Result<()> {
12245            decoder.debug_check_bounds::<Self>(offset);
12246            // Verify that padding bytes are zero.
12247            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
12248            let padval = unsafe { (ptr as *const u32).read_unaligned() };
12249            let mask = 0xffffff00u32;
12250            let maskedval = padval & mask;
12251            if maskedval != 0 {
12252                return Err(fidl::Error::NonZeroPadding {
12253                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
12254                });
12255            }
12256            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
12257            fidl::decode!(bool, D, &mut self.visible, decoder, offset + 4, _depth)?;
12258            Ok(())
12259        }
12260    }
12261
12262    impl fidl::encoding::ValueTypeMarker for SetShapeCmd {
12263        type Borrowed<'a> = &'a Self;
12264        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12265            value
12266        }
12267    }
12268
12269    unsafe impl fidl::encoding::TypeMarker for SetShapeCmd {
12270        type Owned = Self;
12271
12272        #[inline(always)]
12273        fn inline_align(_context: fidl::encoding::Context) -> usize {
12274            4
12275        }
12276
12277        #[inline(always)]
12278        fn inline_size(_context: fidl::encoding::Context) -> usize {
12279            8
12280        }
12281        #[inline(always)]
12282        fn encode_is_copy() -> bool {
12283            true
12284        }
12285
12286        #[inline(always)]
12287        fn decode_is_copy() -> bool {
12288            true
12289        }
12290    }
12291
12292    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetShapeCmd, D>
12293        for &SetShapeCmd
12294    {
12295        #[inline]
12296        unsafe fn encode(
12297            self,
12298            encoder: &mut fidl::encoding::Encoder<'_, D>,
12299            offset: usize,
12300            _depth: fidl::encoding::Depth,
12301        ) -> fidl::Result<()> {
12302            encoder.debug_check_bounds::<SetShapeCmd>(offset);
12303            unsafe {
12304                // Copy the object into the buffer.
12305                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12306                (buf_ptr as *mut SetShapeCmd).write_unaligned((self as *const SetShapeCmd).read());
12307                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12308                // done second because the memcpy will write garbage to these bytes.
12309            }
12310            Ok(())
12311        }
12312    }
12313    unsafe impl<
12314            D: fidl::encoding::ResourceDialect,
12315            T0: fidl::encoding::Encode<u32, D>,
12316            T1: fidl::encoding::Encode<u32, D>,
12317        > fidl::encoding::Encode<SetShapeCmd, D> for (T0, T1)
12318    {
12319        #[inline]
12320        unsafe fn encode(
12321            self,
12322            encoder: &mut fidl::encoding::Encoder<'_, D>,
12323            offset: usize,
12324            depth: fidl::encoding::Depth,
12325        ) -> fidl::Result<()> {
12326            encoder.debug_check_bounds::<SetShapeCmd>(offset);
12327            // Zero out padding regions. There's no need to apply masks
12328            // because the unmasked parts will be overwritten by fields.
12329            // Write the fields.
12330            self.0.encode(encoder, offset + 0, depth)?;
12331            self.1.encode(encoder, offset + 4, depth)?;
12332            Ok(())
12333        }
12334    }
12335
12336    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetShapeCmd {
12337        #[inline(always)]
12338        fn new_empty() -> Self {
12339            Self { node_id: fidl::new_empty!(u32, D), shape_id: fidl::new_empty!(u32, D) }
12340        }
12341
12342        #[inline]
12343        unsafe fn decode(
12344            &mut self,
12345            decoder: &mut fidl::encoding::Decoder<'_, D>,
12346            offset: usize,
12347            _depth: fidl::encoding::Depth,
12348        ) -> fidl::Result<()> {
12349            decoder.debug_check_bounds::<Self>(offset);
12350            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12351            // Verify that padding bytes are zero.
12352            // Copy from the buffer into the object.
12353            unsafe {
12354                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
12355            }
12356            Ok(())
12357        }
12358    }
12359
12360    impl fidl::encoding::ValueTypeMarker for SetSizeCmd {
12361        type Borrowed<'a> = &'a Self;
12362        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12363            value
12364        }
12365    }
12366
12367    unsafe impl fidl::encoding::TypeMarker for SetSizeCmd {
12368        type Owned = Self;
12369
12370        #[inline(always)]
12371        fn inline_align(_context: fidl::encoding::Context) -> usize {
12372            4
12373        }
12374
12375        #[inline(always)]
12376        fn inline_size(_context: fidl::encoding::Context) -> usize {
12377            16
12378        }
12379    }
12380
12381    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetSizeCmd, D>
12382        for &SetSizeCmd
12383    {
12384        #[inline]
12385        unsafe fn encode(
12386            self,
12387            encoder: &mut fidl::encoding::Encoder<'_, D>,
12388            offset: usize,
12389            _depth: fidl::encoding::Depth,
12390        ) -> fidl::Result<()> {
12391            encoder.debug_check_bounds::<SetSizeCmd>(offset);
12392            // Delegate to tuple encoding.
12393            fidl::encoding::Encode::<SetSizeCmd, D>::encode(
12394                (
12395                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
12396                    <Vector2Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
12397                ),
12398                encoder,
12399                offset,
12400                _depth,
12401            )
12402        }
12403    }
12404    unsafe impl<
12405            D: fidl::encoding::ResourceDialect,
12406            T0: fidl::encoding::Encode<u32, D>,
12407            T1: fidl::encoding::Encode<Vector2Value, D>,
12408        > fidl::encoding::Encode<SetSizeCmd, D> for (T0, T1)
12409    {
12410        #[inline]
12411        unsafe fn encode(
12412            self,
12413            encoder: &mut fidl::encoding::Encoder<'_, D>,
12414            offset: usize,
12415            depth: fidl::encoding::Depth,
12416        ) -> fidl::Result<()> {
12417            encoder.debug_check_bounds::<SetSizeCmd>(offset);
12418            // Zero out padding regions. There's no need to apply masks
12419            // because the unmasked parts will be overwritten by fields.
12420            // Write the fields.
12421            self.0.encode(encoder, offset + 0, depth)?;
12422            self.1.encode(encoder, offset + 4, depth)?;
12423            Ok(())
12424        }
12425    }
12426
12427    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetSizeCmd {
12428        #[inline(always)]
12429        fn new_empty() -> Self {
12430            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Vector2Value, D) }
12431        }
12432
12433        #[inline]
12434        unsafe fn decode(
12435            &mut self,
12436            decoder: &mut fidl::encoding::Decoder<'_, D>,
12437            offset: usize,
12438            _depth: fidl::encoding::Depth,
12439        ) -> fidl::Result<()> {
12440            decoder.debug_check_bounds::<Self>(offset);
12441            // Verify that padding bytes are zero.
12442            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
12443            fidl::decode!(Vector2Value, D, &mut self.value, decoder, offset + 4, _depth)?;
12444            Ok(())
12445        }
12446    }
12447
12448    impl fidl::encoding::ValueTypeMarker for SetStereoCameraProjectionCmd {
12449        type Borrowed<'a> = &'a Self;
12450        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12451            value
12452        }
12453    }
12454
12455    unsafe impl fidl::encoding::TypeMarker for SetStereoCameraProjectionCmd {
12456        type Owned = Self;
12457
12458        #[inline(always)]
12459        fn inline_align(_context: fidl::encoding::Context) -> usize {
12460            4
12461        }
12462
12463        #[inline(always)]
12464        fn inline_size(_context: fidl::encoding::Context) -> usize {
12465            140
12466        }
12467    }
12468
12469    unsafe impl<D: fidl::encoding::ResourceDialect>
12470        fidl::encoding::Encode<SetStereoCameraProjectionCmd, D> for &SetStereoCameraProjectionCmd
12471    {
12472        #[inline]
12473        unsafe fn encode(
12474            self,
12475            encoder: &mut fidl::encoding::Encoder<'_, D>,
12476            offset: usize,
12477            _depth: fidl::encoding::Depth,
12478        ) -> fidl::Result<()> {
12479            encoder.debug_check_bounds::<SetStereoCameraProjectionCmd>(offset);
12480            // Delegate to tuple encoding.
12481            fidl::encoding::Encode::<SetStereoCameraProjectionCmd, D>::encode(
12482                (
12483                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.camera_id),
12484                    <Matrix4Value as fidl::encoding::ValueTypeMarker>::borrow(
12485                        &self.left_projection,
12486                    ),
12487                    <Matrix4Value as fidl::encoding::ValueTypeMarker>::borrow(
12488                        &self.right_projection,
12489                    ),
12490                ),
12491                encoder,
12492                offset,
12493                _depth,
12494            )
12495        }
12496    }
12497    unsafe impl<
12498            D: fidl::encoding::ResourceDialect,
12499            T0: fidl::encoding::Encode<u32, D>,
12500            T1: fidl::encoding::Encode<Matrix4Value, D>,
12501            T2: fidl::encoding::Encode<Matrix4Value, D>,
12502        > fidl::encoding::Encode<SetStereoCameraProjectionCmd, D> for (T0, T1, T2)
12503    {
12504        #[inline]
12505        unsafe fn encode(
12506            self,
12507            encoder: &mut fidl::encoding::Encoder<'_, D>,
12508            offset: usize,
12509            depth: fidl::encoding::Depth,
12510        ) -> fidl::Result<()> {
12511            encoder.debug_check_bounds::<SetStereoCameraProjectionCmd>(offset);
12512            // Zero out padding regions. There's no need to apply masks
12513            // because the unmasked parts will be overwritten by fields.
12514            // Write the fields.
12515            self.0.encode(encoder, offset + 0, depth)?;
12516            self.1.encode(encoder, offset + 4, depth)?;
12517            self.2.encode(encoder, offset + 72, depth)?;
12518            Ok(())
12519        }
12520    }
12521
12522    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12523        for SetStereoCameraProjectionCmd
12524    {
12525        #[inline(always)]
12526        fn new_empty() -> Self {
12527            Self {
12528                camera_id: fidl::new_empty!(u32, D),
12529                left_projection: fidl::new_empty!(Matrix4Value, D),
12530                right_projection: fidl::new_empty!(Matrix4Value, D),
12531            }
12532        }
12533
12534        #[inline]
12535        unsafe fn decode(
12536            &mut self,
12537            decoder: &mut fidl::encoding::Decoder<'_, D>,
12538            offset: usize,
12539            _depth: fidl::encoding::Depth,
12540        ) -> fidl::Result<()> {
12541            decoder.debug_check_bounds::<Self>(offset);
12542            // Verify that padding bytes are zero.
12543            fidl::decode!(u32, D, &mut self.camera_id, decoder, offset + 0, _depth)?;
12544            fidl::decode!(Matrix4Value, D, &mut self.left_projection, decoder, offset + 4, _depth)?;
12545            fidl::decode!(
12546                Matrix4Value,
12547                D,
12548                &mut self.right_projection,
12549                decoder,
12550                offset + 72,
12551                _depth
12552            )?;
12553            Ok(())
12554        }
12555    }
12556
12557    impl fidl::encoding::ValueTypeMarker for SetTagCmd {
12558        type Borrowed<'a> = &'a Self;
12559        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12560            value
12561        }
12562    }
12563
12564    unsafe impl fidl::encoding::TypeMarker for SetTagCmd {
12565        type Owned = Self;
12566
12567        #[inline(always)]
12568        fn inline_align(_context: fidl::encoding::Context) -> usize {
12569            4
12570        }
12571
12572        #[inline(always)]
12573        fn inline_size(_context: fidl::encoding::Context) -> usize {
12574            8
12575        }
12576        #[inline(always)]
12577        fn encode_is_copy() -> bool {
12578            true
12579        }
12580
12581        #[inline(always)]
12582        fn decode_is_copy() -> bool {
12583            true
12584        }
12585    }
12586
12587    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetTagCmd, D>
12588        for &SetTagCmd
12589    {
12590        #[inline]
12591        unsafe fn encode(
12592            self,
12593            encoder: &mut fidl::encoding::Encoder<'_, D>,
12594            offset: usize,
12595            _depth: fidl::encoding::Depth,
12596        ) -> fidl::Result<()> {
12597            encoder.debug_check_bounds::<SetTagCmd>(offset);
12598            unsafe {
12599                // Copy the object into the buffer.
12600                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12601                (buf_ptr as *mut SetTagCmd).write_unaligned((self as *const SetTagCmd).read());
12602                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12603                // done second because the memcpy will write garbage to these bytes.
12604            }
12605            Ok(())
12606        }
12607    }
12608    unsafe impl<
12609            D: fidl::encoding::ResourceDialect,
12610            T0: fidl::encoding::Encode<u32, D>,
12611            T1: fidl::encoding::Encode<u32, D>,
12612        > fidl::encoding::Encode<SetTagCmd, D> for (T0, T1)
12613    {
12614        #[inline]
12615        unsafe fn encode(
12616            self,
12617            encoder: &mut fidl::encoding::Encoder<'_, D>,
12618            offset: usize,
12619            depth: fidl::encoding::Depth,
12620        ) -> fidl::Result<()> {
12621            encoder.debug_check_bounds::<SetTagCmd>(offset);
12622            // Zero out padding regions. There's no need to apply masks
12623            // because the unmasked parts will be overwritten by fields.
12624            // Write the fields.
12625            self.0.encode(encoder, offset + 0, depth)?;
12626            self.1.encode(encoder, offset + 4, depth)?;
12627            Ok(())
12628        }
12629    }
12630
12631    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetTagCmd {
12632        #[inline(always)]
12633        fn new_empty() -> Self {
12634            Self { node_id: fidl::new_empty!(u32, D), tag_value: fidl::new_empty!(u32, D) }
12635        }
12636
12637        #[inline]
12638        unsafe fn decode(
12639            &mut self,
12640            decoder: &mut fidl::encoding::Decoder<'_, D>,
12641            offset: usize,
12642            _depth: fidl::encoding::Depth,
12643        ) -> fidl::Result<()> {
12644            decoder.debug_check_bounds::<Self>(offset);
12645            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12646            // Verify that padding bytes are zero.
12647            // Copy from the buffer into the object.
12648            unsafe {
12649                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
12650            }
12651            Ok(())
12652        }
12653    }
12654
12655    impl fidl::encoding::ValueTypeMarker for SetTextureCmd {
12656        type Borrowed<'a> = &'a Self;
12657        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12658            value
12659        }
12660    }
12661
12662    unsafe impl fidl::encoding::TypeMarker for SetTextureCmd {
12663        type Owned = Self;
12664
12665        #[inline(always)]
12666        fn inline_align(_context: fidl::encoding::Context) -> usize {
12667            4
12668        }
12669
12670        #[inline(always)]
12671        fn inline_size(_context: fidl::encoding::Context) -> usize {
12672            8
12673        }
12674        #[inline(always)]
12675        fn encode_is_copy() -> bool {
12676            true
12677        }
12678
12679        #[inline(always)]
12680        fn decode_is_copy() -> bool {
12681            true
12682        }
12683    }
12684
12685    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetTextureCmd, D>
12686        for &SetTextureCmd
12687    {
12688        #[inline]
12689        unsafe fn encode(
12690            self,
12691            encoder: &mut fidl::encoding::Encoder<'_, D>,
12692            offset: usize,
12693            _depth: fidl::encoding::Depth,
12694        ) -> fidl::Result<()> {
12695            encoder.debug_check_bounds::<SetTextureCmd>(offset);
12696            unsafe {
12697                // Copy the object into the buffer.
12698                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12699                (buf_ptr as *mut SetTextureCmd)
12700                    .write_unaligned((self as *const SetTextureCmd).read());
12701                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12702                // done second because the memcpy will write garbage to these bytes.
12703            }
12704            Ok(())
12705        }
12706    }
12707    unsafe impl<
12708            D: fidl::encoding::ResourceDialect,
12709            T0: fidl::encoding::Encode<u32, D>,
12710            T1: fidl::encoding::Encode<u32, D>,
12711        > fidl::encoding::Encode<SetTextureCmd, D> for (T0, T1)
12712    {
12713        #[inline]
12714        unsafe fn encode(
12715            self,
12716            encoder: &mut fidl::encoding::Encoder<'_, D>,
12717            offset: usize,
12718            depth: fidl::encoding::Depth,
12719        ) -> fidl::Result<()> {
12720            encoder.debug_check_bounds::<SetTextureCmd>(offset);
12721            // Zero out padding regions. There's no need to apply masks
12722            // because the unmasked parts will be overwritten by fields.
12723            // Write the fields.
12724            self.0.encode(encoder, offset + 0, depth)?;
12725            self.1.encode(encoder, offset + 4, depth)?;
12726            Ok(())
12727        }
12728    }
12729
12730    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetTextureCmd {
12731        #[inline(always)]
12732        fn new_empty() -> Self {
12733            Self { material_id: fidl::new_empty!(u32, D), texture_id: fidl::new_empty!(u32, D) }
12734        }
12735
12736        #[inline]
12737        unsafe fn decode(
12738            &mut self,
12739            decoder: &mut fidl::encoding::Decoder<'_, D>,
12740            offset: usize,
12741            _depth: fidl::encoding::Depth,
12742        ) -> fidl::Result<()> {
12743            decoder.debug_check_bounds::<Self>(offset);
12744            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12745            // Verify that padding bytes are zero.
12746            // Copy from the buffer into the object.
12747            unsafe {
12748                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
12749            }
12750            Ok(())
12751        }
12752    }
12753
12754    impl fidl::encoding::ValueTypeMarker for SetTranslationCmd {
12755        type Borrowed<'a> = &'a Self;
12756        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12757            value
12758        }
12759    }
12760
12761    unsafe impl fidl::encoding::TypeMarker for SetTranslationCmd {
12762        type Owned = Self;
12763
12764        #[inline(always)]
12765        fn inline_align(_context: fidl::encoding::Context) -> usize {
12766            4
12767        }
12768
12769        #[inline(always)]
12770        fn inline_size(_context: fidl::encoding::Context) -> usize {
12771            20
12772        }
12773    }
12774
12775    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetTranslationCmd, D>
12776        for &SetTranslationCmd
12777    {
12778        #[inline]
12779        unsafe fn encode(
12780            self,
12781            encoder: &mut fidl::encoding::Encoder<'_, D>,
12782            offset: usize,
12783            _depth: fidl::encoding::Depth,
12784        ) -> fidl::Result<()> {
12785            encoder.debug_check_bounds::<SetTranslationCmd>(offset);
12786            // Delegate to tuple encoding.
12787            fidl::encoding::Encode::<SetTranslationCmd, D>::encode(
12788                (
12789                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
12790                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
12791                ),
12792                encoder,
12793                offset,
12794                _depth,
12795            )
12796        }
12797    }
12798    unsafe impl<
12799            D: fidl::encoding::ResourceDialect,
12800            T0: fidl::encoding::Encode<u32, D>,
12801            T1: fidl::encoding::Encode<Vector3Value, D>,
12802        > fidl::encoding::Encode<SetTranslationCmd, D> for (T0, T1)
12803    {
12804        #[inline]
12805        unsafe fn encode(
12806            self,
12807            encoder: &mut fidl::encoding::Encoder<'_, D>,
12808            offset: usize,
12809            depth: fidl::encoding::Depth,
12810        ) -> fidl::Result<()> {
12811            encoder.debug_check_bounds::<SetTranslationCmd>(offset);
12812            // Zero out padding regions. There's no need to apply masks
12813            // because the unmasked parts will be overwritten by fields.
12814            // Write the fields.
12815            self.0.encode(encoder, offset + 0, depth)?;
12816            self.1.encode(encoder, offset + 4, depth)?;
12817            Ok(())
12818        }
12819    }
12820
12821    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetTranslationCmd {
12822        #[inline(always)]
12823        fn new_empty() -> Self {
12824            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Vector3Value, D) }
12825        }
12826
12827        #[inline]
12828        unsafe fn decode(
12829            &mut self,
12830            decoder: &mut fidl::encoding::Decoder<'_, D>,
12831            offset: usize,
12832            _depth: fidl::encoding::Depth,
12833        ) -> fidl::Result<()> {
12834            decoder.debug_check_bounds::<Self>(offset);
12835            // Verify that padding bytes are zero.
12836            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
12837            fidl::decode!(Vector3Value, D, &mut self.value, decoder, offset + 4, _depth)?;
12838            Ok(())
12839        }
12840    }
12841
12842    impl fidl::encoding::ValueTypeMarker for SetViewHolderBoundsColorCmd {
12843        type Borrowed<'a> = &'a Self;
12844        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12845            value
12846        }
12847    }
12848
12849    unsafe impl fidl::encoding::TypeMarker for SetViewHolderBoundsColorCmd {
12850        type Owned = Self;
12851
12852        #[inline(always)]
12853        fn inline_align(_context: fidl::encoding::Context) -> usize {
12854            4
12855        }
12856
12857        #[inline(always)]
12858        fn inline_size(_context: fidl::encoding::Context) -> usize {
12859            20
12860        }
12861    }
12862
12863    unsafe impl<D: fidl::encoding::ResourceDialect>
12864        fidl::encoding::Encode<SetViewHolderBoundsColorCmd, D> for &SetViewHolderBoundsColorCmd
12865    {
12866        #[inline]
12867        unsafe fn encode(
12868            self,
12869            encoder: &mut fidl::encoding::Encoder<'_, D>,
12870            offset: usize,
12871            _depth: fidl::encoding::Depth,
12872        ) -> fidl::Result<()> {
12873            encoder.debug_check_bounds::<SetViewHolderBoundsColorCmd>(offset);
12874            // Delegate to tuple encoding.
12875            fidl::encoding::Encode::<SetViewHolderBoundsColorCmd, D>::encode(
12876                (
12877                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.view_holder_id),
12878                    <ColorRgbValue as fidl::encoding::ValueTypeMarker>::borrow(&self.color),
12879                ),
12880                encoder,
12881                offset,
12882                _depth,
12883            )
12884        }
12885    }
12886    unsafe impl<
12887            D: fidl::encoding::ResourceDialect,
12888            T0: fidl::encoding::Encode<u32, D>,
12889            T1: fidl::encoding::Encode<ColorRgbValue, D>,
12890        > fidl::encoding::Encode<SetViewHolderBoundsColorCmd, D> for (T0, T1)
12891    {
12892        #[inline]
12893        unsafe fn encode(
12894            self,
12895            encoder: &mut fidl::encoding::Encoder<'_, D>,
12896            offset: usize,
12897            depth: fidl::encoding::Depth,
12898        ) -> fidl::Result<()> {
12899            encoder.debug_check_bounds::<SetViewHolderBoundsColorCmd>(offset);
12900            // Zero out padding regions. There's no need to apply masks
12901            // because the unmasked parts will be overwritten by fields.
12902            // Write the fields.
12903            self.0.encode(encoder, offset + 0, depth)?;
12904            self.1.encode(encoder, offset + 4, depth)?;
12905            Ok(())
12906        }
12907    }
12908
12909    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12910        for SetViewHolderBoundsColorCmd
12911    {
12912        #[inline(always)]
12913        fn new_empty() -> Self {
12914            Self {
12915                view_holder_id: fidl::new_empty!(u32, D),
12916                color: fidl::new_empty!(ColorRgbValue, D),
12917            }
12918        }
12919
12920        #[inline]
12921        unsafe fn decode(
12922            &mut self,
12923            decoder: &mut fidl::encoding::Decoder<'_, D>,
12924            offset: usize,
12925            _depth: fidl::encoding::Depth,
12926        ) -> fidl::Result<()> {
12927            decoder.debug_check_bounds::<Self>(offset);
12928            // Verify that padding bytes are zero.
12929            fidl::decode!(u32, D, &mut self.view_holder_id, decoder, offset + 0, _depth)?;
12930            fidl::decode!(ColorRgbValue, D, &mut self.color, decoder, offset + 4, _depth)?;
12931            Ok(())
12932        }
12933    }
12934
12935    impl fidl::encoding::ValueTypeMarker for SetViewPropertiesCmd {
12936        type Borrowed<'a> = &'a Self;
12937        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12938            value
12939        }
12940    }
12941
12942    unsafe impl fidl::encoding::TypeMarker for SetViewPropertiesCmd {
12943        type Owned = Self;
12944
12945        #[inline(always)]
12946        fn inline_align(_context: fidl::encoding::Context) -> usize {
12947            4
12948        }
12949
12950        #[inline(always)]
12951        fn inline_size(_context: fidl::encoding::Context) -> usize {
12952            56
12953        }
12954    }
12955
12956    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetViewPropertiesCmd, D>
12957        for &SetViewPropertiesCmd
12958    {
12959        #[inline]
12960        unsafe fn encode(
12961            self,
12962            encoder: &mut fidl::encoding::Encoder<'_, D>,
12963            offset: usize,
12964            _depth: fidl::encoding::Depth,
12965        ) -> fidl::Result<()> {
12966            encoder.debug_check_bounds::<SetViewPropertiesCmd>(offset);
12967            // Delegate to tuple encoding.
12968            fidl::encoding::Encode::<SetViewPropertiesCmd, D>::encode(
12969                (
12970                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.view_holder_id),
12971                    <ViewProperties as fidl::encoding::ValueTypeMarker>::borrow(&self.properties),
12972                ),
12973                encoder,
12974                offset,
12975                _depth,
12976            )
12977        }
12978    }
12979    unsafe impl<
12980            D: fidl::encoding::ResourceDialect,
12981            T0: fidl::encoding::Encode<u32, D>,
12982            T1: fidl::encoding::Encode<ViewProperties, D>,
12983        > fidl::encoding::Encode<SetViewPropertiesCmd, D> for (T0, T1)
12984    {
12985        #[inline]
12986        unsafe fn encode(
12987            self,
12988            encoder: &mut fidl::encoding::Encoder<'_, D>,
12989            offset: usize,
12990            depth: fidl::encoding::Depth,
12991        ) -> fidl::Result<()> {
12992            encoder.debug_check_bounds::<SetViewPropertiesCmd>(offset);
12993            // Zero out padding regions. There's no need to apply masks
12994            // because the unmasked parts will be overwritten by fields.
12995            // Write the fields.
12996            self.0.encode(encoder, offset + 0, depth)?;
12997            self.1.encode(encoder, offset + 4, depth)?;
12998            Ok(())
12999        }
13000    }
13001
13002    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetViewPropertiesCmd {
13003        #[inline(always)]
13004        fn new_empty() -> Self {
13005            Self {
13006                view_holder_id: fidl::new_empty!(u32, D),
13007                properties: fidl::new_empty!(ViewProperties, D),
13008            }
13009        }
13010
13011        #[inline]
13012        unsafe fn decode(
13013            &mut self,
13014            decoder: &mut fidl::encoding::Decoder<'_, D>,
13015            offset: usize,
13016            _depth: fidl::encoding::Depth,
13017        ) -> fidl::Result<()> {
13018            decoder.debug_check_bounds::<Self>(offset);
13019            // Verify that padding bytes are zero.
13020            fidl::decode!(u32, D, &mut self.view_holder_id, decoder, offset + 0, _depth)?;
13021            fidl::decode!(ViewProperties, D, &mut self.properties, decoder, offset + 4, _depth)?;
13022            Ok(())
13023        }
13024    }
13025
13026    impl fidl::encoding::ValueTypeMarker for ShapeNodeArgs {
13027        type Borrowed<'a> = &'a Self;
13028        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13029            value
13030        }
13031    }
13032
13033    unsafe impl fidl::encoding::TypeMarker for ShapeNodeArgs {
13034        type Owned = Self;
13035
13036        #[inline(always)]
13037        fn inline_align(_context: fidl::encoding::Context) -> usize {
13038            4
13039        }
13040
13041        #[inline(always)]
13042        fn inline_size(_context: fidl::encoding::Context) -> usize {
13043            4
13044        }
13045        #[inline(always)]
13046        fn encode_is_copy() -> bool {
13047            true
13048        }
13049
13050        #[inline(always)]
13051        fn decode_is_copy() -> bool {
13052            true
13053        }
13054    }
13055
13056    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ShapeNodeArgs, D>
13057        for &ShapeNodeArgs
13058    {
13059        #[inline]
13060        unsafe fn encode(
13061            self,
13062            encoder: &mut fidl::encoding::Encoder<'_, D>,
13063            offset: usize,
13064            _depth: fidl::encoding::Depth,
13065        ) -> fidl::Result<()> {
13066            encoder.debug_check_bounds::<ShapeNodeArgs>(offset);
13067            unsafe {
13068                // Copy the object into the buffer.
13069                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13070                (buf_ptr as *mut ShapeNodeArgs)
13071                    .write_unaligned((self as *const ShapeNodeArgs).read());
13072                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13073                // done second because the memcpy will write garbage to these bytes.
13074            }
13075            Ok(())
13076        }
13077    }
13078    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13079        fidl::encoding::Encode<ShapeNodeArgs, D> for (T0,)
13080    {
13081        #[inline]
13082        unsafe fn encode(
13083            self,
13084            encoder: &mut fidl::encoding::Encoder<'_, D>,
13085            offset: usize,
13086            depth: fidl::encoding::Depth,
13087        ) -> fidl::Result<()> {
13088            encoder.debug_check_bounds::<ShapeNodeArgs>(offset);
13089            // Zero out padding regions. There's no need to apply masks
13090            // because the unmasked parts will be overwritten by fields.
13091            // Write the fields.
13092            self.0.encode(encoder, offset + 0, depth)?;
13093            Ok(())
13094        }
13095    }
13096
13097    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ShapeNodeArgs {
13098        #[inline(always)]
13099        fn new_empty() -> Self {
13100            Self { unused: fidl::new_empty!(u32, D) }
13101        }
13102
13103        #[inline]
13104        unsafe fn decode(
13105            &mut self,
13106            decoder: &mut fidl::encoding::Decoder<'_, D>,
13107            offset: usize,
13108            _depth: fidl::encoding::Depth,
13109        ) -> fidl::Result<()> {
13110            decoder.debug_check_bounds::<Self>(offset);
13111            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13112            // Verify that padding bytes are zero.
13113            // Copy from the buffer into the object.
13114            unsafe {
13115                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13116            }
13117            Ok(())
13118        }
13119    }
13120
13121    impl fidl::encoding::ValueTypeMarker for SizeChangeHintEvent {
13122        type Borrowed<'a> = &'a Self;
13123        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13124            value
13125        }
13126    }
13127
13128    unsafe impl fidl::encoding::TypeMarker for SizeChangeHintEvent {
13129        type Owned = Self;
13130
13131        #[inline(always)]
13132        fn inline_align(_context: fidl::encoding::Context) -> usize {
13133            4
13134        }
13135
13136        #[inline(always)]
13137        fn inline_size(_context: fidl::encoding::Context) -> usize {
13138            12
13139        }
13140    }
13141
13142    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SizeChangeHintEvent, D>
13143        for &SizeChangeHintEvent
13144    {
13145        #[inline]
13146        unsafe fn encode(
13147            self,
13148            encoder: &mut fidl::encoding::Encoder<'_, D>,
13149            offset: usize,
13150            _depth: fidl::encoding::Depth,
13151        ) -> fidl::Result<()> {
13152            encoder.debug_check_bounds::<SizeChangeHintEvent>(offset);
13153            // Delegate to tuple encoding.
13154            fidl::encoding::Encode::<SizeChangeHintEvent, D>::encode(
13155                (
13156                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
13157                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.width_change_factor),
13158                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.height_change_factor),
13159                ),
13160                encoder,
13161                offset,
13162                _depth,
13163            )
13164        }
13165    }
13166    unsafe impl<
13167            D: fidl::encoding::ResourceDialect,
13168            T0: fidl::encoding::Encode<u32, D>,
13169            T1: fidl::encoding::Encode<f32, D>,
13170            T2: fidl::encoding::Encode<f32, D>,
13171        > fidl::encoding::Encode<SizeChangeHintEvent, D> for (T0, T1, T2)
13172    {
13173        #[inline]
13174        unsafe fn encode(
13175            self,
13176            encoder: &mut fidl::encoding::Encoder<'_, D>,
13177            offset: usize,
13178            depth: fidl::encoding::Depth,
13179        ) -> fidl::Result<()> {
13180            encoder.debug_check_bounds::<SizeChangeHintEvent>(offset);
13181            // Zero out padding regions. There's no need to apply masks
13182            // because the unmasked parts will be overwritten by fields.
13183            // Write the fields.
13184            self.0.encode(encoder, offset + 0, depth)?;
13185            self.1.encode(encoder, offset + 4, depth)?;
13186            self.2.encode(encoder, offset + 8, depth)?;
13187            Ok(())
13188        }
13189    }
13190
13191    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SizeChangeHintEvent {
13192        #[inline(always)]
13193        fn new_empty() -> Self {
13194            Self {
13195                node_id: fidl::new_empty!(u32, D),
13196                width_change_factor: fidl::new_empty!(f32, D),
13197                height_change_factor: fidl::new_empty!(f32, D),
13198            }
13199        }
13200
13201        #[inline]
13202        unsafe fn decode(
13203            &mut self,
13204            decoder: &mut fidl::encoding::Decoder<'_, D>,
13205            offset: usize,
13206            _depth: fidl::encoding::Depth,
13207        ) -> fidl::Result<()> {
13208            decoder.debug_check_bounds::<Self>(offset);
13209            // Verify that padding bytes are zero.
13210            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
13211            fidl::decode!(f32, D, &mut self.width_change_factor, decoder, offset + 4, _depth)?;
13212            fidl::decode!(f32, D, &mut self.height_change_factor, decoder, offset + 8, _depth)?;
13213            Ok(())
13214        }
13215    }
13216
13217    impl fidl::encoding::ResourceTypeMarker for SnapshotCallbackDeprecatedOnDataRequest {
13218        type Borrowed<'a> = &'a mut Self;
13219        fn take_or_borrow<'a>(
13220            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13221        ) -> Self::Borrowed<'a> {
13222            value
13223        }
13224    }
13225
13226    unsafe impl fidl::encoding::TypeMarker for SnapshotCallbackDeprecatedOnDataRequest {
13227        type Owned = Self;
13228
13229        #[inline(always)]
13230        fn inline_align(_context: fidl::encoding::Context) -> usize {
13231            8
13232        }
13233
13234        #[inline(always)]
13235        fn inline_size(_context: fidl::encoding::Context) -> usize {
13236            16
13237        }
13238    }
13239
13240    unsafe impl
13241        fidl::encoding::Encode<
13242            SnapshotCallbackDeprecatedOnDataRequest,
13243            fidl::encoding::DefaultFuchsiaResourceDialect,
13244        > for &mut SnapshotCallbackDeprecatedOnDataRequest
13245    {
13246        #[inline]
13247        unsafe fn encode(
13248            self,
13249            encoder: &mut fidl::encoding::Encoder<
13250                '_,
13251                fidl::encoding::DefaultFuchsiaResourceDialect,
13252            >,
13253            offset: usize,
13254            _depth: fidl::encoding::Depth,
13255        ) -> fidl::Result<()> {
13256            encoder.debug_check_bounds::<SnapshotCallbackDeprecatedOnDataRequest>(offset);
13257            // Delegate to tuple encoding.
13258            fidl::encoding::Encode::<
13259                SnapshotCallbackDeprecatedOnDataRequest,
13260                fidl::encoding::DefaultFuchsiaResourceDialect,
13261            >::encode(
13262                (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13263                    &mut self.data,
13264                ),),
13265                encoder,
13266                offset,
13267                _depth,
13268            )
13269        }
13270    }
13271    unsafe impl<
13272            T0: fidl::encoding::Encode<
13273                fidl_fuchsia_mem::Buffer,
13274                fidl::encoding::DefaultFuchsiaResourceDialect,
13275            >,
13276        >
13277        fidl::encoding::Encode<
13278            SnapshotCallbackDeprecatedOnDataRequest,
13279            fidl::encoding::DefaultFuchsiaResourceDialect,
13280        > for (T0,)
13281    {
13282        #[inline]
13283        unsafe fn encode(
13284            self,
13285            encoder: &mut fidl::encoding::Encoder<
13286                '_,
13287                fidl::encoding::DefaultFuchsiaResourceDialect,
13288            >,
13289            offset: usize,
13290            depth: fidl::encoding::Depth,
13291        ) -> fidl::Result<()> {
13292            encoder.debug_check_bounds::<SnapshotCallbackDeprecatedOnDataRequest>(offset);
13293            // Zero out padding regions. There's no need to apply masks
13294            // because the unmasked parts will be overwritten by fields.
13295            // Write the fields.
13296            self.0.encode(encoder, offset + 0, depth)?;
13297            Ok(())
13298        }
13299    }
13300
13301    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13302        for SnapshotCallbackDeprecatedOnDataRequest
13303    {
13304        #[inline(always)]
13305        fn new_empty() -> Self {
13306            Self {
13307                data: fidl::new_empty!(
13308                    fidl_fuchsia_mem::Buffer,
13309                    fidl::encoding::DefaultFuchsiaResourceDialect
13310                ),
13311            }
13312        }
13313
13314        #[inline]
13315        unsafe fn decode(
13316            &mut self,
13317            decoder: &mut fidl::encoding::Decoder<
13318                '_,
13319                fidl::encoding::DefaultFuchsiaResourceDialect,
13320            >,
13321            offset: usize,
13322            _depth: fidl::encoding::Depth,
13323        ) -> fidl::Result<()> {
13324            decoder.debug_check_bounds::<Self>(offset);
13325            // Verify that padding bytes are zero.
13326            fidl::decode!(
13327                fidl_fuchsia_mem::Buffer,
13328                fidl::encoding::DefaultFuchsiaResourceDialect,
13329                &mut self.data,
13330                decoder,
13331                offset + 0,
13332                _depth
13333            )?;
13334            Ok(())
13335        }
13336    }
13337
13338    impl fidl::encoding::ValueTypeMarker for StereoCameraArgs {
13339        type Borrowed<'a> = &'a Self;
13340        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13341            value
13342        }
13343    }
13344
13345    unsafe impl fidl::encoding::TypeMarker for StereoCameraArgs {
13346        type Owned = Self;
13347
13348        #[inline(always)]
13349        fn inline_align(_context: fidl::encoding::Context) -> usize {
13350            4
13351        }
13352
13353        #[inline(always)]
13354        fn inline_size(_context: fidl::encoding::Context) -> usize {
13355            4
13356        }
13357        #[inline(always)]
13358        fn encode_is_copy() -> bool {
13359            true
13360        }
13361
13362        #[inline(always)]
13363        fn decode_is_copy() -> bool {
13364            true
13365        }
13366    }
13367
13368    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StereoCameraArgs, D>
13369        for &StereoCameraArgs
13370    {
13371        #[inline]
13372        unsafe fn encode(
13373            self,
13374            encoder: &mut fidl::encoding::Encoder<'_, D>,
13375            offset: usize,
13376            _depth: fidl::encoding::Depth,
13377        ) -> fidl::Result<()> {
13378            encoder.debug_check_bounds::<StereoCameraArgs>(offset);
13379            unsafe {
13380                // Copy the object into the buffer.
13381                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
13382                (buf_ptr as *mut StereoCameraArgs)
13383                    .write_unaligned((self as *const StereoCameraArgs).read());
13384                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
13385                // done second because the memcpy will write garbage to these bytes.
13386            }
13387            Ok(())
13388        }
13389    }
13390    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
13391        fidl::encoding::Encode<StereoCameraArgs, D> for (T0,)
13392    {
13393        #[inline]
13394        unsafe fn encode(
13395            self,
13396            encoder: &mut fidl::encoding::Encoder<'_, D>,
13397            offset: usize,
13398            depth: fidl::encoding::Depth,
13399        ) -> fidl::Result<()> {
13400            encoder.debug_check_bounds::<StereoCameraArgs>(offset);
13401            // Zero out padding regions. There's no need to apply masks
13402            // because the unmasked parts will be overwritten by fields.
13403            // Write the fields.
13404            self.0.encode(encoder, offset + 0, depth)?;
13405            Ok(())
13406        }
13407    }
13408
13409    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StereoCameraArgs {
13410        #[inline(always)]
13411        fn new_empty() -> Self {
13412            Self { scene_id: fidl::new_empty!(u32, D) }
13413        }
13414
13415        #[inline]
13416        unsafe fn decode(
13417            &mut self,
13418            decoder: &mut fidl::encoding::Decoder<'_, D>,
13419            offset: usize,
13420            _depth: fidl::encoding::Depth,
13421        ) -> fidl::Result<()> {
13422            decoder.debug_check_bounds::<Self>(offset);
13423            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
13424            // Verify that padding bytes are zero.
13425            // Copy from the buffer into the object.
13426            unsafe {
13427                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
13428            }
13429            Ok(())
13430        }
13431    }
13432
13433    impl fidl::encoding::ResourceTypeMarker for TakeSnapshotCmdDeprecated {
13434        type Borrowed<'a> = &'a mut Self;
13435        fn take_or_borrow<'a>(
13436            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13437        ) -> Self::Borrowed<'a> {
13438            value
13439        }
13440    }
13441
13442    unsafe impl fidl::encoding::TypeMarker for TakeSnapshotCmdDeprecated {
13443        type Owned = Self;
13444
13445        #[inline(always)]
13446        fn inline_align(_context: fidl::encoding::Context) -> usize {
13447            4
13448        }
13449
13450        #[inline(always)]
13451        fn inline_size(_context: fidl::encoding::Context) -> usize {
13452            8
13453        }
13454    }
13455
13456    unsafe impl
13457        fidl::encoding::Encode<
13458            TakeSnapshotCmdDeprecated,
13459            fidl::encoding::DefaultFuchsiaResourceDialect,
13460        > for &mut TakeSnapshotCmdDeprecated
13461    {
13462        #[inline]
13463        unsafe fn encode(
13464            self,
13465            encoder: &mut fidl::encoding::Encoder<
13466                '_,
13467                fidl::encoding::DefaultFuchsiaResourceDialect,
13468            >,
13469            offset: usize,
13470            _depth: fidl::encoding::Depth,
13471        ) -> fidl::Result<()> {
13472            encoder.debug_check_bounds::<TakeSnapshotCmdDeprecated>(offset);
13473            // Delegate to tuple encoding.
13474            fidl::encoding::Encode::<
13475                TakeSnapshotCmdDeprecated,
13476                fidl::encoding::DefaultFuchsiaResourceDialect,
13477            >::encode(
13478                (
13479                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
13480                    <fidl::encoding::Endpoint<
13481                        fidl::endpoints::ClientEnd<SnapshotCallbackDeprecatedMarker>,
13482                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13483                        &mut self.callback
13484                    ),
13485                ),
13486                encoder,
13487                offset,
13488                _depth,
13489            )
13490        }
13491    }
13492    unsafe impl<
13493            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
13494            T1: fidl::encoding::Encode<
13495                fidl::encoding::Endpoint<
13496                    fidl::endpoints::ClientEnd<SnapshotCallbackDeprecatedMarker>,
13497                >,
13498                fidl::encoding::DefaultFuchsiaResourceDialect,
13499            >,
13500        >
13501        fidl::encoding::Encode<
13502            TakeSnapshotCmdDeprecated,
13503            fidl::encoding::DefaultFuchsiaResourceDialect,
13504        > for (T0, T1)
13505    {
13506        #[inline]
13507        unsafe fn encode(
13508            self,
13509            encoder: &mut fidl::encoding::Encoder<
13510                '_,
13511                fidl::encoding::DefaultFuchsiaResourceDialect,
13512            >,
13513            offset: usize,
13514            depth: fidl::encoding::Depth,
13515        ) -> fidl::Result<()> {
13516            encoder.debug_check_bounds::<TakeSnapshotCmdDeprecated>(offset);
13517            // Zero out padding regions. There's no need to apply masks
13518            // because the unmasked parts will be overwritten by fields.
13519            // Write the fields.
13520            self.0.encode(encoder, offset + 0, depth)?;
13521            self.1.encode(encoder, offset + 4, depth)?;
13522            Ok(())
13523        }
13524    }
13525
13526    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13527        for TakeSnapshotCmdDeprecated
13528    {
13529        #[inline(always)]
13530        fn new_empty() -> Self {
13531            Self {
13532                node_id: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
13533                callback: fidl::new_empty!(
13534                    fidl::encoding::Endpoint<
13535                        fidl::endpoints::ClientEnd<SnapshotCallbackDeprecatedMarker>,
13536                    >,
13537                    fidl::encoding::DefaultFuchsiaResourceDialect
13538                ),
13539            }
13540        }
13541
13542        #[inline]
13543        unsafe fn decode(
13544            &mut self,
13545            decoder: &mut fidl::encoding::Decoder<
13546                '_,
13547                fidl::encoding::DefaultFuchsiaResourceDialect,
13548            >,
13549            offset: usize,
13550            _depth: fidl::encoding::Depth,
13551        ) -> fidl::Result<()> {
13552            decoder.debug_check_bounds::<Self>(offset);
13553            // Verify that padding bytes are zero.
13554            fidl::decode!(
13555                u32,
13556                fidl::encoding::DefaultFuchsiaResourceDialect,
13557                &mut self.node_id,
13558                decoder,
13559                offset + 0,
13560                _depth
13561            )?;
13562            fidl::decode!(
13563                fidl::encoding::Endpoint<
13564                    fidl::endpoints::ClientEnd<SnapshotCallbackDeprecatedMarker>,
13565                >,
13566                fidl::encoding::DefaultFuchsiaResourceDialect,
13567                &mut self.callback,
13568                decoder,
13569                offset + 4,
13570                _depth
13571            )?;
13572            Ok(())
13573        }
13574    }
13575
13576    impl fidl::encoding::ValueTypeMarker for VariableArgs {
13577        type Borrowed<'a> = &'a Self;
13578        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13579            value
13580        }
13581    }
13582
13583    unsafe impl fidl::encoding::TypeMarker for VariableArgs {
13584        type Owned = Self;
13585
13586        #[inline(always)]
13587        fn inline_align(_context: fidl::encoding::Context) -> usize {
13588            8
13589        }
13590
13591        #[inline(always)]
13592        fn inline_size(_context: fidl::encoding::Context) -> usize {
13593            24
13594        }
13595    }
13596
13597    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VariableArgs, D>
13598        for &VariableArgs
13599    {
13600        #[inline]
13601        unsafe fn encode(
13602            self,
13603            encoder: &mut fidl::encoding::Encoder<'_, D>,
13604            offset: usize,
13605            _depth: fidl::encoding::Depth,
13606        ) -> fidl::Result<()> {
13607            encoder.debug_check_bounds::<VariableArgs>(offset);
13608            // Delegate to tuple encoding.
13609            fidl::encoding::Encode::<VariableArgs, D>::encode(
13610                (
13611                    <ValueType as fidl::encoding::ValueTypeMarker>::borrow(&self.type_),
13612                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.initial_value),
13613                ),
13614                encoder,
13615                offset,
13616                _depth,
13617            )
13618        }
13619    }
13620    unsafe impl<
13621            D: fidl::encoding::ResourceDialect,
13622            T0: fidl::encoding::Encode<ValueType, D>,
13623            T1: fidl::encoding::Encode<Value, D>,
13624        > fidl::encoding::Encode<VariableArgs, D> for (T0, T1)
13625    {
13626        #[inline]
13627        unsafe fn encode(
13628            self,
13629            encoder: &mut fidl::encoding::Encoder<'_, D>,
13630            offset: usize,
13631            depth: fidl::encoding::Depth,
13632        ) -> fidl::Result<()> {
13633            encoder.debug_check_bounds::<VariableArgs>(offset);
13634            // Zero out padding regions. There's no need to apply masks
13635            // because the unmasked parts will be overwritten by fields.
13636            unsafe {
13637                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
13638                (ptr as *mut u64).write_unaligned(0);
13639            }
13640            // Write the fields.
13641            self.0.encode(encoder, offset + 0, depth)?;
13642            self.1.encode(encoder, offset + 8, depth)?;
13643            Ok(())
13644        }
13645    }
13646
13647    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VariableArgs {
13648        #[inline(always)]
13649        fn new_empty() -> Self {
13650            Self {
13651                type_: fidl::new_empty!(ValueType, D),
13652                initial_value: fidl::new_empty!(Value, D),
13653            }
13654        }
13655
13656        #[inline]
13657        unsafe fn decode(
13658            &mut self,
13659            decoder: &mut fidl::encoding::Decoder<'_, D>,
13660            offset: usize,
13661            _depth: fidl::encoding::Depth,
13662        ) -> fidl::Result<()> {
13663            decoder.debug_check_bounds::<Self>(offset);
13664            // Verify that padding bytes are zero.
13665            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
13666            let padval = unsafe { (ptr as *const u64).read_unaligned() };
13667            let mask = 0xffffffff00000000u64;
13668            let maskedval = padval & mask;
13669            if maskedval != 0 {
13670                return Err(fidl::Error::NonZeroPadding {
13671                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
13672                });
13673            }
13674            fidl::decode!(ValueType, D, &mut self.type_, decoder, offset + 0, _depth)?;
13675            fidl::decode!(Value, D, &mut self.initial_value, decoder, offset + 8, _depth)?;
13676            Ok(())
13677        }
13678    }
13679
13680    impl fidl::encoding::ValueTypeMarker for Vector2Value {
13681        type Borrowed<'a> = &'a Self;
13682        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13683            value
13684        }
13685    }
13686
13687    unsafe impl fidl::encoding::TypeMarker for Vector2Value {
13688        type Owned = Self;
13689
13690        #[inline(always)]
13691        fn inline_align(_context: fidl::encoding::Context) -> usize {
13692            4
13693        }
13694
13695        #[inline(always)]
13696        fn inline_size(_context: fidl::encoding::Context) -> usize {
13697            12
13698        }
13699    }
13700
13701    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vector2Value, D>
13702        for &Vector2Value
13703    {
13704        #[inline]
13705        unsafe fn encode(
13706            self,
13707            encoder: &mut fidl::encoding::Encoder<'_, D>,
13708            offset: usize,
13709            _depth: fidl::encoding::Depth,
13710        ) -> fidl::Result<()> {
13711            encoder.debug_check_bounds::<Vector2Value>(offset);
13712            // Delegate to tuple encoding.
13713            fidl::encoding::Encode::<Vector2Value, D>::encode(
13714                (
13715                    <Vec2 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
13716                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
13717                ),
13718                encoder,
13719                offset,
13720                _depth,
13721            )
13722        }
13723    }
13724    unsafe impl<
13725            D: fidl::encoding::ResourceDialect,
13726            T0: fidl::encoding::Encode<Vec2, D>,
13727            T1: fidl::encoding::Encode<u32, D>,
13728        > fidl::encoding::Encode<Vector2Value, D> for (T0, T1)
13729    {
13730        #[inline]
13731        unsafe fn encode(
13732            self,
13733            encoder: &mut fidl::encoding::Encoder<'_, D>,
13734            offset: usize,
13735            depth: fidl::encoding::Depth,
13736        ) -> fidl::Result<()> {
13737            encoder.debug_check_bounds::<Vector2Value>(offset);
13738            // Zero out padding regions. There's no need to apply masks
13739            // because the unmasked parts will be overwritten by fields.
13740            // Write the fields.
13741            self.0.encode(encoder, offset + 0, depth)?;
13742            self.1.encode(encoder, offset + 8, depth)?;
13743            Ok(())
13744        }
13745    }
13746
13747    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vector2Value {
13748        #[inline(always)]
13749        fn new_empty() -> Self {
13750            Self { value: fidl::new_empty!(Vec2, D), variable_id: fidl::new_empty!(u32, D) }
13751        }
13752
13753        #[inline]
13754        unsafe fn decode(
13755            &mut self,
13756            decoder: &mut fidl::encoding::Decoder<'_, D>,
13757            offset: usize,
13758            _depth: fidl::encoding::Depth,
13759        ) -> fidl::Result<()> {
13760            decoder.debug_check_bounds::<Self>(offset);
13761            // Verify that padding bytes are zero.
13762            fidl::decode!(Vec2, D, &mut self.value, decoder, offset + 0, _depth)?;
13763            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 8, _depth)?;
13764            Ok(())
13765        }
13766    }
13767
13768    impl fidl::encoding::ValueTypeMarker for Vector3Value {
13769        type Borrowed<'a> = &'a Self;
13770        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13771            value
13772        }
13773    }
13774
13775    unsafe impl fidl::encoding::TypeMarker for Vector3Value {
13776        type Owned = Self;
13777
13778        #[inline(always)]
13779        fn inline_align(_context: fidl::encoding::Context) -> usize {
13780            4
13781        }
13782
13783        #[inline(always)]
13784        fn inline_size(_context: fidl::encoding::Context) -> usize {
13785            16
13786        }
13787    }
13788
13789    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vector3Value, D>
13790        for &Vector3Value
13791    {
13792        #[inline]
13793        unsafe fn encode(
13794            self,
13795            encoder: &mut fidl::encoding::Encoder<'_, D>,
13796            offset: usize,
13797            _depth: fidl::encoding::Depth,
13798        ) -> fidl::Result<()> {
13799            encoder.debug_check_bounds::<Vector3Value>(offset);
13800            // Delegate to tuple encoding.
13801            fidl::encoding::Encode::<Vector3Value, D>::encode(
13802                (
13803                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
13804                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
13805                ),
13806                encoder,
13807                offset,
13808                _depth,
13809            )
13810        }
13811    }
13812    unsafe impl<
13813            D: fidl::encoding::ResourceDialect,
13814            T0: fidl::encoding::Encode<Vec3, D>,
13815            T1: fidl::encoding::Encode<u32, D>,
13816        > fidl::encoding::Encode<Vector3Value, D> for (T0, T1)
13817    {
13818        #[inline]
13819        unsafe fn encode(
13820            self,
13821            encoder: &mut fidl::encoding::Encoder<'_, D>,
13822            offset: usize,
13823            depth: fidl::encoding::Depth,
13824        ) -> fidl::Result<()> {
13825            encoder.debug_check_bounds::<Vector3Value>(offset);
13826            // Zero out padding regions. There's no need to apply masks
13827            // because the unmasked parts will be overwritten by fields.
13828            // Write the fields.
13829            self.0.encode(encoder, offset + 0, depth)?;
13830            self.1.encode(encoder, offset + 12, depth)?;
13831            Ok(())
13832        }
13833    }
13834
13835    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vector3Value {
13836        #[inline(always)]
13837        fn new_empty() -> Self {
13838            Self { value: fidl::new_empty!(Vec3, D), variable_id: fidl::new_empty!(u32, D) }
13839        }
13840
13841        #[inline]
13842        unsafe fn decode(
13843            &mut self,
13844            decoder: &mut fidl::encoding::Decoder<'_, D>,
13845            offset: usize,
13846            _depth: fidl::encoding::Depth,
13847        ) -> fidl::Result<()> {
13848            decoder.debug_check_bounds::<Self>(offset);
13849            // Verify that padding bytes are zero.
13850            fidl::decode!(Vec3, D, &mut self.value, decoder, offset + 0, _depth)?;
13851            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 12, _depth)?;
13852            Ok(())
13853        }
13854    }
13855
13856    impl fidl::encoding::ValueTypeMarker for Vector4Value {
13857        type Borrowed<'a> = &'a Self;
13858        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13859            value
13860        }
13861    }
13862
13863    unsafe impl fidl::encoding::TypeMarker for Vector4Value {
13864        type Owned = Self;
13865
13866        #[inline(always)]
13867        fn inline_align(_context: fidl::encoding::Context) -> usize {
13868            4
13869        }
13870
13871        #[inline(always)]
13872        fn inline_size(_context: fidl::encoding::Context) -> usize {
13873            20
13874        }
13875    }
13876
13877    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vector4Value, D>
13878        for &Vector4Value
13879    {
13880        #[inline]
13881        unsafe fn encode(
13882            self,
13883            encoder: &mut fidl::encoding::Encoder<'_, D>,
13884            offset: usize,
13885            _depth: fidl::encoding::Depth,
13886        ) -> fidl::Result<()> {
13887            encoder.debug_check_bounds::<Vector4Value>(offset);
13888            // Delegate to tuple encoding.
13889            fidl::encoding::Encode::<Vector4Value, D>::encode(
13890                (
13891                    <Vec4 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
13892                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
13893                ),
13894                encoder,
13895                offset,
13896                _depth,
13897            )
13898        }
13899    }
13900    unsafe impl<
13901            D: fidl::encoding::ResourceDialect,
13902            T0: fidl::encoding::Encode<Vec4, D>,
13903            T1: fidl::encoding::Encode<u32, D>,
13904        > fidl::encoding::Encode<Vector4Value, D> for (T0, T1)
13905    {
13906        #[inline]
13907        unsafe fn encode(
13908            self,
13909            encoder: &mut fidl::encoding::Encoder<'_, D>,
13910            offset: usize,
13911            depth: fidl::encoding::Depth,
13912        ) -> fidl::Result<()> {
13913            encoder.debug_check_bounds::<Vector4Value>(offset);
13914            // Zero out padding regions. There's no need to apply masks
13915            // because the unmasked parts will be overwritten by fields.
13916            // Write the fields.
13917            self.0.encode(encoder, offset + 0, depth)?;
13918            self.1.encode(encoder, offset + 16, depth)?;
13919            Ok(())
13920        }
13921    }
13922
13923    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vector4Value {
13924        #[inline(always)]
13925        fn new_empty() -> Self {
13926            Self { value: fidl::new_empty!(Vec4, D), variable_id: fidl::new_empty!(u32, D) }
13927        }
13928
13929        #[inline]
13930        unsafe fn decode(
13931            &mut self,
13932            decoder: &mut fidl::encoding::Decoder<'_, D>,
13933            offset: usize,
13934            _depth: fidl::encoding::Depth,
13935        ) -> fidl::Result<()> {
13936            decoder.debug_check_bounds::<Self>(offset);
13937            // Verify that padding bytes are zero.
13938            fidl::decode!(Vec4, D, &mut self.value, decoder, offset + 0, _depth)?;
13939            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 16, _depth)?;
13940            Ok(())
13941        }
13942    }
13943
13944    impl fidl::encoding::ResourceTypeMarker for ViewArgs {
13945        type Borrowed<'a> = &'a mut Self;
13946        fn take_or_borrow<'a>(
13947            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13948        ) -> Self::Borrowed<'a> {
13949            value
13950        }
13951    }
13952
13953    unsafe impl fidl::encoding::TypeMarker for ViewArgs {
13954        type Owned = Self;
13955
13956        #[inline(always)]
13957        fn inline_align(_context: fidl::encoding::Context) -> usize {
13958            8
13959        }
13960
13961        #[inline(always)]
13962        fn inline_size(_context: fidl::encoding::Context) -> usize {
13963            24
13964        }
13965    }
13966
13967    unsafe impl fidl::encoding::Encode<ViewArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
13968        for &mut ViewArgs
13969    {
13970        #[inline]
13971        unsafe fn encode(
13972            self,
13973            encoder: &mut fidl::encoding::Encoder<
13974                '_,
13975                fidl::encoding::DefaultFuchsiaResourceDialect,
13976            >,
13977            offset: usize,
13978            _depth: fidl::encoding::Depth,
13979        ) -> fidl::Result<()> {
13980            encoder.debug_check_bounds::<ViewArgs>(offset);
13981            // Delegate to tuple encoding.
13982            fidl::encoding::Encode::<ViewArgs, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
13983                (
13984                    <fidl_fuchsia_ui_views::ViewToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
13985                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.debug_name),
13986                ),
13987                encoder, offset, _depth
13988            )
13989        }
13990    }
13991    unsafe impl<
13992            T0: fidl::encoding::Encode<
13993                fidl_fuchsia_ui_views::ViewToken,
13994                fidl::encoding::DefaultFuchsiaResourceDialect,
13995            >,
13996            T1: fidl::encoding::Encode<
13997                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
13998                fidl::encoding::DefaultFuchsiaResourceDialect,
13999            >,
14000        > fidl::encoding::Encode<ViewArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
14001        for (T0, T1)
14002    {
14003        #[inline]
14004        unsafe fn encode(
14005            self,
14006            encoder: &mut fidl::encoding::Encoder<
14007                '_,
14008                fidl::encoding::DefaultFuchsiaResourceDialect,
14009            >,
14010            offset: usize,
14011            depth: fidl::encoding::Depth,
14012        ) -> fidl::Result<()> {
14013            encoder.debug_check_bounds::<ViewArgs>(offset);
14014            // Zero out padding regions. There's no need to apply masks
14015            // because the unmasked parts will be overwritten by fields.
14016            unsafe {
14017                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
14018                (ptr as *mut u64).write_unaligned(0);
14019            }
14020            // Write the fields.
14021            self.0.encode(encoder, offset + 0, depth)?;
14022            self.1.encode(encoder, offset + 8, depth)?;
14023            Ok(())
14024        }
14025    }
14026
14027    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for ViewArgs {
14028        #[inline(always)]
14029        fn new_empty() -> Self {
14030            Self {
14031                token: fidl::new_empty!(
14032                    fidl_fuchsia_ui_views::ViewToken,
14033                    fidl::encoding::DefaultFuchsiaResourceDialect
14034                ),
14035                debug_name: fidl::new_empty!(
14036                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
14037                    fidl::encoding::DefaultFuchsiaResourceDialect
14038                ),
14039            }
14040        }
14041
14042        #[inline]
14043        unsafe fn decode(
14044            &mut self,
14045            decoder: &mut fidl::encoding::Decoder<
14046                '_,
14047                fidl::encoding::DefaultFuchsiaResourceDialect,
14048            >,
14049            offset: usize,
14050            _depth: fidl::encoding::Depth,
14051        ) -> fidl::Result<()> {
14052            decoder.debug_check_bounds::<Self>(offset);
14053            // Verify that padding bytes are zero.
14054            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
14055            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14056            let mask = 0xffffffff00000000u64;
14057            let maskedval = padval & mask;
14058            if maskedval != 0 {
14059                return Err(fidl::Error::NonZeroPadding {
14060                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
14061                });
14062            }
14063            fidl::decode!(
14064                fidl_fuchsia_ui_views::ViewToken,
14065                fidl::encoding::DefaultFuchsiaResourceDialect,
14066                &mut self.token,
14067                decoder,
14068                offset + 0,
14069                _depth
14070            )?;
14071            fidl::decode!(
14072                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
14073                fidl::encoding::DefaultFuchsiaResourceDialect,
14074                &mut self.debug_name,
14075                decoder,
14076                offset + 8,
14077                _depth
14078            )?;
14079            Ok(())
14080        }
14081    }
14082
14083    impl fidl::encoding::ResourceTypeMarker for ViewArgs3 {
14084        type Borrowed<'a> = &'a mut Self;
14085        fn take_or_borrow<'a>(
14086            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14087        ) -> Self::Borrowed<'a> {
14088            value
14089        }
14090    }
14091
14092    unsafe impl fidl::encoding::TypeMarker for ViewArgs3 {
14093        type Owned = Self;
14094
14095        #[inline(always)]
14096        fn inline_align(_context: fidl::encoding::Context) -> usize {
14097            8
14098        }
14099
14100        #[inline(always)]
14101        fn inline_size(_context: fidl::encoding::Context) -> usize {
14102            32
14103        }
14104    }
14105
14106    unsafe impl fidl::encoding::Encode<ViewArgs3, fidl::encoding::DefaultFuchsiaResourceDialect>
14107        for &mut ViewArgs3
14108    {
14109        #[inline]
14110        unsafe fn encode(
14111            self,
14112            encoder: &mut fidl::encoding::Encoder<
14113                '_,
14114                fidl::encoding::DefaultFuchsiaResourceDialect,
14115            >,
14116            offset: usize,
14117            _depth: fidl::encoding::Depth,
14118        ) -> fidl::Result<()> {
14119            encoder.debug_check_bounds::<ViewArgs3>(offset);
14120            // Delegate to tuple encoding.
14121            fidl::encoding::Encode::<ViewArgs3, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
14122                (
14123                    <fidl_fuchsia_ui_views::ViewToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
14124                    <fidl_fuchsia_ui_views::ViewRefControl as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.control_ref),
14125                    <fidl_fuchsia_ui_views::ViewRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.view_ref),
14126                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.debug_name),
14127                ),
14128                encoder, offset, _depth
14129            )
14130        }
14131    }
14132    unsafe impl<
14133            T0: fidl::encoding::Encode<
14134                fidl_fuchsia_ui_views::ViewToken,
14135                fidl::encoding::DefaultFuchsiaResourceDialect,
14136            >,
14137            T1: fidl::encoding::Encode<
14138                fidl_fuchsia_ui_views::ViewRefControl,
14139                fidl::encoding::DefaultFuchsiaResourceDialect,
14140            >,
14141            T2: fidl::encoding::Encode<
14142                fidl_fuchsia_ui_views::ViewRef,
14143                fidl::encoding::DefaultFuchsiaResourceDialect,
14144            >,
14145            T3: fidl::encoding::Encode<
14146                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
14147                fidl::encoding::DefaultFuchsiaResourceDialect,
14148            >,
14149        > fidl::encoding::Encode<ViewArgs3, fidl::encoding::DefaultFuchsiaResourceDialect>
14150        for (T0, T1, T2, T3)
14151    {
14152        #[inline]
14153        unsafe fn encode(
14154            self,
14155            encoder: &mut fidl::encoding::Encoder<
14156                '_,
14157                fidl::encoding::DefaultFuchsiaResourceDialect,
14158            >,
14159            offset: usize,
14160            depth: fidl::encoding::Depth,
14161        ) -> fidl::Result<()> {
14162            encoder.debug_check_bounds::<ViewArgs3>(offset);
14163            // Zero out padding regions. There's no need to apply masks
14164            // because the unmasked parts will be overwritten by fields.
14165            unsafe {
14166                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
14167                (ptr as *mut u64).write_unaligned(0);
14168            }
14169            // Write the fields.
14170            self.0.encode(encoder, offset + 0, depth)?;
14171            self.1.encode(encoder, offset + 4, depth)?;
14172            self.2.encode(encoder, offset + 8, depth)?;
14173            self.3.encode(encoder, offset + 16, depth)?;
14174            Ok(())
14175        }
14176    }
14177
14178    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for ViewArgs3 {
14179        #[inline(always)]
14180        fn new_empty() -> Self {
14181            Self {
14182                token: fidl::new_empty!(
14183                    fidl_fuchsia_ui_views::ViewToken,
14184                    fidl::encoding::DefaultFuchsiaResourceDialect
14185                ),
14186                control_ref: fidl::new_empty!(
14187                    fidl_fuchsia_ui_views::ViewRefControl,
14188                    fidl::encoding::DefaultFuchsiaResourceDialect
14189                ),
14190                view_ref: fidl::new_empty!(
14191                    fidl_fuchsia_ui_views::ViewRef,
14192                    fidl::encoding::DefaultFuchsiaResourceDialect
14193                ),
14194                debug_name: fidl::new_empty!(
14195                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
14196                    fidl::encoding::DefaultFuchsiaResourceDialect
14197                ),
14198            }
14199        }
14200
14201        #[inline]
14202        unsafe fn decode(
14203            &mut self,
14204            decoder: &mut fidl::encoding::Decoder<
14205                '_,
14206                fidl::encoding::DefaultFuchsiaResourceDialect,
14207            >,
14208            offset: usize,
14209            _depth: fidl::encoding::Depth,
14210        ) -> fidl::Result<()> {
14211            decoder.debug_check_bounds::<Self>(offset);
14212            // Verify that padding bytes are zero.
14213            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
14214            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14215            let mask = 0xffffffff00000000u64;
14216            let maskedval = padval & mask;
14217            if maskedval != 0 {
14218                return Err(fidl::Error::NonZeroPadding {
14219                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
14220                });
14221            }
14222            fidl::decode!(
14223                fidl_fuchsia_ui_views::ViewToken,
14224                fidl::encoding::DefaultFuchsiaResourceDialect,
14225                &mut self.token,
14226                decoder,
14227                offset + 0,
14228                _depth
14229            )?;
14230            fidl::decode!(
14231                fidl_fuchsia_ui_views::ViewRefControl,
14232                fidl::encoding::DefaultFuchsiaResourceDialect,
14233                &mut self.control_ref,
14234                decoder,
14235                offset + 4,
14236                _depth
14237            )?;
14238            fidl::decode!(
14239                fidl_fuchsia_ui_views::ViewRef,
14240                fidl::encoding::DefaultFuchsiaResourceDialect,
14241                &mut self.view_ref,
14242                decoder,
14243                offset + 8,
14244                _depth
14245            )?;
14246            fidl::decode!(
14247                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
14248                fidl::encoding::DefaultFuchsiaResourceDialect,
14249                &mut self.debug_name,
14250                decoder,
14251                offset + 16,
14252                _depth
14253            )?;
14254            Ok(())
14255        }
14256    }
14257
14258    impl fidl::encoding::ValueTypeMarker for ViewAttachedToSceneEvent {
14259        type Borrowed<'a> = &'a Self;
14260        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14261            value
14262        }
14263    }
14264
14265    unsafe impl fidl::encoding::TypeMarker for ViewAttachedToSceneEvent {
14266        type Owned = Self;
14267
14268        #[inline(always)]
14269        fn inline_align(_context: fidl::encoding::Context) -> usize {
14270            4
14271        }
14272
14273        #[inline(always)]
14274        fn inline_size(_context: fidl::encoding::Context) -> usize {
14275            56
14276        }
14277    }
14278
14279    unsafe impl<D: fidl::encoding::ResourceDialect>
14280        fidl::encoding::Encode<ViewAttachedToSceneEvent, D> for &ViewAttachedToSceneEvent
14281    {
14282        #[inline]
14283        unsafe fn encode(
14284            self,
14285            encoder: &mut fidl::encoding::Encoder<'_, D>,
14286            offset: usize,
14287            _depth: fidl::encoding::Depth,
14288        ) -> fidl::Result<()> {
14289            encoder.debug_check_bounds::<ViewAttachedToSceneEvent>(offset);
14290            // Delegate to tuple encoding.
14291            fidl::encoding::Encode::<ViewAttachedToSceneEvent, D>::encode(
14292                (
14293                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.view_id),
14294                    <ViewProperties as fidl::encoding::ValueTypeMarker>::borrow(&self.properties),
14295                ),
14296                encoder,
14297                offset,
14298                _depth,
14299            )
14300        }
14301    }
14302    unsafe impl<
14303            D: fidl::encoding::ResourceDialect,
14304            T0: fidl::encoding::Encode<u32, D>,
14305            T1: fidl::encoding::Encode<ViewProperties, D>,
14306        > fidl::encoding::Encode<ViewAttachedToSceneEvent, D> for (T0, T1)
14307    {
14308        #[inline]
14309        unsafe fn encode(
14310            self,
14311            encoder: &mut fidl::encoding::Encoder<'_, D>,
14312            offset: usize,
14313            depth: fidl::encoding::Depth,
14314        ) -> fidl::Result<()> {
14315            encoder.debug_check_bounds::<ViewAttachedToSceneEvent>(offset);
14316            // Zero out padding regions. There's no need to apply masks
14317            // because the unmasked parts will be overwritten by fields.
14318            // Write the fields.
14319            self.0.encode(encoder, offset + 0, depth)?;
14320            self.1.encode(encoder, offset + 4, depth)?;
14321            Ok(())
14322        }
14323    }
14324
14325    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14326        for ViewAttachedToSceneEvent
14327    {
14328        #[inline(always)]
14329        fn new_empty() -> Self {
14330            Self {
14331                view_id: fidl::new_empty!(u32, D),
14332                properties: fidl::new_empty!(ViewProperties, D),
14333            }
14334        }
14335
14336        #[inline]
14337        unsafe fn decode(
14338            &mut self,
14339            decoder: &mut fidl::encoding::Decoder<'_, D>,
14340            offset: usize,
14341            _depth: fidl::encoding::Depth,
14342        ) -> fidl::Result<()> {
14343            decoder.debug_check_bounds::<Self>(offset);
14344            // Verify that padding bytes are zero.
14345            fidl::decode!(u32, D, &mut self.view_id, decoder, offset + 0, _depth)?;
14346            fidl::decode!(ViewProperties, D, &mut self.properties, decoder, offset + 4, _depth)?;
14347            Ok(())
14348        }
14349    }
14350
14351    impl fidl::encoding::ValueTypeMarker for ViewConnectedEvent {
14352        type Borrowed<'a> = &'a Self;
14353        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14354            value
14355        }
14356    }
14357
14358    unsafe impl fidl::encoding::TypeMarker for ViewConnectedEvent {
14359        type Owned = Self;
14360
14361        #[inline(always)]
14362        fn inline_align(_context: fidl::encoding::Context) -> usize {
14363            4
14364        }
14365
14366        #[inline(always)]
14367        fn inline_size(_context: fidl::encoding::Context) -> usize {
14368            4
14369        }
14370        #[inline(always)]
14371        fn encode_is_copy() -> bool {
14372            true
14373        }
14374
14375        #[inline(always)]
14376        fn decode_is_copy() -> bool {
14377            true
14378        }
14379    }
14380
14381    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ViewConnectedEvent, D>
14382        for &ViewConnectedEvent
14383    {
14384        #[inline]
14385        unsafe fn encode(
14386            self,
14387            encoder: &mut fidl::encoding::Encoder<'_, D>,
14388            offset: usize,
14389            _depth: fidl::encoding::Depth,
14390        ) -> fidl::Result<()> {
14391            encoder.debug_check_bounds::<ViewConnectedEvent>(offset);
14392            unsafe {
14393                // Copy the object into the buffer.
14394                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14395                (buf_ptr as *mut ViewConnectedEvent)
14396                    .write_unaligned((self as *const ViewConnectedEvent).read());
14397                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14398                // done second because the memcpy will write garbage to these bytes.
14399            }
14400            Ok(())
14401        }
14402    }
14403    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
14404        fidl::encoding::Encode<ViewConnectedEvent, D> for (T0,)
14405    {
14406        #[inline]
14407        unsafe fn encode(
14408            self,
14409            encoder: &mut fidl::encoding::Encoder<'_, D>,
14410            offset: usize,
14411            depth: fidl::encoding::Depth,
14412        ) -> fidl::Result<()> {
14413            encoder.debug_check_bounds::<ViewConnectedEvent>(offset);
14414            // Zero out padding regions. There's no need to apply masks
14415            // because the unmasked parts will be overwritten by fields.
14416            // Write the fields.
14417            self.0.encode(encoder, offset + 0, depth)?;
14418            Ok(())
14419        }
14420    }
14421
14422    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ViewConnectedEvent {
14423        #[inline(always)]
14424        fn new_empty() -> Self {
14425            Self { view_holder_id: fidl::new_empty!(u32, D) }
14426        }
14427
14428        #[inline]
14429        unsafe fn decode(
14430            &mut self,
14431            decoder: &mut fidl::encoding::Decoder<'_, D>,
14432            offset: usize,
14433            _depth: fidl::encoding::Depth,
14434        ) -> fidl::Result<()> {
14435            decoder.debug_check_bounds::<Self>(offset);
14436            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14437            // Verify that padding bytes are zero.
14438            // Copy from the buffer into the object.
14439            unsafe {
14440                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14441            }
14442            Ok(())
14443        }
14444    }
14445
14446    impl fidl::encoding::ValueTypeMarker for ViewDetachedFromSceneEvent {
14447        type Borrowed<'a> = &'a Self;
14448        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14449            value
14450        }
14451    }
14452
14453    unsafe impl fidl::encoding::TypeMarker for ViewDetachedFromSceneEvent {
14454        type Owned = Self;
14455
14456        #[inline(always)]
14457        fn inline_align(_context: fidl::encoding::Context) -> usize {
14458            4
14459        }
14460
14461        #[inline(always)]
14462        fn inline_size(_context: fidl::encoding::Context) -> usize {
14463            4
14464        }
14465        #[inline(always)]
14466        fn encode_is_copy() -> bool {
14467            true
14468        }
14469
14470        #[inline(always)]
14471        fn decode_is_copy() -> bool {
14472            true
14473        }
14474    }
14475
14476    unsafe impl<D: fidl::encoding::ResourceDialect>
14477        fidl::encoding::Encode<ViewDetachedFromSceneEvent, D> for &ViewDetachedFromSceneEvent
14478    {
14479        #[inline]
14480        unsafe fn encode(
14481            self,
14482            encoder: &mut fidl::encoding::Encoder<'_, D>,
14483            offset: usize,
14484            _depth: fidl::encoding::Depth,
14485        ) -> fidl::Result<()> {
14486            encoder.debug_check_bounds::<ViewDetachedFromSceneEvent>(offset);
14487            unsafe {
14488                // Copy the object into the buffer.
14489                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14490                (buf_ptr as *mut ViewDetachedFromSceneEvent)
14491                    .write_unaligned((self as *const ViewDetachedFromSceneEvent).read());
14492                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14493                // done second because the memcpy will write garbage to these bytes.
14494            }
14495            Ok(())
14496        }
14497    }
14498    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
14499        fidl::encoding::Encode<ViewDetachedFromSceneEvent, D> for (T0,)
14500    {
14501        #[inline]
14502        unsafe fn encode(
14503            self,
14504            encoder: &mut fidl::encoding::Encoder<'_, D>,
14505            offset: usize,
14506            depth: fidl::encoding::Depth,
14507        ) -> fidl::Result<()> {
14508            encoder.debug_check_bounds::<ViewDetachedFromSceneEvent>(offset);
14509            // Zero out padding regions. There's no need to apply masks
14510            // because the unmasked parts will be overwritten by fields.
14511            // Write the fields.
14512            self.0.encode(encoder, offset + 0, depth)?;
14513            Ok(())
14514        }
14515    }
14516
14517    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14518        for ViewDetachedFromSceneEvent
14519    {
14520        #[inline(always)]
14521        fn new_empty() -> Self {
14522            Self { view_id: fidl::new_empty!(u32, D) }
14523        }
14524
14525        #[inline]
14526        unsafe fn decode(
14527            &mut self,
14528            decoder: &mut fidl::encoding::Decoder<'_, D>,
14529            offset: usize,
14530            _depth: fidl::encoding::Depth,
14531        ) -> fidl::Result<()> {
14532            decoder.debug_check_bounds::<Self>(offset);
14533            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14534            // Verify that padding bytes are zero.
14535            // Copy from the buffer into the object.
14536            unsafe {
14537                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14538            }
14539            Ok(())
14540        }
14541    }
14542
14543    impl fidl::encoding::ValueTypeMarker for ViewDisconnectedEvent {
14544        type Borrowed<'a> = &'a Self;
14545        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14546            value
14547        }
14548    }
14549
14550    unsafe impl fidl::encoding::TypeMarker for ViewDisconnectedEvent {
14551        type Owned = Self;
14552
14553        #[inline(always)]
14554        fn inline_align(_context: fidl::encoding::Context) -> usize {
14555            4
14556        }
14557
14558        #[inline(always)]
14559        fn inline_size(_context: fidl::encoding::Context) -> usize {
14560            4
14561        }
14562        #[inline(always)]
14563        fn encode_is_copy() -> bool {
14564            true
14565        }
14566
14567        #[inline(always)]
14568        fn decode_is_copy() -> bool {
14569            true
14570        }
14571    }
14572
14573    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ViewDisconnectedEvent, D>
14574        for &ViewDisconnectedEvent
14575    {
14576        #[inline]
14577        unsafe fn encode(
14578            self,
14579            encoder: &mut fidl::encoding::Encoder<'_, D>,
14580            offset: usize,
14581            _depth: fidl::encoding::Depth,
14582        ) -> fidl::Result<()> {
14583            encoder.debug_check_bounds::<ViewDisconnectedEvent>(offset);
14584            unsafe {
14585                // Copy the object into the buffer.
14586                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14587                (buf_ptr as *mut ViewDisconnectedEvent)
14588                    .write_unaligned((self as *const ViewDisconnectedEvent).read());
14589                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14590                // done second because the memcpy will write garbage to these bytes.
14591            }
14592            Ok(())
14593        }
14594    }
14595    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
14596        fidl::encoding::Encode<ViewDisconnectedEvent, D> for (T0,)
14597    {
14598        #[inline]
14599        unsafe fn encode(
14600            self,
14601            encoder: &mut fidl::encoding::Encoder<'_, D>,
14602            offset: usize,
14603            depth: fidl::encoding::Depth,
14604        ) -> fidl::Result<()> {
14605            encoder.debug_check_bounds::<ViewDisconnectedEvent>(offset);
14606            // Zero out padding regions. There's no need to apply masks
14607            // because the unmasked parts will be overwritten by fields.
14608            // Write the fields.
14609            self.0.encode(encoder, offset + 0, depth)?;
14610            Ok(())
14611        }
14612    }
14613
14614    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ViewDisconnectedEvent {
14615        #[inline(always)]
14616        fn new_empty() -> Self {
14617            Self { view_holder_id: fidl::new_empty!(u32, D) }
14618        }
14619
14620        #[inline]
14621        unsafe fn decode(
14622            &mut self,
14623            decoder: &mut fidl::encoding::Decoder<'_, D>,
14624            offset: usize,
14625            _depth: fidl::encoding::Depth,
14626        ) -> fidl::Result<()> {
14627            decoder.debug_check_bounds::<Self>(offset);
14628            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14629            // Verify that padding bytes are zero.
14630            // Copy from the buffer into the object.
14631            unsafe {
14632                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14633            }
14634            Ok(())
14635        }
14636    }
14637
14638    impl fidl::encoding::ResourceTypeMarker for ViewHolderArgs {
14639        type Borrowed<'a> = &'a mut Self;
14640        fn take_or_borrow<'a>(
14641            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14642        ) -> Self::Borrowed<'a> {
14643            value
14644        }
14645    }
14646
14647    unsafe impl fidl::encoding::TypeMarker for ViewHolderArgs {
14648        type Owned = Self;
14649
14650        #[inline(always)]
14651        fn inline_align(_context: fidl::encoding::Context) -> usize {
14652            8
14653        }
14654
14655        #[inline(always)]
14656        fn inline_size(_context: fidl::encoding::Context) -> usize {
14657            24
14658        }
14659    }
14660
14661    unsafe impl
14662        fidl::encoding::Encode<ViewHolderArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
14663        for &mut ViewHolderArgs
14664    {
14665        #[inline]
14666        unsafe fn encode(
14667            self,
14668            encoder: &mut fidl::encoding::Encoder<
14669                '_,
14670                fidl::encoding::DefaultFuchsiaResourceDialect,
14671            >,
14672            offset: usize,
14673            _depth: fidl::encoding::Depth,
14674        ) -> fidl::Result<()> {
14675            encoder.debug_check_bounds::<ViewHolderArgs>(offset);
14676            // Delegate to tuple encoding.
14677            fidl::encoding::Encode::<ViewHolderArgs, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
14678                (
14679                    <fidl_fuchsia_ui_views::ViewHolderToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
14680                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.debug_name),
14681                ),
14682                encoder, offset, _depth
14683            )
14684        }
14685    }
14686    unsafe impl<
14687            T0: fidl::encoding::Encode<
14688                fidl_fuchsia_ui_views::ViewHolderToken,
14689                fidl::encoding::DefaultFuchsiaResourceDialect,
14690            >,
14691            T1: fidl::encoding::Encode<
14692                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
14693                fidl::encoding::DefaultFuchsiaResourceDialect,
14694            >,
14695        > fidl::encoding::Encode<ViewHolderArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
14696        for (T0, T1)
14697    {
14698        #[inline]
14699        unsafe fn encode(
14700            self,
14701            encoder: &mut fidl::encoding::Encoder<
14702                '_,
14703                fidl::encoding::DefaultFuchsiaResourceDialect,
14704            >,
14705            offset: usize,
14706            depth: fidl::encoding::Depth,
14707        ) -> fidl::Result<()> {
14708            encoder.debug_check_bounds::<ViewHolderArgs>(offset);
14709            // Zero out padding regions. There's no need to apply masks
14710            // because the unmasked parts will be overwritten by fields.
14711            unsafe {
14712                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
14713                (ptr as *mut u64).write_unaligned(0);
14714            }
14715            // Write the fields.
14716            self.0.encode(encoder, offset + 0, depth)?;
14717            self.1.encode(encoder, offset + 8, depth)?;
14718            Ok(())
14719        }
14720    }
14721
14722    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14723        for ViewHolderArgs
14724    {
14725        #[inline(always)]
14726        fn new_empty() -> Self {
14727            Self {
14728                token: fidl::new_empty!(
14729                    fidl_fuchsia_ui_views::ViewHolderToken,
14730                    fidl::encoding::DefaultFuchsiaResourceDialect
14731                ),
14732                debug_name: fidl::new_empty!(
14733                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
14734                    fidl::encoding::DefaultFuchsiaResourceDialect
14735                ),
14736            }
14737        }
14738
14739        #[inline]
14740        unsafe fn decode(
14741            &mut self,
14742            decoder: &mut fidl::encoding::Decoder<
14743                '_,
14744                fidl::encoding::DefaultFuchsiaResourceDialect,
14745            >,
14746            offset: usize,
14747            _depth: fidl::encoding::Depth,
14748        ) -> fidl::Result<()> {
14749            decoder.debug_check_bounds::<Self>(offset);
14750            // Verify that padding bytes are zero.
14751            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
14752            let padval = unsafe { (ptr as *const u64).read_unaligned() };
14753            let mask = 0xffffffff00000000u64;
14754            let maskedval = padval & mask;
14755            if maskedval != 0 {
14756                return Err(fidl::Error::NonZeroPadding {
14757                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
14758                });
14759            }
14760            fidl::decode!(
14761                fidl_fuchsia_ui_views::ViewHolderToken,
14762                fidl::encoding::DefaultFuchsiaResourceDialect,
14763                &mut self.token,
14764                decoder,
14765                offset + 0,
14766                _depth
14767            )?;
14768            fidl::decode!(
14769                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
14770                fidl::encoding::DefaultFuchsiaResourceDialect,
14771                &mut self.debug_name,
14772                decoder,
14773                offset + 8,
14774                _depth
14775            )?;
14776            Ok(())
14777        }
14778    }
14779
14780    impl fidl::encoding::ValueTypeMarker for ViewHolderConnectedEvent {
14781        type Borrowed<'a> = &'a Self;
14782        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14783            value
14784        }
14785    }
14786
14787    unsafe impl fidl::encoding::TypeMarker for ViewHolderConnectedEvent {
14788        type Owned = Self;
14789
14790        #[inline(always)]
14791        fn inline_align(_context: fidl::encoding::Context) -> usize {
14792            4
14793        }
14794
14795        #[inline(always)]
14796        fn inline_size(_context: fidl::encoding::Context) -> usize {
14797            4
14798        }
14799        #[inline(always)]
14800        fn encode_is_copy() -> bool {
14801            true
14802        }
14803
14804        #[inline(always)]
14805        fn decode_is_copy() -> bool {
14806            true
14807        }
14808    }
14809
14810    unsafe impl<D: fidl::encoding::ResourceDialect>
14811        fidl::encoding::Encode<ViewHolderConnectedEvent, D> for &ViewHolderConnectedEvent
14812    {
14813        #[inline]
14814        unsafe fn encode(
14815            self,
14816            encoder: &mut fidl::encoding::Encoder<'_, D>,
14817            offset: usize,
14818            _depth: fidl::encoding::Depth,
14819        ) -> fidl::Result<()> {
14820            encoder.debug_check_bounds::<ViewHolderConnectedEvent>(offset);
14821            unsafe {
14822                // Copy the object into the buffer.
14823                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14824                (buf_ptr as *mut ViewHolderConnectedEvent)
14825                    .write_unaligned((self as *const ViewHolderConnectedEvent).read());
14826                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14827                // done second because the memcpy will write garbage to these bytes.
14828            }
14829            Ok(())
14830        }
14831    }
14832    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
14833        fidl::encoding::Encode<ViewHolderConnectedEvent, D> for (T0,)
14834    {
14835        #[inline]
14836        unsafe fn encode(
14837            self,
14838            encoder: &mut fidl::encoding::Encoder<'_, D>,
14839            offset: usize,
14840            depth: fidl::encoding::Depth,
14841        ) -> fidl::Result<()> {
14842            encoder.debug_check_bounds::<ViewHolderConnectedEvent>(offset);
14843            // Zero out padding regions. There's no need to apply masks
14844            // because the unmasked parts will be overwritten by fields.
14845            // Write the fields.
14846            self.0.encode(encoder, offset + 0, depth)?;
14847            Ok(())
14848        }
14849    }
14850
14851    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14852        for ViewHolderConnectedEvent
14853    {
14854        #[inline(always)]
14855        fn new_empty() -> Self {
14856            Self { view_id: fidl::new_empty!(u32, D) }
14857        }
14858
14859        #[inline]
14860        unsafe fn decode(
14861            &mut self,
14862            decoder: &mut fidl::encoding::Decoder<'_, D>,
14863            offset: usize,
14864            _depth: fidl::encoding::Depth,
14865        ) -> fidl::Result<()> {
14866            decoder.debug_check_bounds::<Self>(offset);
14867            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14868            // Verify that padding bytes are zero.
14869            // Copy from the buffer into the object.
14870            unsafe {
14871                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14872            }
14873            Ok(())
14874        }
14875    }
14876
14877    impl fidl::encoding::ValueTypeMarker for ViewHolderDisconnectedEvent {
14878        type Borrowed<'a> = &'a Self;
14879        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14880            value
14881        }
14882    }
14883
14884    unsafe impl fidl::encoding::TypeMarker for ViewHolderDisconnectedEvent {
14885        type Owned = Self;
14886
14887        #[inline(always)]
14888        fn inline_align(_context: fidl::encoding::Context) -> usize {
14889            4
14890        }
14891
14892        #[inline(always)]
14893        fn inline_size(_context: fidl::encoding::Context) -> usize {
14894            4
14895        }
14896        #[inline(always)]
14897        fn encode_is_copy() -> bool {
14898            true
14899        }
14900
14901        #[inline(always)]
14902        fn decode_is_copy() -> bool {
14903            true
14904        }
14905    }
14906
14907    unsafe impl<D: fidl::encoding::ResourceDialect>
14908        fidl::encoding::Encode<ViewHolderDisconnectedEvent, D> for &ViewHolderDisconnectedEvent
14909    {
14910        #[inline]
14911        unsafe fn encode(
14912            self,
14913            encoder: &mut fidl::encoding::Encoder<'_, D>,
14914            offset: usize,
14915            _depth: fidl::encoding::Depth,
14916        ) -> fidl::Result<()> {
14917            encoder.debug_check_bounds::<ViewHolderDisconnectedEvent>(offset);
14918            unsafe {
14919                // Copy the object into the buffer.
14920                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
14921                (buf_ptr as *mut ViewHolderDisconnectedEvent)
14922                    .write_unaligned((self as *const ViewHolderDisconnectedEvent).read());
14923                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
14924                // done second because the memcpy will write garbage to these bytes.
14925            }
14926            Ok(())
14927        }
14928    }
14929    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
14930        fidl::encoding::Encode<ViewHolderDisconnectedEvent, D> for (T0,)
14931    {
14932        #[inline]
14933        unsafe fn encode(
14934            self,
14935            encoder: &mut fidl::encoding::Encoder<'_, D>,
14936            offset: usize,
14937            depth: fidl::encoding::Depth,
14938        ) -> fidl::Result<()> {
14939            encoder.debug_check_bounds::<ViewHolderDisconnectedEvent>(offset);
14940            // Zero out padding regions. There's no need to apply masks
14941            // because the unmasked parts will be overwritten by fields.
14942            // Write the fields.
14943            self.0.encode(encoder, offset + 0, depth)?;
14944            Ok(())
14945        }
14946    }
14947
14948    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
14949        for ViewHolderDisconnectedEvent
14950    {
14951        #[inline(always)]
14952        fn new_empty() -> Self {
14953            Self { view_id: fidl::new_empty!(u32, D) }
14954        }
14955
14956        #[inline]
14957        unsafe fn decode(
14958            &mut self,
14959            decoder: &mut fidl::encoding::Decoder<'_, D>,
14960            offset: usize,
14961            _depth: fidl::encoding::Depth,
14962        ) -> fidl::Result<()> {
14963            decoder.debug_check_bounds::<Self>(offset);
14964            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
14965            // Verify that padding bytes are zero.
14966            // Copy from the buffer into the object.
14967            unsafe {
14968                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
14969            }
14970            Ok(())
14971        }
14972    }
14973
14974    impl fidl::encoding::ValueTypeMarker for ViewProperties {
14975        type Borrowed<'a> = &'a Self;
14976        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14977            value
14978        }
14979    }
14980
14981    unsafe impl fidl::encoding::TypeMarker for ViewProperties {
14982        type Owned = Self;
14983
14984        #[inline(always)]
14985        fn inline_align(_context: fidl::encoding::Context) -> usize {
14986            4
14987        }
14988
14989        #[inline(always)]
14990        fn inline_size(_context: fidl::encoding::Context) -> usize {
14991            52
14992        }
14993    }
14994
14995    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ViewProperties, D>
14996        for &ViewProperties
14997    {
14998        #[inline]
14999        unsafe fn encode(
15000            self,
15001            encoder: &mut fidl::encoding::Encoder<'_, D>,
15002            offset: usize,
15003            _depth: fidl::encoding::Depth,
15004        ) -> fidl::Result<()> {
15005            encoder.debug_check_bounds::<ViewProperties>(offset);
15006            // Delegate to tuple encoding.
15007            fidl::encoding::Encode::<ViewProperties, D>::encode(
15008                (
15009                    <BoundingBox as fidl::encoding::ValueTypeMarker>::borrow(&self.bounding_box),
15010                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.inset_from_min),
15011                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.inset_from_max),
15012                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.focus_change),
15013                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.downward_input),
15014                ),
15015                encoder,
15016                offset,
15017                _depth,
15018            )
15019        }
15020    }
15021    unsafe impl<
15022            D: fidl::encoding::ResourceDialect,
15023            T0: fidl::encoding::Encode<BoundingBox, D>,
15024            T1: fidl::encoding::Encode<Vec3, D>,
15025            T2: fidl::encoding::Encode<Vec3, D>,
15026            T3: fidl::encoding::Encode<bool, D>,
15027            T4: fidl::encoding::Encode<bool, D>,
15028        > fidl::encoding::Encode<ViewProperties, D> for (T0, T1, T2, T3, T4)
15029    {
15030        #[inline]
15031        unsafe fn encode(
15032            self,
15033            encoder: &mut fidl::encoding::Encoder<'_, D>,
15034            offset: usize,
15035            depth: fidl::encoding::Depth,
15036        ) -> fidl::Result<()> {
15037            encoder.debug_check_bounds::<ViewProperties>(offset);
15038            // Zero out padding regions. There's no need to apply masks
15039            // because the unmasked parts will be overwritten by fields.
15040            unsafe {
15041                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
15042                (ptr as *mut u32).write_unaligned(0);
15043            }
15044            // Write the fields.
15045            self.0.encode(encoder, offset + 0, depth)?;
15046            self.1.encode(encoder, offset + 24, depth)?;
15047            self.2.encode(encoder, offset + 36, depth)?;
15048            self.3.encode(encoder, offset + 48, depth)?;
15049            self.4.encode(encoder, offset + 49, depth)?;
15050            Ok(())
15051        }
15052    }
15053
15054    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ViewProperties {
15055        #[inline(always)]
15056        fn new_empty() -> Self {
15057            Self {
15058                bounding_box: fidl::new_empty!(BoundingBox, D),
15059                inset_from_min: fidl::new_empty!(Vec3, D),
15060                inset_from_max: fidl::new_empty!(Vec3, D),
15061                focus_change: fidl::new_empty!(bool, D),
15062                downward_input: fidl::new_empty!(bool, D),
15063            }
15064        }
15065
15066        #[inline]
15067        unsafe fn decode(
15068            &mut self,
15069            decoder: &mut fidl::encoding::Decoder<'_, D>,
15070            offset: usize,
15071            _depth: fidl::encoding::Depth,
15072        ) -> fidl::Result<()> {
15073            decoder.debug_check_bounds::<Self>(offset);
15074            // Verify that padding bytes are zero.
15075            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
15076            let padval = unsafe { (ptr as *const u32).read_unaligned() };
15077            let mask = 0xffff0000u32;
15078            let maskedval = padval & mask;
15079            if maskedval != 0 {
15080                return Err(fidl::Error::NonZeroPadding {
15081                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
15082                });
15083            }
15084            fidl::decode!(BoundingBox, D, &mut self.bounding_box, decoder, offset + 0, _depth)?;
15085            fidl::decode!(Vec3, D, &mut self.inset_from_min, decoder, offset + 24, _depth)?;
15086            fidl::decode!(Vec3, D, &mut self.inset_from_max, decoder, offset + 36, _depth)?;
15087            fidl::decode!(bool, D, &mut self.focus_change, decoder, offset + 48, _depth)?;
15088            fidl::decode!(bool, D, &mut self.downward_input, decoder, offset + 49, _depth)?;
15089            Ok(())
15090        }
15091    }
15092
15093    impl fidl::encoding::ValueTypeMarker for ViewPropertiesChangedEvent {
15094        type Borrowed<'a> = &'a Self;
15095        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15096            value
15097        }
15098    }
15099
15100    unsafe impl fidl::encoding::TypeMarker for ViewPropertiesChangedEvent {
15101        type Owned = Self;
15102
15103        #[inline(always)]
15104        fn inline_align(_context: fidl::encoding::Context) -> usize {
15105            4
15106        }
15107
15108        #[inline(always)]
15109        fn inline_size(_context: fidl::encoding::Context) -> usize {
15110            56
15111        }
15112    }
15113
15114    unsafe impl<D: fidl::encoding::ResourceDialect>
15115        fidl::encoding::Encode<ViewPropertiesChangedEvent, D> for &ViewPropertiesChangedEvent
15116    {
15117        #[inline]
15118        unsafe fn encode(
15119            self,
15120            encoder: &mut fidl::encoding::Encoder<'_, D>,
15121            offset: usize,
15122            _depth: fidl::encoding::Depth,
15123        ) -> fidl::Result<()> {
15124            encoder.debug_check_bounds::<ViewPropertiesChangedEvent>(offset);
15125            // Delegate to tuple encoding.
15126            fidl::encoding::Encode::<ViewPropertiesChangedEvent, D>::encode(
15127                (
15128                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.view_id),
15129                    <ViewProperties as fidl::encoding::ValueTypeMarker>::borrow(&self.properties),
15130                ),
15131                encoder,
15132                offset,
15133                _depth,
15134            )
15135        }
15136    }
15137    unsafe impl<
15138            D: fidl::encoding::ResourceDialect,
15139            T0: fidl::encoding::Encode<u32, D>,
15140            T1: fidl::encoding::Encode<ViewProperties, D>,
15141        > fidl::encoding::Encode<ViewPropertiesChangedEvent, D> for (T0, T1)
15142    {
15143        #[inline]
15144        unsafe fn encode(
15145            self,
15146            encoder: &mut fidl::encoding::Encoder<'_, D>,
15147            offset: usize,
15148            depth: fidl::encoding::Depth,
15149        ) -> fidl::Result<()> {
15150            encoder.debug_check_bounds::<ViewPropertiesChangedEvent>(offset);
15151            // Zero out padding regions. There's no need to apply masks
15152            // because the unmasked parts will be overwritten by fields.
15153            // Write the fields.
15154            self.0.encode(encoder, offset + 0, depth)?;
15155            self.1.encode(encoder, offset + 4, depth)?;
15156            Ok(())
15157        }
15158    }
15159
15160    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15161        for ViewPropertiesChangedEvent
15162    {
15163        #[inline(always)]
15164        fn new_empty() -> Self {
15165            Self {
15166                view_id: fidl::new_empty!(u32, D),
15167                properties: fidl::new_empty!(ViewProperties, D),
15168            }
15169        }
15170
15171        #[inline]
15172        unsafe fn decode(
15173            &mut self,
15174            decoder: &mut fidl::encoding::Decoder<'_, D>,
15175            offset: usize,
15176            _depth: fidl::encoding::Depth,
15177        ) -> fidl::Result<()> {
15178            decoder.debug_check_bounds::<Self>(offset);
15179            // Verify that padding bytes are zero.
15180            fidl::decode!(u32, D, &mut self.view_id, decoder, offset + 0, _depth)?;
15181            fidl::decode!(ViewProperties, D, &mut self.properties, decoder, offset + 4, _depth)?;
15182            Ok(())
15183        }
15184    }
15185
15186    impl fidl::encoding::ValueTypeMarker for ViewState {
15187        type Borrowed<'a> = &'a Self;
15188        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15189            value
15190        }
15191    }
15192
15193    unsafe impl fidl::encoding::TypeMarker for ViewState {
15194        type Owned = Self;
15195
15196        #[inline(always)]
15197        fn inline_align(_context: fidl::encoding::Context) -> usize {
15198            1
15199        }
15200
15201        #[inline(always)]
15202        fn inline_size(_context: fidl::encoding::Context) -> usize {
15203            1
15204        }
15205    }
15206
15207    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ViewState, D>
15208        for &ViewState
15209    {
15210        #[inline]
15211        unsafe fn encode(
15212            self,
15213            encoder: &mut fidl::encoding::Encoder<'_, D>,
15214            offset: usize,
15215            _depth: fidl::encoding::Depth,
15216        ) -> fidl::Result<()> {
15217            encoder.debug_check_bounds::<ViewState>(offset);
15218            // Delegate to tuple encoding.
15219            fidl::encoding::Encode::<ViewState, D>::encode(
15220                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_rendering),),
15221                encoder,
15222                offset,
15223                _depth,
15224            )
15225        }
15226    }
15227    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
15228        fidl::encoding::Encode<ViewState, D> for (T0,)
15229    {
15230        #[inline]
15231        unsafe fn encode(
15232            self,
15233            encoder: &mut fidl::encoding::Encoder<'_, D>,
15234            offset: usize,
15235            depth: fidl::encoding::Depth,
15236        ) -> fidl::Result<()> {
15237            encoder.debug_check_bounds::<ViewState>(offset);
15238            // Zero out padding regions. There's no need to apply masks
15239            // because the unmasked parts will be overwritten by fields.
15240            // Write the fields.
15241            self.0.encode(encoder, offset + 0, depth)?;
15242            Ok(())
15243        }
15244    }
15245
15246    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ViewState {
15247        #[inline(always)]
15248        fn new_empty() -> Self {
15249            Self { is_rendering: fidl::new_empty!(bool, D) }
15250        }
15251
15252        #[inline]
15253        unsafe fn decode(
15254            &mut self,
15255            decoder: &mut fidl::encoding::Decoder<'_, D>,
15256            offset: usize,
15257            _depth: fidl::encoding::Depth,
15258        ) -> fidl::Result<()> {
15259            decoder.debug_check_bounds::<Self>(offset);
15260            // Verify that padding bytes are zero.
15261            fidl::decode!(bool, D, &mut self.is_rendering, decoder, offset + 0, _depth)?;
15262            Ok(())
15263        }
15264    }
15265
15266    impl fidl::encoding::ValueTypeMarker for ViewStateChangedEvent {
15267        type Borrowed<'a> = &'a Self;
15268        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15269            value
15270        }
15271    }
15272
15273    unsafe impl fidl::encoding::TypeMarker for ViewStateChangedEvent {
15274        type Owned = Self;
15275
15276        #[inline(always)]
15277        fn inline_align(_context: fidl::encoding::Context) -> usize {
15278            4
15279        }
15280
15281        #[inline(always)]
15282        fn inline_size(_context: fidl::encoding::Context) -> usize {
15283            8
15284        }
15285    }
15286
15287    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ViewStateChangedEvent, D>
15288        for &ViewStateChangedEvent
15289    {
15290        #[inline]
15291        unsafe fn encode(
15292            self,
15293            encoder: &mut fidl::encoding::Encoder<'_, D>,
15294            offset: usize,
15295            _depth: fidl::encoding::Depth,
15296        ) -> fidl::Result<()> {
15297            encoder.debug_check_bounds::<ViewStateChangedEvent>(offset);
15298            // Delegate to tuple encoding.
15299            fidl::encoding::Encode::<ViewStateChangedEvent, D>::encode(
15300                (
15301                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.view_holder_id),
15302                    <ViewState as fidl::encoding::ValueTypeMarker>::borrow(&self.state),
15303                ),
15304                encoder,
15305                offset,
15306                _depth,
15307            )
15308        }
15309    }
15310    unsafe impl<
15311            D: fidl::encoding::ResourceDialect,
15312            T0: fidl::encoding::Encode<u32, D>,
15313            T1: fidl::encoding::Encode<ViewState, D>,
15314        > fidl::encoding::Encode<ViewStateChangedEvent, D> for (T0, T1)
15315    {
15316        #[inline]
15317        unsafe fn encode(
15318            self,
15319            encoder: &mut fidl::encoding::Encoder<'_, D>,
15320            offset: usize,
15321            depth: fidl::encoding::Depth,
15322        ) -> fidl::Result<()> {
15323            encoder.debug_check_bounds::<ViewStateChangedEvent>(offset);
15324            // Zero out padding regions. There's no need to apply masks
15325            // because the unmasked parts will be overwritten by fields.
15326            unsafe {
15327                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
15328                (ptr as *mut u32).write_unaligned(0);
15329            }
15330            // Write the fields.
15331            self.0.encode(encoder, offset + 0, depth)?;
15332            self.1.encode(encoder, offset + 4, depth)?;
15333            Ok(())
15334        }
15335    }
15336
15337    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ViewStateChangedEvent {
15338        #[inline(always)]
15339        fn new_empty() -> Self {
15340            Self { view_holder_id: fidl::new_empty!(u32, D), state: fidl::new_empty!(ViewState, D) }
15341        }
15342
15343        #[inline]
15344        unsafe fn decode(
15345            &mut self,
15346            decoder: &mut fidl::encoding::Decoder<'_, D>,
15347            offset: usize,
15348            _depth: fidl::encoding::Depth,
15349        ) -> fidl::Result<()> {
15350            decoder.debug_check_bounds::<Self>(offset);
15351            // Verify that padding bytes are zero.
15352            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
15353            let padval = unsafe { (ptr as *const u32).read_unaligned() };
15354            let mask = 0xffffff00u32;
15355            let maskedval = padval & mask;
15356            if maskedval != 0 {
15357                return Err(fidl::Error::NonZeroPadding {
15358                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
15359                });
15360            }
15361            fidl::decode!(u32, D, &mut self.view_holder_id, decoder, offset + 0, _depth)?;
15362            fidl::decode!(ViewState, D, &mut self.state, decoder, offset + 4, _depth)?;
15363            Ok(())
15364        }
15365    }
15366
15367    impl fidl::encoding::ValueTypeMarker for Mat4 {
15368        type Borrowed<'a> = &'a Self;
15369        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15370            value
15371        }
15372    }
15373
15374    unsafe impl fidl::encoding::TypeMarker for Mat4 {
15375        type Owned = Self;
15376
15377        #[inline(always)]
15378        fn inline_align(_context: fidl::encoding::Context) -> usize {
15379            4
15380        }
15381
15382        #[inline(always)]
15383        fn inline_size(_context: fidl::encoding::Context) -> usize {
15384            64
15385        }
15386    }
15387
15388    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Mat4, D> for &Mat4 {
15389        #[inline]
15390        unsafe fn encode(
15391            self,
15392            encoder: &mut fidl::encoding::Encoder<'_, D>,
15393            offset: usize,
15394            _depth: fidl::encoding::Depth,
15395        ) -> fidl::Result<()> {
15396            encoder.debug_check_bounds::<Mat4>(offset);
15397            // Delegate to tuple encoding.
15398            fidl::encoding::Encode::<Mat4, D>::encode(
15399                (<fidl::encoding::Array<f32, 16> as fidl::encoding::ValueTypeMarker>::borrow(
15400                    &self.matrix,
15401                ),),
15402                encoder,
15403                offset,
15404                _depth,
15405            )
15406        }
15407    }
15408    unsafe impl<
15409            D: fidl::encoding::ResourceDialect,
15410            T0: fidl::encoding::Encode<fidl::encoding::Array<f32, 16>, D>,
15411        > fidl::encoding::Encode<Mat4, D> for (T0,)
15412    {
15413        #[inline]
15414        unsafe fn encode(
15415            self,
15416            encoder: &mut fidl::encoding::Encoder<'_, D>,
15417            offset: usize,
15418            depth: fidl::encoding::Depth,
15419        ) -> fidl::Result<()> {
15420            encoder.debug_check_bounds::<Mat4>(offset);
15421            // Zero out padding regions. There's no need to apply masks
15422            // because the unmasked parts will be overwritten by fields.
15423            // Write the fields.
15424            self.0.encode(encoder, offset + 0, depth)?;
15425            Ok(())
15426        }
15427    }
15428
15429    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Mat4 {
15430        #[inline(always)]
15431        fn new_empty() -> Self {
15432            Self { matrix: fidl::new_empty!(fidl::encoding::Array<f32, 16>, D) }
15433        }
15434
15435        #[inline]
15436        unsafe fn decode(
15437            &mut self,
15438            decoder: &mut fidl::encoding::Decoder<'_, D>,
15439            offset: usize,
15440            _depth: fidl::encoding::Depth,
15441        ) -> fidl::Result<()> {
15442            decoder.debug_check_bounds::<Self>(offset);
15443            // Verify that padding bytes are zero.
15444            fidl::decode!(fidl::encoding::Array<f32, 16>, D, &mut self.matrix, decoder, offset + 0, _depth)?;
15445            Ok(())
15446        }
15447    }
15448
15449    impl fidl::encoding::ValueTypeMarker for Vec2 {
15450        type Borrowed<'a> = &'a Self;
15451        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15452            value
15453        }
15454    }
15455
15456    unsafe impl fidl::encoding::TypeMarker for Vec2 {
15457        type Owned = Self;
15458
15459        #[inline(always)]
15460        fn inline_align(_context: fidl::encoding::Context) -> usize {
15461            4
15462        }
15463
15464        #[inline(always)]
15465        fn inline_size(_context: fidl::encoding::Context) -> usize {
15466            8
15467        }
15468    }
15469
15470    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vec2, D> for &Vec2 {
15471        #[inline]
15472        unsafe fn encode(
15473            self,
15474            encoder: &mut fidl::encoding::Encoder<'_, D>,
15475            offset: usize,
15476            _depth: fidl::encoding::Depth,
15477        ) -> fidl::Result<()> {
15478            encoder.debug_check_bounds::<Vec2>(offset);
15479            // Delegate to tuple encoding.
15480            fidl::encoding::Encode::<Vec2, D>::encode(
15481                (
15482                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
15483                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
15484                ),
15485                encoder,
15486                offset,
15487                _depth,
15488            )
15489        }
15490    }
15491    unsafe impl<
15492            D: fidl::encoding::ResourceDialect,
15493            T0: fidl::encoding::Encode<f32, D>,
15494            T1: fidl::encoding::Encode<f32, D>,
15495        > fidl::encoding::Encode<Vec2, D> for (T0, T1)
15496    {
15497        #[inline]
15498        unsafe fn encode(
15499            self,
15500            encoder: &mut fidl::encoding::Encoder<'_, D>,
15501            offset: usize,
15502            depth: fidl::encoding::Depth,
15503        ) -> fidl::Result<()> {
15504            encoder.debug_check_bounds::<Vec2>(offset);
15505            // Zero out padding regions. There's no need to apply masks
15506            // because the unmasked parts will be overwritten by fields.
15507            // Write the fields.
15508            self.0.encode(encoder, offset + 0, depth)?;
15509            self.1.encode(encoder, offset + 4, depth)?;
15510            Ok(())
15511        }
15512    }
15513
15514    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vec2 {
15515        #[inline(always)]
15516        fn new_empty() -> Self {
15517            Self { x: fidl::new_empty!(f32, D), y: fidl::new_empty!(f32, D) }
15518        }
15519
15520        #[inline]
15521        unsafe fn decode(
15522            &mut self,
15523            decoder: &mut fidl::encoding::Decoder<'_, D>,
15524            offset: usize,
15525            _depth: fidl::encoding::Depth,
15526        ) -> fidl::Result<()> {
15527            decoder.debug_check_bounds::<Self>(offset);
15528            // Verify that padding bytes are zero.
15529            fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
15530            fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
15531            Ok(())
15532        }
15533    }
15534
15535    impl fidl::encoding::ValueTypeMarker for Vec3 {
15536        type Borrowed<'a> = &'a Self;
15537        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15538            value
15539        }
15540    }
15541
15542    unsafe impl fidl::encoding::TypeMarker for Vec3 {
15543        type Owned = Self;
15544
15545        #[inline(always)]
15546        fn inline_align(_context: fidl::encoding::Context) -> usize {
15547            4
15548        }
15549
15550        #[inline(always)]
15551        fn inline_size(_context: fidl::encoding::Context) -> usize {
15552            12
15553        }
15554    }
15555
15556    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vec3, D> for &Vec3 {
15557        #[inline]
15558        unsafe fn encode(
15559            self,
15560            encoder: &mut fidl::encoding::Encoder<'_, D>,
15561            offset: usize,
15562            _depth: fidl::encoding::Depth,
15563        ) -> fidl::Result<()> {
15564            encoder.debug_check_bounds::<Vec3>(offset);
15565            // Delegate to tuple encoding.
15566            fidl::encoding::Encode::<Vec3, D>::encode(
15567                (
15568                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
15569                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
15570                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.z),
15571                ),
15572                encoder,
15573                offset,
15574                _depth,
15575            )
15576        }
15577    }
15578    unsafe impl<
15579            D: fidl::encoding::ResourceDialect,
15580            T0: fidl::encoding::Encode<f32, D>,
15581            T1: fidl::encoding::Encode<f32, D>,
15582            T2: fidl::encoding::Encode<f32, D>,
15583        > fidl::encoding::Encode<Vec3, D> for (T0, T1, T2)
15584    {
15585        #[inline]
15586        unsafe fn encode(
15587            self,
15588            encoder: &mut fidl::encoding::Encoder<'_, D>,
15589            offset: usize,
15590            depth: fidl::encoding::Depth,
15591        ) -> fidl::Result<()> {
15592            encoder.debug_check_bounds::<Vec3>(offset);
15593            // Zero out padding regions. There's no need to apply masks
15594            // because the unmasked parts will be overwritten by fields.
15595            // Write the fields.
15596            self.0.encode(encoder, offset + 0, depth)?;
15597            self.1.encode(encoder, offset + 4, depth)?;
15598            self.2.encode(encoder, offset + 8, depth)?;
15599            Ok(())
15600        }
15601    }
15602
15603    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vec3 {
15604        #[inline(always)]
15605        fn new_empty() -> Self {
15606            Self {
15607                x: fidl::new_empty!(f32, D),
15608                y: fidl::new_empty!(f32, D),
15609                z: fidl::new_empty!(f32, D),
15610            }
15611        }
15612
15613        #[inline]
15614        unsafe fn decode(
15615            &mut self,
15616            decoder: &mut fidl::encoding::Decoder<'_, D>,
15617            offset: usize,
15618            _depth: fidl::encoding::Depth,
15619        ) -> fidl::Result<()> {
15620            decoder.debug_check_bounds::<Self>(offset);
15621            // Verify that padding bytes are zero.
15622            fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
15623            fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
15624            fidl::decode!(f32, D, &mut self.z, decoder, offset + 8, _depth)?;
15625            Ok(())
15626        }
15627    }
15628
15629    impl fidl::encoding::ValueTypeMarker for Vec4 {
15630        type Borrowed<'a> = &'a Self;
15631        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15632            value
15633        }
15634    }
15635
15636    unsafe impl fidl::encoding::TypeMarker for Vec4 {
15637        type Owned = Self;
15638
15639        #[inline(always)]
15640        fn inline_align(_context: fidl::encoding::Context) -> usize {
15641            4
15642        }
15643
15644        #[inline(always)]
15645        fn inline_size(_context: fidl::encoding::Context) -> usize {
15646            16
15647        }
15648    }
15649
15650    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vec4, D> for &Vec4 {
15651        #[inline]
15652        unsafe fn encode(
15653            self,
15654            encoder: &mut fidl::encoding::Encoder<'_, D>,
15655            offset: usize,
15656            _depth: fidl::encoding::Depth,
15657        ) -> fidl::Result<()> {
15658            encoder.debug_check_bounds::<Vec4>(offset);
15659            // Delegate to tuple encoding.
15660            fidl::encoding::Encode::<Vec4, D>::encode(
15661                (
15662                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
15663                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
15664                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.z),
15665                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.w),
15666                ),
15667                encoder,
15668                offset,
15669                _depth,
15670            )
15671        }
15672    }
15673    unsafe impl<
15674            D: fidl::encoding::ResourceDialect,
15675            T0: fidl::encoding::Encode<f32, D>,
15676            T1: fidl::encoding::Encode<f32, D>,
15677            T2: fidl::encoding::Encode<f32, D>,
15678            T3: fidl::encoding::Encode<f32, D>,
15679        > fidl::encoding::Encode<Vec4, D> for (T0, T1, T2, T3)
15680    {
15681        #[inline]
15682        unsafe fn encode(
15683            self,
15684            encoder: &mut fidl::encoding::Encoder<'_, D>,
15685            offset: usize,
15686            depth: fidl::encoding::Depth,
15687        ) -> fidl::Result<()> {
15688            encoder.debug_check_bounds::<Vec4>(offset);
15689            // Zero out padding regions. There's no need to apply masks
15690            // because the unmasked parts will be overwritten by fields.
15691            // Write the fields.
15692            self.0.encode(encoder, offset + 0, depth)?;
15693            self.1.encode(encoder, offset + 4, depth)?;
15694            self.2.encode(encoder, offset + 8, depth)?;
15695            self.3.encode(encoder, offset + 12, depth)?;
15696            Ok(())
15697        }
15698    }
15699
15700    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vec4 {
15701        #[inline(always)]
15702        fn new_empty() -> Self {
15703            Self {
15704                x: fidl::new_empty!(f32, D),
15705                y: fidl::new_empty!(f32, D),
15706                z: fidl::new_empty!(f32, D),
15707                w: fidl::new_empty!(f32, D),
15708            }
15709        }
15710
15711        #[inline]
15712        unsafe fn decode(
15713            &mut self,
15714            decoder: &mut fidl::encoding::Decoder<'_, D>,
15715            offset: usize,
15716            _depth: fidl::encoding::Depth,
15717        ) -> fidl::Result<()> {
15718            decoder.debug_check_bounds::<Self>(offset);
15719            // Verify that padding bytes are zero.
15720            fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
15721            fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
15722            fidl::decode!(f32, D, &mut self.z, decoder, offset + 8, _depth)?;
15723            fidl::decode!(f32, D, &mut self.w, decoder, offset + 12, _depth)?;
15724            Ok(())
15725        }
15726    }
15727
15728    impl fidl::encoding::ResourceTypeMarker for Command {
15729        type Borrowed<'a> = &'a mut Self;
15730        fn take_or_borrow<'a>(
15731            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15732        ) -> Self::Borrowed<'a> {
15733            value
15734        }
15735    }
15736
15737    unsafe impl fidl::encoding::TypeMarker for Command {
15738        type Owned = Self;
15739
15740        #[inline(always)]
15741        fn inline_align(_context: fidl::encoding::Context) -> usize {
15742            8
15743        }
15744
15745        #[inline(always)]
15746        fn inline_size(_context: fidl::encoding::Context) -> usize {
15747            16
15748        }
15749    }
15750
15751    unsafe impl fidl::encoding::Encode<Command, fidl::encoding::DefaultFuchsiaResourceDialect>
15752        for &mut Command
15753    {
15754        #[inline]
15755        unsafe fn encode(
15756            self,
15757            encoder: &mut fidl::encoding::Encoder<
15758                '_,
15759                fidl::encoding::DefaultFuchsiaResourceDialect,
15760            >,
15761            offset: usize,
15762            _depth: fidl::encoding::Depth,
15763        ) -> fidl::Result<()> {
15764            encoder.debug_check_bounds::<Command>(offset);
15765            encoder.write_num::<u64>(self.ordinal(), offset);
15766            match self {
15767            Command::CreateResource(ref mut val) => {
15768                fidl::encoding::encode_in_envelope::<CreateResourceCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15769                    <CreateResourceCmd as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
15770                    encoder, offset + 8, _depth
15771                )
15772            }
15773            Command::ReleaseResource(ref val) => {
15774                fidl::encoding::encode_in_envelope::<ReleaseResourceCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15775                    <ReleaseResourceCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15776                    encoder, offset + 8, _depth
15777                )
15778            }
15779            Command::ExportResource(ref mut val) => {
15780                fidl::encoding::encode_in_envelope::<ExportResourceCmdDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>(
15781                    <ExportResourceCmdDeprecated as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
15782                    encoder, offset + 8, _depth
15783                )
15784            }
15785            Command::ImportResource(ref mut val) => {
15786                fidl::encoding::encode_in_envelope::<ImportResourceCmdDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>(
15787                    <ImportResourceCmdDeprecated as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
15788                    encoder, offset + 8, _depth
15789                )
15790            }
15791            Command::SetTag(ref val) => {
15792                fidl::encoding::encode_in_envelope::<SetTagCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15793                    <SetTagCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15794                    encoder, offset + 8, _depth
15795                )
15796            }
15797            Command::Detach(ref val) => {
15798                fidl::encoding::encode_in_envelope::<DetachCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15799                    <DetachCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15800                    encoder, offset + 8, _depth
15801                )
15802            }
15803            Command::SetTranslation(ref val) => {
15804                fidl::encoding::encode_in_envelope::<SetTranslationCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15805                    <SetTranslationCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15806                    encoder, offset + 8, _depth
15807                )
15808            }
15809            Command::SetScale(ref val) => {
15810                fidl::encoding::encode_in_envelope::<SetScaleCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15811                    <SetScaleCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15812                    encoder, offset + 8, _depth
15813                )
15814            }
15815            Command::SetRotation(ref val) => {
15816                fidl::encoding::encode_in_envelope::<SetRotationCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15817                    <SetRotationCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15818                    encoder, offset + 8, _depth
15819                )
15820            }
15821            Command::SetAnchor(ref val) => {
15822                fidl::encoding::encode_in_envelope::<SetAnchorCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15823                    <SetAnchorCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15824                    encoder, offset + 8, _depth
15825                )
15826            }
15827            Command::SetSize(ref val) => {
15828                fidl::encoding::encode_in_envelope::<SetSizeCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15829                    <SetSizeCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15830                    encoder, offset + 8, _depth
15831                )
15832            }
15833            Command::SetOpacity(ref val) => {
15834                fidl::encoding::encode_in_envelope::<SetOpacityCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15835                    <SetOpacityCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15836                    encoder, offset + 8, _depth
15837                )
15838            }
15839            Command::SendSizeChangeHintHack(ref val) => {
15840                fidl::encoding::encode_in_envelope::<SendSizeChangeHintCmdHack, fidl::encoding::DefaultFuchsiaResourceDialect>(
15841                    <SendSizeChangeHintCmdHack as fidl::encoding::ValueTypeMarker>::borrow(val),
15842                    encoder, offset + 8, _depth
15843                )
15844            }
15845            Command::AddChild(ref val) => {
15846                fidl::encoding::encode_in_envelope::<AddChildCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15847                    <AddChildCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15848                    encoder, offset + 8, _depth
15849                )
15850            }
15851            Command::AddPart(ref val) => {
15852                fidl::encoding::encode_in_envelope::<AddPartCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15853                    <AddPartCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15854                    encoder, offset + 8, _depth
15855                )
15856            }
15857            Command::DetachChildren(ref val) => {
15858                fidl::encoding::encode_in_envelope::<DetachChildrenCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15859                    <DetachChildrenCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15860                    encoder, offset + 8, _depth
15861                )
15862            }
15863            Command::SetShape(ref val) => {
15864                fidl::encoding::encode_in_envelope::<SetShapeCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15865                    <SetShapeCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15866                    encoder, offset + 8, _depth
15867                )
15868            }
15869            Command::SetMaterial(ref val) => {
15870                fidl::encoding::encode_in_envelope::<SetMaterialCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15871                    <SetMaterialCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15872                    encoder, offset + 8, _depth
15873                )
15874            }
15875            Command::SetClip(ref val) => {
15876                fidl::encoding::encode_in_envelope::<SetClipCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15877                    <SetClipCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15878                    encoder, offset + 8, _depth
15879                )
15880            }
15881            Command::SetHitTestBehavior(ref val) => {
15882                fidl::encoding::encode_in_envelope::<SetHitTestBehaviorCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15883                    <SetHitTestBehaviorCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15884                    encoder, offset + 8, _depth
15885                )
15886            }
15887            Command::SetViewProperties(ref val) => {
15888                fidl::encoding::encode_in_envelope::<SetViewPropertiesCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15889                    <SetViewPropertiesCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15890                    encoder, offset + 8, _depth
15891                )
15892            }
15893            Command::TakeSnapshotCmd(ref mut val) => {
15894                fidl::encoding::encode_in_envelope::<TakeSnapshotCmdDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>(
15895                    <TakeSnapshotCmdDeprecated as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
15896                    encoder, offset + 8, _depth
15897                )
15898            }
15899            Command::SetCamera(ref val) => {
15900                fidl::encoding::encode_in_envelope::<SetCameraCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15901                    <SetCameraCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15902                    encoder, offset + 8, _depth
15903                )
15904            }
15905            Command::SetCameraTransform(ref val) => {
15906                fidl::encoding::encode_in_envelope::<SetCameraTransformCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15907                    <SetCameraTransformCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15908                    encoder, offset + 8, _depth
15909                )
15910            }
15911            Command::SetCameraProjection(ref val) => {
15912                fidl::encoding::encode_in_envelope::<SetCameraProjectionCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15913                    <SetCameraProjectionCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15914                    encoder, offset + 8, _depth
15915                )
15916            }
15917            Command::SetStereoCameraProjection(ref val) => {
15918                fidl::encoding::encode_in_envelope::<SetStereoCameraProjectionCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15919                    <SetStereoCameraProjectionCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15920                    encoder, offset + 8, _depth
15921                )
15922            }
15923            Command::SetCameraPoseBuffer(ref val) => {
15924                fidl::encoding::encode_in_envelope::<SetCameraPoseBufferCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15925                    <SetCameraPoseBufferCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15926                    encoder, offset + 8, _depth
15927                )
15928            }
15929            Command::SetLightColor(ref val) => {
15930                fidl::encoding::encode_in_envelope::<SetLightColorCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15931                    <SetLightColorCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15932                    encoder, offset + 8, _depth
15933                )
15934            }
15935            Command::SetLightDirection(ref val) => {
15936                fidl::encoding::encode_in_envelope::<SetLightDirectionCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15937                    <SetLightDirectionCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15938                    encoder, offset + 8, _depth
15939                )
15940            }
15941            Command::AddLight(ref val) => {
15942                fidl::encoding::encode_in_envelope::<AddLightCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15943                    <AddLightCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15944                    encoder, offset + 8, _depth
15945                )
15946            }
15947            Command::DetachLight(ref val) => {
15948                fidl::encoding::encode_in_envelope::<DetachLightCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15949                    <DetachLightCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15950                    encoder, offset + 8, _depth
15951                )
15952            }
15953            Command::DetachLights(ref val) => {
15954                fidl::encoding::encode_in_envelope::<DetachLightsCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15955                    <DetachLightsCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15956                    encoder, offset + 8, _depth
15957                )
15958            }
15959            Command::SetTexture(ref val) => {
15960                fidl::encoding::encode_in_envelope::<SetTextureCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15961                    <SetTextureCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15962                    encoder, offset + 8, _depth
15963                )
15964            }
15965            Command::SetColor(ref val) => {
15966                fidl::encoding::encode_in_envelope::<SetColorCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15967                    <SetColorCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15968                    encoder, offset + 8, _depth
15969                )
15970            }
15971            Command::BindMeshBuffers(ref val) => {
15972                fidl::encoding::encode_in_envelope::<BindMeshBuffersCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15973                    <BindMeshBuffersCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15974                    encoder, offset + 8, _depth
15975                )
15976            }
15977            Command::AddLayer(ref val) => {
15978                fidl::encoding::encode_in_envelope::<AddLayerCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15979                    <AddLayerCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15980                    encoder, offset + 8, _depth
15981                )
15982            }
15983            Command::RemoveLayer(ref val) => {
15984                fidl::encoding::encode_in_envelope::<RemoveLayerCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15985                    <RemoveLayerCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15986                    encoder, offset + 8, _depth
15987                )
15988            }
15989            Command::RemoveAllLayers(ref val) => {
15990                fidl::encoding::encode_in_envelope::<RemoveAllLayersCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15991                    <RemoveAllLayersCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15992                    encoder, offset + 8, _depth
15993                )
15994            }
15995            Command::SetLayerStack(ref val) => {
15996                fidl::encoding::encode_in_envelope::<SetLayerStackCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
15997                    <SetLayerStackCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
15998                    encoder, offset + 8, _depth
15999                )
16000            }
16001            Command::SetRenderer(ref val) => {
16002                fidl::encoding::encode_in_envelope::<SetRendererCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16003                    <SetRendererCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16004                    encoder, offset + 8, _depth
16005                )
16006            }
16007            Command::SetRendererParam(ref val) => {
16008                fidl::encoding::encode_in_envelope::<SetRendererParamCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16009                    <SetRendererParamCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16010                    encoder, offset + 8, _depth
16011                )
16012            }
16013            Command::SetEventMask(ref val) => {
16014                fidl::encoding::encode_in_envelope::<SetEventMaskCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16015                    <SetEventMaskCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16016                    encoder, offset + 8, _depth
16017                )
16018            }
16019            Command::SetLabel(ref val) => {
16020                fidl::encoding::encode_in_envelope::<SetLabelCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16021                    <SetLabelCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16022                    encoder, offset + 8, _depth
16023                )
16024            }
16025            Command::SetDisableClipping(ref val) => {
16026                fidl::encoding::encode_in_envelope::<SetDisableClippingCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16027                    <SetDisableClippingCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16028                    encoder, offset + 8, _depth
16029                )
16030            }
16031            Command::SetImportFocus(ref val) => {
16032                fidl::encoding::encode_in_envelope::<SetImportFocusCmdDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>(
16033                    <SetImportFocusCmdDeprecated as fidl::encoding::ValueTypeMarker>::borrow(val),
16034                    encoder, offset + 8, _depth
16035                )
16036            }
16037            Command::SetClipPlanes(ref val) => {
16038                fidl::encoding::encode_in_envelope::<SetClipPlanesCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16039                    <SetClipPlanesCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16040                    encoder, offset + 8, _depth
16041                )
16042            }
16043            Command::SetPointLightPosition(ref val) => {
16044                fidl::encoding::encode_in_envelope::<SetPointLightPositionCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16045                    <SetPointLightPositionCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16046                    encoder, offset + 8, _depth
16047                )
16048            }
16049            Command::SetPointLightFalloff(ref val) => {
16050                fidl::encoding::encode_in_envelope::<SetPointLightFalloffCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16051                    <SetPointLightFalloffCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16052                    encoder, offset + 8, _depth
16053                )
16054            }
16055            Command::Scene_AddAmbientLight(ref val) => {
16056                fidl::encoding::encode_in_envelope::<SceneAddAmbientLightCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16057                    <SceneAddAmbientLightCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16058                    encoder, offset + 8, _depth
16059                )
16060            }
16061            Command::Scene_AddDirectionalLight(ref val) => {
16062                fidl::encoding::encode_in_envelope::<SceneAddDirectionalLightCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16063                    <SceneAddDirectionalLightCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16064                    encoder, offset + 8, _depth
16065                )
16066            }
16067            Command::Scene_AddPointLight(ref val) => {
16068                fidl::encoding::encode_in_envelope::<SceneAddPointLightCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16069                    <SceneAddPointLightCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16070                    encoder, offset + 8, _depth
16071                )
16072            }
16073            Command::SetDisplayColorConversion(ref val) => {
16074                fidl::encoding::encode_in_envelope::<SetDisplayColorConversionCmdHack, fidl::encoding::DefaultFuchsiaResourceDialect>(
16075                    <SetDisplayColorConversionCmdHack as fidl::encoding::ValueTypeMarker>::borrow(val),
16076                    encoder, offset + 8, _depth
16077                )
16078            }
16079            Command::SetDisplayRotation(ref val) => {
16080                fidl::encoding::encode_in_envelope::<SetDisplayRotationCmdHack, fidl::encoding::DefaultFuchsiaResourceDialect>(
16081                    <SetDisplayRotationCmdHack as fidl::encoding::ValueTypeMarker>::borrow(val),
16082                    encoder, offset + 8, _depth
16083                )
16084            }
16085            Command::SetEnableViewDebugBounds(ref val) => {
16086                fidl::encoding::encode_in_envelope::<SetEnableDebugViewBoundsCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16087                    <SetEnableDebugViewBoundsCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16088                    encoder, offset + 8, _depth
16089                )
16090            }
16091            Command::SetViewHolderBoundsColor(ref val) => {
16092                fidl::encoding::encode_in_envelope::<SetViewHolderBoundsColorCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16093                    <SetViewHolderBoundsColorCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16094                    encoder, offset + 8, _depth
16095                )
16096            }
16097            Command::SetCameraClipSpaceTransform(ref val) => {
16098                fidl::encoding::encode_in_envelope::<SetCameraClipSpaceTransformCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16099                    <SetCameraClipSpaceTransformCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16100                    encoder, offset + 8, _depth
16101                )
16102            }
16103            Command::SetDisplayMinimumRgb(ref val) => {
16104                fidl::encoding::encode_in_envelope::<SetDisplayMinimumRgbCmdHack, fidl::encoding::DefaultFuchsiaResourceDialect>(
16105                    <SetDisplayMinimumRgbCmdHack as fidl::encoding::ValueTypeMarker>::borrow(val),
16106                    encoder, offset + 8, _depth
16107                )
16108            }
16109            Command::SetSemanticVisibility(ref val) => {
16110                fidl::encoding::encode_in_envelope::<SetSemanticVisibilityCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
16111                    <SetSemanticVisibilityCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
16112                    encoder, offset + 8, _depth
16113                )
16114            }
16115        }
16116        }
16117    }
16118
16119    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Command {
16120        #[inline(always)]
16121        fn new_empty() -> Self {
16122            Self::CreateResource(fidl::new_empty!(
16123                CreateResourceCmd,
16124                fidl::encoding::DefaultFuchsiaResourceDialect
16125            ))
16126        }
16127
16128        #[inline]
16129        unsafe fn decode(
16130            &mut self,
16131            decoder: &mut fidl::encoding::Decoder<
16132                '_,
16133                fidl::encoding::DefaultFuchsiaResourceDialect,
16134            >,
16135            offset: usize,
16136            mut depth: fidl::encoding::Depth,
16137        ) -> fidl::Result<()> {
16138            decoder.debug_check_bounds::<Self>(offset);
16139            #[allow(unused_variables)]
16140            let next_out_of_line = decoder.next_out_of_line();
16141            let handles_before = decoder.remaining_handles();
16142            let (ordinal, inlined, num_bytes, num_handles) =
16143                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
16144
16145            let member_inline_size = match ordinal {
16146                1 => {
16147                    <CreateResourceCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
16148                }
16149                2 => {
16150                    <ReleaseResourceCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
16151                }
16152                3 => <ExportResourceCmdDeprecated as fidl::encoding::TypeMarker>::inline_size(
16153                    decoder.context,
16154                ),
16155                4 => <ImportResourceCmdDeprecated as fidl::encoding::TypeMarker>::inline_size(
16156                    decoder.context,
16157                ),
16158                5 => <SetTagCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16159                6 => <DetachCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16160                7 => {
16161                    <SetTranslationCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
16162                }
16163                8 => <SetScaleCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16164                9 => <SetRotationCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16165                10 => <SetAnchorCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16166                11 => <SetSizeCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16167                12 => <SetOpacityCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16168                13 => <SendSizeChangeHintCmdHack as fidl::encoding::TypeMarker>::inline_size(
16169                    decoder.context,
16170                ),
16171                14 => <AddChildCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16172                15 => <AddPartCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16173                16 => {
16174                    <DetachChildrenCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
16175                }
16176                17 => <SetShapeCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16177                18 => <SetMaterialCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16178                19 => <SetClipCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16179                20 => <SetHitTestBehaviorCmd as fidl::encoding::TypeMarker>::inline_size(
16180                    decoder.context,
16181                ),
16182                21 => <SetViewPropertiesCmd as fidl::encoding::TypeMarker>::inline_size(
16183                    decoder.context,
16184                ),
16185                22 => <TakeSnapshotCmdDeprecated as fidl::encoding::TypeMarker>::inline_size(
16186                    decoder.context,
16187                ),
16188                23 => <SetCameraCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16189                24 => <SetCameraTransformCmd as fidl::encoding::TypeMarker>::inline_size(
16190                    decoder.context,
16191                ),
16192                25 => <SetCameraProjectionCmd as fidl::encoding::TypeMarker>::inline_size(
16193                    decoder.context,
16194                ),
16195                26 => <SetStereoCameraProjectionCmd as fidl::encoding::TypeMarker>::inline_size(
16196                    decoder.context,
16197                ),
16198                27 => <SetCameraPoseBufferCmd as fidl::encoding::TypeMarker>::inline_size(
16199                    decoder.context,
16200                ),
16201                28 => {
16202                    <SetLightColorCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
16203                }
16204                29 => <SetLightDirectionCmd as fidl::encoding::TypeMarker>::inline_size(
16205                    decoder.context,
16206                ),
16207                30 => <AddLightCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16208                31 => <DetachLightCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16209                32 => <DetachLightsCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16210                33 => <SetTextureCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16211                34 => <SetColorCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16212                35 => {
16213                    <BindMeshBuffersCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
16214                }
16215                36 => <AddLayerCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16216                37 => <RemoveLayerCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16217                38 => {
16218                    <RemoveAllLayersCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
16219                }
16220                39 => {
16221                    <SetLayerStackCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
16222                }
16223                40 => <SetRendererCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16224                41 => <SetRendererParamCmd as fidl::encoding::TypeMarker>::inline_size(
16225                    decoder.context,
16226                ),
16227                42 => <SetEventMaskCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16228                43 => <SetLabelCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16229                44 => <SetDisableClippingCmd as fidl::encoding::TypeMarker>::inline_size(
16230                    decoder.context,
16231                ),
16232                45 => <SetImportFocusCmdDeprecated as fidl::encoding::TypeMarker>::inline_size(
16233                    decoder.context,
16234                ),
16235                46 => {
16236                    <SetClipPlanesCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
16237                }
16238                47 => <SetPointLightPositionCmd as fidl::encoding::TypeMarker>::inline_size(
16239                    decoder.context,
16240                ),
16241                48 => <SetPointLightFalloffCmd as fidl::encoding::TypeMarker>::inline_size(
16242                    decoder.context,
16243                ),
16244                49 => <SceneAddAmbientLightCmd as fidl::encoding::TypeMarker>::inline_size(
16245                    decoder.context,
16246                ),
16247                50 => <SceneAddDirectionalLightCmd as fidl::encoding::TypeMarker>::inline_size(
16248                    decoder.context,
16249                ),
16250                51 => <SceneAddPointLightCmd as fidl::encoding::TypeMarker>::inline_size(
16251                    decoder.context,
16252                ),
16253                52 => {
16254                    <SetDisplayColorConversionCmdHack as fidl::encoding::TypeMarker>::inline_size(
16255                        decoder.context,
16256                    )
16257                }
16258                53 => <SetDisplayRotationCmdHack as fidl::encoding::TypeMarker>::inline_size(
16259                    decoder.context,
16260                ),
16261                54 => <SetEnableDebugViewBoundsCmd as fidl::encoding::TypeMarker>::inline_size(
16262                    decoder.context,
16263                ),
16264                55 => <SetViewHolderBoundsColorCmd as fidl::encoding::TypeMarker>::inline_size(
16265                    decoder.context,
16266                ),
16267                56 => <SetCameraClipSpaceTransformCmd as fidl::encoding::TypeMarker>::inline_size(
16268                    decoder.context,
16269                ),
16270                57 => <SetDisplayMinimumRgbCmdHack as fidl::encoding::TypeMarker>::inline_size(
16271                    decoder.context,
16272                ),
16273                58 => <SetSemanticVisibilityCmd as fidl::encoding::TypeMarker>::inline_size(
16274                    decoder.context,
16275                ),
16276                _ => return Err(fidl::Error::UnknownUnionTag),
16277            };
16278
16279            if inlined != (member_inline_size <= 4) {
16280                return Err(fidl::Error::InvalidInlineBitInEnvelope);
16281            }
16282            let _inner_offset;
16283            if inlined {
16284                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
16285                _inner_offset = offset + 8;
16286            } else {
16287                depth.increment()?;
16288                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16289            }
16290            match ordinal {
16291                1 => {
16292                    #[allow(irrefutable_let_patterns)]
16293                    if let Command::CreateResource(_) = self {
16294                        // Do nothing, read the value into the object
16295                    } else {
16296                        // Initialize `self` to the right variant
16297                        *self = Command::CreateResource(fidl::new_empty!(
16298                            CreateResourceCmd,
16299                            fidl::encoding::DefaultFuchsiaResourceDialect
16300                        ));
16301                    }
16302                    #[allow(irrefutable_let_patterns)]
16303                    if let Command::CreateResource(ref mut val) = self {
16304                        fidl::decode!(
16305                            CreateResourceCmd,
16306                            fidl::encoding::DefaultFuchsiaResourceDialect,
16307                            val,
16308                            decoder,
16309                            _inner_offset,
16310                            depth
16311                        )?;
16312                    } else {
16313                        unreachable!()
16314                    }
16315                }
16316                2 => {
16317                    #[allow(irrefutable_let_patterns)]
16318                    if let Command::ReleaseResource(_) = self {
16319                        // Do nothing, read the value into the object
16320                    } else {
16321                        // Initialize `self` to the right variant
16322                        *self = Command::ReleaseResource(fidl::new_empty!(
16323                            ReleaseResourceCmd,
16324                            fidl::encoding::DefaultFuchsiaResourceDialect
16325                        ));
16326                    }
16327                    #[allow(irrefutable_let_patterns)]
16328                    if let Command::ReleaseResource(ref mut val) = self {
16329                        fidl::decode!(
16330                            ReleaseResourceCmd,
16331                            fidl::encoding::DefaultFuchsiaResourceDialect,
16332                            val,
16333                            decoder,
16334                            _inner_offset,
16335                            depth
16336                        )?;
16337                    } else {
16338                        unreachable!()
16339                    }
16340                }
16341                3 => {
16342                    #[allow(irrefutable_let_patterns)]
16343                    if let Command::ExportResource(_) = self {
16344                        // Do nothing, read the value into the object
16345                    } else {
16346                        // Initialize `self` to the right variant
16347                        *self = Command::ExportResource(fidl::new_empty!(
16348                            ExportResourceCmdDeprecated,
16349                            fidl::encoding::DefaultFuchsiaResourceDialect
16350                        ));
16351                    }
16352                    #[allow(irrefutable_let_patterns)]
16353                    if let Command::ExportResource(ref mut val) = self {
16354                        fidl::decode!(
16355                            ExportResourceCmdDeprecated,
16356                            fidl::encoding::DefaultFuchsiaResourceDialect,
16357                            val,
16358                            decoder,
16359                            _inner_offset,
16360                            depth
16361                        )?;
16362                    } else {
16363                        unreachable!()
16364                    }
16365                }
16366                4 => {
16367                    #[allow(irrefutable_let_patterns)]
16368                    if let Command::ImportResource(_) = self {
16369                        // Do nothing, read the value into the object
16370                    } else {
16371                        // Initialize `self` to the right variant
16372                        *self = Command::ImportResource(fidl::new_empty!(
16373                            ImportResourceCmdDeprecated,
16374                            fidl::encoding::DefaultFuchsiaResourceDialect
16375                        ));
16376                    }
16377                    #[allow(irrefutable_let_patterns)]
16378                    if let Command::ImportResource(ref mut val) = self {
16379                        fidl::decode!(
16380                            ImportResourceCmdDeprecated,
16381                            fidl::encoding::DefaultFuchsiaResourceDialect,
16382                            val,
16383                            decoder,
16384                            _inner_offset,
16385                            depth
16386                        )?;
16387                    } else {
16388                        unreachable!()
16389                    }
16390                }
16391                5 => {
16392                    #[allow(irrefutable_let_patterns)]
16393                    if let Command::SetTag(_) = self {
16394                        // Do nothing, read the value into the object
16395                    } else {
16396                        // Initialize `self` to the right variant
16397                        *self = Command::SetTag(fidl::new_empty!(
16398                            SetTagCmd,
16399                            fidl::encoding::DefaultFuchsiaResourceDialect
16400                        ));
16401                    }
16402                    #[allow(irrefutable_let_patterns)]
16403                    if let Command::SetTag(ref mut val) = self {
16404                        fidl::decode!(
16405                            SetTagCmd,
16406                            fidl::encoding::DefaultFuchsiaResourceDialect,
16407                            val,
16408                            decoder,
16409                            _inner_offset,
16410                            depth
16411                        )?;
16412                    } else {
16413                        unreachable!()
16414                    }
16415                }
16416                6 => {
16417                    #[allow(irrefutable_let_patterns)]
16418                    if let Command::Detach(_) = self {
16419                        // Do nothing, read the value into the object
16420                    } else {
16421                        // Initialize `self` to the right variant
16422                        *self = Command::Detach(fidl::new_empty!(
16423                            DetachCmd,
16424                            fidl::encoding::DefaultFuchsiaResourceDialect
16425                        ));
16426                    }
16427                    #[allow(irrefutable_let_patterns)]
16428                    if let Command::Detach(ref mut val) = self {
16429                        fidl::decode!(
16430                            DetachCmd,
16431                            fidl::encoding::DefaultFuchsiaResourceDialect,
16432                            val,
16433                            decoder,
16434                            _inner_offset,
16435                            depth
16436                        )?;
16437                    } else {
16438                        unreachable!()
16439                    }
16440                }
16441                7 => {
16442                    #[allow(irrefutable_let_patterns)]
16443                    if let Command::SetTranslation(_) = self {
16444                        // Do nothing, read the value into the object
16445                    } else {
16446                        // Initialize `self` to the right variant
16447                        *self = Command::SetTranslation(fidl::new_empty!(
16448                            SetTranslationCmd,
16449                            fidl::encoding::DefaultFuchsiaResourceDialect
16450                        ));
16451                    }
16452                    #[allow(irrefutable_let_patterns)]
16453                    if let Command::SetTranslation(ref mut val) = self {
16454                        fidl::decode!(
16455                            SetTranslationCmd,
16456                            fidl::encoding::DefaultFuchsiaResourceDialect,
16457                            val,
16458                            decoder,
16459                            _inner_offset,
16460                            depth
16461                        )?;
16462                    } else {
16463                        unreachable!()
16464                    }
16465                }
16466                8 => {
16467                    #[allow(irrefutable_let_patterns)]
16468                    if let Command::SetScale(_) = self {
16469                        // Do nothing, read the value into the object
16470                    } else {
16471                        // Initialize `self` to the right variant
16472                        *self = Command::SetScale(fidl::new_empty!(
16473                            SetScaleCmd,
16474                            fidl::encoding::DefaultFuchsiaResourceDialect
16475                        ));
16476                    }
16477                    #[allow(irrefutable_let_patterns)]
16478                    if let Command::SetScale(ref mut val) = self {
16479                        fidl::decode!(
16480                            SetScaleCmd,
16481                            fidl::encoding::DefaultFuchsiaResourceDialect,
16482                            val,
16483                            decoder,
16484                            _inner_offset,
16485                            depth
16486                        )?;
16487                    } else {
16488                        unreachable!()
16489                    }
16490                }
16491                9 => {
16492                    #[allow(irrefutable_let_patterns)]
16493                    if let Command::SetRotation(_) = self {
16494                        // Do nothing, read the value into the object
16495                    } else {
16496                        // Initialize `self` to the right variant
16497                        *self = Command::SetRotation(fidl::new_empty!(
16498                            SetRotationCmd,
16499                            fidl::encoding::DefaultFuchsiaResourceDialect
16500                        ));
16501                    }
16502                    #[allow(irrefutable_let_patterns)]
16503                    if let Command::SetRotation(ref mut val) = self {
16504                        fidl::decode!(
16505                            SetRotationCmd,
16506                            fidl::encoding::DefaultFuchsiaResourceDialect,
16507                            val,
16508                            decoder,
16509                            _inner_offset,
16510                            depth
16511                        )?;
16512                    } else {
16513                        unreachable!()
16514                    }
16515                }
16516                10 => {
16517                    #[allow(irrefutable_let_patterns)]
16518                    if let Command::SetAnchor(_) = self {
16519                        // Do nothing, read the value into the object
16520                    } else {
16521                        // Initialize `self` to the right variant
16522                        *self = Command::SetAnchor(fidl::new_empty!(
16523                            SetAnchorCmd,
16524                            fidl::encoding::DefaultFuchsiaResourceDialect
16525                        ));
16526                    }
16527                    #[allow(irrefutable_let_patterns)]
16528                    if let Command::SetAnchor(ref mut val) = self {
16529                        fidl::decode!(
16530                            SetAnchorCmd,
16531                            fidl::encoding::DefaultFuchsiaResourceDialect,
16532                            val,
16533                            decoder,
16534                            _inner_offset,
16535                            depth
16536                        )?;
16537                    } else {
16538                        unreachable!()
16539                    }
16540                }
16541                11 => {
16542                    #[allow(irrefutable_let_patterns)]
16543                    if let Command::SetSize(_) = self {
16544                        // Do nothing, read the value into the object
16545                    } else {
16546                        // Initialize `self` to the right variant
16547                        *self = Command::SetSize(fidl::new_empty!(
16548                            SetSizeCmd,
16549                            fidl::encoding::DefaultFuchsiaResourceDialect
16550                        ));
16551                    }
16552                    #[allow(irrefutable_let_patterns)]
16553                    if let Command::SetSize(ref mut val) = self {
16554                        fidl::decode!(
16555                            SetSizeCmd,
16556                            fidl::encoding::DefaultFuchsiaResourceDialect,
16557                            val,
16558                            decoder,
16559                            _inner_offset,
16560                            depth
16561                        )?;
16562                    } else {
16563                        unreachable!()
16564                    }
16565                }
16566                12 => {
16567                    #[allow(irrefutable_let_patterns)]
16568                    if let Command::SetOpacity(_) = self {
16569                        // Do nothing, read the value into the object
16570                    } else {
16571                        // Initialize `self` to the right variant
16572                        *self = Command::SetOpacity(fidl::new_empty!(
16573                            SetOpacityCmd,
16574                            fidl::encoding::DefaultFuchsiaResourceDialect
16575                        ));
16576                    }
16577                    #[allow(irrefutable_let_patterns)]
16578                    if let Command::SetOpacity(ref mut val) = self {
16579                        fidl::decode!(
16580                            SetOpacityCmd,
16581                            fidl::encoding::DefaultFuchsiaResourceDialect,
16582                            val,
16583                            decoder,
16584                            _inner_offset,
16585                            depth
16586                        )?;
16587                    } else {
16588                        unreachable!()
16589                    }
16590                }
16591                13 => {
16592                    #[allow(irrefutable_let_patterns)]
16593                    if let Command::SendSizeChangeHintHack(_) = self {
16594                        // Do nothing, read the value into the object
16595                    } else {
16596                        // Initialize `self` to the right variant
16597                        *self = Command::SendSizeChangeHintHack(fidl::new_empty!(
16598                            SendSizeChangeHintCmdHack,
16599                            fidl::encoding::DefaultFuchsiaResourceDialect
16600                        ));
16601                    }
16602                    #[allow(irrefutable_let_patterns)]
16603                    if let Command::SendSizeChangeHintHack(ref mut val) = self {
16604                        fidl::decode!(
16605                            SendSizeChangeHintCmdHack,
16606                            fidl::encoding::DefaultFuchsiaResourceDialect,
16607                            val,
16608                            decoder,
16609                            _inner_offset,
16610                            depth
16611                        )?;
16612                    } else {
16613                        unreachable!()
16614                    }
16615                }
16616                14 => {
16617                    #[allow(irrefutable_let_patterns)]
16618                    if let Command::AddChild(_) = self {
16619                        // Do nothing, read the value into the object
16620                    } else {
16621                        // Initialize `self` to the right variant
16622                        *self = Command::AddChild(fidl::new_empty!(
16623                            AddChildCmd,
16624                            fidl::encoding::DefaultFuchsiaResourceDialect
16625                        ));
16626                    }
16627                    #[allow(irrefutable_let_patterns)]
16628                    if let Command::AddChild(ref mut val) = self {
16629                        fidl::decode!(
16630                            AddChildCmd,
16631                            fidl::encoding::DefaultFuchsiaResourceDialect,
16632                            val,
16633                            decoder,
16634                            _inner_offset,
16635                            depth
16636                        )?;
16637                    } else {
16638                        unreachable!()
16639                    }
16640                }
16641                15 => {
16642                    #[allow(irrefutable_let_patterns)]
16643                    if let Command::AddPart(_) = self {
16644                        // Do nothing, read the value into the object
16645                    } else {
16646                        // Initialize `self` to the right variant
16647                        *self = Command::AddPart(fidl::new_empty!(
16648                            AddPartCmd,
16649                            fidl::encoding::DefaultFuchsiaResourceDialect
16650                        ));
16651                    }
16652                    #[allow(irrefutable_let_patterns)]
16653                    if let Command::AddPart(ref mut val) = self {
16654                        fidl::decode!(
16655                            AddPartCmd,
16656                            fidl::encoding::DefaultFuchsiaResourceDialect,
16657                            val,
16658                            decoder,
16659                            _inner_offset,
16660                            depth
16661                        )?;
16662                    } else {
16663                        unreachable!()
16664                    }
16665                }
16666                16 => {
16667                    #[allow(irrefutable_let_patterns)]
16668                    if let Command::DetachChildren(_) = self {
16669                        // Do nothing, read the value into the object
16670                    } else {
16671                        // Initialize `self` to the right variant
16672                        *self = Command::DetachChildren(fidl::new_empty!(
16673                            DetachChildrenCmd,
16674                            fidl::encoding::DefaultFuchsiaResourceDialect
16675                        ));
16676                    }
16677                    #[allow(irrefutable_let_patterns)]
16678                    if let Command::DetachChildren(ref mut val) = self {
16679                        fidl::decode!(
16680                            DetachChildrenCmd,
16681                            fidl::encoding::DefaultFuchsiaResourceDialect,
16682                            val,
16683                            decoder,
16684                            _inner_offset,
16685                            depth
16686                        )?;
16687                    } else {
16688                        unreachable!()
16689                    }
16690                }
16691                17 => {
16692                    #[allow(irrefutable_let_patterns)]
16693                    if let Command::SetShape(_) = self {
16694                        // Do nothing, read the value into the object
16695                    } else {
16696                        // Initialize `self` to the right variant
16697                        *self = Command::SetShape(fidl::new_empty!(
16698                            SetShapeCmd,
16699                            fidl::encoding::DefaultFuchsiaResourceDialect
16700                        ));
16701                    }
16702                    #[allow(irrefutable_let_patterns)]
16703                    if let Command::SetShape(ref mut val) = self {
16704                        fidl::decode!(
16705                            SetShapeCmd,
16706                            fidl::encoding::DefaultFuchsiaResourceDialect,
16707                            val,
16708                            decoder,
16709                            _inner_offset,
16710                            depth
16711                        )?;
16712                    } else {
16713                        unreachable!()
16714                    }
16715                }
16716                18 => {
16717                    #[allow(irrefutable_let_patterns)]
16718                    if let Command::SetMaterial(_) = self {
16719                        // Do nothing, read the value into the object
16720                    } else {
16721                        // Initialize `self` to the right variant
16722                        *self = Command::SetMaterial(fidl::new_empty!(
16723                            SetMaterialCmd,
16724                            fidl::encoding::DefaultFuchsiaResourceDialect
16725                        ));
16726                    }
16727                    #[allow(irrefutable_let_patterns)]
16728                    if let Command::SetMaterial(ref mut val) = self {
16729                        fidl::decode!(
16730                            SetMaterialCmd,
16731                            fidl::encoding::DefaultFuchsiaResourceDialect,
16732                            val,
16733                            decoder,
16734                            _inner_offset,
16735                            depth
16736                        )?;
16737                    } else {
16738                        unreachable!()
16739                    }
16740                }
16741                19 => {
16742                    #[allow(irrefutable_let_patterns)]
16743                    if let Command::SetClip(_) = self {
16744                        // Do nothing, read the value into the object
16745                    } else {
16746                        // Initialize `self` to the right variant
16747                        *self = Command::SetClip(fidl::new_empty!(
16748                            SetClipCmd,
16749                            fidl::encoding::DefaultFuchsiaResourceDialect
16750                        ));
16751                    }
16752                    #[allow(irrefutable_let_patterns)]
16753                    if let Command::SetClip(ref mut val) = self {
16754                        fidl::decode!(
16755                            SetClipCmd,
16756                            fidl::encoding::DefaultFuchsiaResourceDialect,
16757                            val,
16758                            decoder,
16759                            _inner_offset,
16760                            depth
16761                        )?;
16762                    } else {
16763                        unreachable!()
16764                    }
16765                }
16766                20 => {
16767                    #[allow(irrefutable_let_patterns)]
16768                    if let Command::SetHitTestBehavior(_) = self {
16769                        // Do nothing, read the value into the object
16770                    } else {
16771                        // Initialize `self` to the right variant
16772                        *self = Command::SetHitTestBehavior(fidl::new_empty!(
16773                            SetHitTestBehaviorCmd,
16774                            fidl::encoding::DefaultFuchsiaResourceDialect
16775                        ));
16776                    }
16777                    #[allow(irrefutable_let_patterns)]
16778                    if let Command::SetHitTestBehavior(ref mut val) = self {
16779                        fidl::decode!(
16780                            SetHitTestBehaviorCmd,
16781                            fidl::encoding::DefaultFuchsiaResourceDialect,
16782                            val,
16783                            decoder,
16784                            _inner_offset,
16785                            depth
16786                        )?;
16787                    } else {
16788                        unreachable!()
16789                    }
16790                }
16791                21 => {
16792                    #[allow(irrefutable_let_patterns)]
16793                    if let Command::SetViewProperties(_) = self {
16794                        // Do nothing, read the value into the object
16795                    } else {
16796                        // Initialize `self` to the right variant
16797                        *self = Command::SetViewProperties(fidl::new_empty!(
16798                            SetViewPropertiesCmd,
16799                            fidl::encoding::DefaultFuchsiaResourceDialect
16800                        ));
16801                    }
16802                    #[allow(irrefutable_let_patterns)]
16803                    if let Command::SetViewProperties(ref mut val) = self {
16804                        fidl::decode!(
16805                            SetViewPropertiesCmd,
16806                            fidl::encoding::DefaultFuchsiaResourceDialect,
16807                            val,
16808                            decoder,
16809                            _inner_offset,
16810                            depth
16811                        )?;
16812                    } else {
16813                        unreachable!()
16814                    }
16815                }
16816                22 => {
16817                    #[allow(irrefutable_let_patterns)]
16818                    if let Command::TakeSnapshotCmd(_) = self {
16819                        // Do nothing, read the value into the object
16820                    } else {
16821                        // Initialize `self` to the right variant
16822                        *self = Command::TakeSnapshotCmd(fidl::new_empty!(
16823                            TakeSnapshotCmdDeprecated,
16824                            fidl::encoding::DefaultFuchsiaResourceDialect
16825                        ));
16826                    }
16827                    #[allow(irrefutable_let_patterns)]
16828                    if let Command::TakeSnapshotCmd(ref mut val) = self {
16829                        fidl::decode!(
16830                            TakeSnapshotCmdDeprecated,
16831                            fidl::encoding::DefaultFuchsiaResourceDialect,
16832                            val,
16833                            decoder,
16834                            _inner_offset,
16835                            depth
16836                        )?;
16837                    } else {
16838                        unreachable!()
16839                    }
16840                }
16841                23 => {
16842                    #[allow(irrefutable_let_patterns)]
16843                    if let Command::SetCamera(_) = self {
16844                        // Do nothing, read the value into the object
16845                    } else {
16846                        // Initialize `self` to the right variant
16847                        *self = Command::SetCamera(fidl::new_empty!(
16848                            SetCameraCmd,
16849                            fidl::encoding::DefaultFuchsiaResourceDialect
16850                        ));
16851                    }
16852                    #[allow(irrefutable_let_patterns)]
16853                    if let Command::SetCamera(ref mut val) = self {
16854                        fidl::decode!(
16855                            SetCameraCmd,
16856                            fidl::encoding::DefaultFuchsiaResourceDialect,
16857                            val,
16858                            decoder,
16859                            _inner_offset,
16860                            depth
16861                        )?;
16862                    } else {
16863                        unreachable!()
16864                    }
16865                }
16866                24 => {
16867                    #[allow(irrefutable_let_patterns)]
16868                    if let Command::SetCameraTransform(_) = self {
16869                        // Do nothing, read the value into the object
16870                    } else {
16871                        // Initialize `self` to the right variant
16872                        *self = Command::SetCameraTransform(fidl::new_empty!(
16873                            SetCameraTransformCmd,
16874                            fidl::encoding::DefaultFuchsiaResourceDialect
16875                        ));
16876                    }
16877                    #[allow(irrefutable_let_patterns)]
16878                    if let Command::SetCameraTransform(ref mut val) = self {
16879                        fidl::decode!(
16880                            SetCameraTransformCmd,
16881                            fidl::encoding::DefaultFuchsiaResourceDialect,
16882                            val,
16883                            decoder,
16884                            _inner_offset,
16885                            depth
16886                        )?;
16887                    } else {
16888                        unreachable!()
16889                    }
16890                }
16891                25 => {
16892                    #[allow(irrefutable_let_patterns)]
16893                    if let Command::SetCameraProjection(_) = self {
16894                        // Do nothing, read the value into the object
16895                    } else {
16896                        // Initialize `self` to the right variant
16897                        *self = Command::SetCameraProjection(fidl::new_empty!(
16898                            SetCameraProjectionCmd,
16899                            fidl::encoding::DefaultFuchsiaResourceDialect
16900                        ));
16901                    }
16902                    #[allow(irrefutable_let_patterns)]
16903                    if let Command::SetCameraProjection(ref mut val) = self {
16904                        fidl::decode!(
16905                            SetCameraProjectionCmd,
16906                            fidl::encoding::DefaultFuchsiaResourceDialect,
16907                            val,
16908                            decoder,
16909                            _inner_offset,
16910                            depth
16911                        )?;
16912                    } else {
16913                        unreachable!()
16914                    }
16915                }
16916                26 => {
16917                    #[allow(irrefutable_let_patterns)]
16918                    if let Command::SetStereoCameraProjection(_) = self {
16919                        // Do nothing, read the value into the object
16920                    } else {
16921                        // Initialize `self` to the right variant
16922                        *self = Command::SetStereoCameraProjection(fidl::new_empty!(
16923                            SetStereoCameraProjectionCmd,
16924                            fidl::encoding::DefaultFuchsiaResourceDialect
16925                        ));
16926                    }
16927                    #[allow(irrefutable_let_patterns)]
16928                    if let Command::SetStereoCameraProjection(ref mut val) = self {
16929                        fidl::decode!(
16930                            SetStereoCameraProjectionCmd,
16931                            fidl::encoding::DefaultFuchsiaResourceDialect,
16932                            val,
16933                            decoder,
16934                            _inner_offset,
16935                            depth
16936                        )?;
16937                    } else {
16938                        unreachable!()
16939                    }
16940                }
16941                27 => {
16942                    #[allow(irrefutable_let_patterns)]
16943                    if let Command::SetCameraPoseBuffer(_) = self {
16944                        // Do nothing, read the value into the object
16945                    } else {
16946                        // Initialize `self` to the right variant
16947                        *self = Command::SetCameraPoseBuffer(fidl::new_empty!(
16948                            SetCameraPoseBufferCmd,
16949                            fidl::encoding::DefaultFuchsiaResourceDialect
16950                        ));
16951                    }
16952                    #[allow(irrefutable_let_patterns)]
16953                    if let Command::SetCameraPoseBuffer(ref mut val) = self {
16954                        fidl::decode!(
16955                            SetCameraPoseBufferCmd,
16956                            fidl::encoding::DefaultFuchsiaResourceDialect,
16957                            val,
16958                            decoder,
16959                            _inner_offset,
16960                            depth
16961                        )?;
16962                    } else {
16963                        unreachable!()
16964                    }
16965                }
16966                28 => {
16967                    #[allow(irrefutable_let_patterns)]
16968                    if let Command::SetLightColor(_) = self {
16969                        // Do nothing, read the value into the object
16970                    } else {
16971                        // Initialize `self` to the right variant
16972                        *self = Command::SetLightColor(fidl::new_empty!(
16973                            SetLightColorCmd,
16974                            fidl::encoding::DefaultFuchsiaResourceDialect
16975                        ));
16976                    }
16977                    #[allow(irrefutable_let_patterns)]
16978                    if let Command::SetLightColor(ref mut val) = self {
16979                        fidl::decode!(
16980                            SetLightColorCmd,
16981                            fidl::encoding::DefaultFuchsiaResourceDialect,
16982                            val,
16983                            decoder,
16984                            _inner_offset,
16985                            depth
16986                        )?;
16987                    } else {
16988                        unreachable!()
16989                    }
16990                }
16991                29 => {
16992                    #[allow(irrefutable_let_patterns)]
16993                    if let Command::SetLightDirection(_) = self {
16994                        // Do nothing, read the value into the object
16995                    } else {
16996                        // Initialize `self` to the right variant
16997                        *self = Command::SetLightDirection(fidl::new_empty!(
16998                            SetLightDirectionCmd,
16999                            fidl::encoding::DefaultFuchsiaResourceDialect
17000                        ));
17001                    }
17002                    #[allow(irrefutable_let_patterns)]
17003                    if let Command::SetLightDirection(ref mut val) = self {
17004                        fidl::decode!(
17005                            SetLightDirectionCmd,
17006                            fidl::encoding::DefaultFuchsiaResourceDialect,
17007                            val,
17008                            decoder,
17009                            _inner_offset,
17010                            depth
17011                        )?;
17012                    } else {
17013                        unreachable!()
17014                    }
17015                }
17016                30 => {
17017                    #[allow(irrefutable_let_patterns)]
17018                    if let Command::AddLight(_) = self {
17019                        // Do nothing, read the value into the object
17020                    } else {
17021                        // Initialize `self` to the right variant
17022                        *self = Command::AddLight(fidl::new_empty!(
17023                            AddLightCmd,
17024                            fidl::encoding::DefaultFuchsiaResourceDialect
17025                        ));
17026                    }
17027                    #[allow(irrefutable_let_patterns)]
17028                    if let Command::AddLight(ref mut val) = self {
17029                        fidl::decode!(
17030                            AddLightCmd,
17031                            fidl::encoding::DefaultFuchsiaResourceDialect,
17032                            val,
17033                            decoder,
17034                            _inner_offset,
17035                            depth
17036                        )?;
17037                    } else {
17038                        unreachable!()
17039                    }
17040                }
17041                31 => {
17042                    #[allow(irrefutable_let_patterns)]
17043                    if let Command::DetachLight(_) = self {
17044                        // Do nothing, read the value into the object
17045                    } else {
17046                        // Initialize `self` to the right variant
17047                        *self = Command::DetachLight(fidl::new_empty!(
17048                            DetachLightCmd,
17049                            fidl::encoding::DefaultFuchsiaResourceDialect
17050                        ));
17051                    }
17052                    #[allow(irrefutable_let_patterns)]
17053                    if let Command::DetachLight(ref mut val) = self {
17054                        fidl::decode!(
17055                            DetachLightCmd,
17056                            fidl::encoding::DefaultFuchsiaResourceDialect,
17057                            val,
17058                            decoder,
17059                            _inner_offset,
17060                            depth
17061                        )?;
17062                    } else {
17063                        unreachable!()
17064                    }
17065                }
17066                32 => {
17067                    #[allow(irrefutable_let_patterns)]
17068                    if let Command::DetachLights(_) = self {
17069                        // Do nothing, read the value into the object
17070                    } else {
17071                        // Initialize `self` to the right variant
17072                        *self = Command::DetachLights(fidl::new_empty!(
17073                            DetachLightsCmd,
17074                            fidl::encoding::DefaultFuchsiaResourceDialect
17075                        ));
17076                    }
17077                    #[allow(irrefutable_let_patterns)]
17078                    if let Command::DetachLights(ref mut val) = self {
17079                        fidl::decode!(
17080                            DetachLightsCmd,
17081                            fidl::encoding::DefaultFuchsiaResourceDialect,
17082                            val,
17083                            decoder,
17084                            _inner_offset,
17085                            depth
17086                        )?;
17087                    } else {
17088                        unreachable!()
17089                    }
17090                }
17091                33 => {
17092                    #[allow(irrefutable_let_patterns)]
17093                    if let Command::SetTexture(_) = self {
17094                        // Do nothing, read the value into the object
17095                    } else {
17096                        // Initialize `self` to the right variant
17097                        *self = Command::SetTexture(fidl::new_empty!(
17098                            SetTextureCmd,
17099                            fidl::encoding::DefaultFuchsiaResourceDialect
17100                        ));
17101                    }
17102                    #[allow(irrefutable_let_patterns)]
17103                    if let Command::SetTexture(ref mut val) = self {
17104                        fidl::decode!(
17105                            SetTextureCmd,
17106                            fidl::encoding::DefaultFuchsiaResourceDialect,
17107                            val,
17108                            decoder,
17109                            _inner_offset,
17110                            depth
17111                        )?;
17112                    } else {
17113                        unreachable!()
17114                    }
17115                }
17116                34 => {
17117                    #[allow(irrefutable_let_patterns)]
17118                    if let Command::SetColor(_) = self {
17119                        // Do nothing, read the value into the object
17120                    } else {
17121                        // Initialize `self` to the right variant
17122                        *self = Command::SetColor(fidl::new_empty!(
17123                            SetColorCmd,
17124                            fidl::encoding::DefaultFuchsiaResourceDialect
17125                        ));
17126                    }
17127                    #[allow(irrefutable_let_patterns)]
17128                    if let Command::SetColor(ref mut val) = self {
17129                        fidl::decode!(
17130                            SetColorCmd,
17131                            fidl::encoding::DefaultFuchsiaResourceDialect,
17132                            val,
17133                            decoder,
17134                            _inner_offset,
17135                            depth
17136                        )?;
17137                    } else {
17138                        unreachable!()
17139                    }
17140                }
17141                35 => {
17142                    #[allow(irrefutable_let_patterns)]
17143                    if let Command::BindMeshBuffers(_) = self {
17144                        // Do nothing, read the value into the object
17145                    } else {
17146                        // Initialize `self` to the right variant
17147                        *self = Command::BindMeshBuffers(fidl::new_empty!(
17148                            BindMeshBuffersCmd,
17149                            fidl::encoding::DefaultFuchsiaResourceDialect
17150                        ));
17151                    }
17152                    #[allow(irrefutable_let_patterns)]
17153                    if let Command::BindMeshBuffers(ref mut val) = self {
17154                        fidl::decode!(
17155                            BindMeshBuffersCmd,
17156                            fidl::encoding::DefaultFuchsiaResourceDialect,
17157                            val,
17158                            decoder,
17159                            _inner_offset,
17160                            depth
17161                        )?;
17162                    } else {
17163                        unreachable!()
17164                    }
17165                }
17166                36 => {
17167                    #[allow(irrefutable_let_patterns)]
17168                    if let Command::AddLayer(_) = self {
17169                        // Do nothing, read the value into the object
17170                    } else {
17171                        // Initialize `self` to the right variant
17172                        *self = Command::AddLayer(fidl::new_empty!(
17173                            AddLayerCmd,
17174                            fidl::encoding::DefaultFuchsiaResourceDialect
17175                        ));
17176                    }
17177                    #[allow(irrefutable_let_patterns)]
17178                    if let Command::AddLayer(ref mut val) = self {
17179                        fidl::decode!(
17180                            AddLayerCmd,
17181                            fidl::encoding::DefaultFuchsiaResourceDialect,
17182                            val,
17183                            decoder,
17184                            _inner_offset,
17185                            depth
17186                        )?;
17187                    } else {
17188                        unreachable!()
17189                    }
17190                }
17191                37 => {
17192                    #[allow(irrefutable_let_patterns)]
17193                    if let Command::RemoveLayer(_) = self {
17194                        // Do nothing, read the value into the object
17195                    } else {
17196                        // Initialize `self` to the right variant
17197                        *self = Command::RemoveLayer(fidl::new_empty!(
17198                            RemoveLayerCmd,
17199                            fidl::encoding::DefaultFuchsiaResourceDialect
17200                        ));
17201                    }
17202                    #[allow(irrefutable_let_patterns)]
17203                    if let Command::RemoveLayer(ref mut val) = self {
17204                        fidl::decode!(
17205                            RemoveLayerCmd,
17206                            fidl::encoding::DefaultFuchsiaResourceDialect,
17207                            val,
17208                            decoder,
17209                            _inner_offset,
17210                            depth
17211                        )?;
17212                    } else {
17213                        unreachable!()
17214                    }
17215                }
17216                38 => {
17217                    #[allow(irrefutable_let_patterns)]
17218                    if let Command::RemoveAllLayers(_) = self {
17219                        // Do nothing, read the value into the object
17220                    } else {
17221                        // Initialize `self` to the right variant
17222                        *self = Command::RemoveAllLayers(fidl::new_empty!(
17223                            RemoveAllLayersCmd,
17224                            fidl::encoding::DefaultFuchsiaResourceDialect
17225                        ));
17226                    }
17227                    #[allow(irrefutable_let_patterns)]
17228                    if let Command::RemoveAllLayers(ref mut val) = self {
17229                        fidl::decode!(
17230                            RemoveAllLayersCmd,
17231                            fidl::encoding::DefaultFuchsiaResourceDialect,
17232                            val,
17233                            decoder,
17234                            _inner_offset,
17235                            depth
17236                        )?;
17237                    } else {
17238                        unreachable!()
17239                    }
17240                }
17241                39 => {
17242                    #[allow(irrefutable_let_patterns)]
17243                    if let Command::SetLayerStack(_) = self {
17244                        // Do nothing, read the value into the object
17245                    } else {
17246                        // Initialize `self` to the right variant
17247                        *self = Command::SetLayerStack(fidl::new_empty!(
17248                            SetLayerStackCmd,
17249                            fidl::encoding::DefaultFuchsiaResourceDialect
17250                        ));
17251                    }
17252                    #[allow(irrefutable_let_patterns)]
17253                    if let Command::SetLayerStack(ref mut val) = self {
17254                        fidl::decode!(
17255                            SetLayerStackCmd,
17256                            fidl::encoding::DefaultFuchsiaResourceDialect,
17257                            val,
17258                            decoder,
17259                            _inner_offset,
17260                            depth
17261                        )?;
17262                    } else {
17263                        unreachable!()
17264                    }
17265                }
17266                40 => {
17267                    #[allow(irrefutable_let_patterns)]
17268                    if let Command::SetRenderer(_) = self {
17269                        // Do nothing, read the value into the object
17270                    } else {
17271                        // Initialize `self` to the right variant
17272                        *self = Command::SetRenderer(fidl::new_empty!(
17273                            SetRendererCmd,
17274                            fidl::encoding::DefaultFuchsiaResourceDialect
17275                        ));
17276                    }
17277                    #[allow(irrefutable_let_patterns)]
17278                    if let Command::SetRenderer(ref mut val) = self {
17279                        fidl::decode!(
17280                            SetRendererCmd,
17281                            fidl::encoding::DefaultFuchsiaResourceDialect,
17282                            val,
17283                            decoder,
17284                            _inner_offset,
17285                            depth
17286                        )?;
17287                    } else {
17288                        unreachable!()
17289                    }
17290                }
17291                41 => {
17292                    #[allow(irrefutable_let_patterns)]
17293                    if let Command::SetRendererParam(_) = self {
17294                        // Do nothing, read the value into the object
17295                    } else {
17296                        // Initialize `self` to the right variant
17297                        *self = Command::SetRendererParam(fidl::new_empty!(
17298                            SetRendererParamCmd,
17299                            fidl::encoding::DefaultFuchsiaResourceDialect
17300                        ));
17301                    }
17302                    #[allow(irrefutable_let_patterns)]
17303                    if let Command::SetRendererParam(ref mut val) = self {
17304                        fidl::decode!(
17305                            SetRendererParamCmd,
17306                            fidl::encoding::DefaultFuchsiaResourceDialect,
17307                            val,
17308                            decoder,
17309                            _inner_offset,
17310                            depth
17311                        )?;
17312                    } else {
17313                        unreachable!()
17314                    }
17315                }
17316                42 => {
17317                    #[allow(irrefutable_let_patterns)]
17318                    if let Command::SetEventMask(_) = self {
17319                        // Do nothing, read the value into the object
17320                    } else {
17321                        // Initialize `self` to the right variant
17322                        *self = Command::SetEventMask(fidl::new_empty!(
17323                            SetEventMaskCmd,
17324                            fidl::encoding::DefaultFuchsiaResourceDialect
17325                        ));
17326                    }
17327                    #[allow(irrefutable_let_patterns)]
17328                    if let Command::SetEventMask(ref mut val) = self {
17329                        fidl::decode!(
17330                            SetEventMaskCmd,
17331                            fidl::encoding::DefaultFuchsiaResourceDialect,
17332                            val,
17333                            decoder,
17334                            _inner_offset,
17335                            depth
17336                        )?;
17337                    } else {
17338                        unreachable!()
17339                    }
17340                }
17341                43 => {
17342                    #[allow(irrefutable_let_patterns)]
17343                    if let Command::SetLabel(_) = self {
17344                        // Do nothing, read the value into the object
17345                    } else {
17346                        // Initialize `self` to the right variant
17347                        *self = Command::SetLabel(fidl::new_empty!(
17348                            SetLabelCmd,
17349                            fidl::encoding::DefaultFuchsiaResourceDialect
17350                        ));
17351                    }
17352                    #[allow(irrefutable_let_patterns)]
17353                    if let Command::SetLabel(ref mut val) = self {
17354                        fidl::decode!(
17355                            SetLabelCmd,
17356                            fidl::encoding::DefaultFuchsiaResourceDialect,
17357                            val,
17358                            decoder,
17359                            _inner_offset,
17360                            depth
17361                        )?;
17362                    } else {
17363                        unreachable!()
17364                    }
17365                }
17366                44 => {
17367                    #[allow(irrefutable_let_patterns)]
17368                    if let Command::SetDisableClipping(_) = self {
17369                        // Do nothing, read the value into the object
17370                    } else {
17371                        // Initialize `self` to the right variant
17372                        *self = Command::SetDisableClipping(fidl::new_empty!(
17373                            SetDisableClippingCmd,
17374                            fidl::encoding::DefaultFuchsiaResourceDialect
17375                        ));
17376                    }
17377                    #[allow(irrefutable_let_patterns)]
17378                    if let Command::SetDisableClipping(ref mut val) = self {
17379                        fidl::decode!(
17380                            SetDisableClippingCmd,
17381                            fidl::encoding::DefaultFuchsiaResourceDialect,
17382                            val,
17383                            decoder,
17384                            _inner_offset,
17385                            depth
17386                        )?;
17387                    } else {
17388                        unreachable!()
17389                    }
17390                }
17391                45 => {
17392                    #[allow(irrefutable_let_patterns)]
17393                    if let Command::SetImportFocus(_) = self {
17394                        // Do nothing, read the value into the object
17395                    } else {
17396                        // Initialize `self` to the right variant
17397                        *self = Command::SetImportFocus(fidl::new_empty!(
17398                            SetImportFocusCmdDeprecated,
17399                            fidl::encoding::DefaultFuchsiaResourceDialect
17400                        ));
17401                    }
17402                    #[allow(irrefutable_let_patterns)]
17403                    if let Command::SetImportFocus(ref mut val) = self {
17404                        fidl::decode!(
17405                            SetImportFocusCmdDeprecated,
17406                            fidl::encoding::DefaultFuchsiaResourceDialect,
17407                            val,
17408                            decoder,
17409                            _inner_offset,
17410                            depth
17411                        )?;
17412                    } else {
17413                        unreachable!()
17414                    }
17415                }
17416                46 => {
17417                    #[allow(irrefutable_let_patterns)]
17418                    if let Command::SetClipPlanes(_) = self {
17419                        // Do nothing, read the value into the object
17420                    } else {
17421                        // Initialize `self` to the right variant
17422                        *self = Command::SetClipPlanes(fidl::new_empty!(
17423                            SetClipPlanesCmd,
17424                            fidl::encoding::DefaultFuchsiaResourceDialect
17425                        ));
17426                    }
17427                    #[allow(irrefutable_let_patterns)]
17428                    if let Command::SetClipPlanes(ref mut val) = self {
17429                        fidl::decode!(
17430                            SetClipPlanesCmd,
17431                            fidl::encoding::DefaultFuchsiaResourceDialect,
17432                            val,
17433                            decoder,
17434                            _inner_offset,
17435                            depth
17436                        )?;
17437                    } else {
17438                        unreachable!()
17439                    }
17440                }
17441                47 => {
17442                    #[allow(irrefutable_let_patterns)]
17443                    if let Command::SetPointLightPosition(_) = self {
17444                        // Do nothing, read the value into the object
17445                    } else {
17446                        // Initialize `self` to the right variant
17447                        *self = Command::SetPointLightPosition(fidl::new_empty!(
17448                            SetPointLightPositionCmd,
17449                            fidl::encoding::DefaultFuchsiaResourceDialect
17450                        ));
17451                    }
17452                    #[allow(irrefutable_let_patterns)]
17453                    if let Command::SetPointLightPosition(ref mut val) = self {
17454                        fidl::decode!(
17455                            SetPointLightPositionCmd,
17456                            fidl::encoding::DefaultFuchsiaResourceDialect,
17457                            val,
17458                            decoder,
17459                            _inner_offset,
17460                            depth
17461                        )?;
17462                    } else {
17463                        unreachable!()
17464                    }
17465                }
17466                48 => {
17467                    #[allow(irrefutable_let_patterns)]
17468                    if let Command::SetPointLightFalloff(_) = self {
17469                        // Do nothing, read the value into the object
17470                    } else {
17471                        // Initialize `self` to the right variant
17472                        *self = Command::SetPointLightFalloff(fidl::new_empty!(
17473                            SetPointLightFalloffCmd,
17474                            fidl::encoding::DefaultFuchsiaResourceDialect
17475                        ));
17476                    }
17477                    #[allow(irrefutable_let_patterns)]
17478                    if let Command::SetPointLightFalloff(ref mut val) = self {
17479                        fidl::decode!(
17480                            SetPointLightFalloffCmd,
17481                            fidl::encoding::DefaultFuchsiaResourceDialect,
17482                            val,
17483                            decoder,
17484                            _inner_offset,
17485                            depth
17486                        )?;
17487                    } else {
17488                        unreachable!()
17489                    }
17490                }
17491                49 => {
17492                    #[allow(irrefutable_let_patterns)]
17493                    if let Command::Scene_AddAmbientLight(_) = self {
17494                        // Do nothing, read the value into the object
17495                    } else {
17496                        // Initialize `self` to the right variant
17497                        *self = Command::Scene_AddAmbientLight(fidl::new_empty!(
17498                            SceneAddAmbientLightCmd,
17499                            fidl::encoding::DefaultFuchsiaResourceDialect
17500                        ));
17501                    }
17502                    #[allow(irrefutable_let_patterns)]
17503                    if let Command::Scene_AddAmbientLight(ref mut val) = self {
17504                        fidl::decode!(
17505                            SceneAddAmbientLightCmd,
17506                            fidl::encoding::DefaultFuchsiaResourceDialect,
17507                            val,
17508                            decoder,
17509                            _inner_offset,
17510                            depth
17511                        )?;
17512                    } else {
17513                        unreachable!()
17514                    }
17515                }
17516                50 => {
17517                    #[allow(irrefutable_let_patterns)]
17518                    if let Command::Scene_AddDirectionalLight(_) = self {
17519                        // Do nothing, read the value into the object
17520                    } else {
17521                        // Initialize `self` to the right variant
17522                        *self = Command::Scene_AddDirectionalLight(fidl::new_empty!(
17523                            SceneAddDirectionalLightCmd,
17524                            fidl::encoding::DefaultFuchsiaResourceDialect
17525                        ));
17526                    }
17527                    #[allow(irrefutable_let_patterns)]
17528                    if let Command::Scene_AddDirectionalLight(ref mut val) = self {
17529                        fidl::decode!(
17530                            SceneAddDirectionalLightCmd,
17531                            fidl::encoding::DefaultFuchsiaResourceDialect,
17532                            val,
17533                            decoder,
17534                            _inner_offset,
17535                            depth
17536                        )?;
17537                    } else {
17538                        unreachable!()
17539                    }
17540                }
17541                51 => {
17542                    #[allow(irrefutable_let_patterns)]
17543                    if let Command::Scene_AddPointLight(_) = self {
17544                        // Do nothing, read the value into the object
17545                    } else {
17546                        // Initialize `self` to the right variant
17547                        *self = Command::Scene_AddPointLight(fidl::new_empty!(
17548                            SceneAddPointLightCmd,
17549                            fidl::encoding::DefaultFuchsiaResourceDialect
17550                        ));
17551                    }
17552                    #[allow(irrefutable_let_patterns)]
17553                    if let Command::Scene_AddPointLight(ref mut val) = self {
17554                        fidl::decode!(
17555                            SceneAddPointLightCmd,
17556                            fidl::encoding::DefaultFuchsiaResourceDialect,
17557                            val,
17558                            decoder,
17559                            _inner_offset,
17560                            depth
17561                        )?;
17562                    } else {
17563                        unreachable!()
17564                    }
17565                }
17566                52 => {
17567                    #[allow(irrefutable_let_patterns)]
17568                    if let Command::SetDisplayColorConversion(_) = self {
17569                        // Do nothing, read the value into the object
17570                    } else {
17571                        // Initialize `self` to the right variant
17572                        *self = Command::SetDisplayColorConversion(fidl::new_empty!(
17573                            SetDisplayColorConversionCmdHack,
17574                            fidl::encoding::DefaultFuchsiaResourceDialect
17575                        ));
17576                    }
17577                    #[allow(irrefutable_let_patterns)]
17578                    if let Command::SetDisplayColorConversion(ref mut val) = self {
17579                        fidl::decode!(
17580                            SetDisplayColorConversionCmdHack,
17581                            fidl::encoding::DefaultFuchsiaResourceDialect,
17582                            val,
17583                            decoder,
17584                            _inner_offset,
17585                            depth
17586                        )?;
17587                    } else {
17588                        unreachable!()
17589                    }
17590                }
17591                53 => {
17592                    #[allow(irrefutable_let_patterns)]
17593                    if let Command::SetDisplayRotation(_) = self {
17594                        // Do nothing, read the value into the object
17595                    } else {
17596                        // Initialize `self` to the right variant
17597                        *self = Command::SetDisplayRotation(fidl::new_empty!(
17598                            SetDisplayRotationCmdHack,
17599                            fidl::encoding::DefaultFuchsiaResourceDialect
17600                        ));
17601                    }
17602                    #[allow(irrefutable_let_patterns)]
17603                    if let Command::SetDisplayRotation(ref mut val) = self {
17604                        fidl::decode!(
17605                            SetDisplayRotationCmdHack,
17606                            fidl::encoding::DefaultFuchsiaResourceDialect,
17607                            val,
17608                            decoder,
17609                            _inner_offset,
17610                            depth
17611                        )?;
17612                    } else {
17613                        unreachable!()
17614                    }
17615                }
17616                54 => {
17617                    #[allow(irrefutable_let_patterns)]
17618                    if let Command::SetEnableViewDebugBounds(_) = self {
17619                        // Do nothing, read the value into the object
17620                    } else {
17621                        // Initialize `self` to the right variant
17622                        *self = Command::SetEnableViewDebugBounds(fidl::new_empty!(
17623                            SetEnableDebugViewBoundsCmd,
17624                            fidl::encoding::DefaultFuchsiaResourceDialect
17625                        ));
17626                    }
17627                    #[allow(irrefutable_let_patterns)]
17628                    if let Command::SetEnableViewDebugBounds(ref mut val) = self {
17629                        fidl::decode!(
17630                            SetEnableDebugViewBoundsCmd,
17631                            fidl::encoding::DefaultFuchsiaResourceDialect,
17632                            val,
17633                            decoder,
17634                            _inner_offset,
17635                            depth
17636                        )?;
17637                    } else {
17638                        unreachable!()
17639                    }
17640                }
17641                55 => {
17642                    #[allow(irrefutable_let_patterns)]
17643                    if let Command::SetViewHolderBoundsColor(_) = self {
17644                        // Do nothing, read the value into the object
17645                    } else {
17646                        // Initialize `self` to the right variant
17647                        *self = Command::SetViewHolderBoundsColor(fidl::new_empty!(
17648                            SetViewHolderBoundsColorCmd,
17649                            fidl::encoding::DefaultFuchsiaResourceDialect
17650                        ));
17651                    }
17652                    #[allow(irrefutable_let_patterns)]
17653                    if let Command::SetViewHolderBoundsColor(ref mut val) = self {
17654                        fidl::decode!(
17655                            SetViewHolderBoundsColorCmd,
17656                            fidl::encoding::DefaultFuchsiaResourceDialect,
17657                            val,
17658                            decoder,
17659                            _inner_offset,
17660                            depth
17661                        )?;
17662                    } else {
17663                        unreachable!()
17664                    }
17665                }
17666                56 => {
17667                    #[allow(irrefutable_let_patterns)]
17668                    if let Command::SetCameraClipSpaceTransform(_) = self {
17669                        // Do nothing, read the value into the object
17670                    } else {
17671                        // Initialize `self` to the right variant
17672                        *self = Command::SetCameraClipSpaceTransform(fidl::new_empty!(
17673                            SetCameraClipSpaceTransformCmd,
17674                            fidl::encoding::DefaultFuchsiaResourceDialect
17675                        ));
17676                    }
17677                    #[allow(irrefutable_let_patterns)]
17678                    if let Command::SetCameraClipSpaceTransform(ref mut val) = self {
17679                        fidl::decode!(
17680                            SetCameraClipSpaceTransformCmd,
17681                            fidl::encoding::DefaultFuchsiaResourceDialect,
17682                            val,
17683                            decoder,
17684                            _inner_offset,
17685                            depth
17686                        )?;
17687                    } else {
17688                        unreachable!()
17689                    }
17690                }
17691                57 => {
17692                    #[allow(irrefutable_let_patterns)]
17693                    if let Command::SetDisplayMinimumRgb(_) = self {
17694                        // Do nothing, read the value into the object
17695                    } else {
17696                        // Initialize `self` to the right variant
17697                        *self = Command::SetDisplayMinimumRgb(fidl::new_empty!(
17698                            SetDisplayMinimumRgbCmdHack,
17699                            fidl::encoding::DefaultFuchsiaResourceDialect
17700                        ));
17701                    }
17702                    #[allow(irrefutable_let_patterns)]
17703                    if let Command::SetDisplayMinimumRgb(ref mut val) = self {
17704                        fidl::decode!(
17705                            SetDisplayMinimumRgbCmdHack,
17706                            fidl::encoding::DefaultFuchsiaResourceDialect,
17707                            val,
17708                            decoder,
17709                            _inner_offset,
17710                            depth
17711                        )?;
17712                    } else {
17713                        unreachable!()
17714                    }
17715                }
17716                58 => {
17717                    #[allow(irrefutable_let_patterns)]
17718                    if let Command::SetSemanticVisibility(_) = self {
17719                        // Do nothing, read the value into the object
17720                    } else {
17721                        // Initialize `self` to the right variant
17722                        *self = Command::SetSemanticVisibility(fidl::new_empty!(
17723                            SetSemanticVisibilityCmd,
17724                            fidl::encoding::DefaultFuchsiaResourceDialect
17725                        ));
17726                    }
17727                    #[allow(irrefutable_let_patterns)]
17728                    if let Command::SetSemanticVisibility(ref mut val) = self {
17729                        fidl::decode!(
17730                            SetSemanticVisibilityCmd,
17731                            fidl::encoding::DefaultFuchsiaResourceDialect,
17732                            val,
17733                            decoder,
17734                            _inner_offset,
17735                            depth
17736                        )?;
17737                    } else {
17738                        unreachable!()
17739                    }
17740                }
17741                ordinal => panic!("unexpected ordinal {:?}", ordinal),
17742            }
17743            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
17744                return Err(fidl::Error::InvalidNumBytesInEnvelope);
17745            }
17746            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17747                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17748            }
17749            Ok(())
17750        }
17751    }
17752
17753    impl fidl::encoding::ValueTypeMarker for Event {
17754        type Borrowed<'a> = &'a Self;
17755        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
17756            value
17757        }
17758    }
17759
17760    unsafe impl fidl::encoding::TypeMarker for Event {
17761        type Owned = Self;
17762
17763        #[inline(always)]
17764        fn inline_align(_context: fidl::encoding::Context) -> usize {
17765            8
17766        }
17767
17768        #[inline(always)]
17769        fn inline_size(_context: fidl::encoding::Context) -> usize {
17770            16
17771        }
17772    }
17773
17774    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Event, D> for &Event {
17775        #[inline]
17776        unsafe fn encode(
17777            self,
17778            encoder: &mut fidl::encoding::Encoder<'_, D>,
17779            offset: usize,
17780            _depth: fidl::encoding::Depth,
17781        ) -> fidl::Result<()> {
17782            encoder.debug_check_bounds::<Event>(offset);
17783            encoder.write_num::<u64>(self.ordinal(), offset);
17784            match self {
17785                Event::Metrics(ref val) => fidl::encoding::encode_in_envelope::<MetricsEvent, D>(
17786                    <MetricsEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
17787                    encoder,
17788                    offset + 8,
17789                    _depth,
17790                ),
17791                Event::SizeChangeHint(ref val) => {
17792                    fidl::encoding::encode_in_envelope::<SizeChangeHintEvent, D>(
17793                        <SizeChangeHintEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
17794                        encoder,
17795                        offset + 8,
17796                        _depth,
17797                    )
17798                }
17799                Event::ImportUnbound(ref val) => {
17800                    fidl::encoding::encode_in_envelope::<ImportUnboundEvent, D>(
17801                        <ImportUnboundEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
17802                        encoder,
17803                        offset + 8,
17804                        _depth,
17805                    )
17806                }
17807                Event::ViewConnected(ref val) => {
17808                    fidl::encoding::encode_in_envelope::<ViewConnectedEvent, D>(
17809                        <ViewConnectedEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
17810                        encoder,
17811                        offset + 8,
17812                        _depth,
17813                    )
17814                }
17815                Event::ViewDisconnected(ref val) => {
17816                    fidl::encoding::encode_in_envelope::<ViewDisconnectedEvent, D>(
17817                        <ViewDisconnectedEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
17818                        encoder,
17819                        offset + 8,
17820                        _depth,
17821                    )
17822                }
17823                Event::ViewHolderDisconnected(ref val) => fidl::encoding::encode_in_envelope::<
17824                    ViewHolderDisconnectedEvent,
17825                    D,
17826                >(
17827                    <ViewHolderDisconnectedEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
17828                    encoder,
17829                    offset + 8,
17830                    _depth,
17831                ),
17832                Event::ViewAttachedToScene(ref val) => {
17833                    fidl::encoding::encode_in_envelope::<ViewAttachedToSceneEvent, D>(
17834                        <ViewAttachedToSceneEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
17835                        encoder,
17836                        offset + 8,
17837                        _depth,
17838                    )
17839                }
17840                Event::ViewDetachedFromScene(ref val) => fidl::encoding::encode_in_envelope::<
17841                    ViewDetachedFromSceneEvent,
17842                    D,
17843                >(
17844                    <ViewDetachedFromSceneEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
17845                    encoder,
17846                    offset + 8,
17847                    _depth,
17848                ),
17849                Event::ViewPropertiesChanged(ref val) => fidl::encoding::encode_in_envelope::<
17850                    ViewPropertiesChangedEvent,
17851                    D,
17852                >(
17853                    <ViewPropertiesChangedEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
17854                    encoder,
17855                    offset + 8,
17856                    _depth,
17857                ),
17858                Event::ViewStateChanged(ref val) => {
17859                    fidl::encoding::encode_in_envelope::<ViewStateChangedEvent, D>(
17860                        <ViewStateChangedEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
17861                        encoder,
17862                        offset + 8,
17863                        _depth,
17864                    )
17865                }
17866                Event::ViewHolderConnected(ref val) => {
17867                    fidl::encoding::encode_in_envelope::<ViewHolderConnectedEvent, D>(
17868                        <ViewHolderConnectedEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
17869                        encoder,
17870                        offset + 8,
17871                        _depth,
17872                    )
17873                }
17874            }
17875        }
17876    }
17877
17878    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Event {
17879        #[inline(always)]
17880        fn new_empty() -> Self {
17881            Self::Metrics(fidl::new_empty!(MetricsEvent, D))
17882        }
17883
17884        #[inline]
17885        unsafe fn decode(
17886            &mut self,
17887            decoder: &mut fidl::encoding::Decoder<'_, D>,
17888            offset: usize,
17889            mut depth: fidl::encoding::Depth,
17890        ) -> fidl::Result<()> {
17891            decoder.debug_check_bounds::<Self>(offset);
17892            #[allow(unused_variables)]
17893            let next_out_of_line = decoder.next_out_of_line();
17894            let handles_before = decoder.remaining_handles();
17895            let (ordinal, inlined, num_bytes, num_handles) =
17896                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
17897
17898            let member_inline_size = match ordinal {
17899                1 => <MetricsEvent as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17900                2 => <SizeChangeHintEvent as fidl::encoding::TypeMarker>::inline_size(
17901                    decoder.context,
17902                ),
17903                3 => {
17904                    <ImportUnboundEvent as fidl::encoding::TypeMarker>::inline_size(decoder.context)
17905                }
17906                4 => {
17907                    <ViewConnectedEvent as fidl::encoding::TypeMarker>::inline_size(decoder.context)
17908                }
17909                5 => <ViewDisconnectedEvent as fidl::encoding::TypeMarker>::inline_size(
17910                    decoder.context,
17911                ),
17912                6 => <ViewHolderDisconnectedEvent as fidl::encoding::TypeMarker>::inline_size(
17913                    decoder.context,
17914                ),
17915                7 => <ViewAttachedToSceneEvent as fidl::encoding::TypeMarker>::inline_size(
17916                    decoder.context,
17917                ),
17918                8 => <ViewDetachedFromSceneEvent as fidl::encoding::TypeMarker>::inline_size(
17919                    decoder.context,
17920                ),
17921                9 => <ViewPropertiesChangedEvent as fidl::encoding::TypeMarker>::inline_size(
17922                    decoder.context,
17923                ),
17924                10 => <ViewStateChangedEvent as fidl::encoding::TypeMarker>::inline_size(
17925                    decoder.context,
17926                ),
17927                11 => <ViewHolderConnectedEvent as fidl::encoding::TypeMarker>::inline_size(
17928                    decoder.context,
17929                ),
17930                _ => return Err(fidl::Error::UnknownUnionTag),
17931            };
17932
17933            if inlined != (member_inline_size <= 4) {
17934                return Err(fidl::Error::InvalidInlineBitInEnvelope);
17935            }
17936            let _inner_offset;
17937            if inlined {
17938                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
17939                _inner_offset = offset + 8;
17940            } else {
17941                depth.increment()?;
17942                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17943            }
17944            match ordinal {
17945                1 => {
17946                    #[allow(irrefutable_let_patterns)]
17947                    if let Event::Metrics(_) = self {
17948                        // Do nothing, read the value into the object
17949                    } else {
17950                        // Initialize `self` to the right variant
17951                        *self = Event::Metrics(fidl::new_empty!(MetricsEvent, D));
17952                    }
17953                    #[allow(irrefutable_let_patterns)]
17954                    if let Event::Metrics(ref mut val) = self {
17955                        fidl::decode!(MetricsEvent, D, val, decoder, _inner_offset, depth)?;
17956                    } else {
17957                        unreachable!()
17958                    }
17959                }
17960                2 => {
17961                    #[allow(irrefutable_let_patterns)]
17962                    if let Event::SizeChangeHint(_) = self {
17963                        // Do nothing, read the value into the object
17964                    } else {
17965                        // Initialize `self` to the right variant
17966                        *self = Event::SizeChangeHint(fidl::new_empty!(SizeChangeHintEvent, D));
17967                    }
17968                    #[allow(irrefutable_let_patterns)]
17969                    if let Event::SizeChangeHint(ref mut val) = self {
17970                        fidl::decode!(SizeChangeHintEvent, D, val, decoder, _inner_offset, depth)?;
17971                    } else {
17972                        unreachable!()
17973                    }
17974                }
17975                3 => {
17976                    #[allow(irrefutable_let_patterns)]
17977                    if let Event::ImportUnbound(_) = self {
17978                        // Do nothing, read the value into the object
17979                    } else {
17980                        // Initialize `self` to the right variant
17981                        *self = Event::ImportUnbound(fidl::new_empty!(ImportUnboundEvent, D));
17982                    }
17983                    #[allow(irrefutable_let_patterns)]
17984                    if let Event::ImportUnbound(ref mut val) = self {
17985                        fidl::decode!(ImportUnboundEvent, D, val, decoder, _inner_offset, depth)?;
17986                    } else {
17987                        unreachable!()
17988                    }
17989                }
17990                4 => {
17991                    #[allow(irrefutable_let_patterns)]
17992                    if let Event::ViewConnected(_) = self {
17993                        // Do nothing, read the value into the object
17994                    } else {
17995                        // Initialize `self` to the right variant
17996                        *self = Event::ViewConnected(fidl::new_empty!(ViewConnectedEvent, D));
17997                    }
17998                    #[allow(irrefutable_let_patterns)]
17999                    if let Event::ViewConnected(ref mut val) = self {
18000                        fidl::decode!(ViewConnectedEvent, D, val, decoder, _inner_offset, depth)?;
18001                    } else {
18002                        unreachable!()
18003                    }
18004                }
18005                5 => {
18006                    #[allow(irrefutable_let_patterns)]
18007                    if let Event::ViewDisconnected(_) = self {
18008                        // Do nothing, read the value into the object
18009                    } else {
18010                        // Initialize `self` to the right variant
18011                        *self = Event::ViewDisconnected(fidl::new_empty!(ViewDisconnectedEvent, D));
18012                    }
18013                    #[allow(irrefutable_let_patterns)]
18014                    if let Event::ViewDisconnected(ref mut val) = self {
18015                        fidl::decode!(
18016                            ViewDisconnectedEvent,
18017                            D,
18018                            val,
18019                            decoder,
18020                            _inner_offset,
18021                            depth
18022                        )?;
18023                    } else {
18024                        unreachable!()
18025                    }
18026                }
18027                6 => {
18028                    #[allow(irrefutable_let_patterns)]
18029                    if let Event::ViewHolderDisconnected(_) = self {
18030                        // Do nothing, read the value into the object
18031                    } else {
18032                        // Initialize `self` to the right variant
18033                        *self = Event::ViewHolderDisconnected(fidl::new_empty!(
18034                            ViewHolderDisconnectedEvent,
18035                            D
18036                        ));
18037                    }
18038                    #[allow(irrefutable_let_patterns)]
18039                    if let Event::ViewHolderDisconnected(ref mut val) = self {
18040                        fidl::decode!(
18041                            ViewHolderDisconnectedEvent,
18042                            D,
18043                            val,
18044                            decoder,
18045                            _inner_offset,
18046                            depth
18047                        )?;
18048                    } else {
18049                        unreachable!()
18050                    }
18051                }
18052                7 => {
18053                    #[allow(irrefutable_let_patterns)]
18054                    if let Event::ViewAttachedToScene(_) = self {
18055                        // Do nothing, read the value into the object
18056                    } else {
18057                        // Initialize `self` to the right variant
18058                        *self = Event::ViewAttachedToScene(fidl::new_empty!(
18059                            ViewAttachedToSceneEvent,
18060                            D
18061                        ));
18062                    }
18063                    #[allow(irrefutable_let_patterns)]
18064                    if let Event::ViewAttachedToScene(ref mut val) = self {
18065                        fidl::decode!(
18066                            ViewAttachedToSceneEvent,
18067                            D,
18068                            val,
18069                            decoder,
18070                            _inner_offset,
18071                            depth
18072                        )?;
18073                    } else {
18074                        unreachable!()
18075                    }
18076                }
18077                8 => {
18078                    #[allow(irrefutable_let_patterns)]
18079                    if let Event::ViewDetachedFromScene(_) = self {
18080                        // Do nothing, read the value into the object
18081                    } else {
18082                        // Initialize `self` to the right variant
18083                        *self = Event::ViewDetachedFromScene(fidl::new_empty!(
18084                            ViewDetachedFromSceneEvent,
18085                            D
18086                        ));
18087                    }
18088                    #[allow(irrefutable_let_patterns)]
18089                    if let Event::ViewDetachedFromScene(ref mut val) = self {
18090                        fidl::decode!(
18091                            ViewDetachedFromSceneEvent,
18092                            D,
18093                            val,
18094                            decoder,
18095                            _inner_offset,
18096                            depth
18097                        )?;
18098                    } else {
18099                        unreachable!()
18100                    }
18101                }
18102                9 => {
18103                    #[allow(irrefutable_let_patterns)]
18104                    if let Event::ViewPropertiesChanged(_) = self {
18105                        // Do nothing, read the value into the object
18106                    } else {
18107                        // Initialize `self` to the right variant
18108                        *self = Event::ViewPropertiesChanged(fidl::new_empty!(
18109                            ViewPropertiesChangedEvent,
18110                            D
18111                        ));
18112                    }
18113                    #[allow(irrefutable_let_patterns)]
18114                    if let Event::ViewPropertiesChanged(ref mut val) = self {
18115                        fidl::decode!(
18116                            ViewPropertiesChangedEvent,
18117                            D,
18118                            val,
18119                            decoder,
18120                            _inner_offset,
18121                            depth
18122                        )?;
18123                    } else {
18124                        unreachable!()
18125                    }
18126                }
18127                10 => {
18128                    #[allow(irrefutable_let_patterns)]
18129                    if let Event::ViewStateChanged(_) = self {
18130                        // Do nothing, read the value into the object
18131                    } else {
18132                        // Initialize `self` to the right variant
18133                        *self = Event::ViewStateChanged(fidl::new_empty!(ViewStateChangedEvent, D));
18134                    }
18135                    #[allow(irrefutable_let_patterns)]
18136                    if let Event::ViewStateChanged(ref mut val) = self {
18137                        fidl::decode!(
18138                            ViewStateChangedEvent,
18139                            D,
18140                            val,
18141                            decoder,
18142                            _inner_offset,
18143                            depth
18144                        )?;
18145                    } else {
18146                        unreachable!()
18147                    }
18148                }
18149                11 => {
18150                    #[allow(irrefutable_let_patterns)]
18151                    if let Event::ViewHolderConnected(_) = self {
18152                        // Do nothing, read the value into the object
18153                    } else {
18154                        // Initialize `self` to the right variant
18155                        *self = Event::ViewHolderConnected(fidl::new_empty!(
18156                            ViewHolderConnectedEvent,
18157                            D
18158                        ));
18159                    }
18160                    #[allow(irrefutable_let_patterns)]
18161                    if let Event::ViewHolderConnected(ref mut val) = self {
18162                        fidl::decode!(
18163                            ViewHolderConnectedEvent,
18164                            D,
18165                            val,
18166                            decoder,
18167                            _inner_offset,
18168                            depth
18169                        )?;
18170                    } else {
18171                        unreachable!()
18172                    }
18173                }
18174                ordinal => panic!("unexpected ordinal {:?}", ordinal),
18175            }
18176            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
18177                return Err(fidl::Error::InvalidNumBytesInEnvelope);
18178            }
18179            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18180                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18181            }
18182            Ok(())
18183        }
18184    }
18185
18186    impl fidl::encoding::ValueTypeMarker for RendererParam {
18187        type Borrowed<'a> = &'a Self;
18188        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
18189            value
18190        }
18191    }
18192
18193    unsafe impl fidl::encoding::TypeMarker for RendererParam {
18194        type Owned = Self;
18195
18196        #[inline(always)]
18197        fn inline_align(_context: fidl::encoding::Context) -> usize {
18198            8
18199        }
18200
18201        #[inline(always)]
18202        fn inline_size(_context: fidl::encoding::Context) -> usize {
18203            16
18204        }
18205    }
18206
18207    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RendererParam, D>
18208        for &RendererParam
18209    {
18210        #[inline]
18211        unsafe fn encode(
18212            self,
18213            encoder: &mut fidl::encoding::Encoder<'_, D>,
18214            offset: usize,
18215            _depth: fidl::encoding::Depth,
18216        ) -> fidl::Result<()> {
18217            encoder.debug_check_bounds::<RendererParam>(offset);
18218            encoder.write_num::<u64>(self.ordinal(), offset);
18219            match self {
18220                RendererParam::ShadowTechnique(ref val) => {
18221                    fidl::encoding::encode_in_envelope::<ShadowTechnique, D>(
18222                        <ShadowTechnique as fidl::encoding::ValueTypeMarker>::borrow(val),
18223                        encoder,
18224                        offset + 8,
18225                        _depth,
18226                    )
18227                }
18228                RendererParam::Reserved(ref val) => {
18229                    fidl::encoding::encode_in_envelope::<RenderFrequency, D>(
18230                        <RenderFrequency as fidl::encoding::ValueTypeMarker>::borrow(val),
18231                        encoder,
18232                        offset + 8,
18233                        _depth,
18234                    )
18235                }
18236                RendererParam::EnableDebugging(ref val) => {
18237                    fidl::encoding::encode_in_envelope::<bool, D>(
18238                        <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
18239                        encoder,
18240                        offset + 8,
18241                        _depth,
18242                    )
18243                }
18244            }
18245        }
18246    }
18247
18248    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RendererParam {
18249        #[inline(always)]
18250        fn new_empty() -> Self {
18251            Self::ShadowTechnique(fidl::new_empty!(ShadowTechnique, D))
18252        }
18253
18254        #[inline]
18255        unsafe fn decode(
18256            &mut self,
18257            decoder: &mut fidl::encoding::Decoder<'_, D>,
18258            offset: usize,
18259            mut depth: fidl::encoding::Depth,
18260        ) -> fidl::Result<()> {
18261            decoder.debug_check_bounds::<Self>(offset);
18262            #[allow(unused_variables)]
18263            let next_out_of_line = decoder.next_out_of_line();
18264            let handles_before = decoder.remaining_handles();
18265            let (ordinal, inlined, num_bytes, num_handles) =
18266                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
18267
18268            let member_inline_size = match ordinal {
18269                1 => <ShadowTechnique as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18270                2 => <RenderFrequency as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18271                3 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18272                _ => return Err(fidl::Error::UnknownUnionTag),
18273            };
18274
18275            if inlined != (member_inline_size <= 4) {
18276                return Err(fidl::Error::InvalidInlineBitInEnvelope);
18277            }
18278            let _inner_offset;
18279            if inlined {
18280                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
18281                _inner_offset = offset + 8;
18282            } else {
18283                depth.increment()?;
18284                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18285            }
18286            match ordinal {
18287                1 => {
18288                    #[allow(irrefutable_let_patterns)]
18289                    if let RendererParam::ShadowTechnique(_) = self {
18290                        // Do nothing, read the value into the object
18291                    } else {
18292                        // Initialize `self` to the right variant
18293                        *self =
18294                            RendererParam::ShadowTechnique(fidl::new_empty!(ShadowTechnique, D));
18295                    }
18296                    #[allow(irrefutable_let_patterns)]
18297                    if let RendererParam::ShadowTechnique(ref mut val) = self {
18298                        fidl::decode!(ShadowTechnique, D, val, decoder, _inner_offset, depth)?;
18299                    } else {
18300                        unreachable!()
18301                    }
18302                }
18303                2 => {
18304                    #[allow(irrefutable_let_patterns)]
18305                    if let RendererParam::Reserved(_) = self {
18306                        // Do nothing, read the value into the object
18307                    } else {
18308                        // Initialize `self` to the right variant
18309                        *self = RendererParam::Reserved(fidl::new_empty!(RenderFrequency, D));
18310                    }
18311                    #[allow(irrefutable_let_patterns)]
18312                    if let RendererParam::Reserved(ref mut val) = self {
18313                        fidl::decode!(RenderFrequency, D, val, decoder, _inner_offset, depth)?;
18314                    } else {
18315                        unreachable!()
18316                    }
18317                }
18318                3 => {
18319                    #[allow(irrefutable_let_patterns)]
18320                    if let RendererParam::EnableDebugging(_) = self {
18321                        // Do nothing, read the value into the object
18322                    } else {
18323                        // Initialize `self` to the right variant
18324                        *self = RendererParam::EnableDebugging(fidl::new_empty!(bool, D));
18325                    }
18326                    #[allow(irrefutable_let_patterns)]
18327                    if let RendererParam::EnableDebugging(ref mut val) = self {
18328                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
18329                    } else {
18330                        unreachable!()
18331                    }
18332                }
18333                ordinal => panic!("unexpected ordinal {:?}", ordinal),
18334            }
18335            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
18336                return Err(fidl::Error::InvalidNumBytesInEnvelope);
18337            }
18338            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18339                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18340            }
18341            Ok(())
18342        }
18343    }
18344
18345    impl fidl::encoding::ResourceTypeMarker for ResourceArgs {
18346        type Borrowed<'a> = &'a mut Self;
18347        fn take_or_borrow<'a>(
18348            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18349        ) -> Self::Borrowed<'a> {
18350            value
18351        }
18352    }
18353
18354    unsafe impl fidl::encoding::TypeMarker for ResourceArgs {
18355        type Owned = Self;
18356
18357        #[inline(always)]
18358        fn inline_align(_context: fidl::encoding::Context) -> usize {
18359            8
18360        }
18361
18362        #[inline(always)]
18363        fn inline_size(_context: fidl::encoding::Context) -> usize {
18364            16
18365        }
18366    }
18367
18368    unsafe impl fidl::encoding::Encode<ResourceArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
18369        for &mut ResourceArgs
18370    {
18371        #[inline]
18372        unsafe fn encode(
18373            self,
18374            encoder: &mut fidl::encoding::Encoder<
18375                '_,
18376                fidl::encoding::DefaultFuchsiaResourceDialect,
18377            >,
18378            offset: usize,
18379            _depth: fidl::encoding::Depth,
18380        ) -> fidl::Result<()> {
18381            encoder.debug_check_bounds::<ResourceArgs>(offset);
18382            encoder.write_num::<u64>(self.ordinal(), offset);
18383            match self {
18384                ResourceArgs::Memory(ref mut val) => fidl::encoding::encode_in_envelope::<
18385                    MemoryArgs,
18386                    fidl::encoding::DefaultFuchsiaResourceDialect,
18387                >(
18388                    <MemoryArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
18389                    encoder,
18390                    offset + 8,
18391                    _depth,
18392                ),
18393                ResourceArgs::Image(ref val) => fidl::encoding::encode_in_envelope::<
18394                    ImageArgs,
18395                    fidl::encoding::DefaultFuchsiaResourceDialect,
18396                >(
18397                    <ImageArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18398                    encoder,
18399                    offset + 8,
18400                    _depth,
18401                ),
18402                ResourceArgs::Buffer(ref val) => fidl::encoding::encode_in_envelope::<
18403                    BufferArgs,
18404                    fidl::encoding::DefaultFuchsiaResourceDialect,
18405                >(
18406                    <BufferArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18407                    encoder,
18408                    offset + 8,
18409                    _depth,
18410                ),
18411                ResourceArgs::View(ref mut val) => fidl::encoding::encode_in_envelope::<
18412                    ViewArgs,
18413                    fidl::encoding::DefaultFuchsiaResourceDialect,
18414                >(
18415                    <ViewArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
18416                    encoder,
18417                    offset + 8,
18418                    _depth,
18419                ),
18420                ResourceArgs::ViewHolder(ref mut val) => fidl::encoding::encode_in_envelope::<
18421                    ViewHolderArgs,
18422                    fidl::encoding::DefaultFuchsiaResourceDialect,
18423                >(
18424                    <ViewHolderArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
18425                    encoder,
18426                    offset + 8,
18427                    _depth,
18428                ),
18429                ResourceArgs::Rectangle(ref val) => fidl::encoding::encode_in_envelope::<
18430                    RectangleArgs,
18431                    fidl::encoding::DefaultFuchsiaResourceDialect,
18432                >(
18433                    <RectangleArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18434                    encoder,
18435                    offset + 8,
18436                    _depth,
18437                ),
18438                ResourceArgs::RoundedRectangle(ref val) => fidl::encoding::encode_in_envelope::<
18439                    RoundedRectangleArgs,
18440                    fidl::encoding::DefaultFuchsiaResourceDialect,
18441                >(
18442                    <RoundedRectangleArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18443                    encoder,
18444                    offset + 8,
18445                    _depth,
18446                ),
18447                ResourceArgs::Circle(ref val) => fidl::encoding::encode_in_envelope::<
18448                    CircleArgs,
18449                    fidl::encoding::DefaultFuchsiaResourceDialect,
18450                >(
18451                    <CircleArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18452                    encoder,
18453                    offset + 8,
18454                    _depth,
18455                ),
18456                ResourceArgs::Mesh(ref val) => fidl::encoding::encode_in_envelope::<
18457                    MeshArgs,
18458                    fidl::encoding::DefaultFuchsiaResourceDialect,
18459                >(
18460                    <MeshArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18461                    encoder,
18462                    offset + 8,
18463                    _depth,
18464                ),
18465                ResourceArgs::ShapeNode(ref val) => fidl::encoding::encode_in_envelope::<
18466                    ShapeNodeArgs,
18467                    fidl::encoding::DefaultFuchsiaResourceDialect,
18468                >(
18469                    <ShapeNodeArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18470                    encoder,
18471                    offset + 8,
18472                    _depth,
18473                ),
18474                ResourceArgs::ClipNode(ref val) => fidl::encoding::encode_in_envelope::<
18475                    ClipNodeArgs,
18476                    fidl::encoding::DefaultFuchsiaResourceDialect,
18477                >(
18478                    <ClipNodeArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18479                    encoder,
18480                    offset + 8,
18481                    _depth,
18482                ),
18483                ResourceArgs::EntityNode(ref val) => fidl::encoding::encode_in_envelope::<
18484                    EntityNodeArgs,
18485                    fidl::encoding::DefaultFuchsiaResourceDialect,
18486                >(
18487                    <EntityNodeArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18488                    encoder,
18489                    offset + 8,
18490                    _depth,
18491                ),
18492                ResourceArgs::OpacityNode(ref val) => fidl::encoding::encode_in_envelope::<
18493                    OpacityNodeArgsHack,
18494                    fidl::encoding::DefaultFuchsiaResourceDialect,
18495                >(
18496                    <OpacityNodeArgsHack as fidl::encoding::ValueTypeMarker>::borrow(val),
18497                    encoder,
18498                    offset + 8,
18499                    _depth,
18500                ),
18501                ResourceArgs::Material(ref val) => fidl::encoding::encode_in_envelope::<
18502                    MaterialArgs,
18503                    fidl::encoding::DefaultFuchsiaResourceDialect,
18504                >(
18505                    <MaterialArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18506                    encoder,
18507                    offset + 8,
18508                    _depth,
18509                ),
18510                ResourceArgs::Compositor(ref val) => fidl::encoding::encode_in_envelope::<
18511                    CompositorArgs,
18512                    fidl::encoding::DefaultFuchsiaResourceDialect,
18513                >(
18514                    <CompositorArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18515                    encoder,
18516                    offset + 8,
18517                    _depth,
18518                ),
18519                ResourceArgs::DisplayCompositor(ref val) => fidl::encoding::encode_in_envelope::<
18520                    DisplayCompositorArgs,
18521                    fidl::encoding::DefaultFuchsiaResourceDialect,
18522                >(
18523                    <DisplayCompositorArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18524                    encoder,
18525                    offset + 8,
18526                    _depth,
18527                ),
18528                ResourceArgs::LayerStack(ref val) => fidl::encoding::encode_in_envelope::<
18529                    LayerStackArgs,
18530                    fidl::encoding::DefaultFuchsiaResourceDialect,
18531                >(
18532                    <LayerStackArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18533                    encoder,
18534                    offset + 8,
18535                    _depth,
18536                ),
18537                ResourceArgs::Layer(ref val) => fidl::encoding::encode_in_envelope::<
18538                    LayerArgs,
18539                    fidl::encoding::DefaultFuchsiaResourceDialect,
18540                >(
18541                    <LayerArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18542                    encoder,
18543                    offset + 8,
18544                    _depth,
18545                ),
18546                ResourceArgs::Scene(ref val) => fidl::encoding::encode_in_envelope::<
18547                    SceneArgs,
18548                    fidl::encoding::DefaultFuchsiaResourceDialect,
18549                >(
18550                    <SceneArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18551                    encoder,
18552                    offset + 8,
18553                    _depth,
18554                ),
18555                ResourceArgs::Camera(ref val) => fidl::encoding::encode_in_envelope::<
18556                    CameraArgs,
18557                    fidl::encoding::DefaultFuchsiaResourceDialect,
18558                >(
18559                    <CameraArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18560                    encoder,
18561                    offset + 8,
18562                    _depth,
18563                ),
18564                ResourceArgs::StereoCamera(ref val) => fidl::encoding::encode_in_envelope::<
18565                    StereoCameraArgs,
18566                    fidl::encoding::DefaultFuchsiaResourceDialect,
18567                >(
18568                    <StereoCameraArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18569                    encoder,
18570                    offset + 8,
18571                    _depth,
18572                ),
18573                ResourceArgs::Renderer(ref val) => fidl::encoding::encode_in_envelope::<
18574                    RendererArgs,
18575                    fidl::encoding::DefaultFuchsiaResourceDialect,
18576                >(
18577                    <RendererArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18578                    encoder,
18579                    offset + 8,
18580                    _depth,
18581                ),
18582                ResourceArgs::AmbientLight(ref val) => fidl::encoding::encode_in_envelope::<
18583                    AmbientLightArgs,
18584                    fidl::encoding::DefaultFuchsiaResourceDialect,
18585                >(
18586                    <AmbientLightArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18587                    encoder,
18588                    offset + 8,
18589                    _depth,
18590                ),
18591                ResourceArgs::DirectionalLight(ref val) => fidl::encoding::encode_in_envelope::<
18592                    DirectionalLightArgs,
18593                    fidl::encoding::DefaultFuchsiaResourceDialect,
18594                >(
18595                    <DirectionalLightArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18596                    encoder,
18597                    offset + 8,
18598                    _depth,
18599                ),
18600                ResourceArgs::Variable(ref val) => fidl::encoding::encode_in_envelope::<
18601                    VariableArgs,
18602                    fidl::encoding::DefaultFuchsiaResourceDialect,
18603                >(
18604                    <VariableArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18605                    encoder,
18606                    offset + 8,
18607                    _depth,
18608                ),
18609                ResourceArgs::PointLight(ref val) => fidl::encoding::encode_in_envelope::<
18610                    PointLightArgs,
18611                    fidl::encoding::DefaultFuchsiaResourceDialect,
18612                >(
18613                    <PointLightArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
18614                    encoder,
18615                    offset + 8,
18616                    _depth,
18617                ),
18618                ResourceArgs::View3(ref mut val) => fidl::encoding::encode_in_envelope::<
18619                    ViewArgs3,
18620                    fidl::encoding::DefaultFuchsiaResourceDialect,
18621                >(
18622                    <ViewArgs3 as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
18623                    encoder,
18624                    offset + 8,
18625                    _depth,
18626                ),
18627                ResourceArgs::ImagePipe2(ref mut val) => fidl::encoding::encode_in_envelope::<
18628                    ImagePipe2Args,
18629                    fidl::encoding::DefaultFuchsiaResourceDialect,
18630                >(
18631                    <ImagePipe2Args as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
18632                    encoder,
18633                    offset + 8,
18634                    _depth,
18635                ),
18636                ResourceArgs::Image2(ref val) => fidl::encoding::encode_in_envelope::<
18637                    ImageArgs2,
18638                    fidl::encoding::DefaultFuchsiaResourceDialect,
18639                >(
18640                    <ImageArgs2 as fidl::encoding::ValueTypeMarker>::borrow(val),
18641                    encoder,
18642                    offset + 8,
18643                    _depth,
18644                ),
18645                ResourceArgs::Image3(ref mut val) => fidl::encoding::encode_in_envelope::<
18646                    ImageArgs3,
18647                    fidl::encoding::DefaultFuchsiaResourceDialect,
18648                >(
18649                    <ImageArgs3 as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
18650                    encoder,
18651                    offset + 8,
18652                    _depth,
18653                ),
18654            }
18655        }
18656    }
18657
18658    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for ResourceArgs {
18659        #[inline(always)]
18660        fn new_empty() -> Self {
18661            Self::Memory(fidl::new_empty!(
18662                MemoryArgs,
18663                fidl::encoding::DefaultFuchsiaResourceDialect
18664            ))
18665        }
18666
18667        #[inline]
18668        unsafe fn decode(
18669            &mut self,
18670            decoder: &mut fidl::encoding::Decoder<
18671                '_,
18672                fidl::encoding::DefaultFuchsiaResourceDialect,
18673            >,
18674            offset: usize,
18675            mut depth: fidl::encoding::Depth,
18676        ) -> fidl::Result<()> {
18677            decoder.debug_check_bounds::<Self>(offset);
18678            #[allow(unused_variables)]
18679            let next_out_of_line = decoder.next_out_of_line();
18680            let handles_before = decoder.remaining_handles();
18681            let (ordinal, inlined, num_bytes, num_handles) =
18682                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
18683
18684            let member_inline_size = match ordinal {
18685                1 => <MemoryArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18686                2 => <ImageArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18687                4 => <BufferArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18688                5 => <ViewArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18689                6 => <ViewHolderArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18690                7 => <RectangleArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18691                8 => <RoundedRectangleArgs as fidl::encoding::TypeMarker>::inline_size(
18692                    decoder.context,
18693                ),
18694                9 => <CircleArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18695                10 => <MeshArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18696                11 => <ShapeNodeArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18697                12 => <ClipNodeArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18698                13 => <EntityNodeArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18699                14 => <OpacityNodeArgsHack as fidl::encoding::TypeMarker>::inline_size(
18700                    decoder.context,
18701                ),
18702                15 => <MaterialArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18703                16 => <CompositorArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18704                17 => <DisplayCompositorArgs as fidl::encoding::TypeMarker>::inline_size(
18705                    decoder.context,
18706                ),
18707                19 => <LayerStackArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18708                20 => <LayerArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18709                21 => <SceneArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18710                22 => <CameraArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18711                23 => {
18712                    <StereoCameraArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context)
18713                }
18714                24 => <RendererArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18715                25 => {
18716                    <AmbientLightArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context)
18717                }
18718                26 => <DirectionalLightArgs as fidl::encoding::TypeMarker>::inline_size(
18719                    decoder.context,
18720                ),
18721                27 => <VariableArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18722                28 => <PointLightArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18723                31 => <ViewArgs3 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18724                32 => <ImagePipe2Args as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18725                33 => <ImageArgs2 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18726                34 => <ImageArgs3 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18727                _ => return Err(fidl::Error::UnknownUnionTag),
18728            };
18729
18730            if inlined != (member_inline_size <= 4) {
18731                return Err(fidl::Error::InvalidInlineBitInEnvelope);
18732            }
18733            let _inner_offset;
18734            if inlined {
18735                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
18736                _inner_offset = offset + 8;
18737            } else {
18738                depth.increment()?;
18739                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18740            }
18741            match ordinal {
18742                1 => {
18743                    #[allow(irrefutable_let_patterns)]
18744                    if let ResourceArgs::Memory(_) = self {
18745                        // Do nothing, read the value into the object
18746                    } else {
18747                        // Initialize `self` to the right variant
18748                        *self = ResourceArgs::Memory(fidl::new_empty!(
18749                            MemoryArgs,
18750                            fidl::encoding::DefaultFuchsiaResourceDialect
18751                        ));
18752                    }
18753                    #[allow(irrefutable_let_patterns)]
18754                    if let ResourceArgs::Memory(ref mut val) = self {
18755                        fidl::decode!(
18756                            MemoryArgs,
18757                            fidl::encoding::DefaultFuchsiaResourceDialect,
18758                            val,
18759                            decoder,
18760                            _inner_offset,
18761                            depth
18762                        )?;
18763                    } else {
18764                        unreachable!()
18765                    }
18766                }
18767                2 => {
18768                    #[allow(irrefutable_let_patterns)]
18769                    if let ResourceArgs::Image(_) = self {
18770                        // Do nothing, read the value into the object
18771                    } else {
18772                        // Initialize `self` to the right variant
18773                        *self = ResourceArgs::Image(fidl::new_empty!(
18774                            ImageArgs,
18775                            fidl::encoding::DefaultFuchsiaResourceDialect
18776                        ));
18777                    }
18778                    #[allow(irrefutable_let_patterns)]
18779                    if let ResourceArgs::Image(ref mut val) = self {
18780                        fidl::decode!(
18781                            ImageArgs,
18782                            fidl::encoding::DefaultFuchsiaResourceDialect,
18783                            val,
18784                            decoder,
18785                            _inner_offset,
18786                            depth
18787                        )?;
18788                    } else {
18789                        unreachable!()
18790                    }
18791                }
18792                4 => {
18793                    #[allow(irrefutable_let_patterns)]
18794                    if let ResourceArgs::Buffer(_) = self {
18795                        // Do nothing, read the value into the object
18796                    } else {
18797                        // Initialize `self` to the right variant
18798                        *self = ResourceArgs::Buffer(fidl::new_empty!(
18799                            BufferArgs,
18800                            fidl::encoding::DefaultFuchsiaResourceDialect
18801                        ));
18802                    }
18803                    #[allow(irrefutable_let_patterns)]
18804                    if let ResourceArgs::Buffer(ref mut val) = self {
18805                        fidl::decode!(
18806                            BufferArgs,
18807                            fidl::encoding::DefaultFuchsiaResourceDialect,
18808                            val,
18809                            decoder,
18810                            _inner_offset,
18811                            depth
18812                        )?;
18813                    } else {
18814                        unreachable!()
18815                    }
18816                }
18817                5 => {
18818                    #[allow(irrefutable_let_patterns)]
18819                    if let ResourceArgs::View(_) = self {
18820                        // Do nothing, read the value into the object
18821                    } else {
18822                        // Initialize `self` to the right variant
18823                        *self = ResourceArgs::View(fidl::new_empty!(
18824                            ViewArgs,
18825                            fidl::encoding::DefaultFuchsiaResourceDialect
18826                        ));
18827                    }
18828                    #[allow(irrefutable_let_patterns)]
18829                    if let ResourceArgs::View(ref mut val) = self {
18830                        fidl::decode!(
18831                            ViewArgs,
18832                            fidl::encoding::DefaultFuchsiaResourceDialect,
18833                            val,
18834                            decoder,
18835                            _inner_offset,
18836                            depth
18837                        )?;
18838                    } else {
18839                        unreachable!()
18840                    }
18841                }
18842                6 => {
18843                    #[allow(irrefutable_let_patterns)]
18844                    if let ResourceArgs::ViewHolder(_) = self {
18845                        // Do nothing, read the value into the object
18846                    } else {
18847                        // Initialize `self` to the right variant
18848                        *self = ResourceArgs::ViewHolder(fidl::new_empty!(
18849                            ViewHolderArgs,
18850                            fidl::encoding::DefaultFuchsiaResourceDialect
18851                        ));
18852                    }
18853                    #[allow(irrefutable_let_patterns)]
18854                    if let ResourceArgs::ViewHolder(ref mut val) = self {
18855                        fidl::decode!(
18856                            ViewHolderArgs,
18857                            fidl::encoding::DefaultFuchsiaResourceDialect,
18858                            val,
18859                            decoder,
18860                            _inner_offset,
18861                            depth
18862                        )?;
18863                    } else {
18864                        unreachable!()
18865                    }
18866                }
18867                7 => {
18868                    #[allow(irrefutable_let_patterns)]
18869                    if let ResourceArgs::Rectangle(_) = self {
18870                        // Do nothing, read the value into the object
18871                    } else {
18872                        // Initialize `self` to the right variant
18873                        *self = ResourceArgs::Rectangle(fidl::new_empty!(
18874                            RectangleArgs,
18875                            fidl::encoding::DefaultFuchsiaResourceDialect
18876                        ));
18877                    }
18878                    #[allow(irrefutable_let_patterns)]
18879                    if let ResourceArgs::Rectangle(ref mut val) = self {
18880                        fidl::decode!(
18881                            RectangleArgs,
18882                            fidl::encoding::DefaultFuchsiaResourceDialect,
18883                            val,
18884                            decoder,
18885                            _inner_offset,
18886                            depth
18887                        )?;
18888                    } else {
18889                        unreachable!()
18890                    }
18891                }
18892                8 => {
18893                    #[allow(irrefutable_let_patterns)]
18894                    if let ResourceArgs::RoundedRectangle(_) = self {
18895                        // Do nothing, read the value into the object
18896                    } else {
18897                        // Initialize `self` to the right variant
18898                        *self = ResourceArgs::RoundedRectangle(fidl::new_empty!(
18899                            RoundedRectangleArgs,
18900                            fidl::encoding::DefaultFuchsiaResourceDialect
18901                        ));
18902                    }
18903                    #[allow(irrefutable_let_patterns)]
18904                    if let ResourceArgs::RoundedRectangle(ref mut val) = self {
18905                        fidl::decode!(
18906                            RoundedRectangleArgs,
18907                            fidl::encoding::DefaultFuchsiaResourceDialect,
18908                            val,
18909                            decoder,
18910                            _inner_offset,
18911                            depth
18912                        )?;
18913                    } else {
18914                        unreachable!()
18915                    }
18916                }
18917                9 => {
18918                    #[allow(irrefutable_let_patterns)]
18919                    if let ResourceArgs::Circle(_) = self {
18920                        // Do nothing, read the value into the object
18921                    } else {
18922                        // Initialize `self` to the right variant
18923                        *self = ResourceArgs::Circle(fidl::new_empty!(
18924                            CircleArgs,
18925                            fidl::encoding::DefaultFuchsiaResourceDialect
18926                        ));
18927                    }
18928                    #[allow(irrefutable_let_patterns)]
18929                    if let ResourceArgs::Circle(ref mut val) = self {
18930                        fidl::decode!(
18931                            CircleArgs,
18932                            fidl::encoding::DefaultFuchsiaResourceDialect,
18933                            val,
18934                            decoder,
18935                            _inner_offset,
18936                            depth
18937                        )?;
18938                    } else {
18939                        unreachable!()
18940                    }
18941                }
18942                10 => {
18943                    #[allow(irrefutable_let_patterns)]
18944                    if let ResourceArgs::Mesh(_) = self {
18945                        // Do nothing, read the value into the object
18946                    } else {
18947                        // Initialize `self` to the right variant
18948                        *self = ResourceArgs::Mesh(fidl::new_empty!(
18949                            MeshArgs,
18950                            fidl::encoding::DefaultFuchsiaResourceDialect
18951                        ));
18952                    }
18953                    #[allow(irrefutable_let_patterns)]
18954                    if let ResourceArgs::Mesh(ref mut val) = self {
18955                        fidl::decode!(
18956                            MeshArgs,
18957                            fidl::encoding::DefaultFuchsiaResourceDialect,
18958                            val,
18959                            decoder,
18960                            _inner_offset,
18961                            depth
18962                        )?;
18963                    } else {
18964                        unreachable!()
18965                    }
18966                }
18967                11 => {
18968                    #[allow(irrefutable_let_patterns)]
18969                    if let ResourceArgs::ShapeNode(_) = self {
18970                        // Do nothing, read the value into the object
18971                    } else {
18972                        // Initialize `self` to the right variant
18973                        *self = ResourceArgs::ShapeNode(fidl::new_empty!(
18974                            ShapeNodeArgs,
18975                            fidl::encoding::DefaultFuchsiaResourceDialect
18976                        ));
18977                    }
18978                    #[allow(irrefutable_let_patterns)]
18979                    if let ResourceArgs::ShapeNode(ref mut val) = self {
18980                        fidl::decode!(
18981                            ShapeNodeArgs,
18982                            fidl::encoding::DefaultFuchsiaResourceDialect,
18983                            val,
18984                            decoder,
18985                            _inner_offset,
18986                            depth
18987                        )?;
18988                    } else {
18989                        unreachable!()
18990                    }
18991                }
18992                12 => {
18993                    #[allow(irrefutable_let_patterns)]
18994                    if let ResourceArgs::ClipNode(_) = self {
18995                        // Do nothing, read the value into the object
18996                    } else {
18997                        // Initialize `self` to the right variant
18998                        *self = ResourceArgs::ClipNode(fidl::new_empty!(
18999                            ClipNodeArgs,
19000                            fidl::encoding::DefaultFuchsiaResourceDialect
19001                        ));
19002                    }
19003                    #[allow(irrefutable_let_patterns)]
19004                    if let ResourceArgs::ClipNode(ref mut val) = self {
19005                        fidl::decode!(
19006                            ClipNodeArgs,
19007                            fidl::encoding::DefaultFuchsiaResourceDialect,
19008                            val,
19009                            decoder,
19010                            _inner_offset,
19011                            depth
19012                        )?;
19013                    } else {
19014                        unreachable!()
19015                    }
19016                }
19017                13 => {
19018                    #[allow(irrefutable_let_patterns)]
19019                    if let ResourceArgs::EntityNode(_) = self {
19020                        // Do nothing, read the value into the object
19021                    } else {
19022                        // Initialize `self` to the right variant
19023                        *self = ResourceArgs::EntityNode(fidl::new_empty!(
19024                            EntityNodeArgs,
19025                            fidl::encoding::DefaultFuchsiaResourceDialect
19026                        ));
19027                    }
19028                    #[allow(irrefutable_let_patterns)]
19029                    if let ResourceArgs::EntityNode(ref mut val) = self {
19030                        fidl::decode!(
19031                            EntityNodeArgs,
19032                            fidl::encoding::DefaultFuchsiaResourceDialect,
19033                            val,
19034                            decoder,
19035                            _inner_offset,
19036                            depth
19037                        )?;
19038                    } else {
19039                        unreachable!()
19040                    }
19041                }
19042                14 => {
19043                    #[allow(irrefutable_let_patterns)]
19044                    if let ResourceArgs::OpacityNode(_) = self {
19045                        // Do nothing, read the value into the object
19046                    } else {
19047                        // Initialize `self` to the right variant
19048                        *self = ResourceArgs::OpacityNode(fidl::new_empty!(
19049                            OpacityNodeArgsHack,
19050                            fidl::encoding::DefaultFuchsiaResourceDialect
19051                        ));
19052                    }
19053                    #[allow(irrefutable_let_patterns)]
19054                    if let ResourceArgs::OpacityNode(ref mut val) = self {
19055                        fidl::decode!(
19056                            OpacityNodeArgsHack,
19057                            fidl::encoding::DefaultFuchsiaResourceDialect,
19058                            val,
19059                            decoder,
19060                            _inner_offset,
19061                            depth
19062                        )?;
19063                    } else {
19064                        unreachable!()
19065                    }
19066                }
19067                15 => {
19068                    #[allow(irrefutable_let_patterns)]
19069                    if let ResourceArgs::Material(_) = self {
19070                        // Do nothing, read the value into the object
19071                    } else {
19072                        // Initialize `self` to the right variant
19073                        *self = ResourceArgs::Material(fidl::new_empty!(
19074                            MaterialArgs,
19075                            fidl::encoding::DefaultFuchsiaResourceDialect
19076                        ));
19077                    }
19078                    #[allow(irrefutable_let_patterns)]
19079                    if let ResourceArgs::Material(ref mut val) = self {
19080                        fidl::decode!(
19081                            MaterialArgs,
19082                            fidl::encoding::DefaultFuchsiaResourceDialect,
19083                            val,
19084                            decoder,
19085                            _inner_offset,
19086                            depth
19087                        )?;
19088                    } else {
19089                        unreachable!()
19090                    }
19091                }
19092                16 => {
19093                    #[allow(irrefutable_let_patterns)]
19094                    if let ResourceArgs::Compositor(_) = self {
19095                        // Do nothing, read the value into the object
19096                    } else {
19097                        // Initialize `self` to the right variant
19098                        *self = ResourceArgs::Compositor(fidl::new_empty!(
19099                            CompositorArgs,
19100                            fidl::encoding::DefaultFuchsiaResourceDialect
19101                        ));
19102                    }
19103                    #[allow(irrefutable_let_patterns)]
19104                    if let ResourceArgs::Compositor(ref mut val) = self {
19105                        fidl::decode!(
19106                            CompositorArgs,
19107                            fidl::encoding::DefaultFuchsiaResourceDialect,
19108                            val,
19109                            decoder,
19110                            _inner_offset,
19111                            depth
19112                        )?;
19113                    } else {
19114                        unreachable!()
19115                    }
19116                }
19117                17 => {
19118                    #[allow(irrefutable_let_patterns)]
19119                    if let ResourceArgs::DisplayCompositor(_) = self {
19120                        // Do nothing, read the value into the object
19121                    } else {
19122                        // Initialize `self` to the right variant
19123                        *self = ResourceArgs::DisplayCompositor(fidl::new_empty!(
19124                            DisplayCompositorArgs,
19125                            fidl::encoding::DefaultFuchsiaResourceDialect
19126                        ));
19127                    }
19128                    #[allow(irrefutable_let_patterns)]
19129                    if let ResourceArgs::DisplayCompositor(ref mut val) = self {
19130                        fidl::decode!(
19131                            DisplayCompositorArgs,
19132                            fidl::encoding::DefaultFuchsiaResourceDialect,
19133                            val,
19134                            decoder,
19135                            _inner_offset,
19136                            depth
19137                        )?;
19138                    } else {
19139                        unreachable!()
19140                    }
19141                }
19142                19 => {
19143                    #[allow(irrefutable_let_patterns)]
19144                    if let ResourceArgs::LayerStack(_) = self {
19145                        // Do nothing, read the value into the object
19146                    } else {
19147                        // Initialize `self` to the right variant
19148                        *self = ResourceArgs::LayerStack(fidl::new_empty!(
19149                            LayerStackArgs,
19150                            fidl::encoding::DefaultFuchsiaResourceDialect
19151                        ));
19152                    }
19153                    #[allow(irrefutable_let_patterns)]
19154                    if let ResourceArgs::LayerStack(ref mut val) = self {
19155                        fidl::decode!(
19156                            LayerStackArgs,
19157                            fidl::encoding::DefaultFuchsiaResourceDialect,
19158                            val,
19159                            decoder,
19160                            _inner_offset,
19161                            depth
19162                        )?;
19163                    } else {
19164                        unreachable!()
19165                    }
19166                }
19167                20 => {
19168                    #[allow(irrefutable_let_patterns)]
19169                    if let ResourceArgs::Layer(_) = self {
19170                        // Do nothing, read the value into the object
19171                    } else {
19172                        // Initialize `self` to the right variant
19173                        *self = ResourceArgs::Layer(fidl::new_empty!(
19174                            LayerArgs,
19175                            fidl::encoding::DefaultFuchsiaResourceDialect
19176                        ));
19177                    }
19178                    #[allow(irrefutable_let_patterns)]
19179                    if let ResourceArgs::Layer(ref mut val) = self {
19180                        fidl::decode!(
19181                            LayerArgs,
19182                            fidl::encoding::DefaultFuchsiaResourceDialect,
19183                            val,
19184                            decoder,
19185                            _inner_offset,
19186                            depth
19187                        )?;
19188                    } else {
19189                        unreachable!()
19190                    }
19191                }
19192                21 => {
19193                    #[allow(irrefutable_let_patterns)]
19194                    if let ResourceArgs::Scene(_) = self {
19195                        // Do nothing, read the value into the object
19196                    } else {
19197                        // Initialize `self` to the right variant
19198                        *self = ResourceArgs::Scene(fidl::new_empty!(
19199                            SceneArgs,
19200                            fidl::encoding::DefaultFuchsiaResourceDialect
19201                        ));
19202                    }
19203                    #[allow(irrefutable_let_patterns)]
19204                    if let ResourceArgs::Scene(ref mut val) = self {
19205                        fidl::decode!(
19206                            SceneArgs,
19207                            fidl::encoding::DefaultFuchsiaResourceDialect,
19208                            val,
19209                            decoder,
19210                            _inner_offset,
19211                            depth
19212                        )?;
19213                    } else {
19214                        unreachable!()
19215                    }
19216                }
19217                22 => {
19218                    #[allow(irrefutable_let_patterns)]
19219                    if let ResourceArgs::Camera(_) = self {
19220                        // Do nothing, read the value into the object
19221                    } else {
19222                        // Initialize `self` to the right variant
19223                        *self = ResourceArgs::Camera(fidl::new_empty!(
19224                            CameraArgs,
19225                            fidl::encoding::DefaultFuchsiaResourceDialect
19226                        ));
19227                    }
19228                    #[allow(irrefutable_let_patterns)]
19229                    if let ResourceArgs::Camera(ref mut val) = self {
19230                        fidl::decode!(
19231                            CameraArgs,
19232                            fidl::encoding::DefaultFuchsiaResourceDialect,
19233                            val,
19234                            decoder,
19235                            _inner_offset,
19236                            depth
19237                        )?;
19238                    } else {
19239                        unreachable!()
19240                    }
19241                }
19242                23 => {
19243                    #[allow(irrefutable_let_patterns)]
19244                    if let ResourceArgs::StereoCamera(_) = self {
19245                        // Do nothing, read the value into the object
19246                    } else {
19247                        // Initialize `self` to the right variant
19248                        *self = ResourceArgs::StereoCamera(fidl::new_empty!(
19249                            StereoCameraArgs,
19250                            fidl::encoding::DefaultFuchsiaResourceDialect
19251                        ));
19252                    }
19253                    #[allow(irrefutable_let_patterns)]
19254                    if let ResourceArgs::StereoCamera(ref mut val) = self {
19255                        fidl::decode!(
19256                            StereoCameraArgs,
19257                            fidl::encoding::DefaultFuchsiaResourceDialect,
19258                            val,
19259                            decoder,
19260                            _inner_offset,
19261                            depth
19262                        )?;
19263                    } else {
19264                        unreachable!()
19265                    }
19266                }
19267                24 => {
19268                    #[allow(irrefutable_let_patterns)]
19269                    if let ResourceArgs::Renderer(_) = self {
19270                        // Do nothing, read the value into the object
19271                    } else {
19272                        // Initialize `self` to the right variant
19273                        *self = ResourceArgs::Renderer(fidl::new_empty!(
19274                            RendererArgs,
19275                            fidl::encoding::DefaultFuchsiaResourceDialect
19276                        ));
19277                    }
19278                    #[allow(irrefutable_let_patterns)]
19279                    if let ResourceArgs::Renderer(ref mut val) = self {
19280                        fidl::decode!(
19281                            RendererArgs,
19282                            fidl::encoding::DefaultFuchsiaResourceDialect,
19283                            val,
19284                            decoder,
19285                            _inner_offset,
19286                            depth
19287                        )?;
19288                    } else {
19289                        unreachable!()
19290                    }
19291                }
19292                25 => {
19293                    #[allow(irrefutable_let_patterns)]
19294                    if let ResourceArgs::AmbientLight(_) = self {
19295                        // Do nothing, read the value into the object
19296                    } else {
19297                        // Initialize `self` to the right variant
19298                        *self = ResourceArgs::AmbientLight(fidl::new_empty!(
19299                            AmbientLightArgs,
19300                            fidl::encoding::DefaultFuchsiaResourceDialect
19301                        ));
19302                    }
19303                    #[allow(irrefutable_let_patterns)]
19304                    if let ResourceArgs::AmbientLight(ref mut val) = self {
19305                        fidl::decode!(
19306                            AmbientLightArgs,
19307                            fidl::encoding::DefaultFuchsiaResourceDialect,
19308                            val,
19309                            decoder,
19310                            _inner_offset,
19311                            depth
19312                        )?;
19313                    } else {
19314                        unreachable!()
19315                    }
19316                }
19317                26 => {
19318                    #[allow(irrefutable_let_patterns)]
19319                    if let ResourceArgs::DirectionalLight(_) = self {
19320                        // Do nothing, read the value into the object
19321                    } else {
19322                        // Initialize `self` to the right variant
19323                        *self = ResourceArgs::DirectionalLight(fidl::new_empty!(
19324                            DirectionalLightArgs,
19325                            fidl::encoding::DefaultFuchsiaResourceDialect
19326                        ));
19327                    }
19328                    #[allow(irrefutable_let_patterns)]
19329                    if let ResourceArgs::DirectionalLight(ref mut val) = self {
19330                        fidl::decode!(
19331                            DirectionalLightArgs,
19332                            fidl::encoding::DefaultFuchsiaResourceDialect,
19333                            val,
19334                            decoder,
19335                            _inner_offset,
19336                            depth
19337                        )?;
19338                    } else {
19339                        unreachable!()
19340                    }
19341                }
19342                27 => {
19343                    #[allow(irrefutable_let_patterns)]
19344                    if let ResourceArgs::Variable(_) = self {
19345                        // Do nothing, read the value into the object
19346                    } else {
19347                        // Initialize `self` to the right variant
19348                        *self = ResourceArgs::Variable(fidl::new_empty!(
19349                            VariableArgs,
19350                            fidl::encoding::DefaultFuchsiaResourceDialect
19351                        ));
19352                    }
19353                    #[allow(irrefutable_let_patterns)]
19354                    if let ResourceArgs::Variable(ref mut val) = self {
19355                        fidl::decode!(
19356                            VariableArgs,
19357                            fidl::encoding::DefaultFuchsiaResourceDialect,
19358                            val,
19359                            decoder,
19360                            _inner_offset,
19361                            depth
19362                        )?;
19363                    } else {
19364                        unreachable!()
19365                    }
19366                }
19367                28 => {
19368                    #[allow(irrefutable_let_patterns)]
19369                    if let ResourceArgs::PointLight(_) = self {
19370                        // Do nothing, read the value into the object
19371                    } else {
19372                        // Initialize `self` to the right variant
19373                        *self = ResourceArgs::PointLight(fidl::new_empty!(
19374                            PointLightArgs,
19375                            fidl::encoding::DefaultFuchsiaResourceDialect
19376                        ));
19377                    }
19378                    #[allow(irrefutable_let_patterns)]
19379                    if let ResourceArgs::PointLight(ref mut val) = self {
19380                        fidl::decode!(
19381                            PointLightArgs,
19382                            fidl::encoding::DefaultFuchsiaResourceDialect,
19383                            val,
19384                            decoder,
19385                            _inner_offset,
19386                            depth
19387                        )?;
19388                    } else {
19389                        unreachable!()
19390                    }
19391                }
19392                31 => {
19393                    #[allow(irrefutable_let_patterns)]
19394                    if let ResourceArgs::View3(_) = self {
19395                        // Do nothing, read the value into the object
19396                    } else {
19397                        // Initialize `self` to the right variant
19398                        *self = ResourceArgs::View3(fidl::new_empty!(
19399                            ViewArgs3,
19400                            fidl::encoding::DefaultFuchsiaResourceDialect
19401                        ));
19402                    }
19403                    #[allow(irrefutable_let_patterns)]
19404                    if let ResourceArgs::View3(ref mut val) = self {
19405                        fidl::decode!(
19406                            ViewArgs3,
19407                            fidl::encoding::DefaultFuchsiaResourceDialect,
19408                            val,
19409                            decoder,
19410                            _inner_offset,
19411                            depth
19412                        )?;
19413                    } else {
19414                        unreachable!()
19415                    }
19416                }
19417                32 => {
19418                    #[allow(irrefutable_let_patterns)]
19419                    if let ResourceArgs::ImagePipe2(_) = self {
19420                        // Do nothing, read the value into the object
19421                    } else {
19422                        // Initialize `self` to the right variant
19423                        *self = ResourceArgs::ImagePipe2(fidl::new_empty!(
19424                            ImagePipe2Args,
19425                            fidl::encoding::DefaultFuchsiaResourceDialect
19426                        ));
19427                    }
19428                    #[allow(irrefutable_let_patterns)]
19429                    if let ResourceArgs::ImagePipe2(ref mut val) = self {
19430                        fidl::decode!(
19431                            ImagePipe2Args,
19432                            fidl::encoding::DefaultFuchsiaResourceDialect,
19433                            val,
19434                            decoder,
19435                            _inner_offset,
19436                            depth
19437                        )?;
19438                    } else {
19439                        unreachable!()
19440                    }
19441                }
19442                33 => {
19443                    #[allow(irrefutable_let_patterns)]
19444                    if let ResourceArgs::Image2(_) = self {
19445                        // Do nothing, read the value into the object
19446                    } else {
19447                        // Initialize `self` to the right variant
19448                        *self = ResourceArgs::Image2(fidl::new_empty!(
19449                            ImageArgs2,
19450                            fidl::encoding::DefaultFuchsiaResourceDialect
19451                        ));
19452                    }
19453                    #[allow(irrefutable_let_patterns)]
19454                    if let ResourceArgs::Image2(ref mut val) = self {
19455                        fidl::decode!(
19456                            ImageArgs2,
19457                            fidl::encoding::DefaultFuchsiaResourceDialect,
19458                            val,
19459                            decoder,
19460                            _inner_offset,
19461                            depth
19462                        )?;
19463                    } else {
19464                        unreachable!()
19465                    }
19466                }
19467                34 => {
19468                    #[allow(irrefutable_let_patterns)]
19469                    if let ResourceArgs::Image3(_) = self {
19470                        // Do nothing, read the value into the object
19471                    } else {
19472                        // Initialize `self` to the right variant
19473                        *self = ResourceArgs::Image3(fidl::new_empty!(
19474                            ImageArgs3,
19475                            fidl::encoding::DefaultFuchsiaResourceDialect
19476                        ));
19477                    }
19478                    #[allow(irrefutable_let_patterns)]
19479                    if let ResourceArgs::Image3(ref mut val) = self {
19480                        fidl::decode!(
19481                            ImageArgs3,
19482                            fidl::encoding::DefaultFuchsiaResourceDialect,
19483                            val,
19484                            decoder,
19485                            _inner_offset,
19486                            depth
19487                        )?;
19488                    } else {
19489                        unreachable!()
19490                    }
19491                }
19492                ordinal => panic!("unexpected ordinal {:?}", ordinal),
19493            }
19494            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
19495                return Err(fidl::Error::InvalidNumBytesInEnvelope);
19496            }
19497            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19498                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19499            }
19500            Ok(())
19501        }
19502    }
19503
19504    impl fidl::encoding::ValueTypeMarker for Value {
19505        type Borrowed<'a> = &'a Self;
19506        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
19507            value
19508        }
19509    }
19510
19511    unsafe impl fidl::encoding::TypeMarker for Value {
19512        type Owned = Self;
19513
19514        #[inline(always)]
19515        fn inline_align(_context: fidl::encoding::Context) -> usize {
19516            8
19517        }
19518
19519        #[inline(always)]
19520        fn inline_size(_context: fidl::encoding::Context) -> usize {
19521            16
19522        }
19523    }
19524
19525    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Value, D> for &Value {
19526        #[inline]
19527        unsafe fn encode(
19528            self,
19529            encoder: &mut fidl::encoding::Encoder<'_, D>,
19530            offset: usize,
19531            _depth: fidl::encoding::Depth,
19532        ) -> fidl::Result<()> {
19533            encoder.debug_check_bounds::<Value>(offset);
19534            encoder.write_num::<u64>(self.ordinal(), offset);
19535            match self {
19536                Value::Vector1(ref val) => fidl::encoding::encode_in_envelope::<f32, D>(
19537                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(val),
19538                    encoder,
19539                    offset + 8,
19540                    _depth,
19541                ),
19542                Value::Vector2(ref val) => fidl::encoding::encode_in_envelope::<Vec2, D>(
19543                    <Vec2 as fidl::encoding::ValueTypeMarker>::borrow(val),
19544                    encoder,
19545                    offset + 8,
19546                    _depth,
19547                ),
19548                Value::Vector3(ref val) => fidl::encoding::encode_in_envelope::<Vec3, D>(
19549                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(val),
19550                    encoder,
19551                    offset + 8,
19552                    _depth,
19553                ),
19554                Value::Vector4(ref val) => fidl::encoding::encode_in_envelope::<Vec4, D>(
19555                    <Vec4 as fidl::encoding::ValueTypeMarker>::borrow(val),
19556                    encoder,
19557                    offset + 8,
19558                    _depth,
19559                ),
19560                Value::Matrix4x4(ref val) => fidl::encoding::encode_in_envelope::<Mat4, D>(
19561                    <Mat4 as fidl::encoding::ValueTypeMarker>::borrow(val),
19562                    encoder,
19563                    offset + 8,
19564                    _depth,
19565                ),
19566                Value::ColorRgba(ref val) => fidl::encoding::encode_in_envelope::<ColorRgba, D>(
19567                    <ColorRgba as fidl::encoding::ValueTypeMarker>::borrow(val),
19568                    encoder,
19569                    offset + 8,
19570                    _depth,
19571                ),
19572                Value::ColorRgb(ref val) => fidl::encoding::encode_in_envelope::<ColorRgb, D>(
19573                    <ColorRgb as fidl::encoding::ValueTypeMarker>::borrow(val),
19574                    encoder,
19575                    offset + 8,
19576                    _depth,
19577                ),
19578                Value::Degrees(ref val) => fidl::encoding::encode_in_envelope::<f32, D>(
19579                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(val),
19580                    encoder,
19581                    offset + 8,
19582                    _depth,
19583                ),
19584                Value::Quaternion(ref val) => fidl::encoding::encode_in_envelope::<Quaternion, D>(
19585                    <Quaternion as fidl::encoding::ValueTypeMarker>::borrow(val),
19586                    encoder,
19587                    offset + 8,
19588                    _depth,
19589                ),
19590                Value::Transform(ref val) => {
19591                    fidl::encoding::encode_in_envelope::<FactoredTransform, D>(
19592                        <FactoredTransform as fidl::encoding::ValueTypeMarker>::borrow(val),
19593                        encoder,
19594                        offset + 8,
19595                        _depth,
19596                    )
19597                }
19598                Value::VariableId(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
19599                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
19600                    encoder,
19601                    offset + 8,
19602                    _depth,
19603                ),
19604            }
19605        }
19606    }
19607
19608    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Value {
19609        #[inline(always)]
19610        fn new_empty() -> Self {
19611            Self::Vector1(fidl::new_empty!(f32, D))
19612        }
19613
19614        #[inline]
19615        unsafe fn decode(
19616            &mut self,
19617            decoder: &mut fidl::encoding::Decoder<'_, D>,
19618            offset: usize,
19619            mut depth: fidl::encoding::Depth,
19620        ) -> fidl::Result<()> {
19621            decoder.debug_check_bounds::<Self>(offset);
19622            #[allow(unused_variables)]
19623            let next_out_of_line = decoder.next_out_of_line();
19624            let handles_before = decoder.remaining_handles();
19625            let (ordinal, inlined, num_bytes, num_handles) =
19626                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
19627
19628            let member_inline_size = match ordinal {
19629                1 => <f32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19630                2 => <Vec2 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19631                3 => <Vec3 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19632                4 => <Vec4 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19633                5 => <Mat4 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19634                6 => <ColorRgba as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19635                7 => <ColorRgb as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19636                8 => <f32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19637                9 => <Quaternion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19638                10 => {
19639                    <FactoredTransform as fidl::encoding::TypeMarker>::inline_size(decoder.context)
19640                }
19641                11 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
19642                _ => return Err(fidl::Error::UnknownUnionTag),
19643            };
19644
19645            if inlined != (member_inline_size <= 4) {
19646                return Err(fidl::Error::InvalidInlineBitInEnvelope);
19647            }
19648            let _inner_offset;
19649            if inlined {
19650                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
19651                _inner_offset = offset + 8;
19652            } else {
19653                depth.increment()?;
19654                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
19655            }
19656            match ordinal {
19657                1 => {
19658                    #[allow(irrefutable_let_patterns)]
19659                    if let Value::Vector1(_) = self {
19660                        // Do nothing, read the value into the object
19661                    } else {
19662                        // Initialize `self` to the right variant
19663                        *self = Value::Vector1(fidl::new_empty!(f32, D));
19664                    }
19665                    #[allow(irrefutable_let_patterns)]
19666                    if let Value::Vector1(ref mut val) = self {
19667                        fidl::decode!(f32, D, val, decoder, _inner_offset, depth)?;
19668                    } else {
19669                        unreachable!()
19670                    }
19671                }
19672                2 => {
19673                    #[allow(irrefutable_let_patterns)]
19674                    if let Value::Vector2(_) = self {
19675                        // Do nothing, read the value into the object
19676                    } else {
19677                        // Initialize `self` to the right variant
19678                        *self = Value::Vector2(fidl::new_empty!(Vec2, D));
19679                    }
19680                    #[allow(irrefutable_let_patterns)]
19681                    if let Value::Vector2(ref mut val) = self {
19682                        fidl::decode!(Vec2, D, val, decoder, _inner_offset, depth)?;
19683                    } else {
19684                        unreachable!()
19685                    }
19686                }
19687                3 => {
19688                    #[allow(irrefutable_let_patterns)]
19689                    if let Value::Vector3(_) = self {
19690                        // Do nothing, read the value into the object
19691                    } else {
19692                        // Initialize `self` to the right variant
19693                        *self = Value::Vector3(fidl::new_empty!(Vec3, D));
19694                    }
19695                    #[allow(irrefutable_let_patterns)]
19696                    if let Value::Vector3(ref mut val) = self {
19697                        fidl::decode!(Vec3, D, val, decoder, _inner_offset, depth)?;
19698                    } else {
19699                        unreachable!()
19700                    }
19701                }
19702                4 => {
19703                    #[allow(irrefutable_let_patterns)]
19704                    if let Value::Vector4(_) = self {
19705                        // Do nothing, read the value into the object
19706                    } else {
19707                        // Initialize `self` to the right variant
19708                        *self = Value::Vector4(fidl::new_empty!(Vec4, D));
19709                    }
19710                    #[allow(irrefutable_let_patterns)]
19711                    if let Value::Vector4(ref mut val) = self {
19712                        fidl::decode!(Vec4, D, val, decoder, _inner_offset, depth)?;
19713                    } else {
19714                        unreachable!()
19715                    }
19716                }
19717                5 => {
19718                    #[allow(irrefutable_let_patterns)]
19719                    if let Value::Matrix4x4(_) = self {
19720                        // Do nothing, read the value into the object
19721                    } else {
19722                        // Initialize `self` to the right variant
19723                        *self = Value::Matrix4x4(fidl::new_empty!(Mat4, D));
19724                    }
19725                    #[allow(irrefutable_let_patterns)]
19726                    if let Value::Matrix4x4(ref mut val) = self {
19727                        fidl::decode!(Mat4, D, val, decoder, _inner_offset, depth)?;
19728                    } else {
19729                        unreachable!()
19730                    }
19731                }
19732                6 => {
19733                    #[allow(irrefutable_let_patterns)]
19734                    if let Value::ColorRgba(_) = self {
19735                        // Do nothing, read the value into the object
19736                    } else {
19737                        // Initialize `self` to the right variant
19738                        *self = Value::ColorRgba(fidl::new_empty!(ColorRgba, D));
19739                    }
19740                    #[allow(irrefutable_let_patterns)]
19741                    if let Value::ColorRgba(ref mut val) = self {
19742                        fidl::decode!(ColorRgba, D, val, decoder, _inner_offset, depth)?;
19743                    } else {
19744                        unreachable!()
19745                    }
19746                }
19747                7 => {
19748                    #[allow(irrefutable_let_patterns)]
19749                    if let Value::ColorRgb(_) = self {
19750                        // Do nothing, read the value into the object
19751                    } else {
19752                        // Initialize `self` to the right variant
19753                        *self = Value::ColorRgb(fidl::new_empty!(ColorRgb, D));
19754                    }
19755                    #[allow(irrefutable_let_patterns)]
19756                    if let Value::ColorRgb(ref mut val) = self {
19757                        fidl::decode!(ColorRgb, D, val, decoder, _inner_offset, depth)?;
19758                    } else {
19759                        unreachable!()
19760                    }
19761                }
19762                8 => {
19763                    #[allow(irrefutable_let_patterns)]
19764                    if let Value::Degrees(_) = self {
19765                        // Do nothing, read the value into the object
19766                    } else {
19767                        // Initialize `self` to the right variant
19768                        *self = Value::Degrees(fidl::new_empty!(f32, D));
19769                    }
19770                    #[allow(irrefutable_let_patterns)]
19771                    if let Value::Degrees(ref mut val) = self {
19772                        fidl::decode!(f32, D, val, decoder, _inner_offset, depth)?;
19773                    } else {
19774                        unreachable!()
19775                    }
19776                }
19777                9 => {
19778                    #[allow(irrefutable_let_patterns)]
19779                    if let Value::Quaternion(_) = self {
19780                        // Do nothing, read the value into the object
19781                    } else {
19782                        // Initialize `self` to the right variant
19783                        *self = Value::Quaternion(fidl::new_empty!(Quaternion, D));
19784                    }
19785                    #[allow(irrefutable_let_patterns)]
19786                    if let Value::Quaternion(ref mut val) = self {
19787                        fidl::decode!(Quaternion, D, val, decoder, _inner_offset, depth)?;
19788                    } else {
19789                        unreachable!()
19790                    }
19791                }
19792                10 => {
19793                    #[allow(irrefutable_let_patterns)]
19794                    if let Value::Transform(_) = self {
19795                        // Do nothing, read the value into the object
19796                    } else {
19797                        // Initialize `self` to the right variant
19798                        *self = Value::Transform(fidl::new_empty!(FactoredTransform, D));
19799                    }
19800                    #[allow(irrefutable_let_patterns)]
19801                    if let Value::Transform(ref mut val) = self {
19802                        fidl::decode!(FactoredTransform, D, val, decoder, _inner_offset, depth)?;
19803                    } else {
19804                        unreachable!()
19805                    }
19806                }
19807                11 => {
19808                    #[allow(irrefutable_let_patterns)]
19809                    if let Value::VariableId(_) = self {
19810                        // Do nothing, read the value into the object
19811                    } else {
19812                        // Initialize `self` to the right variant
19813                        *self = Value::VariableId(fidl::new_empty!(u32, D));
19814                    }
19815                    #[allow(irrefutable_let_patterns)]
19816                    if let Value::VariableId(ref mut val) = self {
19817                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
19818                    } else {
19819                        unreachable!()
19820                    }
19821                }
19822                ordinal => panic!("unexpected ordinal {:?}", ordinal),
19823            }
19824            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
19825                return Err(fidl::Error::InvalidNumBytesInEnvelope);
19826            }
19827            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
19828                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
19829            }
19830            Ok(())
19831        }
19832    }
19833}