fidl_fuchsia_ui_gfx__common/
fidl_fuchsia_ui_gfx__common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11/// Maximum length for a resource label.
12pub const LABEL_MAX_LENGTH: u32 = 32;
13
14/// Reports metrics information.
15/// This event type is only reported for node resources.
16pub const METRICS_EVENT_MASK: u32 = 1;
17
18pub const SIZE_CHANGE_HINT_EVENT_MASK: u32 = 2;
19
20/// Describes how nodes interact with hit testings.
21#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
22#[repr(u32)]
23pub enum HitTestBehavior {
24    /// Apply hit testing to the node's content, its parts, and its children.
25    KDefault = 0,
26    /// Suppress hit testing of the node and everything it contains.
27    KSuppress = 1,
28}
29
30impl HitTestBehavior {
31    #[inline]
32    pub fn from_primitive(prim: u32) -> Option<Self> {
33        match prim {
34            0 => Some(Self::KDefault),
35            1 => Some(Self::KSuppress),
36            _ => None,
37        }
38    }
39
40    #[inline]
41    pub const fn into_primitive(self) -> u32 {
42        self as u32
43    }
44}
45
46/// Describes an exported resource that is to be imported by an
47/// ImportResourceCmd.
48///
49/// NOTE: Currently just an enum of importable resource types, but may later be
50/// expanded to express concepts like "meshes with a particular vertex format".
51#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
52#[repr(u32)]
53pub enum ImportSpec {
54    Node = 0,
55}
56
57impl ImportSpec {
58    #[inline]
59    pub fn from_primitive(prim: u32) -> Option<Self> {
60        match prim {
61            0 => Some(Self::Node),
62            _ => None,
63        }
64    }
65
66    #[inline]
67    pub const fn into_primitive(self) -> u32 {
68        self as u32
69    }
70}
71
72/// Set a mesh's indices and vertices.
73///
74/// `mesh_id` refs the Mesh to be updated.
75/// `index_buffer_id` refs a Buffer that contains the mesh indices.
76/// `index_format` defines how the index buffer data is to be interpreted.
77/// `index_offset` number of bytes from the start of the index Buffer.
78/// `index_count` number of indices.
79/// `vertex_buffer_id` refs a Buffer that contains the mesh vertices.
80/// `vertex_format` defines how the vertex buffer data is to be interpreted.
81/// `vertex_offset` number of bytes from the start of the vertex Buffer.
82/// `vertex_count` number of vertices.
83/// `bounding_box` must contain all vertices within the specified range.
84///
85/// The MeshVertexFormat defines which per-vertex attributes are provided by the
86/// mesh, and the size of each attribute (and therefore the size of each vertex).
87/// The attributes are ordered within the vertex in the same order that they
88/// appear within the MeshVertexFormat struct.  For example, if the values are
89/// kVector3, kNone and kVector2, then:
90///   - each vertex has a position and UV-coordinates, but no surface normal.
91///   - the 3D position occupies bytes 0-11 (3 dimensions * 4 bytes per float32).
92///   - the UV coords occupy bytes 12-19, since no surface normal is provided.
93#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
94#[repr(u32)]
95pub enum MeshIndexFormat {
96    KUint16 = 1,
97    KUint32 = 2,
98}
99
100impl MeshIndexFormat {
101    #[inline]
102    pub fn from_primitive(prim: u32) -> Option<Self> {
103        match prim {
104            1 => Some(Self::KUint16),
105            2 => Some(Self::KUint32),
106            _ => None,
107        }
108    }
109
110    #[inline]
111    pub const fn into_primitive(self) -> u32 {
112        self as u32
113    }
114}
115
116#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
117#[repr(u32)]
118pub enum RenderFrequency {
119    WhenRequested = 0,
120    Continuously = 1,
121}
122
123impl RenderFrequency {
124    #[inline]
125    pub fn from_primitive(prim: u32) -> Option<Self> {
126        match prim {
127            0 => Some(Self::WhenRequested),
128            1 => Some(Self::Continuously),
129            _ => None,
130        }
131    }
132
133    #[inline]
134    pub const fn into_primitive(self) -> u32 {
135        self as u32
136    }
137}
138
139/// Represents the shadow algorithm that the `Renderer` should use when lighting
140/// the scene.
141#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
142#[repr(u32)]
143pub enum ShadowTechnique {
144    /// No shadows.
145    Unshadowed = 0,
146    /// Default.  Screen-space, depth-buffer based shadows; SSDO-ish.
147    ScreenSpace = 1,
148    /// Basic shadow map.
149    ShadowMap = 2,
150    /// Moment shadow map (see http:///momentsingraphics.de).
151    MomentShadowMap = 3,
152    /// Stencil shadow volume.
153    StencilShadowVolume = 4,
154}
155
156impl ShadowTechnique {
157    #[inline]
158    pub fn from_primitive(prim: u32) -> Option<Self> {
159        match prim {
160            0 => Some(Self::Unshadowed),
161            1 => Some(Self::ScreenSpace),
162            2 => Some(Self::ShadowMap),
163            3 => Some(Self::MomentShadowMap),
164            4 => Some(Self::StencilShadowVolume),
165            _ => None,
166        }
167    }
168
169    #[inline]
170    pub const fn into_primitive(self) -> u32 {
171        self as u32
172    }
173}
174
175#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
176#[repr(u32)]
177pub enum ValueType {
178    KNone = 0,
179    KVector1 = 1,
180    KVector2 = 2,
181    KVector3 = 3,
182    KVector4 = 4,
183    KMatrix4 = 5,
184    KColorRgb = 6,
185    KColorRgba = 7,
186    KQuaternion = 8,
187    KFactoredTransform = 9,
188}
189
190impl ValueType {
191    #[inline]
192    pub fn from_primitive(prim: u32) -> Option<Self> {
193        match prim {
194            0 => Some(Self::KNone),
195            1 => Some(Self::KVector1),
196            2 => Some(Self::KVector2),
197            3 => Some(Self::KVector3),
198            4 => Some(Self::KVector4),
199            5 => Some(Self::KMatrix4),
200            6 => Some(Self::KColorRgb),
201            7 => Some(Self::KColorRgba),
202            8 => Some(Self::KQuaternion),
203            9 => Some(Self::KFactoredTransform),
204            _ => None,
205        }
206    }
207
208    #[inline]
209    pub const fn into_primitive(self) -> u32 {
210        self as u32
211    }
212}
213
214/// Add a node as a child to another node.
215///
216/// Constraints:
217/// - `id` refs a Node with the has_children characteristic.
218/// - `child_id` refs any Node.
219///
220/// Discussion:
221/// The child node is first removed from its existing parent, as if DetachCmd
222/// was applied first.
223#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
224#[repr(C)]
225pub struct AddChildCmd {
226    pub node_id: u32,
227    pub child_id: u32,
228}
229
230impl fidl::Persistable for AddChildCmd {}
231
232/// Add a layer to a layer stack.
233/// Constraints:
234/// - `layer_stack_id` refs a `LayerStack`.
235/// - `layer_id` refs a `Layer`.
236/// - The layer must not already belong to a different stack; it must first be
237///   detached.
238#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
239#[repr(C)]
240pub struct AddLayerCmd {
241    pub layer_stack_id: u32,
242    pub layer_id: u32,
243}
244
245impl fidl::Persistable for AddLayerCmd {}
246
247/// Adds the light specified by `light_id` specified by `light_id` to the scene
248/// identified by `scene_id`.
249#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
250#[repr(C)]
251pub struct AddLightCmd {
252    pub scene_id: u32,
253    pub light_id: u32,
254}
255
256impl fidl::Persistable for AddLightCmd {}
257
258/// Add a node as a part of another node.  The implications of being a part
259/// rather than a child differ based on the type of the part.  However, one
260/// implication is constant: removing all of a node's children (e.g. via
261/// DetachChildrenCmd) does not affect its parts.  This is similar to the
262/// "shadow DOM" in a web browser: the controls of a <video> element are
263/// implemented as using the shadow DOM, and do no show up amongst the children
264/// of that element.
265///
266/// Constraints:
267/// - `id` refs a Node with the has_parts characteristic.
268/// - `part_id` refs any Node.
269///
270/// Discussion:
271/// The part node is first removed from its existing parent, as if DetachCmd
272/// was applied first.
273#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
274#[repr(C)]
275pub struct AddPartCmd {
276    pub node_id: u32,
277    pub part_id: u32,
278}
279
280impl fidl::Persistable for AddPartCmd {}
281
282/// An AmbientLight is a Light that is is assumed to be everywhere in the scene,
283/// in all directions.
284///
285/// Supported commands:
286/// - SetLightColor
287#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
288#[repr(C)]
289pub struct AmbientLightArgs {
290    pub dummy: u32,
291}
292
293impl fidl::Persistable for AmbientLightArgs {}
294
295#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
296pub struct BindMeshBuffersCmd {
297    pub mesh_id: u32,
298    pub index_buffer_id: u32,
299    pub index_format: MeshIndexFormat,
300    pub index_offset: u64,
301    pub index_count: u32,
302    pub vertex_buffer_id: u32,
303    pub vertex_format: MeshVertexFormat,
304    pub vertex_offset: u64,
305    pub vertex_count: u32,
306    pub bounding_box: BoundingBox,
307}
308
309impl fidl::Persistable for BindMeshBuffersCmd {}
310
311/// Represents an axis-aligned bounding box.
312///
313/// If any of the dimensions has a negative extent (e.g. max.x < min.x) then the
314/// bounding box is treated as empty. It is valid for a client to define an
315/// empty bounding box.
316///
317/// An "empty bounding box" is one that does not admit a point inhabitant.
318/// Note that a zero-volume, zero-area bounding box (e.g., a point like
319/// (0,0,0)-(0,0,0), or a line like (0,0,0)-(1,0,0)) is thus not empty.
320#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
321pub struct BoundingBox {
322    pub min: Vec3,
323    pub max: Vec3,
324}
325
326impl fidl::Persistable for BoundingBox {}
327
328/// A buffer mapped to a range of `Memory`.
329#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
330#[repr(C)]
331pub struct BufferArgs {
332    pub memory_id: u32,
333    pub memory_offset: u32,
334    pub num_bytes: u32,
335}
336
337impl fidl::Persistable for BufferArgs {}
338
339/// A Camera is used to render a Scene from a particular viewpoint.  This is
340/// achieved by setting a Renderer to use the camera.
341///
342/// The following commands may be applied to a Camera:
343/// - SetCameraTransform
344/// - SetCameraProjection
345/// - SetCameraPoseBuffer
346#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
347#[repr(C)]
348pub struct CameraArgs {
349    /// The scene that the camera is viewing.
350    pub scene_id: u32,
351}
352
353impl fidl::Persistable for CameraArgs {}
354
355#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
356pub struct CircleArgs {
357    pub radius: Value,
358}
359
360impl fidl::Persistable for CircleArgs {}
361
362/// Characteristics:
363/// - has_parent
364/// - is_clip
365/// - has_parts
366#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
367#[repr(C)]
368pub struct ClipNodeArgs {
369    pub unused: u32,
370}
371
372impl fidl::Persistable for ClipNodeArgs {}
373
374#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
375pub struct ColorRgb {
376    pub red: f32,
377    pub green: f32,
378    pub blue: f32,
379}
380
381impl fidl::Persistable for ColorRgb {}
382
383/// A value that is specified explicitly by `value` if `variable_id` is zero,
384/// or is the value produced by the resource identified by `variable_id`, e.g.
385/// an animation or expression.  In the latter case, the value produced by the
386/// resource must be a ColorRgb, and `value` is ignored.
387#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
388pub struct ColorRgbValue {
389    pub value: ColorRgb,
390    pub variable_id: u32,
391}
392
393impl fidl::Persistable for ColorRgbValue {}
394
395/// sRGB color space and nonlinear transfer function.
396#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
397#[repr(C)]
398pub struct ColorRgba {
399    pub red: u8,
400    pub green: u8,
401    pub blue: u8,
402    pub alpha: u8,
403}
404
405impl fidl::Persistable for ColorRgba {}
406
407/// A value that is specified explicitly by `value` if `variable_id` is zero,
408/// or is the value produced by the resource identified by `variable_id`, e.g.
409/// an animation or expression.  In the latter case, the value produced by the
410/// resource must be a ColorRgba, and `value` is ignored.
411#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
412#[repr(C)]
413pub struct ColorRgbaValue {
414    pub value: ColorRgba,
415    pub variable_id: u32,
416}
417
418impl fidl::Persistable for ColorRgbaValue {}
419
420/// A Compositor draws its `LayerStack` into a framebuffer provided by its
421/// attached `Display`, if any.  If no display is attached, nothing is rendered.
422#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
423#[repr(C)]
424pub struct CompositorArgs {
425    pub dummy: u32,
426}
427
428impl fidl::Persistable for CompositorArgs {}
429
430/// Detaches all of a node's children (but not its parts).
431#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
432#[repr(C)]
433pub struct DetachChildrenCmd {
434    pub node_id: u32,
435}
436
437impl fidl::Persistable for DetachChildrenCmd {}
438
439/// Detaches a parentable object from its parent (e.g. a node from a parent node,
440/// or a layer from a layer stack).  It is illegal to apply this command to a
441/// non-parentable object.  No-op if the target object currently has no parent.
442///
443/// Constraints:
444/// - `id` refs a parentable object
445///
446/// Discussion:
447/// For nodes, this command will detach a node from its parent, regardless of
448/// whether it is a part or a child of its parent.
449#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
450#[repr(C)]
451pub struct DetachCmd {
452    pub id: u32,
453}
454
455impl fidl::Persistable for DetachCmd {}
456
457/// Detach the light specified by `light_id` from the scene that it is attached
458/// to, if any.
459#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
460#[repr(C)]
461pub struct DetachLightCmd {
462    pub light_id: u32,
463}
464
465impl fidl::Persistable for DetachLightCmd {}
466
467/// Detach all lights from the scene specified by `scene_id`.
468#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
469#[repr(C)]
470pub struct DetachLightsCmd {
471    pub scene_id: u32,
472}
473
474impl fidl::Persistable for DetachLightsCmd {}
475
476/// A DirectionalLight is a Light that is emitted from a point at infinity.
477///
478/// Although the light is directional, the light has some amount of angular
479/// dispersion (i.e., the light is not fully columnated). For simplicity, we
480/// assume the dispersion of the light source is symmetric about the light's
481/// primary direction.
482///
483/// Supported commands:
484/// - SetLightColor
485/// - SetLightDirection
486#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
487#[repr(C)]
488pub struct DirectionalLightArgs {
489    pub dummy: u32,
490}
491
492impl fidl::Persistable for DirectionalLightArgs {}
493
494/// A DisplayCompositor draws its attached `LayerStack` into an image that is
495/// presented on a display.
496#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
497#[repr(C)]
498pub struct DisplayCompositorArgs {
499    pub dummy: u32,
500}
501
502impl fidl::Persistable for DisplayCompositorArgs {}
503
504/// Provides information about a display.
505#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
506#[repr(C)]
507pub struct DisplayInfo {
508    /// The size of the display, in physical pixels.
509    pub width_in_px: u32,
510    pub height_in_px: u32,
511}
512
513impl fidl::Persistable for DisplayInfo {}
514
515/// Characteristics:
516/// - has_transform
517/// - has_children
518/// - has_parent
519/// - has_parts
520/// - has_clip
521#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
522#[repr(C)]
523pub struct EntityNodeArgs {
524    pub unused: u32,
525}
526
527impl fidl::Persistable for EntityNodeArgs {}
528
529#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
530pub struct FactoredTransform {
531    pub translation: Vec3,
532    pub scale: Vec3,
533    /// Point around which rotation and scaling occur.
534    pub anchor: Vec3,
535    pub rotation: Quaternion,
536}
537
538impl fidl::Persistable for FactoredTransform {}
539
540/// A value that is specified explicitly by `value` if `variable_id` is zero,
541/// or is the value produced by the resource identified by `variable_id`, e.g.
542/// an animation or expression.  In the latter case, the value produced by the
543/// resource must be a float32, and `value` is ignored.
544#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
545pub struct FloatValue {
546    pub value: f32,
547    pub variable_id: u32,
548}
549
550impl fidl::Persistable for FloatValue {}
551
552/// An image mapped to a range of a `Memory` resource.
553#[derive(Clone, Debug, PartialEq)]
554pub struct ImageArgs {
555    pub info: fidl_fuchsia_images__common::ImageInfo,
556    pub memory_id: u32,
557    pub memory_offset: u32,
558}
559
560impl fidl::Persistable for ImageArgs {}
561
562/// An image mapped to a range of a `Memory` resource.
563#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
564#[repr(C)]
565pub struct ImageArgs2 {
566    pub width: u32,
567    pub height: u32,
568    /// The id of a `BufferCollection`. Before creating this resource, the
569    /// buffer collection should be registered on the same `Session` with
570    /// `RegisterBufferCollection` and it should have its contraints set.
571    /// Once the buffers are allocated successfully (e.g. after calling
572    /// `WaitForBuffersAllocated`), the collection's id can be used to create
573    /// the image resource.
574    pub buffer_collection_id: u32,
575    /// The index of the VMO from the `BufferCollection` that backs this image.
576    pub buffer_collection_index: u32,
577}
578
579impl fidl::Persistable for ImageArgs2 {}
580
581/// Delivered when the imported resource with the given ID is no longer bound to
582/// its host resource, or if the imported resource can not be bound because
583/// the host resource is not available.
584#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
585#[repr(C)]
586pub struct ImportUnboundEvent {
587    pub resource_id: u32,
588}
589
590impl fidl::Persistable for ImportUnboundEvent {}
591
592/// A Layer is a 2-dimensional image that is drawn by a Compositor.  The
593/// contents of each Layer in a Layerstack are independent of each other.
594/// A layer is not drawn unless it has a camera, texture, or color.
595///
596/// Supported commands:
597/// - Detach
598/// - SetCamera
599/// - SetColor
600/// - SetTexture
601/// - SetSize (depth must be zero)
602/// - SetSize
603/// - SetTranslation (z component determines the relative Z-ordering of layers)
604/// - SetRotation (must rotate around Z-axis)
605/// - SetScale
606#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
607#[repr(C)]
608pub struct LayerArgs {
609    pub dummy: u32,
610}
611
612impl fidl::Persistable for LayerArgs {}
613
614/// A LayerStack is a stack of layers that are attached to a Compositor, which
615/// draws them in order of increasing Z-order (or rather, presents the illusion
616/// of drawing them in that order: it may apply any optimizations that don't
617/// affect the output).
618///
619/// Supported commands:
620/// - AddLayer
621#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
622#[repr(C)]
623pub struct LayerStackArgs {
624    pub dummy: u32,
625}
626
627impl fidl::Persistable for LayerStackArgs {}
628
629/// Simple texture-mapped material.
630///
631/// Supported commands:
632/// - SetTextureCmd: sets the texture, or it can be left as zero (no texture).
633///   The texture can be an Image or ImagePipe2.
634/// - SetColorCmd: sets the color.
635#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
636#[repr(C)]
637pub struct MaterialArgs {
638    pub dummy: u32,
639}
640
641impl fidl::Persistable for MaterialArgs {}
642
643/// A value that is specified explicitly by `value` if `variable_id` is zero,
644/// or is the value produced by the resource identified by `variable_id`, e.g.
645/// an animation or expression.  In the latter case, the value produced by the
646/// resource must be a vec4, and `value` is ignored.
647#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
648pub struct Matrix4Value {
649    pub value: Mat4,
650    pub variable_id: u32,
651}
652
653impl fidl::Persistable for Matrix4Value {}
654
655/// A Mesh cannot be rendered until it has been bound to vertex/index buffers;
656/// see BindMeshBuffersCmd.
657#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
658pub struct MeshArgs;
659
660impl fidl::Persistable for MeshArgs {}
661
662#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
663pub struct MeshVertexFormat {
664    /// kVector2 or kVector3.
665    pub position_type: ValueType,
666    /// kVector2 or kVector3 (must match position_type), or kNone.
667    pub normal_type: ValueType,
668    /// kVector2 or kNone.
669    pub tex_coord_type: ValueType,
670}
671
672impl fidl::Persistable for MeshVertexFormat {}
673
674/// Rendering target metrics associated with a node.
675/// See also `MetricsEvent`.
676#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
677pub struct Metrics {
678    /// The ratio between the size of one logical pixel within the node's local
679    /// coordinate system and the size of one physical pixel of the rendering
680    /// target.
681    ///
682    /// This scale factors change in relation to the resolution of the rendering
683    /// target and the scale transformations applied by containing nodes.
684    /// They are always strictly positive and non-zero.
685    ///
686    /// For example, suppose the rendering target is a high resolution display
687    /// with a device pixel ratio of 2.0 meaning that each logical pixel
688    /// within the model corresponds to two physical pixels of the display.
689    /// Assuming no scale transformations affect the node, then its metrics event
690    /// will report a scale factor of 2.0.
691    ///
692    /// Building on this example, if instead the node's parent applies a
693    /// scale transformation of 0.25 to the node, then the node's metrics event
694    /// will report a scale factor of 0.5 indicating that the node should render
695    /// its content at a reduced resolution and level of detail since a smaller
696    /// area of physical pixels (half the size in each dimension) will be rendered.
697    pub scale_x: f32,
698    pub scale_y: f32,
699    pub scale_z: f32,
700}
701
702impl fidl::Persistable for Metrics {}
703
704/// Provides rendering target metrics information about the specified node.
705///
706/// This event is delivered when the following conditions are true:
707/// - The node is a descendant of a `Scene`.
708/// - The node has `kMetricsEventMask` set to an enabled state.
709/// - The node's metrics have changed since they were last delivered, or since
710///   `kMetricsEventMask` transitioned from a disabled state to an enabled state.
711///
712/// Subscribe to this event to receive information about the scale factors you
713/// should apply when generating textures for your nodes.
714#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
715pub struct MetricsEvent {
716    pub node_id: u32,
717    pub metrics: Metrics,
718}
719
720impl fidl::Persistable for MetricsEvent {}
721
722/// Characteristics:
723/// - has_transform
724/// - has_parent
725/// - has_children
726/// - has_parts
727/// - has_opacity
728#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
729#[repr(C)]
730pub struct OpacityNodeArgsHack {
731    pub unused: u32,
732}
733
734impl fidl::Persistable for OpacityNodeArgsHack {}
735
736/// Oriented plane described by a normal vector and a distance
737/// from the origin along that vector.
738#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
739pub struct Plane3 {
740    pub dir: Vec3,
741    pub dist: f32,
742}
743
744impl fidl::Persistable for Plane3 {}
745
746/// A PointLight is a Light that emits light in all directions.  By default, the
747/// intensity of the light falls off according to the physically based
748/// "inverse-square law" (see Wikipedia), although it can be adjusted to other
749/// values for artistic effect.
750///
751/// Supported commands:
752/// - SetLightColor
753/// - SetPointLightPosition
754/// - SetPointLightFalloff
755#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
756#[repr(C)]
757pub struct PointLightArgs {
758    pub dummy: u32,
759}
760
761impl fidl::Persistable for PointLightArgs {}
762
763#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
764pub struct Quaternion {
765    pub x: f32,
766    pub y: f32,
767    pub z: f32,
768    pub w: f32,
769}
770
771impl fidl::Persistable for Quaternion {}
772
773/// A value that is specified explicitly by `value` if `variable_id` is zero,
774/// or is the value produced by the resource identified by `variable_id`, e.g.
775/// an animation or expression.  In the latter case, the value produced by the
776/// resource must be a Quaternion, and `value` is ignored.
777#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
778pub struct QuaternionValue {
779    pub value: Quaternion,
780    pub variable_id: u32,
781}
782
783impl fidl::Persistable for QuaternionValue {}
784
785/// Rectangle centered at (0,0).
786#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
787pub struct RectangleArgs {
788    pub width: Value,
789    pub height: Value,
790}
791
792impl fidl::Persistable for RectangleArgs {}
793
794/// Releases the client's reference to the resource; it is then illegal to use
795/// the ID in subsequent Commands.  Other references to the resource may exist,
796/// so releasing the resource does not result in its immediate destruction; it is
797/// only destroyed once the last reference is released.  For example, the
798/// resource may be required to render an in-progress frame, or it may be
799/// referred to by another resource).  However, the ID will be immediately
800/// unregistered, and may be reused to create a new resource.
801#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
802#[repr(C)]
803pub struct ReleaseResourceCmd {
804    /// ID of the resource to be dereferenced.
805    pub id: u32,
806}
807
808impl fidl::Persistable for ReleaseResourceCmd {}
809
810/// Remove all layers from a layer stack.
811/// Constraints
812/// - `layer_stack_id` refs a `LayerStack`.
813#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
814#[repr(C)]
815pub struct RemoveAllLayersCmd {
816    pub layer_stack_id: u32,
817}
818
819impl fidl::Persistable for RemoveAllLayersCmd {}
820
821/// Remove a layer from a layer stack.
822/// Constraints:
823/// - `layer_stack_id` refs a `LayerStack`.
824/// - `layer_id` refs a `Layer`.
825/// - The layer must belong to this stack.
826#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
827#[repr(C)]
828pub struct RemoveLayerCmd {
829    pub layer_stack_id: u32,
830    pub layer_id: u32,
831}
832
833impl fidl::Persistable for RemoveLayerCmd {}
834
835/// A Renderer renders a Scene via a Camera.
836///
837/// Supported commands:
838/// - SetCamera
839/// - SetRendererParam
840#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
841#[repr(C)]
842pub struct RendererArgs {
843    pub dummy: u32,
844}
845
846impl fidl::Persistable for RendererArgs {}
847
848/// RoundedRectangle centered at (0,0).  Legal parameter values must satisfy the
849/// constraint that the flat sides of the rectangle have non-negative length.
850/// In other words, the following constraints must hold:
851///   - top_left_radius + top_right_radius <= width
852///   - bottom_left_radius + bottom_right_radius <= width
853///   - top_left_radius + bottom_left_radius <= height
854///   - top_right_radius + bottom_right_radius <= height
855#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
856pub struct RoundedRectangleArgs {
857    pub width: Value,
858    pub height: Value,
859    pub top_left_radius: Value,
860    pub top_right_radius: Value,
861    pub bottom_right_radius: Value,
862    pub bottom_left_radius: Value,
863}
864
865impl fidl::Persistable for RoundedRectangleArgs {}
866
867/// Adds the light specified by `light_id` specified by `light_id` to the scene
868/// identified by `scene_id`.
869#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
870#[repr(C)]
871pub struct SceneAddAmbientLightCmd {
872    pub scene_id: u32,
873    pub light_id: u32,
874}
875
876impl fidl::Persistable for SceneAddAmbientLightCmd {}
877
878/// Adds the light specified by `light_id` specified by `light_id` to the scene
879/// identified by `scene_id`.
880#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
881#[repr(C)]
882pub struct SceneAddDirectionalLightCmd {
883    pub scene_id: u32,
884    pub light_id: u32,
885}
886
887impl fidl::Persistable for SceneAddDirectionalLightCmd {}
888
889/// Adds the light specified by `light_id` specified by `light_id` to the scene
890/// identified by `scene_id`.
891#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
892#[repr(C)]
893pub struct SceneAddPointLightCmd {
894    pub scene_id: u32,
895    pub light_id: u32,
896}
897
898impl fidl::Persistable for SceneAddPointLightCmd {}
899
900/// A Scene is the root of a scene-graph, and defines the rendering environment
901/// (lighting, etc.) for the tree of nodes beneath it.
902///
903/// Supported commands:
904/// - Add/RemoveLight
905/// - AddChild
906#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
907#[repr(C)]
908pub struct SceneArgs {
909    pub dummy: u32,
910}
911
912impl fidl::Persistable for SceneArgs {}
913
914/// Sends a hint about a pending size change to the given node and all nodes
915/// below. This is generally sent before an animation.
916///
917/// `width_change_factor` and `height_change_factor` is how much bigger or smaller
918/// the item is expected to be in the near future. This one number encapsulate
919/// both changes in scale, as well as changes to layout width and height.
920#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
921pub struct SendSizeChangeHintCmdHack {
922    pub node_id: u32,
923    pub width_change_factor: f32,
924    pub height_change_factor: f32,
925}
926
927impl fidl::Persistable for SendSizeChangeHintCmdHack {}
928
929/// Sets a Resource's (typically a Node's) anchor point.
930///
931/// Constraints:
932/// - `id` refs a Resource with the has_transform characteristic.
933#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
934pub struct SetAnchorCmd {
935    pub id: u32,
936    pub value: Vector3Value,
937}
938
939impl fidl::Persistable for SetAnchorCmd {}
940
941/// Sets a camera's 2D clip-space transform.
942///
943/// Constraints:
944/// - `camera_id` refs a `Camera`.
945/// - `translation` is the desired translation, in Vulkan NDC.
946/// - `scale` is the scale factor to apply on the x/y plane before translation.
947#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
948pub struct SetCameraClipSpaceTransformCmd {
949    pub camera_id: u32,
950    pub translation: Vec2,
951    pub scale: f32,
952}
953
954impl fidl::Persistable for SetCameraClipSpaceTransformCmd {}
955
956/// Sets a renderer's camera.
957///
958/// Constraints:
959/// - `renderer_id` refs a `Renderer`.
960/// - `camera_id` refs a `Camera`, or stops rendering by passing zero.
961/// - `matrix` is a value or variable of type kMatrix4x4.
962#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
963#[repr(C)]
964pub struct SetCameraCmd {
965    pub renderer_id: u32,
966    pub camera_id: u32,
967}
968
969impl fidl::Persistable for SetCameraCmd {}
970
971/// Sets the "pose buffer" for the camera identified by `camera_id`.
972/// This operation can be applied to both Cameras and StereoCameras.
973///
974/// This will override any position and rotation set for the camera and will
975/// make it take its position and rotation from the pose buffer each frame
976/// based on the presentation time for that frame.
977///
978/// A pose buffer represents a ring buffer of poses for a fixed number of time
979/// points in the future. Each entry in the buffer identified by `buffer_id` is
980/// a quaternion and a position layed out as follows:
981///
982/// struct Pose {
983///   // Quaternion
984///   float32 a;
985///   float32 b;
986///   float32 c;
987///   float32 d;
988///
989///   // Position
990///   float32 x;
991///   float32 y;
992///   float32 z;
993///
994///   // Reserved/Padding
995///   byte[4] reserved;
996/// }
997///
998/// The buffer can be thought of as a packed array of `num_entries` Pose structs
999/// and is required to be at least num_entries * sizeof(Pose) bytes.
1000///
1001/// The quaternions and positions are specified in the space of the camera's
1002/// parent node.
1003///
1004/// `base_time` is a base time point expressed in nanoseconds in the
1005/// `CLOCK_MONOTONIC` timebase and `time_interval` is the time in nanoseconds
1006/// between entries in the buffer. `base_time` must be in the past.
1007///
1008/// For a given point in time `t` expressed in nanoseconds in the
1009/// `CLOCK_MONOTONIC` timebase the index of the corresponding pose in
1010/// the pose buffer can be computed as follows:
1011///
1012/// index(t) = ((t - base_time) / time_interval) % num_entries
1013///
1014/// poses[index(t)] is valid for t over the time interval (t - time_interval, t]
1015/// and should be expected to updated continuously without synchronization
1016/// for the duration of that interval. If a single pose value is needed for
1017/// multiple non-atomic operations a value should be latched and stored outside
1018/// the pose buffer.
1019///
1020/// Because the poses are not protected by any synchronization primitives it is
1021/// possible that when a pose is latched it will be only partially updated, and
1022/// the pose being read will contain some components from the pose before it is
1023/// updated and some components from the updated pose. The safety of using these
1024/// "torn" poses relies on two things:
1025///
1026/// 1) Sequential poses written to poses[index(t)] are very similar to each
1027/// other numerically, so that if some components are taken from the first and
1028/// some are taken from another the result is numerically similar to both
1029///
1030/// 2) The space of positions and quaternions is locally flat at the scale of
1031/// changes between sequential updates, which guarantees that two poses which
1032/// are numerically similar also represent semantically similar poses (i.e.
1033/// there are no discontinuities which will cause a small numerical change in
1034/// the position or quaterninon to cause a large change in the encoded pose)
1035/// For positions this is guaranteed because Scenic uses a Euclidean 3-space
1036/// which is globally flat and for quaternions this is guaranteed because
1037/// quaternions encode rotation as points on a unit 4-sphere, and spheres are
1038/// locally flat. For more details on the encoding of rotations in quaterions
1039/// see https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation
1040///
1041/// This commanderation is intended for late latching camera pose to support
1042/// low-latency motion-tracked rendering.
1043#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1044#[repr(C)]
1045pub struct SetCameraPoseBufferCmd {
1046    pub camera_id: u32,
1047    pub buffer_id: u32,
1048    pub num_entries: u32,
1049    pub base_time: i64,
1050    pub time_interval: u64,
1051}
1052
1053impl fidl::Persistable for SetCameraPoseBufferCmd {}
1054
1055/// Sets a camera's projection matrix.
1056/// This operation cannot be applied to a StereoCamera.
1057///
1058/// Constraints:
1059/// - `camera_id` refs a `Camera` that is not a `StereoCamera`.
1060/// - `fovy` is the Y-axis field of view, in radians.
1061///
1062/// NOTE: A default orthographic projection is specified by setting `fovy` to
1063/// zero.  In this case, the camera transform is ignored.
1064#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1065pub struct SetCameraProjectionCmd {
1066    pub camera_id: u32,
1067    pub fovy: FloatValue,
1068}
1069
1070impl fidl::Persistable for SetCameraProjectionCmd {}
1071
1072/// Sets a camera's view matrix.
1073/// This operation can be applied to both Cameras and StereoCameras.
1074///
1075/// Constraints:
1076/// - `camera_id` refs a `Camera`.
1077/// - `eye_position` is the position of the eye.
1078/// - `eye_look_at` is the point is the scene the that eye is pointed at.
1079/// - `eye_up` defines the camera's "up" vector.
1080#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1081pub struct SetCameraTransformCmd {
1082    pub camera_id: u32,
1083    pub eye_position: Vector3Value,
1084    pub eye_look_at: Vector3Value,
1085    pub eye_up: Vector3Value,
1086}
1087
1088impl fidl::Persistable for SetCameraTransformCmd {}
1089
1090/// Sets/clears a node's clip.  DEPRECATED: use SetClipPlanesCmd.
1091///
1092/// Constraints:
1093/// - `node_id` refs a `Node` with the has_clip characteristic.
1094/// - `clip_id` a `Node` with the is_clip characteristic, or nothing.  If the
1095///   referenced node is not rooted, then it will have no effect (since its
1096///   full world-transform cannot be determined).
1097/// - `clip_to_self` If false, children are only clipped to the region specified
1098///   by `clip_id`.  If true, children are additionally clipped to the node's
1099///   shape (as determined by its ShapeNode parts).
1100///
1101/// Discussion:
1102/// If a node has a clip, it will be applied to both the parts and the children
1103/// of the node.  Under some circumstances (TBD), a clip will not be applicable
1104/// to a node; in such cases it will be as though no clip has been specified for
1105/// the node.
1106#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1107pub struct SetClipCmd {
1108    pub node_id: u32,
1109    pub clip_id: u32,
1110    pub clip_to_self: bool,
1111}
1112
1113impl fidl::Persistable for SetClipCmd {}
1114
1115/// Sets the list of clip planes that apply to a Node and all of its children.  Replaces
1116/// the list set by any previous SetClipPlanesCmd.
1117///
1118/// - `node_id` refs a `Node` with the has_clip characteristic.
1119/// - `clip_planes` is the new list of oriented clip planes.
1120#[derive(Clone, Debug, PartialEq, PartialOrd)]
1121pub struct SetClipPlanesCmd {
1122    pub node_id: u32,
1123    pub clip_planes: Vec<Plane3>,
1124}
1125
1126impl fidl::Persistable for SetClipPlanesCmd {}
1127
1128/// Sets a material's color.
1129///
1130/// Constraints:
1131/// - `material_id` refs a `Material`.
1132///
1133/// If a texture is set on the material, then the value sampled from the texture
1134/// is multiplied by the color.
1135#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1136#[repr(C)]
1137pub struct SetColorCmd {
1138    pub material_id: u32,
1139    pub color: ColorRgbaValue,
1140}
1141
1142impl fidl::Persistable for SetColorCmd {}
1143
1144/// Set whether clipping should be disabled for the specified renderer.  For a
1145/// newly-created renderer, clipping will NOT be disabled (i.e. it will be
1146/// enabled).
1147///
1148/// NOTE: this disables visual clipping only; objects are still clipped for the
1149/// purposes of hit-testing.
1150///
1151/// `renderer_id` refs the target renderer.
1152/// `disable_clipping` specifies whether the clipping should be disabled.
1153#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1154pub struct SetDisableClippingCmd {
1155    pub renderer_id: u32,
1156    pub disable_clipping: bool,
1157}
1158
1159impl fidl::Persistable for SetDisableClippingCmd {}
1160
1161/// Set the color conversion applied to the compositor's display.
1162/// The conversion is applied to to each pixel according to the formula:
1163///
1164/// (matrix * (pixel + preoffsets)) + postoffsets
1165///
1166/// where pixel is a column vector consisting of the pixel's 3 components.
1167///
1168/// `matrix` is passed in row-major order. Clients will be responsible
1169/// for passing default values, when needed.
1170/// Default values are not currently supported in fidl.
1171/// Default Values:
1172///   preoffsets = [0 0 0]
1173///   matrix = [1 0 0 0 1 0 0 0 1]
1174///   postoffsets = [0 0 0]
1175#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1176pub struct SetDisplayColorConversionCmdHack {
1177    pub compositor_id: u32,
1178    pub preoffsets: [f32; 3],
1179    pub matrix: [f32; 9],
1180    pub postoffsets: [f32; 3],
1181}
1182
1183impl fidl::Persistable for SetDisplayColorConversionCmdHack {}
1184
1185#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1186#[repr(C)]
1187pub struct SetDisplayMinimumRgbCmdHack {
1188    pub min_value: u8,
1189}
1190
1191impl fidl::Persistable for SetDisplayMinimumRgbCmdHack {}
1192
1193/// Depending on the device, the display might be rotated
1194/// with respect to what the lower level device controller
1195/// considers the physical orientation of pixels. The
1196/// compositors and layers must be in alignment with the
1197/// underlying physical orientation which means that for
1198/// certain operations like screenshotting, they cannot
1199/// provide results with the accurate orientation unless
1200/// they have information about how the higher-level display
1201/// is orienting the screen. The only legal values for the
1202/// rotation are 0, 90, 180, and 270, which are each
1203///  applied counterclockwise.
1204#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1205#[repr(C)]
1206pub struct SetDisplayRotationCmdHack {
1207    pub compositor_id: u32,
1208    pub rotation_degrees: u32,
1209}
1210
1211impl fidl::Persistable for SetDisplayRotationCmdHack {}
1212
1213#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1214pub struct SetEnableDebugViewBoundsCmd {
1215    pub view_id: u32,
1216    pub enable: bool,
1217}
1218
1219impl fidl::Persistable for SetEnableDebugViewBoundsCmd {}
1220
1221/// Sets which events a resource should deliver to the session listener.
1222/// This command replaces any prior event mask for the resource.
1223///
1224/// The initial event mask for a resource is zero, meaning no events are
1225/// reported.
1226///
1227/// Constraints:
1228/// - `resource_id` is a valid resource id
1229/// - `event_mask` is zero or a combination of `k*EventMask` bits OR'ed together.
1230#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1231#[repr(C)]
1232pub struct SetEventMaskCmd {
1233    pub id: u32,
1234    pub event_mask: u32,
1235}
1236
1237impl fidl::Persistable for SetEventMaskCmd {}
1238
1239/// Sets a node's hit test behavior.
1240///
1241/// Discussion:
1242/// By default, hit testing is performed on the node's content, its parts,
1243/// and its children.
1244#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1245pub struct SetHitTestBehaviorCmd {
1246    pub node_id: u32,
1247    pub hit_test_behavior: HitTestBehavior,
1248}
1249
1250impl fidl::Persistable for SetHitTestBehaviorCmd {}
1251
1252#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1253pub struct SetImportFocusCmdDeprecated;
1254
1255impl fidl::Persistable for SetImportFocusCmdDeprecated {}
1256
1257/// Sets/clears a label to help developers identify the purpose of the resource
1258/// when using diagnostic tools.
1259///
1260/// The label serves no functional purpose in the scene graph.  It exists only
1261/// to help developers understand its structure.  The scene manager may truncate
1262/// or discard labels at will.
1263///
1264/// Constraints:
1265/// - The label's maximum length is `kLabelMaxLength` characters.
1266/// - Setting the label to an empty string clears it.
1267#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1268pub struct SetLabelCmd {
1269    pub id: u32,
1270    pub label: String,
1271}
1272
1273impl fidl::Persistable for SetLabelCmd {}
1274
1275/// Set a compositor's layer stack, replacing the current stack (if any).
1276/// Constraints:
1277/// - `compositor_id` refs a `DisplayCompositor`.
1278/// - `layer_stack_id` refs a `LayerStack`.
1279#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1280#[repr(C)]
1281pub struct SetLayerStackCmd {
1282    pub compositor_id: u32,
1283    pub layer_stack_id: u32,
1284}
1285
1286impl fidl::Persistable for SetLayerStackCmd {}
1287
1288/// Sets the color of the Light identified by `light_id`.
1289#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1290pub struct SetLightColorCmd {
1291    pub light_id: u32,
1292    pub color: ColorRgbValue,
1293}
1294
1295impl fidl::Persistable for SetLightColorCmd {}
1296
1297/// Sets the direction of the DirectionalLight identified by `light_id`.
1298#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1299pub struct SetLightDirectionCmd {
1300    pub light_id: u32,
1301    pub direction: Vector3Value,
1302}
1303
1304impl fidl::Persistable for SetLightDirectionCmd {}
1305
1306/// Sets/clears a node's material.
1307///
1308/// Constraints:
1309/// - `node_id` refs a `Node` with the has_material characteristic.
1310/// - `material_id` refs a `Material`, or nothing.
1311/// - if this command causes the target to have both a `Shape` and a `Material`,
1312///   then these must be compatible with each other (see README.md regarding
1313///   "Shape/Material Compatibility").
1314///
1315/// Discussion:
1316/// In order to be painted, a node requires both a `Shape` and a `Material`.
1317/// Without a material, a node can still participate in hit-testing and clipping.
1318/// Without a shape, a node cannot do any of the above.
1319#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1320#[repr(C)]
1321pub struct SetMaterialCmd {
1322    pub node_id: u32,
1323    pub material_id: u32,
1324}
1325
1326impl fidl::Persistable for SetMaterialCmd {}
1327
1328/// Sets a node's opacity.
1329///
1330/// Constraints:
1331/// - `node_id` refs a `Node` with the has_opacity characteristic.
1332/// - `opacity` is in the range [0, 1].
1333#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1334pub struct SetOpacityCmd {
1335    pub node_id: u32,
1336    pub opacity: f32,
1337}
1338
1339impl fidl::Persistable for SetOpacityCmd {}
1340
1341/// Sets the falloff factor of the PointLight identified by `light_id`.
1342/// A value of 1.0 corresponds to the physically-based "inverse-square law"
1343/// (see Wikipedia).  Other values can be used for artistic effect, e.g. a
1344/// value of 0.0 means that the radiance of a surface is not dependant on
1345/// its distance from the light.
1346#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1347pub struct SetPointLightFalloffCmd {
1348    pub light_id: u32,
1349    pub falloff: FloatValue,
1350}
1351
1352impl fidl::Persistable for SetPointLightFalloffCmd {}
1353
1354/// Sets the position of the PointLight identified by `light_id`.
1355#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1356pub struct SetPointLightPositionCmd {
1357    pub light_id: u32,
1358    pub position: Vector3Value,
1359}
1360
1361impl fidl::Persistable for SetPointLightPositionCmd {}
1362
1363/// Set a layer's renderer, replacing the current renderer (if any).
1364/// Constraints:
1365/// - `layer_id` refs a `Layer`.
1366/// - `renderer_id` refs a `Renderer`.
1367#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1368#[repr(C)]
1369pub struct SetRendererCmd {
1370    pub layer_id: u32,
1371    pub renderer_id: u32,
1372}
1373
1374impl fidl::Persistable for SetRendererCmd {}
1375
1376/// Sets a parameter that affects how a renderer renders a scene.
1377///
1378/// `renderer_id` refs the Renderer that is being modified.
1379/// `param` describes the parameter that should be set, and to what.
1380#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1381pub struct SetRendererParamCmd {
1382    pub renderer_id: u32,
1383    pub param: RendererParam,
1384}
1385
1386impl fidl::Persistable for SetRendererParamCmd {}
1387
1388/// Sets a Resource's (typically a Node's) rotation.
1389///
1390/// Constraints:
1391/// - `id` refs a Resource with the has_transform characteristic.
1392///
1393/// Discussion:
1394/// Quaternions represent any rotation in a 3D coordinate system. Consisting of
1395/// [a,b,c,d], [a] represents the amount of rotation that should be applied and
1396/// [b,c,d] represents the vector around which the rotation is applied. This
1397/// conforms to the semantics of glm::quat.
1398#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1399pub struct SetRotationCmd {
1400    pub id: u32,
1401    pub value: QuaternionValue,
1402}
1403
1404impl fidl::Persistable for SetRotationCmd {}
1405
1406/// Sets a Resource's (typically a Node's) scale.
1407///
1408/// Constraints:
1409/// - `id` refs a Resource with the has_transform characteristic.
1410#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1411pub struct SetScaleCmd {
1412    pub id: u32,
1413    pub value: Vector3Value,
1414}
1415
1416impl fidl::Persistable for SetScaleCmd {}
1417
1418/// Sets a node's semantic visibility.
1419///
1420/// Discussion:
1421/// By default, all nodes are semantically visible. Semantically invisible nodes and their children
1422/// are ignored by hit tests performed for accessibility.
1423#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1424pub struct SetSemanticVisibilityCmd {
1425    pub node_id: u32,
1426    pub visible: bool,
1427}
1428
1429impl fidl::Persistable for SetSemanticVisibilityCmd {}
1430
1431/// Sets/clears a node's shape.
1432///
1433/// Constraints:
1434/// - `node_id` refs a `Node` with the has_shape characteristic.
1435/// - `shape_id` refs a `Shape`, or nothing.
1436/// - if this command causes the target to have both a `Shape` and a `Material`,
1437///   then these must be compatible with each other (see README.md regarding
1438///   "Shape/Material Compatibility").
1439///
1440/// Discussion:
1441/// In order to be painted, a node requires both a `Shape` and a `Material`.
1442/// Without a material, a node can still participate in hit-testing and clipping.
1443/// Without a shape, a node cannot do any of the above.
1444#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1445#[repr(C)]
1446pub struct SetShapeCmd {
1447    pub node_id: u32,
1448    pub shape_id: u32,
1449}
1450
1451impl fidl::Persistable for SetShapeCmd {}
1452
1453/// Sets an object's size.
1454///
1455/// Constraints:
1456/// - `id` refs a resizeable object.
1457/// - some objects that support this command may have additional constraints
1458///   (e.g. in some cases `depth` must be zero).
1459#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1460pub struct SetSizeCmd {
1461    pub id: u32,
1462    pub value: Vector2Value,
1463}
1464
1465impl fidl::Persistable for SetSizeCmd {}
1466
1467/// Sets a StereoCamera's projection matrices.
1468/// This operation can only be applied to a StereoCamera.
1469///
1470/// Constraints:
1471/// - `camera_id` refs a `StereoCamera`.
1472/// - `left_projection` is the projection matrix for the left eye.
1473/// - `right_projection` is the projection matrix for the right eye.
1474///
1475/// These projection matrices may also contain a transform in camera space for
1476/// their eye if needed.
1477#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1478pub struct SetStereoCameraProjectionCmd {
1479    pub camera_id: u32,
1480    pub left_projection: Matrix4Value,
1481    pub right_projection: Matrix4Value,
1482}
1483
1484impl fidl::Persistable for SetStereoCameraProjectionCmd {}
1485
1486/// Sets/clears a node's tag value.
1487///
1488/// A session can apply a tag value to any node to which it has access, including
1489/// imported nodes.  These tags are private to the session and cannot be read
1490/// or modified by other sessions.  When multiple sessions import the same node,
1491/// each session will only observe its own tag values.
1492///
1493/// Hit test results for a session only include nodes which the session has
1494/// tagged with a non-zero value.  Therefore a session can use tag values to
1495/// associate nodes with their functional purpose when picked.
1496///
1497/// Constraints:
1498/// - `node_id` refs a `Node`.
1499/// - `tag_value` is the tag value to assign, or 0 to remove the tag.
1500#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1501#[repr(C)]
1502pub struct SetTagCmd {
1503    pub node_id: u32,
1504    pub tag_value: u32,
1505}
1506
1507impl fidl::Persistable for SetTagCmd {}
1508
1509/// Sets/clears a material's texture.
1510///
1511/// Constraints:
1512/// - `material_id` refs a `Material`.
1513/// - `texture_id` refs a `Image`, `ImagePipe2`, or nothing.
1514///
1515/// If no texture is provided (i.e. `texture_id` is zero), a solid color is used.
1516/// If a texture is provided, then the value sampled from the texture is
1517/// multiplied by the color.
1518#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1519#[repr(C)]
1520pub struct SetTextureCmd {
1521    pub material_id: u32,
1522    pub texture_id: u32,
1523}
1524
1525impl fidl::Persistable for SetTextureCmd {}
1526
1527/// Sets a Resource's (typically a Node's) translation.
1528///
1529/// Constraints:
1530/// - `id` refs a Resource with the has_transform characteristic.
1531#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1532pub struct SetTranslationCmd {
1533    pub id: u32,
1534    pub value: Vector3Value,
1535}
1536
1537impl fidl::Persistable for SetTranslationCmd {}
1538
1539#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1540pub struct SetViewHolderBoundsColorCmd {
1541    pub view_holder_id: u32,
1542    pub color: ColorRgbValue,
1543}
1544
1545impl fidl::Persistable for SetViewHolderBoundsColorCmd {}
1546
1547/// Sets the properties for a ViewHolder's attached View.
1548///
1549/// Constraints:
1550/// - `view_holder_id` refs a `ViewHolder`.
1551#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1552pub struct SetViewPropertiesCmd {
1553    pub view_holder_id: u32,
1554    pub properties: ViewProperties,
1555}
1556
1557impl fidl::Persistable for SetViewPropertiesCmd {}
1558
1559/// Characteristics:
1560/// - has_parent
1561/// - has_shape
1562/// - has_material
1563#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1564#[repr(C)]
1565pub struct ShapeNodeArgs {
1566    pub unused: u32,
1567}
1568
1569impl fidl::Persistable for ShapeNodeArgs {}
1570
1571/// Delivered in response to a size change hint from a parent node
1572/// (SendSizeChangeHintCmd).
1573///
1574/// This event is delivered when the following conditions are true:
1575/// - The node has `kSizeChangeEventMask` set to an enabled state.
1576/// - A parent node has sent a SendSizeChangeHintCmd.
1577///
1578/// Subscribe to this event to receive information about how large textures you
1579/// will need in the near future for your nodes. The canonical use case is to
1580/// pre-allocate memory to avoid repeated re-allocations.
1581#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1582pub struct SizeChangeHintEvent {
1583    pub node_id: u32,
1584    pub width_change_factor: f32,
1585    pub height_change_factor: f32,
1586}
1587
1588impl fidl::Persistable for SizeChangeHintEvent {}
1589
1590/// A StereoCamera is a Camera that renders the scene in side-by-side stereo.
1591///
1592/// Any command which can be applied to a Camera can also be applied to a
1593/// StereoCamera.
1594/// Additional supported commands:
1595/// - SetStereoCameraProjection
1596#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1597#[repr(C)]
1598pub struct StereoCameraArgs {
1599    /// The scene that the camera is viewing.
1600    pub scene_id: u32,
1601}
1602
1603impl fidl::Persistable for StereoCameraArgs {}
1604
1605/// Describes a typed, client-modifiable value.
1606#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1607pub struct VariableArgs {
1608    pub type_: ValueType,
1609    pub initial_value: Value,
1610}
1611
1612impl fidl::Persistable for VariableArgs {}
1613
1614/// A value that is specified explicitly by `value` if `variable_id` is zero,
1615/// or is the value produced by the resource identified by `variable_id`, e.g.
1616/// an animation or expression.  In the latter case, the value produced by the
1617/// resource must be a vec2, and `value` is ignored.
1618#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1619pub struct Vector2Value {
1620    pub value: Vec2,
1621    pub variable_id: u32,
1622}
1623
1624impl fidl::Persistable for Vector2Value {}
1625
1626/// A value that is specified explicitly by `value` if `variable_id` is zero,
1627/// or is the value produced by the resource identified by `variable_id`, e.g.
1628/// an animation or expression.  In the latter case, the value produced by the
1629/// resource must be a vec3, and `value` is ignored.
1630#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1631pub struct Vector3Value {
1632    pub value: Vec3,
1633    pub variable_id: u32,
1634}
1635
1636impl fidl::Persistable for Vector3Value {}
1637
1638/// A value that is specified explicitly by `value` if `variable_id` is zero,
1639/// or is the value produced by the resource identified by `variable_id`, e.g.
1640/// an animation or expression.  In the latter case, the value produced by the
1641/// resource must be a vec4, and `value` is ignored.
1642#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1643pub struct Vector4Value {
1644    pub value: Vec4,
1645    pub variable_id: u32,
1646}
1647
1648impl fidl::Persistable for Vector4Value {}
1649
1650/// Delivered to a View's Session when the parent ViewHolder for the given View
1651/// becomes a part of a Scene.
1652///
1653/// A ViewHolder is considered to be part of a Scene if there is an unbroken
1654/// chain of parent-child relationships between the Scene node and the
1655/// ViewHolder node.
1656#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1657pub struct ViewAttachedToSceneEvent {
1658    pub view_id: u32,
1659    pub properties: ViewProperties,
1660}
1661
1662impl fidl::Persistable for ViewAttachedToSceneEvent {}
1663
1664/// Delivered to a ViewHolder's Session when its peer View is connected.
1665#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1666#[repr(C)]
1667pub struct ViewConnectedEvent {
1668    pub view_holder_id: u32,
1669}
1670
1671impl fidl::Persistable for ViewConnectedEvent {}
1672
1673/// Delivered to a View's Session when the parent ViewHolder for the given View
1674/// is no longer part of a scene.
1675///
1676/// This can happen if the ViewHolder is detached directly from the scene, or
1677/// if one of its parent nodes is.
1678///
1679/// A ViewHolder is considered to be part of a Scene if there is an unbroken
1680/// chain of parent-child relationships between the Scene node and the
1681/// ViewHolder node.
1682#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1683#[repr(C)]
1684pub struct ViewDetachedFromSceneEvent {
1685    pub view_id: u32,
1686}
1687
1688impl fidl::Persistable for ViewDetachedFromSceneEvent {}
1689
1690/// Delivered to a ViewHolder's Session when its peer View is disconnected or
1691/// destroyed.
1692///
1693/// If the View is destroyed before the connection is established, then this
1694/// event will be delivered immediately when the ViewHolder attempts to connect.
1695#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1696#[repr(C)]
1697pub struct ViewDisconnectedEvent {
1698    pub view_holder_id: u32,
1699}
1700
1701impl fidl::Persistable for ViewDisconnectedEvent {}
1702
1703/// Delivered to a View's Session when its peer ViewHolder is connected.
1704///
1705/// If the ViewHolder is destroyed before the connection is established, then
1706/// this event will not be delivered.
1707#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1708#[repr(C)]
1709pub struct ViewHolderConnectedEvent {
1710    pub view_id: u32,
1711}
1712
1713impl fidl::Persistable for ViewHolderConnectedEvent {}
1714
1715/// Delivered to a View's Session when its peer ViewHolder is disconnected or
1716/// destroyed.
1717///
1718/// If the ViewHolder is destroyed before the connection is established, then
1719/// this event will be delivered immediately when the View attempts to connect.
1720#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1721#[repr(C)]
1722pub struct ViewHolderDisconnectedEvent {
1723    pub view_id: u32,
1724}
1725
1726impl fidl::Persistable for ViewHolderDisconnectedEvent {}
1727
1728/// Represents the properties for a View.
1729#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1730pub struct ViewProperties {
1731    /// The View's bounding box extents can be defined as:
1732    ///    { bounding_box.min, bounding_box.max }
1733    /// Content contained within the View is clipped to this bounding box.
1734    pub bounding_box: BoundingBox,
1735    /// `insets_from_min` and `insets_from_max` specify the distances between the
1736    /// view's bounding box and that of its parent.
1737    ///
1738    /// These properties are not strictly enforced by Scenic, but only used
1739    /// as hints for clients and other components that receives ViewProperties:
1740    ///
1741    /// View clients can assume that anything drawn outside of
1742    ///    { bounding_box.min + inset_from_min, bounding_box.max - inset_from_max }
1743    /// may be obscured by an ancestor view. The reason for obscuring, and the rules
1744    /// surrounding it, is specific to each product.
1745    pub inset_from_min: Vec3,
1746    pub inset_from_max: Vec3,
1747    /// Whether the View can receive a focus event; default is true.  When
1748    /// false, and this View is eligible to receive a focus event, no
1749    /// focus/unfocus event is actually sent to any View.
1750    pub focus_change: bool,
1751    /// Whether the View allows geometrically underlying Views to receive input;
1752    /// default is true. When false, Scenic does not send input events to
1753    /// underlying Views.
1754    pub downward_input: bool,
1755}
1756
1757impl fidl::Persistable for ViewProperties {}
1758
1759/// Delivered when the parent ViewHolder for the given View makes a change to
1760/// the View's properties.
1761#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1762pub struct ViewPropertiesChangedEvent {
1763    pub view_id: u32,
1764    pub properties: ViewProperties,
1765}
1766
1767impl fidl::Persistable for ViewPropertiesChangedEvent {}
1768
1769/// Represents the state of a View in Scenic.
1770#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1771pub struct ViewState {
1772    /// Whether the View is rendering. Default is false. Delivered to the View's
1773    /// corresponding ViewHolder after the View's first frame render request.
1774    pub is_rendering: bool,
1775}
1776
1777impl fidl::Persistable for ViewState {}
1778
1779/// Delivered to a ViewHolder's Session when its peer View's state has changed.
1780#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1781pub struct ViewStateChangedEvent {
1782    pub view_holder_id: u32,
1783    pub state: ViewState,
1784}
1785
1786impl fidl::Persistable for ViewStateChangedEvent {}
1787
1788#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1789pub struct Mat4 {
1790    /// Column major order.
1791    pub matrix: [f32; 16],
1792}
1793
1794impl fidl::Persistable for Mat4 {}
1795
1796#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1797pub struct Vec2 {
1798    pub x: f32,
1799    pub y: f32,
1800}
1801
1802impl fidl::Persistable for Vec2 {}
1803
1804#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1805pub struct Vec3 {
1806    pub x: f32,
1807    pub y: f32,
1808    pub z: f32,
1809}
1810
1811impl fidl::Persistable for Vec3 {}
1812
1813#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1814pub struct Vec4 {
1815    pub x: f32,
1816    pub y: f32,
1817    pub z: f32,
1818    pub w: f32,
1819}
1820
1821impl fidl::Persistable for Vec4 {}
1822
1823/// These are all of the types of events which can be reported by a `Session`.
1824/// Use `SetEventMaskCmd` to enable event delivery for a resource.
1825#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1826pub enum Event {
1827    /// Events which are controlled by a mask.
1828    Metrics(MetricsEvent),
1829    SizeChangeHint(SizeChangeHintEvent),
1830    /// Events which are always delivered, regardless of mask.
1831    ImportUnbound(ImportUnboundEvent),
1832    ViewConnected(ViewConnectedEvent),
1833    ViewDisconnected(ViewDisconnectedEvent),
1834    ViewHolderDisconnected(ViewHolderDisconnectedEvent),
1835    ViewAttachedToScene(ViewAttachedToSceneEvent),
1836    ViewDetachedFromScene(ViewDetachedFromSceneEvent),
1837    ViewPropertiesChanged(ViewPropertiesChangedEvent),
1838    ViewStateChanged(ViewStateChangedEvent),
1839    ViewHolderConnected(ViewHolderConnectedEvent),
1840}
1841
1842impl Event {
1843    #[inline]
1844    pub fn ordinal(&self) -> u64 {
1845        match *self {
1846            Self::Metrics(_) => 1,
1847            Self::SizeChangeHint(_) => 2,
1848            Self::ImportUnbound(_) => 3,
1849            Self::ViewConnected(_) => 4,
1850            Self::ViewDisconnected(_) => 5,
1851            Self::ViewHolderDisconnected(_) => 6,
1852            Self::ViewAttachedToScene(_) => 7,
1853            Self::ViewDetachedFromScene(_) => 8,
1854            Self::ViewPropertiesChanged(_) => 9,
1855            Self::ViewStateChanged(_) => 10,
1856            Self::ViewHolderConnected(_) => 11,
1857        }
1858    }
1859}
1860
1861impl fidl::Persistable for Event {}
1862
1863/// These are all of the types of parameters that can be set to configure a
1864/// `Renderer`.
1865#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1866pub enum RendererParam {
1867    ShadowTechnique(ShadowTechnique),
1868    Reserved(RenderFrequency),
1869    EnableDebugging(bool),
1870}
1871
1872impl RendererParam {
1873    #[inline]
1874    pub fn ordinal(&self) -> u64 {
1875        match *self {
1876            Self::ShadowTechnique(_) => 1,
1877            Self::Reserved(_) => 2,
1878            Self::EnableDebugging(_) => 3,
1879        }
1880    }
1881}
1882
1883impl fidl::Persistable for RendererParam {}
1884
1885#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
1886pub enum Value {
1887    Vector1(f32),
1888    Vector2(Vec2),
1889    Vector3(Vec3),
1890    Vector4(Vec4),
1891    Matrix4x4(Mat4),
1892    ColorRgba(ColorRgba),
1893    ColorRgb(ColorRgb),
1894    /// Degrees of counter-clockwise rotation in the XY plane.
1895    Degrees(f32),
1896    Quaternion(Quaternion),
1897    Transform(FactoredTransform),
1898    /// ID of a value-producing resource (an animation or an expression).
1899    /// The type of this value matches the type produced by the named resource.
1900    VariableId(u32),
1901}
1902
1903impl Value {
1904    #[inline]
1905    pub fn ordinal(&self) -> u64 {
1906        match *self {
1907            Self::Vector1(_) => 1,
1908            Self::Vector2(_) => 2,
1909            Self::Vector3(_) => 3,
1910            Self::Vector4(_) => 4,
1911            Self::Matrix4x4(_) => 5,
1912            Self::ColorRgba(_) => 6,
1913            Self::ColorRgb(_) => 7,
1914            Self::Degrees(_) => 8,
1915            Self::Quaternion(_) => 9,
1916            Self::Transform(_) => 10,
1917            Self::VariableId(_) => 11,
1918        }
1919    }
1920}
1921
1922impl fidl::Persistable for Value {}
1923
1924pub mod snapshot_callback_deprecated_ordinals {
1925    pub const ON_DATA: u64 = 0x11d1a93b419b7d9f;
1926}
1927
1928mod internal {
1929    use super::*;
1930    unsafe impl fidl::encoding::TypeMarker for HitTestBehavior {
1931        type Owned = Self;
1932
1933        #[inline(always)]
1934        fn inline_align(_context: fidl::encoding::Context) -> usize {
1935            std::mem::align_of::<u32>()
1936        }
1937
1938        #[inline(always)]
1939        fn inline_size(_context: fidl::encoding::Context) -> usize {
1940            std::mem::size_of::<u32>()
1941        }
1942
1943        #[inline(always)]
1944        fn encode_is_copy() -> bool {
1945            true
1946        }
1947
1948        #[inline(always)]
1949        fn decode_is_copy() -> bool {
1950            false
1951        }
1952    }
1953
1954    impl fidl::encoding::ValueTypeMarker for HitTestBehavior {
1955        type Borrowed<'a> = Self;
1956        #[inline(always)]
1957        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1958            *value
1959        }
1960    }
1961
1962    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1963        for HitTestBehavior
1964    {
1965        #[inline]
1966        unsafe fn encode(
1967            self,
1968            encoder: &mut fidl::encoding::Encoder<'_, D>,
1969            offset: usize,
1970            _depth: fidl::encoding::Depth,
1971        ) -> fidl::Result<()> {
1972            encoder.debug_check_bounds::<Self>(offset);
1973            encoder.write_num(self.into_primitive(), offset);
1974            Ok(())
1975        }
1976    }
1977
1978    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for HitTestBehavior {
1979        #[inline(always)]
1980        fn new_empty() -> Self {
1981            Self::KDefault
1982        }
1983
1984        #[inline]
1985        unsafe fn decode(
1986            &mut self,
1987            decoder: &mut fidl::encoding::Decoder<'_, D>,
1988            offset: usize,
1989            _depth: fidl::encoding::Depth,
1990        ) -> fidl::Result<()> {
1991            decoder.debug_check_bounds::<Self>(offset);
1992            let prim = decoder.read_num::<u32>(offset);
1993
1994            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1995            Ok(())
1996        }
1997    }
1998    unsafe impl fidl::encoding::TypeMarker for ImportSpec {
1999        type Owned = Self;
2000
2001        #[inline(always)]
2002        fn inline_align(_context: fidl::encoding::Context) -> usize {
2003            std::mem::align_of::<u32>()
2004        }
2005
2006        #[inline(always)]
2007        fn inline_size(_context: fidl::encoding::Context) -> usize {
2008            std::mem::size_of::<u32>()
2009        }
2010
2011        #[inline(always)]
2012        fn encode_is_copy() -> bool {
2013            true
2014        }
2015
2016        #[inline(always)]
2017        fn decode_is_copy() -> bool {
2018            false
2019        }
2020    }
2021
2022    impl fidl::encoding::ValueTypeMarker for ImportSpec {
2023        type Borrowed<'a> = Self;
2024        #[inline(always)]
2025        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2026            *value
2027        }
2028    }
2029
2030    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ImportSpec {
2031        #[inline]
2032        unsafe fn encode(
2033            self,
2034            encoder: &mut fidl::encoding::Encoder<'_, D>,
2035            offset: usize,
2036            _depth: fidl::encoding::Depth,
2037        ) -> fidl::Result<()> {
2038            encoder.debug_check_bounds::<Self>(offset);
2039            encoder.write_num(self.into_primitive(), offset);
2040            Ok(())
2041        }
2042    }
2043
2044    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ImportSpec {
2045        #[inline(always)]
2046        fn new_empty() -> Self {
2047            Self::Node
2048        }
2049
2050        #[inline]
2051        unsafe fn decode(
2052            &mut self,
2053            decoder: &mut fidl::encoding::Decoder<'_, D>,
2054            offset: usize,
2055            _depth: fidl::encoding::Depth,
2056        ) -> fidl::Result<()> {
2057            decoder.debug_check_bounds::<Self>(offset);
2058            let prim = decoder.read_num::<u32>(offset);
2059
2060            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2061            Ok(())
2062        }
2063    }
2064    unsafe impl fidl::encoding::TypeMarker for MeshIndexFormat {
2065        type Owned = Self;
2066
2067        #[inline(always)]
2068        fn inline_align(_context: fidl::encoding::Context) -> usize {
2069            std::mem::align_of::<u32>()
2070        }
2071
2072        #[inline(always)]
2073        fn inline_size(_context: fidl::encoding::Context) -> usize {
2074            std::mem::size_of::<u32>()
2075        }
2076
2077        #[inline(always)]
2078        fn encode_is_copy() -> bool {
2079            true
2080        }
2081
2082        #[inline(always)]
2083        fn decode_is_copy() -> bool {
2084            false
2085        }
2086    }
2087
2088    impl fidl::encoding::ValueTypeMarker for MeshIndexFormat {
2089        type Borrowed<'a> = Self;
2090        #[inline(always)]
2091        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2092            *value
2093        }
2094    }
2095
2096    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2097        for MeshIndexFormat
2098    {
2099        #[inline]
2100        unsafe fn encode(
2101            self,
2102            encoder: &mut fidl::encoding::Encoder<'_, D>,
2103            offset: usize,
2104            _depth: fidl::encoding::Depth,
2105        ) -> fidl::Result<()> {
2106            encoder.debug_check_bounds::<Self>(offset);
2107            encoder.write_num(self.into_primitive(), offset);
2108            Ok(())
2109        }
2110    }
2111
2112    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MeshIndexFormat {
2113        #[inline(always)]
2114        fn new_empty() -> Self {
2115            Self::KUint16
2116        }
2117
2118        #[inline]
2119        unsafe fn decode(
2120            &mut self,
2121            decoder: &mut fidl::encoding::Decoder<'_, D>,
2122            offset: usize,
2123            _depth: fidl::encoding::Depth,
2124        ) -> fidl::Result<()> {
2125            decoder.debug_check_bounds::<Self>(offset);
2126            let prim = decoder.read_num::<u32>(offset);
2127
2128            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2129            Ok(())
2130        }
2131    }
2132    unsafe impl fidl::encoding::TypeMarker for RenderFrequency {
2133        type Owned = Self;
2134
2135        #[inline(always)]
2136        fn inline_align(_context: fidl::encoding::Context) -> usize {
2137            std::mem::align_of::<u32>()
2138        }
2139
2140        #[inline(always)]
2141        fn inline_size(_context: fidl::encoding::Context) -> usize {
2142            std::mem::size_of::<u32>()
2143        }
2144
2145        #[inline(always)]
2146        fn encode_is_copy() -> bool {
2147            true
2148        }
2149
2150        #[inline(always)]
2151        fn decode_is_copy() -> bool {
2152            false
2153        }
2154    }
2155
2156    impl fidl::encoding::ValueTypeMarker for RenderFrequency {
2157        type Borrowed<'a> = Self;
2158        #[inline(always)]
2159        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2160            *value
2161        }
2162    }
2163
2164    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2165        for RenderFrequency
2166    {
2167        #[inline]
2168        unsafe fn encode(
2169            self,
2170            encoder: &mut fidl::encoding::Encoder<'_, D>,
2171            offset: usize,
2172            _depth: fidl::encoding::Depth,
2173        ) -> fidl::Result<()> {
2174            encoder.debug_check_bounds::<Self>(offset);
2175            encoder.write_num(self.into_primitive(), offset);
2176            Ok(())
2177        }
2178    }
2179
2180    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RenderFrequency {
2181        #[inline(always)]
2182        fn new_empty() -> Self {
2183            Self::WhenRequested
2184        }
2185
2186        #[inline]
2187        unsafe fn decode(
2188            &mut self,
2189            decoder: &mut fidl::encoding::Decoder<'_, D>,
2190            offset: usize,
2191            _depth: fidl::encoding::Depth,
2192        ) -> fidl::Result<()> {
2193            decoder.debug_check_bounds::<Self>(offset);
2194            let prim = decoder.read_num::<u32>(offset);
2195
2196            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2197            Ok(())
2198        }
2199    }
2200    unsafe impl fidl::encoding::TypeMarker for ShadowTechnique {
2201        type Owned = Self;
2202
2203        #[inline(always)]
2204        fn inline_align(_context: fidl::encoding::Context) -> usize {
2205            std::mem::align_of::<u32>()
2206        }
2207
2208        #[inline(always)]
2209        fn inline_size(_context: fidl::encoding::Context) -> usize {
2210            std::mem::size_of::<u32>()
2211        }
2212
2213        #[inline(always)]
2214        fn encode_is_copy() -> bool {
2215            true
2216        }
2217
2218        #[inline(always)]
2219        fn decode_is_copy() -> bool {
2220            false
2221        }
2222    }
2223
2224    impl fidl::encoding::ValueTypeMarker for ShadowTechnique {
2225        type Borrowed<'a> = Self;
2226        #[inline(always)]
2227        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2228            *value
2229        }
2230    }
2231
2232    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2233        for ShadowTechnique
2234    {
2235        #[inline]
2236        unsafe fn encode(
2237            self,
2238            encoder: &mut fidl::encoding::Encoder<'_, D>,
2239            offset: usize,
2240            _depth: fidl::encoding::Depth,
2241        ) -> fidl::Result<()> {
2242            encoder.debug_check_bounds::<Self>(offset);
2243            encoder.write_num(self.into_primitive(), offset);
2244            Ok(())
2245        }
2246    }
2247
2248    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ShadowTechnique {
2249        #[inline(always)]
2250        fn new_empty() -> Self {
2251            Self::Unshadowed
2252        }
2253
2254        #[inline]
2255        unsafe fn decode(
2256            &mut self,
2257            decoder: &mut fidl::encoding::Decoder<'_, D>,
2258            offset: usize,
2259            _depth: fidl::encoding::Depth,
2260        ) -> fidl::Result<()> {
2261            decoder.debug_check_bounds::<Self>(offset);
2262            let prim = decoder.read_num::<u32>(offset);
2263
2264            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2265            Ok(())
2266        }
2267    }
2268    unsafe impl fidl::encoding::TypeMarker for ValueType {
2269        type Owned = Self;
2270
2271        #[inline(always)]
2272        fn inline_align(_context: fidl::encoding::Context) -> usize {
2273            std::mem::align_of::<u32>()
2274        }
2275
2276        #[inline(always)]
2277        fn inline_size(_context: fidl::encoding::Context) -> usize {
2278            std::mem::size_of::<u32>()
2279        }
2280
2281        #[inline(always)]
2282        fn encode_is_copy() -> bool {
2283            true
2284        }
2285
2286        #[inline(always)]
2287        fn decode_is_copy() -> bool {
2288            false
2289        }
2290    }
2291
2292    impl fidl::encoding::ValueTypeMarker for ValueType {
2293        type Borrowed<'a> = Self;
2294        #[inline(always)]
2295        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2296            *value
2297        }
2298    }
2299
2300    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ValueType {
2301        #[inline]
2302        unsafe fn encode(
2303            self,
2304            encoder: &mut fidl::encoding::Encoder<'_, D>,
2305            offset: usize,
2306            _depth: fidl::encoding::Depth,
2307        ) -> fidl::Result<()> {
2308            encoder.debug_check_bounds::<Self>(offset);
2309            encoder.write_num(self.into_primitive(), offset);
2310            Ok(())
2311        }
2312    }
2313
2314    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ValueType {
2315        #[inline(always)]
2316        fn new_empty() -> Self {
2317            Self::KNone
2318        }
2319
2320        #[inline]
2321        unsafe fn decode(
2322            &mut self,
2323            decoder: &mut fidl::encoding::Decoder<'_, D>,
2324            offset: usize,
2325            _depth: fidl::encoding::Depth,
2326        ) -> fidl::Result<()> {
2327            decoder.debug_check_bounds::<Self>(offset);
2328            let prim = decoder.read_num::<u32>(offset);
2329
2330            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2331            Ok(())
2332        }
2333    }
2334
2335    impl fidl::encoding::ValueTypeMarker for AddChildCmd {
2336        type Borrowed<'a> = &'a Self;
2337        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2338            value
2339        }
2340    }
2341
2342    unsafe impl fidl::encoding::TypeMarker for AddChildCmd {
2343        type Owned = Self;
2344
2345        #[inline(always)]
2346        fn inline_align(_context: fidl::encoding::Context) -> usize {
2347            4
2348        }
2349
2350        #[inline(always)]
2351        fn inline_size(_context: fidl::encoding::Context) -> usize {
2352            8
2353        }
2354        #[inline(always)]
2355        fn encode_is_copy() -> bool {
2356            true
2357        }
2358
2359        #[inline(always)]
2360        fn decode_is_copy() -> bool {
2361            true
2362        }
2363    }
2364
2365    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddChildCmd, D>
2366        for &AddChildCmd
2367    {
2368        #[inline]
2369        unsafe fn encode(
2370            self,
2371            encoder: &mut fidl::encoding::Encoder<'_, D>,
2372            offset: usize,
2373            _depth: fidl::encoding::Depth,
2374        ) -> fidl::Result<()> {
2375            encoder.debug_check_bounds::<AddChildCmd>(offset);
2376            unsafe {
2377                // Copy the object into the buffer.
2378                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2379                (buf_ptr as *mut AddChildCmd).write_unaligned((self as *const AddChildCmd).read());
2380                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2381                // done second because the memcpy will write garbage to these bytes.
2382            }
2383            Ok(())
2384        }
2385    }
2386    unsafe impl<
2387            D: fidl::encoding::ResourceDialect,
2388            T0: fidl::encoding::Encode<u32, D>,
2389            T1: fidl::encoding::Encode<u32, D>,
2390        > fidl::encoding::Encode<AddChildCmd, D> for (T0, T1)
2391    {
2392        #[inline]
2393        unsafe fn encode(
2394            self,
2395            encoder: &mut fidl::encoding::Encoder<'_, D>,
2396            offset: usize,
2397            depth: fidl::encoding::Depth,
2398        ) -> fidl::Result<()> {
2399            encoder.debug_check_bounds::<AddChildCmd>(offset);
2400            // Zero out padding regions. There's no need to apply masks
2401            // because the unmasked parts will be overwritten by fields.
2402            // Write the fields.
2403            self.0.encode(encoder, offset + 0, depth)?;
2404            self.1.encode(encoder, offset + 4, depth)?;
2405            Ok(())
2406        }
2407    }
2408
2409    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddChildCmd {
2410        #[inline(always)]
2411        fn new_empty() -> Self {
2412            Self { node_id: fidl::new_empty!(u32, D), child_id: fidl::new_empty!(u32, D) }
2413        }
2414
2415        #[inline]
2416        unsafe fn decode(
2417            &mut self,
2418            decoder: &mut fidl::encoding::Decoder<'_, D>,
2419            offset: usize,
2420            _depth: fidl::encoding::Depth,
2421        ) -> fidl::Result<()> {
2422            decoder.debug_check_bounds::<Self>(offset);
2423            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2424            // Verify that padding bytes are zero.
2425            // Copy from the buffer into the object.
2426            unsafe {
2427                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2428            }
2429            Ok(())
2430        }
2431    }
2432
2433    impl fidl::encoding::ValueTypeMarker for AddLayerCmd {
2434        type Borrowed<'a> = &'a Self;
2435        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2436            value
2437        }
2438    }
2439
2440    unsafe impl fidl::encoding::TypeMarker for AddLayerCmd {
2441        type Owned = Self;
2442
2443        #[inline(always)]
2444        fn inline_align(_context: fidl::encoding::Context) -> usize {
2445            4
2446        }
2447
2448        #[inline(always)]
2449        fn inline_size(_context: fidl::encoding::Context) -> usize {
2450            8
2451        }
2452        #[inline(always)]
2453        fn encode_is_copy() -> bool {
2454            true
2455        }
2456
2457        #[inline(always)]
2458        fn decode_is_copy() -> bool {
2459            true
2460        }
2461    }
2462
2463    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddLayerCmd, D>
2464        for &AddLayerCmd
2465    {
2466        #[inline]
2467        unsafe fn encode(
2468            self,
2469            encoder: &mut fidl::encoding::Encoder<'_, D>,
2470            offset: usize,
2471            _depth: fidl::encoding::Depth,
2472        ) -> fidl::Result<()> {
2473            encoder.debug_check_bounds::<AddLayerCmd>(offset);
2474            unsafe {
2475                // Copy the object into the buffer.
2476                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2477                (buf_ptr as *mut AddLayerCmd).write_unaligned((self as *const AddLayerCmd).read());
2478                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2479                // done second because the memcpy will write garbage to these bytes.
2480            }
2481            Ok(())
2482        }
2483    }
2484    unsafe impl<
2485            D: fidl::encoding::ResourceDialect,
2486            T0: fidl::encoding::Encode<u32, D>,
2487            T1: fidl::encoding::Encode<u32, D>,
2488        > fidl::encoding::Encode<AddLayerCmd, D> for (T0, T1)
2489    {
2490        #[inline]
2491        unsafe fn encode(
2492            self,
2493            encoder: &mut fidl::encoding::Encoder<'_, D>,
2494            offset: usize,
2495            depth: fidl::encoding::Depth,
2496        ) -> fidl::Result<()> {
2497            encoder.debug_check_bounds::<AddLayerCmd>(offset);
2498            // Zero out padding regions. There's no need to apply masks
2499            // because the unmasked parts will be overwritten by fields.
2500            // Write the fields.
2501            self.0.encode(encoder, offset + 0, depth)?;
2502            self.1.encode(encoder, offset + 4, depth)?;
2503            Ok(())
2504        }
2505    }
2506
2507    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddLayerCmd {
2508        #[inline(always)]
2509        fn new_empty() -> Self {
2510            Self { layer_stack_id: fidl::new_empty!(u32, D), layer_id: fidl::new_empty!(u32, D) }
2511        }
2512
2513        #[inline]
2514        unsafe fn decode(
2515            &mut self,
2516            decoder: &mut fidl::encoding::Decoder<'_, D>,
2517            offset: usize,
2518            _depth: fidl::encoding::Depth,
2519        ) -> fidl::Result<()> {
2520            decoder.debug_check_bounds::<Self>(offset);
2521            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2522            // Verify that padding bytes are zero.
2523            // Copy from the buffer into the object.
2524            unsafe {
2525                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2526            }
2527            Ok(())
2528        }
2529    }
2530
2531    impl fidl::encoding::ValueTypeMarker for AddLightCmd {
2532        type Borrowed<'a> = &'a Self;
2533        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2534            value
2535        }
2536    }
2537
2538    unsafe impl fidl::encoding::TypeMarker for AddLightCmd {
2539        type Owned = Self;
2540
2541        #[inline(always)]
2542        fn inline_align(_context: fidl::encoding::Context) -> usize {
2543            4
2544        }
2545
2546        #[inline(always)]
2547        fn inline_size(_context: fidl::encoding::Context) -> usize {
2548            8
2549        }
2550        #[inline(always)]
2551        fn encode_is_copy() -> bool {
2552            true
2553        }
2554
2555        #[inline(always)]
2556        fn decode_is_copy() -> bool {
2557            true
2558        }
2559    }
2560
2561    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddLightCmd, D>
2562        for &AddLightCmd
2563    {
2564        #[inline]
2565        unsafe fn encode(
2566            self,
2567            encoder: &mut fidl::encoding::Encoder<'_, D>,
2568            offset: usize,
2569            _depth: fidl::encoding::Depth,
2570        ) -> fidl::Result<()> {
2571            encoder.debug_check_bounds::<AddLightCmd>(offset);
2572            unsafe {
2573                // Copy the object into the buffer.
2574                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2575                (buf_ptr as *mut AddLightCmd).write_unaligned((self as *const AddLightCmd).read());
2576                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2577                // done second because the memcpy will write garbage to these bytes.
2578            }
2579            Ok(())
2580        }
2581    }
2582    unsafe impl<
2583            D: fidl::encoding::ResourceDialect,
2584            T0: fidl::encoding::Encode<u32, D>,
2585            T1: fidl::encoding::Encode<u32, D>,
2586        > fidl::encoding::Encode<AddLightCmd, D> for (T0, T1)
2587    {
2588        #[inline]
2589        unsafe fn encode(
2590            self,
2591            encoder: &mut fidl::encoding::Encoder<'_, D>,
2592            offset: usize,
2593            depth: fidl::encoding::Depth,
2594        ) -> fidl::Result<()> {
2595            encoder.debug_check_bounds::<AddLightCmd>(offset);
2596            // Zero out padding regions. There's no need to apply masks
2597            // because the unmasked parts will be overwritten by fields.
2598            // Write the fields.
2599            self.0.encode(encoder, offset + 0, depth)?;
2600            self.1.encode(encoder, offset + 4, depth)?;
2601            Ok(())
2602        }
2603    }
2604
2605    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddLightCmd {
2606        #[inline(always)]
2607        fn new_empty() -> Self {
2608            Self { scene_id: fidl::new_empty!(u32, D), light_id: fidl::new_empty!(u32, D) }
2609        }
2610
2611        #[inline]
2612        unsafe fn decode(
2613            &mut self,
2614            decoder: &mut fidl::encoding::Decoder<'_, D>,
2615            offset: usize,
2616            _depth: fidl::encoding::Depth,
2617        ) -> fidl::Result<()> {
2618            decoder.debug_check_bounds::<Self>(offset);
2619            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2620            // Verify that padding bytes are zero.
2621            // Copy from the buffer into the object.
2622            unsafe {
2623                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2624            }
2625            Ok(())
2626        }
2627    }
2628
2629    impl fidl::encoding::ValueTypeMarker for AddPartCmd {
2630        type Borrowed<'a> = &'a Self;
2631        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2632            value
2633        }
2634    }
2635
2636    unsafe impl fidl::encoding::TypeMarker for AddPartCmd {
2637        type Owned = Self;
2638
2639        #[inline(always)]
2640        fn inline_align(_context: fidl::encoding::Context) -> usize {
2641            4
2642        }
2643
2644        #[inline(always)]
2645        fn inline_size(_context: fidl::encoding::Context) -> usize {
2646            8
2647        }
2648        #[inline(always)]
2649        fn encode_is_copy() -> bool {
2650            true
2651        }
2652
2653        #[inline(always)]
2654        fn decode_is_copy() -> bool {
2655            true
2656        }
2657    }
2658
2659    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AddPartCmd, D>
2660        for &AddPartCmd
2661    {
2662        #[inline]
2663        unsafe fn encode(
2664            self,
2665            encoder: &mut fidl::encoding::Encoder<'_, D>,
2666            offset: usize,
2667            _depth: fidl::encoding::Depth,
2668        ) -> fidl::Result<()> {
2669            encoder.debug_check_bounds::<AddPartCmd>(offset);
2670            unsafe {
2671                // Copy the object into the buffer.
2672                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2673                (buf_ptr as *mut AddPartCmd).write_unaligned((self as *const AddPartCmd).read());
2674                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2675                // done second because the memcpy will write garbage to these bytes.
2676            }
2677            Ok(())
2678        }
2679    }
2680    unsafe impl<
2681            D: fidl::encoding::ResourceDialect,
2682            T0: fidl::encoding::Encode<u32, D>,
2683            T1: fidl::encoding::Encode<u32, D>,
2684        > fidl::encoding::Encode<AddPartCmd, D> for (T0, T1)
2685    {
2686        #[inline]
2687        unsafe fn encode(
2688            self,
2689            encoder: &mut fidl::encoding::Encoder<'_, D>,
2690            offset: usize,
2691            depth: fidl::encoding::Depth,
2692        ) -> fidl::Result<()> {
2693            encoder.debug_check_bounds::<AddPartCmd>(offset);
2694            // Zero out padding regions. There's no need to apply masks
2695            // because the unmasked parts will be overwritten by fields.
2696            // Write the fields.
2697            self.0.encode(encoder, offset + 0, depth)?;
2698            self.1.encode(encoder, offset + 4, depth)?;
2699            Ok(())
2700        }
2701    }
2702
2703    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AddPartCmd {
2704        #[inline(always)]
2705        fn new_empty() -> Self {
2706            Self { node_id: fidl::new_empty!(u32, D), part_id: fidl::new_empty!(u32, D) }
2707        }
2708
2709        #[inline]
2710        unsafe fn decode(
2711            &mut self,
2712            decoder: &mut fidl::encoding::Decoder<'_, D>,
2713            offset: usize,
2714            _depth: fidl::encoding::Depth,
2715        ) -> fidl::Result<()> {
2716            decoder.debug_check_bounds::<Self>(offset);
2717            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2718            // Verify that padding bytes are zero.
2719            // Copy from the buffer into the object.
2720            unsafe {
2721                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2722            }
2723            Ok(())
2724        }
2725    }
2726
2727    impl fidl::encoding::ValueTypeMarker for AmbientLightArgs {
2728        type Borrowed<'a> = &'a Self;
2729        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2730            value
2731        }
2732    }
2733
2734    unsafe impl fidl::encoding::TypeMarker for AmbientLightArgs {
2735        type Owned = Self;
2736
2737        #[inline(always)]
2738        fn inline_align(_context: fidl::encoding::Context) -> usize {
2739            4
2740        }
2741
2742        #[inline(always)]
2743        fn inline_size(_context: fidl::encoding::Context) -> usize {
2744            4
2745        }
2746        #[inline(always)]
2747        fn encode_is_copy() -> bool {
2748            true
2749        }
2750
2751        #[inline(always)]
2752        fn decode_is_copy() -> bool {
2753            true
2754        }
2755    }
2756
2757    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<AmbientLightArgs, D>
2758        for &AmbientLightArgs
2759    {
2760        #[inline]
2761        unsafe fn encode(
2762            self,
2763            encoder: &mut fidl::encoding::Encoder<'_, D>,
2764            offset: usize,
2765            _depth: fidl::encoding::Depth,
2766        ) -> fidl::Result<()> {
2767            encoder.debug_check_bounds::<AmbientLightArgs>(offset);
2768            unsafe {
2769                // Copy the object into the buffer.
2770                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2771                (buf_ptr as *mut AmbientLightArgs)
2772                    .write_unaligned((self as *const AmbientLightArgs).read());
2773                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2774                // done second because the memcpy will write garbage to these bytes.
2775            }
2776            Ok(())
2777        }
2778    }
2779    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
2780        fidl::encoding::Encode<AmbientLightArgs, D> for (T0,)
2781    {
2782        #[inline]
2783        unsafe fn encode(
2784            self,
2785            encoder: &mut fidl::encoding::Encoder<'_, D>,
2786            offset: usize,
2787            depth: fidl::encoding::Depth,
2788        ) -> fidl::Result<()> {
2789            encoder.debug_check_bounds::<AmbientLightArgs>(offset);
2790            // Zero out padding regions. There's no need to apply masks
2791            // because the unmasked parts will be overwritten by fields.
2792            // Write the fields.
2793            self.0.encode(encoder, offset + 0, depth)?;
2794            Ok(())
2795        }
2796    }
2797
2798    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for AmbientLightArgs {
2799        #[inline(always)]
2800        fn new_empty() -> Self {
2801            Self { dummy: fidl::new_empty!(u32, D) }
2802        }
2803
2804        #[inline]
2805        unsafe fn decode(
2806            &mut self,
2807            decoder: &mut fidl::encoding::Decoder<'_, D>,
2808            offset: usize,
2809            _depth: fidl::encoding::Depth,
2810        ) -> fidl::Result<()> {
2811            decoder.debug_check_bounds::<Self>(offset);
2812            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2813            // Verify that padding bytes are zero.
2814            // Copy from the buffer into the object.
2815            unsafe {
2816                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2817            }
2818            Ok(())
2819        }
2820    }
2821
2822    impl fidl::encoding::ValueTypeMarker for BindMeshBuffersCmd {
2823        type Borrowed<'a> = &'a Self;
2824        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2825            value
2826        }
2827    }
2828
2829    unsafe impl fidl::encoding::TypeMarker for BindMeshBuffersCmd {
2830        type Owned = Self;
2831
2832        #[inline(always)]
2833        fn inline_align(_context: fidl::encoding::Context) -> usize {
2834            8
2835        }
2836
2837        #[inline(always)]
2838        fn inline_size(_context: fidl::encoding::Context) -> usize {
2839            88
2840        }
2841    }
2842
2843    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BindMeshBuffersCmd, D>
2844        for &BindMeshBuffersCmd
2845    {
2846        #[inline]
2847        unsafe fn encode(
2848            self,
2849            encoder: &mut fidl::encoding::Encoder<'_, D>,
2850            offset: usize,
2851            _depth: fidl::encoding::Depth,
2852        ) -> fidl::Result<()> {
2853            encoder.debug_check_bounds::<BindMeshBuffersCmd>(offset);
2854            // Delegate to tuple encoding.
2855            fidl::encoding::Encode::<BindMeshBuffersCmd, D>::encode(
2856                (
2857                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.mesh_id),
2858                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.index_buffer_id),
2859                    <MeshIndexFormat as fidl::encoding::ValueTypeMarker>::borrow(
2860                        &self.index_format,
2861                    ),
2862                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.index_offset),
2863                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.index_count),
2864                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.vertex_buffer_id),
2865                    <MeshVertexFormat as fidl::encoding::ValueTypeMarker>::borrow(
2866                        &self.vertex_format,
2867                    ),
2868                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.vertex_offset),
2869                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.vertex_count),
2870                    <BoundingBox as fidl::encoding::ValueTypeMarker>::borrow(&self.bounding_box),
2871                ),
2872                encoder,
2873                offset,
2874                _depth,
2875            )
2876        }
2877    }
2878    unsafe impl<
2879            D: fidl::encoding::ResourceDialect,
2880            T0: fidl::encoding::Encode<u32, D>,
2881            T1: fidl::encoding::Encode<u32, D>,
2882            T2: fidl::encoding::Encode<MeshIndexFormat, D>,
2883            T3: fidl::encoding::Encode<u64, D>,
2884            T4: fidl::encoding::Encode<u32, D>,
2885            T5: fidl::encoding::Encode<u32, D>,
2886            T6: fidl::encoding::Encode<MeshVertexFormat, D>,
2887            T7: fidl::encoding::Encode<u64, D>,
2888            T8: fidl::encoding::Encode<u32, D>,
2889            T9: fidl::encoding::Encode<BoundingBox, D>,
2890        > fidl::encoding::Encode<BindMeshBuffersCmd, D>
2891        for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)
2892    {
2893        #[inline]
2894        unsafe fn encode(
2895            self,
2896            encoder: &mut fidl::encoding::Encoder<'_, D>,
2897            offset: usize,
2898            depth: fidl::encoding::Depth,
2899        ) -> fidl::Result<()> {
2900            encoder.debug_check_bounds::<BindMeshBuffersCmd>(offset);
2901            // Zero out padding regions. There's no need to apply masks
2902            // because the unmasked parts will be overwritten by fields.
2903            unsafe {
2904                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
2905                (ptr as *mut u64).write_unaligned(0);
2906            }
2907            unsafe {
2908                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
2909                (ptr as *mut u64).write_unaligned(0);
2910            }
2911            unsafe {
2912                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(80);
2913                (ptr as *mut u64).write_unaligned(0);
2914            }
2915            // Write the fields.
2916            self.0.encode(encoder, offset + 0, depth)?;
2917            self.1.encode(encoder, offset + 4, depth)?;
2918            self.2.encode(encoder, offset + 8, depth)?;
2919            self.3.encode(encoder, offset + 16, depth)?;
2920            self.4.encode(encoder, offset + 24, depth)?;
2921            self.5.encode(encoder, offset + 28, depth)?;
2922            self.6.encode(encoder, offset + 32, depth)?;
2923            self.7.encode(encoder, offset + 48, depth)?;
2924            self.8.encode(encoder, offset + 56, depth)?;
2925            self.9.encode(encoder, offset + 60, depth)?;
2926            Ok(())
2927        }
2928    }
2929
2930    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BindMeshBuffersCmd {
2931        #[inline(always)]
2932        fn new_empty() -> Self {
2933            Self {
2934                mesh_id: fidl::new_empty!(u32, D),
2935                index_buffer_id: fidl::new_empty!(u32, D),
2936                index_format: fidl::new_empty!(MeshIndexFormat, D),
2937                index_offset: fidl::new_empty!(u64, D),
2938                index_count: fidl::new_empty!(u32, D),
2939                vertex_buffer_id: fidl::new_empty!(u32, D),
2940                vertex_format: fidl::new_empty!(MeshVertexFormat, D),
2941                vertex_offset: fidl::new_empty!(u64, D),
2942                vertex_count: fidl::new_empty!(u32, D),
2943                bounding_box: fidl::new_empty!(BoundingBox, D),
2944            }
2945        }
2946
2947        #[inline]
2948        unsafe fn decode(
2949            &mut self,
2950            decoder: &mut fidl::encoding::Decoder<'_, D>,
2951            offset: usize,
2952            _depth: fidl::encoding::Depth,
2953        ) -> fidl::Result<()> {
2954            decoder.debug_check_bounds::<Self>(offset);
2955            // Verify that padding bytes are zero.
2956            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
2957            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2958            let mask = 0xffffffff00000000u64;
2959            let maskedval = padval & mask;
2960            if maskedval != 0 {
2961                return Err(fidl::Error::NonZeroPadding {
2962                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
2963                });
2964            }
2965            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
2966            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2967            let mask = 0xffffffff00000000u64;
2968            let maskedval = padval & mask;
2969            if maskedval != 0 {
2970                return Err(fidl::Error::NonZeroPadding {
2971                    padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
2972                });
2973            }
2974            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(80) };
2975            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2976            let mask = 0xffffffff00000000u64;
2977            let maskedval = padval & mask;
2978            if maskedval != 0 {
2979                return Err(fidl::Error::NonZeroPadding {
2980                    padding_start: offset + 80 + ((mask as u64).trailing_zeros() / 8) as usize,
2981                });
2982            }
2983            fidl::decode!(u32, D, &mut self.mesh_id, decoder, offset + 0, _depth)?;
2984            fidl::decode!(u32, D, &mut self.index_buffer_id, decoder, offset + 4, _depth)?;
2985            fidl::decode!(MeshIndexFormat, D, &mut self.index_format, decoder, offset + 8, _depth)?;
2986            fidl::decode!(u64, D, &mut self.index_offset, decoder, offset + 16, _depth)?;
2987            fidl::decode!(u32, D, &mut self.index_count, decoder, offset + 24, _depth)?;
2988            fidl::decode!(u32, D, &mut self.vertex_buffer_id, decoder, offset + 28, _depth)?;
2989            fidl::decode!(
2990                MeshVertexFormat,
2991                D,
2992                &mut self.vertex_format,
2993                decoder,
2994                offset + 32,
2995                _depth
2996            )?;
2997            fidl::decode!(u64, D, &mut self.vertex_offset, decoder, offset + 48, _depth)?;
2998            fidl::decode!(u32, D, &mut self.vertex_count, decoder, offset + 56, _depth)?;
2999            fidl::decode!(BoundingBox, D, &mut self.bounding_box, decoder, offset + 60, _depth)?;
3000            Ok(())
3001        }
3002    }
3003
3004    impl fidl::encoding::ValueTypeMarker for BoundingBox {
3005        type Borrowed<'a> = &'a Self;
3006        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3007            value
3008        }
3009    }
3010
3011    unsafe impl fidl::encoding::TypeMarker for BoundingBox {
3012        type Owned = Self;
3013
3014        #[inline(always)]
3015        fn inline_align(_context: fidl::encoding::Context) -> usize {
3016            4
3017        }
3018
3019        #[inline(always)]
3020        fn inline_size(_context: fidl::encoding::Context) -> usize {
3021            24
3022        }
3023    }
3024
3025    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BoundingBox, D>
3026        for &BoundingBox
3027    {
3028        #[inline]
3029        unsafe fn encode(
3030            self,
3031            encoder: &mut fidl::encoding::Encoder<'_, D>,
3032            offset: usize,
3033            _depth: fidl::encoding::Depth,
3034        ) -> fidl::Result<()> {
3035            encoder.debug_check_bounds::<BoundingBox>(offset);
3036            // Delegate to tuple encoding.
3037            fidl::encoding::Encode::<BoundingBox, D>::encode(
3038                (
3039                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.min),
3040                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.max),
3041                ),
3042                encoder,
3043                offset,
3044                _depth,
3045            )
3046        }
3047    }
3048    unsafe impl<
3049            D: fidl::encoding::ResourceDialect,
3050            T0: fidl::encoding::Encode<Vec3, D>,
3051            T1: fidl::encoding::Encode<Vec3, D>,
3052        > fidl::encoding::Encode<BoundingBox, D> for (T0, T1)
3053    {
3054        #[inline]
3055        unsafe fn encode(
3056            self,
3057            encoder: &mut fidl::encoding::Encoder<'_, D>,
3058            offset: usize,
3059            depth: fidl::encoding::Depth,
3060        ) -> fidl::Result<()> {
3061            encoder.debug_check_bounds::<BoundingBox>(offset);
3062            // Zero out padding regions. There's no need to apply masks
3063            // because the unmasked parts will be overwritten by fields.
3064            // Write the fields.
3065            self.0.encode(encoder, offset + 0, depth)?;
3066            self.1.encode(encoder, offset + 12, depth)?;
3067            Ok(())
3068        }
3069    }
3070
3071    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BoundingBox {
3072        #[inline(always)]
3073        fn new_empty() -> Self {
3074            Self { min: fidl::new_empty!(Vec3, D), max: fidl::new_empty!(Vec3, D) }
3075        }
3076
3077        #[inline]
3078        unsafe fn decode(
3079            &mut self,
3080            decoder: &mut fidl::encoding::Decoder<'_, D>,
3081            offset: usize,
3082            _depth: fidl::encoding::Depth,
3083        ) -> fidl::Result<()> {
3084            decoder.debug_check_bounds::<Self>(offset);
3085            // Verify that padding bytes are zero.
3086            fidl::decode!(Vec3, D, &mut self.min, decoder, offset + 0, _depth)?;
3087            fidl::decode!(Vec3, D, &mut self.max, decoder, offset + 12, _depth)?;
3088            Ok(())
3089        }
3090    }
3091
3092    impl fidl::encoding::ValueTypeMarker for BufferArgs {
3093        type Borrowed<'a> = &'a Self;
3094        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3095            value
3096        }
3097    }
3098
3099    unsafe impl fidl::encoding::TypeMarker for BufferArgs {
3100        type Owned = Self;
3101
3102        #[inline(always)]
3103        fn inline_align(_context: fidl::encoding::Context) -> usize {
3104            4
3105        }
3106
3107        #[inline(always)]
3108        fn inline_size(_context: fidl::encoding::Context) -> usize {
3109            12
3110        }
3111        #[inline(always)]
3112        fn encode_is_copy() -> bool {
3113            true
3114        }
3115
3116        #[inline(always)]
3117        fn decode_is_copy() -> bool {
3118            true
3119        }
3120    }
3121
3122    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BufferArgs, D>
3123        for &BufferArgs
3124    {
3125        #[inline]
3126        unsafe fn encode(
3127            self,
3128            encoder: &mut fidl::encoding::Encoder<'_, D>,
3129            offset: usize,
3130            _depth: fidl::encoding::Depth,
3131        ) -> fidl::Result<()> {
3132            encoder.debug_check_bounds::<BufferArgs>(offset);
3133            unsafe {
3134                // Copy the object into the buffer.
3135                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3136                (buf_ptr as *mut BufferArgs).write_unaligned((self as *const BufferArgs).read());
3137                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3138                // done second because the memcpy will write garbage to these bytes.
3139            }
3140            Ok(())
3141        }
3142    }
3143    unsafe impl<
3144            D: fidl::encoding::ResourceDialect,
3145            T0: fidl::encoding::Encode<u32, D>,
3146            T1: fidl::encoding::Encode<u32, D>,
3147            T2: fidl::encoding::Encode<u32, D>,
3148        > fidl::encoding::Encode<BufferArgs, D> for (T0, T1, T2)
3149    {
3150        #[inline]
3151        unsafe fn encode(
3152            self,
3153            encoder: &mut fidl::encoding::Encoder<'_, D>,
3154            offset: usize,
3155            depth: fidl::encoding::Depth,
3156        ) -> fidl::Result<()> {
3157            encoder.debug_check_bounds::<BufferArgs>(offset);
3158            // Zero out padding regions. There's no need to apply masks
3159            // because the unmasked parts will be overwritten by fields.
3160            // Write the fields.
3161            self.0.encode(encoder, offset + 0, depth)?;
3162            self.1.encode(encoder, offset + 4, depth)?;
3163            self.2.encode(encoder, offset + 8, depth)?;
3164            Ok(())
3165        }
3166    }
3167
3168    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BufferArgs {
3169        #[inline(always)]
3170        fn new_empty() -> Self {
3171            Self {
3172                memory_id: fidl::new_empty!(u32, D),
3173                memory_offset: fidl::new_empty!(u32, D),
3174                num_bytes: fidl::new_empty!(u32, D),
3175            }
3176        }
3177
3178        #[inline]
3179        unsafe fn decode(
3180            &mut self,
3181            decoder: &mut fidl::encoding::Decoder<'_, D>,
3182            offset: usize,
3183            _depth: fidl::encoding::Depth,
3184        ) -> fidl::Result<()> {
3185            decoder.debug_check_bounds::<Self>(offset);
3186            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3187            // Verify that padding bytes are zero.
3188            // Copy from the buffer into the object.
3189            unsafe {
3190                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
3191            }
3192            Ok(())
3193        }
3194    }
3195
3196    impl fidl::encoding::ValueTypeMarker for CameraArgs {
3197        type Borrowed<'a> = &'a Self;
3198        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3199            value
3200        }
3201    }
3202
3203    unsafe impl fidl::encoding::TypeMarker for CameraArgs {
3204        type Owned = Self;
3205
3206        #[inline(always)]
3207        fn inline_align(_context: fidl::encoding::Context) -> usize {
3208            4
3209        }
3210
3211        #[inline(always)]
3212        fn inline_size(_context: fidl::encoding::Context) -> usize {
3213            4
3214        }
3215        #[inline(always)]
3216        fn encode_is_copy() -> bool {
3217            true
3218        }
3219
3220        #[inline(always)]
3221        fn decode_is_copy() -> bool {
3222            true
3223        }
3224    }
3225
3226    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CameraArgs, D>
3227        for &CameraArgs
3228    {
3229        #[inline]
3230        unsafe fn encode(
3231            self,
3232            encoder: &mut fidl::encoding::Encoder<'_, D>,
3233            offset: usize,
3234            _depth: fidl::encoding::Depth,
3235        ) -> fidl::Result<()> {
3236            encoder.debug_check_bounds::<CameraArgs>(offset);
3237            unsafe {
3238                // Copy the object into the buffer.
3239                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3240                (buf_ptr as *mut CameraArgs).write_unaligned((self as *const CameraArgs).read());
3241                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3242                // done second because the memcpy will write garbage to these bytes.
3243            }
3244            Ok(())
3245        }
3246    }
3247    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
3248        fidl::encoding::Encode<CameraArgs, D> for (T0,)
3249    {
3250        #[inline]
3251        unsafe fn encode(
3252            self,
3253            encoder: &mut fidl::encoding::Encoder<'_, D>,
3254            offset: usize,
3255            depth: fidl::encoding::Depth,
3256        ) -> fidl::Result<()> {
3257            encoder.debug_check_bounds::<CameraArgs>(offset);
3258            // Zero out padding regions. There's no need to apply masks
3259            // because the unmasked parts will be overwritten by fields.
3260            // Write the fields.
3261            self.0.encode(encoder, offset + 0, depth)?;
3262            Ok(())
3263        }
3264    }
3265
3266    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CameraArgs {
3267        #[inline(always)]
3268        fn new_empty() -> Self {
3269            Self { scene_id: fidl::new_empty!(u32, D) }
3270        }
3271
3272        #[inline]
3273        unsafe fn decode(
3274            &mut self,
3275            decoder: &mut fidl::encoding::Decoder<'_, D>,
3276            offset: usize,
3277            _depth: fidl::encoding::Depth,
3278        ) -> fidl::Result<()> {
3279            decoder.debug_check_bounds::<Self>(offset);
3280            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3281            // Verify that padding bytes are zero.
3282            // Copy from the buffer into the object.
3283            unsafe {
3284                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
3285            }
3286            Ok(())
3287        }
3288    }
3289
3290    impl fidl::encoding::ValueTypeMarker for CircleArgs {
3291        type Borrowed<'a> = &'a Self;
3292        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3293            value
3294        }
3295    }
3296
3297    unsafe impl fidl::encoding::TypeMarker for CircleArgs {
3298        type Owned = Self;
3299
3300        #[inline(always)]
3301        fn inline_align(_context: fidl::encoding::Context) -> usize {
3302            8
3303        }
3304
3305        #[inline(always)]
3306        fn inline_size(_context: fidl::encoding::Context) -> usize {
3307            16
3308        }
3309    }
3310
3311    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CircleArgs, D>
3312        for &CircleArgs
3313    {
3314        #[inline]
3315        unsafe fn encode(
3316            self,
3317            encoder: &mut fidl::encoding::Encoder<'_, D>,
3318            offset: usize,
3319            _depth: fidl::encoding::Depth,
3320        ) -> fidl::Result<()> {
3321            encoder.debug_check_bounds::<CircleArgs>(offset);
3322            // Delegate to tuple encoding.
3323            fidl::encoding::Encode::<CircleArgs, D>::encode(
3324                (<Value as fidl::encoding::ValueTypeMarker>::borrow(&self.radius),),
3325                encoder,
3326                offset,
3327                _depth,
3328            )
3329        }
3330    }
3331    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Value, D>>
3332        fidl::encoding::Encode<CircleArgs, D> for (T0,)
3333    {
3334        #[inline]
3335        unsafe fn encode(
3336            self,
3337            encoder: &mut fidl::encoding::Encoder<'_, D>,
3338            offset: usize,
3339            depth: fidl::encoding::Depth,
3340        ) -> fidl::Result<()> {
3341            encoder.debug_check_bounds::<CircleArgs>(offset);
3342            // Zero out padding regions. There's no need to apply masks
3343            // because the unmasked parts will be overwritten by fields.
3344            // Write the fields.
3345            self.0.encode(encoder, offset + 0, depth)?;
3346            Ok(())
3347        }
3348    }
3349
3350    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CircleArgs {
3351        #[inline(always)]
3352        fn new_empty() -> Self {
3353            Self { radius: fidl::new_empty!(Value, D) }
3354        }
3355
3356        #[inline]
3357        unsafe fn decode(
3358            &mut self,
3359            decoder: &mut fidl::encoding::Decoder<'_, D>,
3360            offset: usize,
3361            _depth: fidl::encoding::Depth,
3362        ) -> fidl::Result<()> {
3363            decoder.debug_check_bounds::<Self>(offset);
3364            // Verify that padding bytes are zero.
3365            fidl::decode!(Value, D, &mut self.radius, decoder, offset + 0, _depth)?;
3366            Ok(())
3367        }
3368    }
3369
3370    impl fidl::encoding::ValueTypeMarker for ClipNodeArgs {
3371        type Borrowed<'a> = &'a Self;
3372        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3373            value
3374        }
3375    }
3376
3377    unsafe impl fidl::encoding::TypeMarker for ClipNodeArgs {
3378        type Owned = Self;
3379
3380        #[inline(always)]
3381        fn inline_align(_context: fidl::encoding::Context) -> usize {
3382            4
3383        }
3384
3385        #[inline(always)]
3386        fn inline_size(_context: fidl::encoding::Context) -> usize {
3387            4
3388        }
3389        #[inline(always)]
3390        fn encode_is_copy() -> bool {
3391            true
3392        }
3393
3394        #[inline(always)]
3395        fn decode_is_copy() -> bool {
3396            true
3397        }
3398    }
3399
3400    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ClipNodeArgs, D>
3401        for &ClipNodeArgs
3402    {
3403        #[inline]
3404        unsafe fn encode(
3405            self,
3406            encoder: &mut fidl::encoding::Encoder<'_, D>,
3407            offset: usize,
3408            _depth: fidl::encoding::Depth,
3409        ) -> fidl::Result<()> {
3410            encoder.debug_check_bounds::<ClipNodeArgs>(offset);
3411            unsafe {
3412                // Copy the object into the buffer.
3413                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3414                (buf_ptr as *mut ClipNodeArgs)
3415                    .write_unaligned((self as *const ClipNodeArgs).read());
3416                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3417                // done second because the memcpy will write garbage to these bytes.
3418            }
3419            Ok(())
3420        }
3421    }
3422    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
3423        fidl::encoding::Encode<ClipNodeArgs, D> for (T0,)
3424    {
3425        #[inline]
3426        unsafe fn encode(
3427            self,
3428            encoder: &mut fidl::encoding::Encoder<'_, D>,
3429            offset: usize,
3430            depth: fidl::encoding::Depth,
3431        ) -> fidl::Result<()> {
3432            encoder.debug_check_bounds::<ClipNodeArgs>(offset);
3433            // Zero out padding regions. There's no need to apply masks
3434            // because the unmasked parts will be overwritten by fields.
3435            // Write the fields.
3436            self.0.encode(encoder, offset + 0, depth)?;
3437            Ok(())
3438        }
3439    }
3440
3441    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ClipNodeArgs {
3442        #[inline(always)]
3443        fn new_empty() -> Self {
3444            Self { unused: fidl::new_empty!(u32, D) }
3445        }
3446
3447        #[inline]
3448        unsafe fn decode(
3449            &mut self,
3450            decoder: &mut fidl::encoding::Decoder<'_, D>,
3451            offset: usize,
3452            _depth: fidl::encoding::Depth,
3453        ) -> fidl::Result<()> {
3454            decoder.debug_check_bounds::<Self>(offset);
3455            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3456            // Verify that padding bytes are zero.
3457            // Copy from the buffer into the object.
3458            unsafe {
3459                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
3460            }
3461            Ok(())
3462        }
3463    }
3464
3465    impl fidl::encoding::ValueTypeMarker for ColorRgb {
3466        type Borrowed<'a> = &'a Self;
3467        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3468            value
3469        }
3470    }
3471
3472    unsafe impl fidl::encoding::TypeMarker for ColorRgb {
3473        type Owned = Self;
3474
3475        #[inline(always)]
3476        fn inline_align(_context: fidl::encoding::Context) -> usize {
3477            4
3478        }
3479
3480        #[inline(always)]
3481        fn inline_size(_context: fidl::encoding::Context) -> usize {
3482            12
3483        }
3484    }
3485
3486    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ColorRgb, D> for &ColorRgb {
3487        #[inline]
3488        unsafe fn encode(
3489            self,
3490            encoder: &mut fidl::encoding::Encoder<'_, D>,
3491            offset: usize,
3492            _depth: fidl::encoding::Depth,
3493        ) -> fidl::Result<()> {
3494            encoder.debug_check_bounds::<ColorRgb>(offset);
3495            // Delegate to tuple encoding.
3496            fidl::encoding::Encode::<ColorRgb, D>::encode(
3497                (
3498                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.red),
3499                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.green),
3500                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.blue),
3501                ),
3502                encoder,
3503                offset,
3504                _depth,
3505            )
3506        }
3507    }
3508    unsafe impl<
3509            D: fidl::encoding::ResourceDialect,
3510            T0: fidl::encoding::Encode<f32, D>,
3511            T1: fidl::encoding::Encode<f32, D>,
3512            T2: fidl::encoding::Encode<f32, D>,
3513        > fidl::encoding::Encode<ColorRgb, D> for (T0, T1, T2)
3514    {
3515        #[inline]
3516        unsafe fn encode(
3517            self,
3518            encoder: &mut fidl::encoding::Encoder<'_, D>,
3519            offset: usize,
3520            depth: fidl::encoding::Depth,
3521        ) -> fidl::Result<()> {
3522            encoder.debug_check_bounds::<ColorRgb>(offset);
3523            // Zero out padding regions. There's no need to apply masks
3524            // because the unmasked parts will be overwritten by fields.
3525            // Write the fields.
3526            self.0.encode(encoder, offset + 0, depth)?;
3527            self.1.encode(encoder, offset + 4, depth)?;
3528            self.2.encode(encoder, offset + 8, depth)?;
3529            Ok(())
3530        }
3531    }
3532
3533    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ColorRgb {
3534        #[inline(always)]
3535        fn new_empty() -> Self {
3536            Self {
3537                red: fidl::new_empty!(f32, D),
3538                green: fidl::new_empty!(f32, D),
3539                blue: fidl::new_empty!(f32, D),
3540            }
3541        }
3542
3543        #[inline]
3544        unsafe fn decode(
3545            &mut self,
3546            decoder: &mut fidl::encoding::Decoder<'_, D>,
3547            offset: usize,
3548            _depth: fidl::encoding::Depth,
3549        ) -> fidl::Result<()> {
3550            decoder.debug_check_bounds::<Self>(offset);
3551            // Verify that padding bytes are zero.
3552            fidl::decode!(f32, D, &mut self.red, decoder, offset + 0, _depth)?;
3553            fidl::decode!(f32, D, &mut self.green, decoder, offset + 4, _depth)?;
3554            fidl::decode!(f32, D, &mut self.blue, decoder, offset + 8, _depth)?;
3555            Ok(())
3556        }
3557    }
3558
3559    impl fidl::encoding::ValueTypeMarker for ColorRgbValue {
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 ColorRgbValue {
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            16
3577        }
3578    }
3579
3580    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ColorRgbValue, D>
3581        for &ColorRgbValue
3582    {
3583        #[inline]
3584        unsafe fn encode(
3585            self,
3586            encoder: &mut fidl::encoding::Encoder<'_, D>,
3587            offset: usize,
3588            _depth: fidl::encoding::Depth,
3589        ) -> fidl::Result<()> {
3590            encoder.debug_check_bounds::<ColorRgbValue>(offset);
3591            // Delegate to tuple encoding.
3592            fidl::encoding::Encode::<ColorRgbValue, D>::encode(
3593                (
3594                    <ColorRgb as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
3595                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
3596                ),
3597                encoder,
3598                offset,
3599                _depth,
3600            )
3601        }
3602    }
3603    unsafe impl<
3604            D: fidl::encoding::ResourceDialect,
3605            T0: fidl::encoding::Encode<ColorRgb, D>,
3606            T1: fidl::encoding::Encode<u32, D>,
3607        > fidl::encoding::Encode<ColorRgbValue, D> for (T0, T1)
3608    {
3609        #[inline]
3610        unsafe fn encode(
3611            self,
3612            encoder: &mut fidl::encoding::Encoder<'_, D>,
3613            offset: usize,
3614            depth: fidl::encoding::Depth,
3615        ) -> fidl::Result<()> {
3616            encoder.debug_check_bounds::<ColorRgbValue>(offset);
3617            // Zero out padding regions. There's no need to apply masks
3618            // because the unmasked parts will be overwritten by fields.
3619            // Write the fields.
3620            self.0.encode(encoder, offset + 0, depth)?;
3621            self.1.encode(encoder, offset + 12, depth)?;
3622            Ok(())
3623        }
3624    }
3625
3626    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ColorRgbValue {
3627        #[inline(always)]
3628        fn new_empty() -> Self {
3629            Self { value: fidl::new_empty!(ColorRgb, D), variable_id: fidl::new_empty!(u32, D) }
3630        }
3631
3632        #[inline]
3633        unsafe fn decode(
3634            &mut self,
3635            decoder: &mut fidl::encoding::Decoder<'_, D>,
3636            offset: usize,
3637            _depth: fidl::encoding::Depth,
3638        ) -> fidl::Result<()> {
3639            decoder.debug_check_bounds::<Self>(offset);
3640            // Verify that padding bytes are zero.
3641            fidl::decode!(ColorRgb, D, &mut self.value, decoder, offset + 0, _depth)?;
3642            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 12, _depth)?;
3643            Ok(())
3644        }
3645    }
3646
3647    impl fidl::encoding::ValueTypeMarker for ColorRgba {
3648        type Borrowed<'a> = &'a Self;
3649        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3650            value
3651        }
3652    }
3653
3654    unsafe impl fidl::encoding::TypeMarker for ColorRgba {
3655        type Owned = Self;
3656
3657        #[inline(always)]
3658        fn inline_align(_context: fidl::encoding::Context) -> usize {
3659            1
3660        }
3661
3662        #[inline(always)]
3663        fn inline_size(_context: fidl::encoding::Context) -> usize {
3664            4
3665        }
3666        #[inline(always)]
3667        fn encode_is_copy() -> bool {
3668            true
3669        }
3670
3671        #[inline(always)]
3672        fn decode_is_copy() -> bool {
3673            true
3674        }
3675    }
3676
3677    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ColorRgba, D>
3678        for &ColorRgba
3679    {
3680        #[inline]
3681        unsafe fn encode(
3682            self,
3683            encoder: &mut fidl::encoding::Encoder<'_, D>,
3684            offset: usize,
3685            _depth: fidl::encoding::Depth,
3686        ) -> fidl::Result<()> {
3687            encoder.debug_check_bounds::<ColorRgba>(offset);
3688            unsafe {
3689                // Copy the object into the buffer.
3690                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3691                (buf_ptr as *mut ColorRgba).write_unaligned((self as *const ColorRgba).read());
3692                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3693                // done second because the memcpy will write garbage to these bytes.
3694            }
3695            Ok(())
3696        }
3697    }
3698    unsafe impl<
3699            D: fidl::encoding::ResourceDialect,
3700            T0: fidl::encoding::Encode<u8, D>,
3701            T1: fidl::encoding::Encode<u8, D>,
3702            T2: fidl::encoding::Encode<u8, D>,
3703            T3: fidl::encoding::Encode<u8, D>,
3704        > fidl::encoding::Encode<ColorRgba, D> for (T0, T1, T2, T3)
3705    {
3706        #[inline]
3707        unsafe fn encode(
3708            self,
3709            encoder: &mut fidl::encoding::Encoder<'_, D>,
3710            offset: usize,
3711            depth: fidl::encoding::Depth,
3712        ) -> fidl::Result<()> {
3713            encoder.debug_check_bounds::<ColorRgba>(offset);
3714            // Zero out padding regions. There's no need to apply masks
3715            // because the unmasked parts will be overwritten by fields.
3716            // Write the fields.
3717            self.0.encode(encoder, offset + 0, depth)?;
3718            self.1.encode(encoder, offset + 1, depth)?;
3719            self.2.encode(encoder, offset + 2, depth)?;
3720            self.3.encode(encoder, offset + 3, depth)?;
3721            Ok(())
3722        }
3723    }
3724
3725    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ColorRgba {
3726        #[inline(always)]
3727        fn new_empty() -> Self {
3728            Self {
3729                red: fidl::new_empty!(u8, D),
3730                green: fidl::new_empty!(u8, D),
3731                blue: fidl::new_empty!(u8, D),
3732                alpha: fidl::new_empty!(u8, D),
3733            }
3734        }
3735
3736        #[inline]
3737        unsafe fn decode(
3738            &mut self,
3739            decoder: &mut fidl::encoding::Decoder<'_, D>,
3740            offset: usize,
3741            _depth: fidl::encoding::Depth,
3742        ) -> fidl::Result<()> {
3743            decoder.debug_check_bounds::<Self>(offset);
3744            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3745            // Verify that padding bytes are zero.
3746            // Copy from the buffer into the object.
3747            unsafe {
3748                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
3749            }
3750            Ok(())
3751        }
3752    }
3753
3754    impl fidl::encoding::ValueTypeMarker for ColorRgbaValue {
3755        type Borrowed<'a> = &'a Self;
3756        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3757            value
3758        }
3759    }
3760
3761    unsafe impl fidl::encoding::TypeMarker for ColorRgbaValue {
3762        type Owned = Self;
3763
3764        #[inline(always)]
3765        fn inline_align(_context: fidl::encoding::Context) -> usize {
3766            4
3767        }
3768
3769        #[inline(always)]
3770        fn inline_size(_context: fidl::encoding::Context) -> usize {
3771            8
3772        }
3773        #[inline(always)]
3774        fn encode_is_copy() -> bool {
3775            true
3776        }
3777
3778        #[inline(always)]
3779        fn decode_is_copy() -> bool {
3780            true
3781        }
3782    }
3783
3784    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ColorRgbaValue, D>
3785        for &ColorRgbaValue
3786    {
3787        #[inline]
3788        unsafe fn encode(
3789            self,
3790            encoder: &mut fidl::encoding::Encoder<'_, D>,
3791            offset: usize,
3792            _depth: fidl::encoding::Depth,
3793        ) -> fidl::Result<()> {
3794            encoder.debug_check_bounds::<ColorRgbaValue>(offset);
3795            unsafe {
3796                // Copy the object into the buffer.
3797                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3798                (buf_ptr as *mut ColorRgbaValue)
3799                    .write_unaligned((self as *const ColorRgbaValue).read());
3800                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3801                // done second because the memcpy will write garbage to these bytes.
3802            }
3803            Ok(())
3804        }
3805    }
3806    unsafe impl<
3807            D: fidl::encoding::ResourceDialect,
3808            T0: fidl::encoding::Encode<ColorRgba, D>,
3809            T1: fidl::encoding::Encode<u32, D>,
3810        > fidl::encoding::Encode<ColorRgbaValue, D> for (T0, T1)
3811    {
3812        #[inline]
3813        unsafe fn encode(
3814            self,
3815            encoder: &mut fidl::encoding::Encoder<'_, D>,
3816            offset: usize,
3817            depth: fidl::encoding::Depth,
3818        ) -> fidl::Result<()> {
3819            encoder.debug_check_bounds::<ColorRgbaValue>(offset);
3820            // Zero out padding regions. There's no need to apply masks
3821            // because the unmasked parts will be overwritten by fields.
3822            // Write the fields.
3823            self.0.encode(encoder, offset + 0, depth)?;
3824            self.1.encode(encoder, offset + 4, depth)?;
3825            Ok(())
3826        }
3827    }
3828
3829    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ColorRgbaValue {
3830        #[inline(always)]
3831        fn new_empty() -> Self {
3832            Self { value: fidl::new_empty!(ColorRgba, D), variable_id: fidl::new_empty!(u32, D) }
3833        }
3834
3835        #[inline]
3836        unsafe fn decode(
3837            &mut self,
3838            decoder: &mut fidl::encoding::Decoder<'_, D>,
3839            offset: usize,
3840            _depth: fidl::encoding::Depth,
3841        ) -> fidl::Result<()> {
3842            decoder.debug_check_bounds::<Self>(offset);
3843            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3844            // Verify that padding bytes are zero.
3845            // Copy from the buffer into the object.
3846            unsafe {
3847                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3848            }
3849            Ok(())
3850        }
3851    }
3852
3853    impl fidl::encoding::ValueTypeMarker for CompositorArgs {
3854        type Borrowed<'a> = &'a Self;
3855        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3856            value
3857        }
3858    }
3859
3860    unsafe impl fidl::encoding::TypeMarker for CompositorArgs {
3861        type Owned = Self;
3862
3863        #[inline(always)]
3864        fn inline_align(_context: fidl::encoding::Context) -> usize {
3865            4
3866        }
3867
3868        #[inline(always)]
3869        fn inline_size(_context: fidl::encoding::Context) -> usize {
3870            4
3871        }
3872        #[inline(always)]
3873        fn encode_is_copy() -> bool {
3874            true
3875        }
3876
3877        #[inline(always)]
3878        fn decode_is_copy() -> bool {
3879            true
3880        }
3881    }
3882
3883    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CompositorArgs, D>
3884        for &CompositorArgs
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::<CompositorArgs>(offset);
3894            unsafe {
3895                // Copy the object into the buffer.
3896                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3897                (buf_ptr as *mut CompositorArgs)
3898                    .write_unaligned((self as *const CompositorArgs).read());
3899                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3900                // done second because the memcpy will write garbage to these bytes.
3901            }
3902            Ok(())
3903        }
3904    }
3905    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
3906        fidl::encoding::Encode<CompositorArgs, D> for (T0,)
3907    {
3908        #[inline]
3909        unsafe fn encode(
3910            self,
3911            encoder: &mut fidl::encoding::Encoder<'_, D>,
3912            offset: usize,
3913            depth: fidl::encoding::Depth,
3914        ) -> fidl::Result<()> {
3915            encoder.debug_check_bounds::<CompositorArgs>(offset);
3916            // Zero out padding regions. There's no need to apply masks
3917            // because the unmasked parts will be overwritten by fields.
3918            // Write the fields.
3919            self.0.encode(encoder, offset + 0, depth)?;
3920            Ok(())
3921        }
3922    }
3923
3924    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompositorArgs {
3925        #[inline(always)]
3926        fn new_empty() -> Self {
3927            Self { dummy: fidl::new_empty!(u32, D) }
3928        }
3929
3930        #[inline]
3931        unsafe fn decode(
3932            &mut self,
3933            decoder: &mut fidl::encoding::Decoder<'_, D>,
3934            offset: usize,
3935            _depth: fidl::encoding::Depth,
3936        ) -> fidl::Result<()> {
3937            decoder.debug_check_bounds::<Self>(offset);
3938            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3939            // Verify that padding bytes are zero.
3940            // Copy from the buffer into the object.
3941            unsafe {
3942                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
3943            }
3944            Ok(())
3945        }
3946    }
3947
3948    impl fidl::encoding::ValueTypeMarker for DetachChildrenCmd {
3949        type Borrowed<'a> = &'a Self;
3950        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3951            value
3952        }
3953    }
3954
3955    unsafe impl fidl::encoding::TypeMarker for DetachChildrenCmd {
3956        type Owned = Self;
3957
3958        #[inline(always)]
3959        fn inline_align(_context: fidl::encoding::Context) -> usize {
3960            4
3961        }
3962
3963        #[inline(always)]
3964        fn inline_size(_context: fidl::encoding::Context) -> usize {
3965            4
3966        }
3967        #[inline(always)]
3968        fn encode_is_copy() -> bool {
3969            true
3970        }
3971
3972        #[inline(always)]
3973        fn decode_is_copy() -> bool {
3974            true
3975        }
3976    }
3977
3978    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DetachChildrenCmd, D>
3979        for &DetachChildrenCmd
3980    {
3981        #[inline]
3982        unsafe fn encode(
3983            self,
3984            encoder: &mut fidl::encoding::Encoder<'_, D>,
3985            offset: usize,
3986            _depth: fidl::encoding::Depth,
3987        ) -> fidl::Result<()> {
3988            encoder.debug_check_bounds::<DetachChildrenCmd>(offset);
3989            unsafe {
3990                // Copy the object into the buffer.
3991                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3992                (buf_ptr as *mut DetachChildrenCmd)
3993                    .write_unaligned((self as *const DetachChildrenCmd).read());
3994                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3995                // done second because the memcpy will write garbage to these bytes.
3996            }
3997            Ok(())
3998        }
3999    }
4000    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4001        fidl::encoding::Encode<DetachChildrenCmd, D> for (T0,)
4002    {
4003        #[inline]
4004        unsafe fn encode(
4005            self,
4006            encoder: &mut fidl::encoding::Encoder<'_, D>,
4007            offset: usize,
4008            depth: fidl::encoding::Depth,
4009        ) -> fidl::Result<()> {
4010            encoder.debug_check_bounds::<DetachChildrenCmd>(offset);
4011            // Zero out padding regions. There's no need to apply masks
4012            // because the unmasked parts will be overwritten by fields.
4013            // Write the fields.
4014            self.0.encode(encoder, offset + 0, depth)?;
4015            Ok(())
4016        }
4017    }
4018
4019    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DetachChildrenCmd {
4020        #[inline(always)]
4021        fn new_empty() -> Self {
4022            Self { node_id: fidl::new_empty!(u32, D) }
4023        }
4024
4025        #[inline]
4026        unsafe fn decode(
4027            &mut self,
4028            decoder: &mut fidl::encoding::Decoder<'_, D>,
4029            offset: usize,
4030            _depth: fidl::encoding::Depth,
4031        ) -> fidl::Result<()> {
4032            decoder.debug_check_bounds::<Self>(offset);
4033            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4034            // Verify that padding bytes are zero.
4035            // Copy from the buffer into the object.
4036            unsafe {
4037                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4038            }
4039            Ok(())
4040        }
4041    }
4042
4043    impl fidl::encoding::ValueTypeMarker for DetachCmd {
4044        type Borrowed<'a> = &'a Self;
4045        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4046            value
4047        }
4048    }
4049
4050    unsafe impl fidl::encoding::TypeMarker for DetachCmd {
4051        type Owned = Self;
4052
4053        #[inline(always)]
4054        fn inline_align(_context: fidl::encoding::Context) -> usize {
4055            4
4056        }
4057
4058        #[inline(always)]
4059        fn inline_size(_context: fidl::encoding::Context) -> usize {
4060            4
4061        }
4062        #[inline(always)]
4063        fn encode_is_copy() -> bool {
4064            true
4065        }
4066
4067        #[inline(always)]
4068        fn decode_is_copy() -> bool {
4069            true
4070        }
4071    }
4072
4073    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DetachCmd, D>
4074        for &DetachCmd
4075    {
4076        #[inline]
4077        unsafe fn encode(
4078            self,
4079            encoder: &mut fidl::encoding::Encoder<'_, D>,
4080            offset: usize,
4081            _depth: fidl::encoding::Depth,
4082        ) -> fidl::Result<()> {
4083            encoder.debug_check_bounds::<DetachCmd>(offset);
4084            unsafe {
4085                // Copy the object into the buffer.
4086                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4087                (buf_ptr as *mut DetachCmd).write_unaligned((self as *const DetachCmd).read());
4088                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4089                // done second because the memcpy will write garbage to these bytes.
4090            }
4091            Ok(())
4092        }
4093    }
4094    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4095        fidl::encoding::Encode<DetachCmd, D> for (T0,)
4096    {
4097        #[inline]
4098        unsafe fn encode(
4099            self,
4100            encoder: &mut fidl::encoding::Encoder<'_, D>,
4101            offset: usize,
4102            depth: fidl::encoding::Depth,
4103        ) -> fidl::Result<()> {
4104            encoder.debug_check_bounds::<DetachCmd>(offset);
4105            // Zero out padding regions. There's no need to apply masks
4106            // because the unmasked parts will be overwritten by fields.
4107            // Write the fields.
4108            self.0.encode(encoder, offset + 0, depth)?;
4109            Ok(())
4110        }
4111    }
4112
4113    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DetachCmd {
4114        #[inline(always)]
4115        fn new_empty() -> Self {
4116            Self { id: fidl::new_empty!(u32, D) }
4117        }
4118
4119        #[inline]
4120        unsafe fn decode(
4121            &mut self,
4122            decoder: &mut fidl::encoding::Decoder<'_, D>,
4123            offset: usize,
4124            _depth: fidl::encoding::Depth,
4125        ) -> fidl::Result<()> {
4126            decoder.debug_check_bounds::<Self>(offset);
4127            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4128            // Verify that padding bytes are zero.
4129            // Copy from the buffer into the object.
4130            unsafe {
4131                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4132            }
4133            Ok(())
4134        }
4135    }
4136
4137    impl fidl::encoding::ValueTypeMarker for DetachLightCmd {
4138        type Borrowed<'a> = &'a Self;
4139        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4140            value
4141        }
4142    }
4143
4144    unsafe impl fidl::encoding::TypeMarker for DetachLightCmd {
4145        type Owned = Self;
4146
4147        #[inline(always)]
4148        fn inline_align(_context: fidl::encoding::Context) -> usize {
4149            4
4150        }
4151
4152        #[inline(always)]
4153        fn inline_size(_context: fidl::encoding::Context) -> usize {
4154            4
4155        }
4156        #[inline(always)]
4157        fn encode_is_copy() -> bool {
4158            true
4159        }
4160
4161        #[inline(always)]
4162        fn decode_is_copy() -> bool {
4163            true
4164        }
4165    }
4166
4167    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DetachLightCmd, D>
4168        for &DetachLightCmd
4169    {
4170        #[inline]
4171        unsafe fn encode(
4172            self,
4173            encoder: &mut fidl::encoding::Encoder<'_, D>,
4174            offset: usize,
4175            _depth: fidl::encoding::Depth,
4176        ) -> fidl::Result<()> {
4177            encoder.debug_check_bounds::<DetachLightCmd>(offset);
4178            unsafe {
4179                // Copy the object into the buffer.
4180                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4181                (buf_ptr as *mut DetachLightCmd)
4182                    .write_unaligned((self as *const DetachLightCmd).read());
4183                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4184                // done second because the memcpy will write garbage to these bytes.
4185            }
4186            Ok(())
4187        }
4188    }
4189    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4190        fidl::encoding::Encode<DetachLightCmd, D> for (T0,)
4191    {
4192        #[inline]
4193        unsafe fn encode(
4194            self,
4195            encoder: &mut fidl::encoding::Encoder<'_, D>,
4196            offset: usize,
4197            depth: fidl::encoding::Depth,
4198        ) -> fidl::Result<()> {
4199            encoder.debug_check_bounds::<DetachLightCmd>(offset);
4200            // Zero out padding regions. There's no need to apply masks
4201            // because the unmasked parts will be overwritten by fields.
4202            // Write the fields.
4203            self.0.encode(encoder, offset + 0, depth)?;
4204            Ok(())
4205        }
4206    }
4207
4208    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DetachLightCmd {
4209        #[inline(always)]
4210        fn new_empty() -> Self {
4211            Self { light_id: fidl::new_empty!(u32, D) }
4212        }
4213
4214        #[inline]
4215        unsafe fn decode(
4216            &mut self,
4217            decoder: &mut fidl::encoding::Decoder<'_, D>,
4218            offset: usize,
4219            _depth: fidl::encoding::Depth,
4220        ) -> fidl::Result<()> {
4221            decoder.debug_check_bounds::<Self>(offset);
4222            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4223            // Verify that padding bytes are zero.
4224            // Copy from the buffer into the object.
4225            unsafe {
4226                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4227            }
4228            Ok(())
4229        }
4230    }
4231
4232    impl fidl::encoding::ValueTypeMarker for DetachLightsCmd {
4233        type Borrowed<'a> = &'a Self;
4234        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4235            value
4236        }
4237    }
4238
4239    unsafe impl fidl::encoding::TypeMarker for DetachLightsCmd {
4240        type Owned = Self;
4241
4242        #[inline(always)]
4243        fn inline_align(_context: fidl::encoding::Context) -> usize {
4244            4
4245        }
4246
4247        #[inline(always)]
4248        fn inline_size(_context: fidl::encoding::Context) -> usize {
4249            4
4250        }
4251        #[inline(always)]
4252        fn encode_is_copy() -> bool {
4253            true
4254        }
4255
4256        #[inline(always)]
4257        fn decode_is_copy() -> bool {
4258            true
4259        }
4260    }
4261
4262    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DetachLightsCmd, D>
4263        for &DetachLightsCmd
4264    {
4265        #[inline]
4266        unsafe fn encode(
4267            self,
4268            encoder: &mut fidl::encoding::Encoder<'_, D>,
4269            offset: usize,
4270            _depth: fidl::encoding::Depth,
4271        ) -> fidl::Result<()> {
4272            encoder.debug_check_bounds::<DetachLightsCmd>(offset);
4273            unsafe {
4274                // Copy the object into the buffer.
4275                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4276                (buf_ptr as *mut DetachLightsCmd)
4277                    .write_unaligned((self as *const DetachLightsCmd).read());
4278                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4279                // done second because the memcpy will write garbage to these bytes.
4280            }
4281            Ok(())
4282        }
4283    }
4284    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4285        fidl::encoding::Encode<DetachLightsCmd, D> for (T0,)
4286    {
4287        #[inline]
4288        unsafe fn encode(
4289            self,
4290            encoder: &mut fidl::encoding::Encoder<'_, D>,
4291            offset: usize,
4292            depth: fidl::encoding::Depth,
4293        ) -> fidl::Result<()> {
4294            encoder.debug_check_bounds::<DetachLightsCmd>(offset);
4295            // Zero out padding regions. There's no need to apply masks
4296            // because the unmasked parts will be overwritten by fields.
4297            // Write the fields.
4298            self.0.encode(encoder, offset + 0, depth)?;
4299            Ok(())
4300        }
4301    }
4302
4303    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DetachLightsCmd {
4304        #[inline(always)]
4305        fn new_empty() -> Self {
4306            Self { scene_id: fidl::new_empty!(u32, D) }
4307        }
4308
4309        #[inline]
4310        unsafe fn decode(
4311            &mut self,
4312            decoder: &mut fidl::encoding::Decoder<'_, D>,
4313            offset: usize,
4314            _depth: fidl::encoding::Depth,
4315        ) -> fidl::Result<()> {
4316            decoder.debug_check_bounds::<Self>(offset);
4317            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4318            // Verify that padding bytes are zero.
4319            // Copy from the buffer into the object.
4320            unsafe {
4321                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4322            }
4323            Ok(())
4324        }
4325    }
4326
4327    impl fidl::encoding::ValueTypeMarker for DirectionalLightArgs {
4328        type Borrowed<'a> = &'a Self;
4329        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4330            value
4331        }
4332    }
4333
4334    unsafe impl fidl::encoding::TypeMarker for DirectionalLightArgs {
4335        type Owned = Self;
4336
4337        #[inline(always)]
4338        fn inline_align(_context: fidl::encoding::Context) -> usize {
4339            4
4340        }
4341
4342        #[inline(always)]
4343        fn inline_size(_context: fidl::encoding::Context) -> usize {
4344            4
4345        }
4346        #[inline(always)]
4347        fn encode_is_copy() -> bool {
4348            true
4349        }
4350
4351        #[inline(always)]
4352        fn decode_is_copy() -> bool {
4353            true
4354        }
4355    }
4356
4357    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DirectionalLightArgs, D>
4358        for &DirectionalLightArgs
4359    {
4360        #[inline]
4361        unsafe fn encode(
4362            self,
4363            encoder: &mut fidl::encoding::Encoder<'_, D>,
4364            offset: usize,
4365            _depth: fidl::encoding::Depth,
4366        ) -> fidl::Result<()> {
4367            encoder.debug_check_bounds::<DirectionalLightArgs>(offset);
4368            unsafe {
4369                // Copy the object into the buffer.
4370                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4371                (buf_ptr as *mut DirectionalLightArgs)
4372                    .write_unaligned((self as *const DirectionalLightArgs).read());
4373                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4374                // done second because the memcpy will write garbage to these bytes.
4375            }
4376            Ok(())
4377        }
4378    }
4379    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4380        fidl::encoding::Encode<DirectionalLightArgs, D> for (T0,)
4381    {
4382        #[inline]
4383        unsafe fn encode(
4384            self,
4385            encoder: &mut fidl::encoding::Encoder<'_, D>,
4386            offset: usize,
4387            depth: fidl::encoding::Depth,
4388        ) -> fidl::Result<()> {
4389            encoder.debug_check_bounds::<DirectionalLightArgs>(offset);
4390            // Zero out padding regions. There's no need to apply masks
4391            // because the unmasked parts will be overwritten by fields.
4392            // Write the fields.
4393            self.0.encode(encoder, offset + 0, depth)?;
4394            Ok(())
4395        }
4396    }
4397
4398    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DirectionalLightArgs {
4399        #[inline(always)]
4400        fn new_empty() -> Self {
4401            Self { dummy: fidl::new_empty!(u32, D) }
4402        }
4403
4404        #[inline]
4405        unsafe fn decode(
4406            &mut self,
4407            decoder: &mut fidl::encoding::Decoder<'_, D>,
4408            offset: usize,
4409            _depth: fidl::encoding::Depth,
4410        ) -> fidl::Result<()> {
4411            decoder.debug_check_bounds::<Self>(offset);
4412            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4413            // Verify that padding bytes are zero.
4414            // Copy from the buffer into the object.
4415            unsafe {
4416                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4417            }
4418            Ok(())
4419        }
4420    }
4421
4422    impl fidl::encoding::ValueTypeMarker for DisplayCompositorArgs {
4423        type Borrowed<'a> = &'a Self;
4424        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4425            value
4426        }
4427    }
4428
4429    unsafe impl fidl::encoding::TypeMarker for DisplayCompositorArgs {
4430        type Owned = Self;
4431
4432        #[inline(always)]
4433        fn inline_align(_context: fidl::encoding::Context) -> usize {
4434            4
4435        }
4436
4437        #[inline(always)]
4438        fn inline_size(_context: fidl::encoding::Context) -> usize {
4439            4
4440        }
4441        #[inline(always)]
4442        fn encode_is_copy() -> bool {
4443            true
4444        }
4445
4446        #[inline(always)]
4447        fn decode_is_copy() -> bool {
4448            true
4449        }
4450    }
4451
4452    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisplayCompositorArgs, D>
4453        for &DisplayCompositorArgs
4454    {
4455        #[inline]
4456        unsafe fn encode(
4457            self,
4458            encoder: &mut fidl::encoding::Encoder<'_, D>,
4459            offset: usize,
4460            _depth: fidl::encoding::Depth,
4461        ) -> fidl::Result<()> {
4462            encoder.debug_check_bounds::<DisplayCompositorArgs>(offset);
4463            unsafe {
4464                // Copy the object into the buffer.
4465                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4466                (buf_ptr as *mut DisplayCompositorArgs)
4467                    .write_unaligned((self as *const DisplayCompositorArgs).read());
4468                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4469                // done second because the memcpy will write garbage to these bytes.
4470            }
4471            Ok(())
4472        }
4473    }
4474    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4475        fidl::encoding::Encode<DisplayCompositorArgs, D> for (T0,)
4476    {
4477        #[inline]
4478        unsafe fn encode(
4479            self,
4480            encoder: &mut fidl::encoding::Encoder<'_, D>,
4481            offset: usize,
4482            depth: fidl::encoding::Depth,
4483        ) -> fidl::Result<()> {
4484            encoder.debug_check_bounds::<DisplayCompositorArgs>(offset);
4485            // Zero out padding regions. There's no need to apply masks
4486            // because the unmasked parts will be overwritten by fields.
4487            // Write the fields.
4488            self.0.encode(encoder, offset + 0, depth)?;
4489            Ok(())
4490        }
4491    }
4492
4493    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisplayCompositorArgs {
4494        #[inline(always)]
4495        fn new_empty() -> Self {
4496            Self { dummy: fidl::new_empty!(u32, D) }
4497        }
4498
4499        #[inline]
4500        unsafe fn decode(
4501            &mut self,
4502            decoder: &mut fidl::encoding::Decoder<'_, D>,
4503            offset: usize,
4504            _depth: fidl::encoding::Depth,
4505        ) -> fidl::Result<()> {
4506            decoder.debug_check_bounds::<Self>(offset);
4507            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4508            // Verify that padding bytes are zero.
4509            // Copy from the buffer into the object.
4510            unsafe {
4511                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4512            }
4513            Ok(())
4514        }
4515    }
4516
4517    impl fidl::encoding::ValueTypeMarker for DisplayInfo {
4518        type Borrowed<'a> = &'a Self;
4519        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4520            value
4521        }
4522    }
4523
4524    unsafe impl fidl::encoding::TypeMarker for DisplayInfo {
4525        type Owned = Self;
4526
4527        #[inline(always)]
4528        fn inline_align(_context: fidl::encoding::Context) -> usize {
4529            4
4530        }
4531
4532        #[inline(always)]
4533        fn inline_size(_context: fidl::encoding::Context) -> usize {
4534            8
4535        }
4536        #[inline(always)]
4537        fn encode_is_copy() -> bool {
4538            true
4539        }
4540
4541        #[inline(always)]
4542        fn decode_is_copy() -> bool {
4543            true
4544        }
4545    }
4546
4547    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DisplayInfo, D>
4548        for &DisplayInfo
4549    {
4550        #[inline]
4551        unsafe fn encode(
4552            self,
4553            encoder: &mut fidl::encoding::Encoder<'_, D>,
4554            offset: usize,
4555            _depth: fidl::encoding::Depth,
4556        ) -> fidl::Result<()> {
4557            encoder.debug_check_bounds::<DisplayInfo>(offset);
4558            unsafe {
4559                // Copy the object into the buffer.
4560                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4561                (buf_ptr as *mut DisplayInfo).write_unaligned((self as *const DisplayInfo).read());
4562                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4563                // done second because the memcpy will write garbage to these bytes.
4564            }
4565            Ok(())
4566        }
4567    }
4568    unsafe impl<
4569            D: fidl::encoding::ResourceDialect,
4570            T0: fidl::encoding::Encode<u32, D>,
4571            T1: fidl::encoding::Encode<u32, D>,
4572        > fidl::encoding::Encode<DisplayInfo, D> for (T0, T1)
4573    {
4574        #[inline]
4575        unsafe fn encode(
4576            self,
4577            encoder: &mut fidl::encoding::Encoder<'_, D>,
4578            offset: usize,
4579            depth: fidl::encoding::Depth,
4580        ) -> fidl::Result<()> {
4581            encoder.debug_check_bounds::<DisplayInfo>(offset);
4582            // Zero out padding regions. There's no need to apply masks
4583            // because the unmasked parts will be overwritten by fields.
4584            // Write the fields.
4585            self.0.encode(encoder, offset + 0, depth)?;
4586            self.1.encode(encoder, offset + 4, depth)?;
4587            Ok(())
4588        }
4589    }
4590
4591    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DisplayInfo {
4592        #[inline(always)]
4593        fn new_empty() -> Self {
4594            Self { width_in_px: fidl::new_empty!(u32, D), height_in_px: fidl::new_empty!(u32, D) }
4595        }
4596
4597        #[inline]
4598        unsafe fn decode(
4599            &mut self,
4600            decoder: &mut fidl::encoding::Decoder<'_, D>,
4601            offset: usize,
4602            _depth: fidl::encoding::Depth,
4603        ) -> fidl::Result<()> {
4604            decoder.debug_check_bounds::<Self>(offset);
4605            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4606            // Verify that padding bytes are zero.
4607            // Copy from the buffer into the object.
4608            unsafe {
4609                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
4610            }
4611            Ok(())
4612        }
4613    }
4614
4615    impl fidl::encoding::ValueTypeMarker for EntityNodeArgs {
4616        type Borrowed<'a> = &'a Self;
4617        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4618            value
4619        }
4620    }
4621
4622    unsafe impl fidl::encoding::TypeMarker for EntityNodeArgs {
4623        type Owned = Self;
4624
4625        #[inline(always)]
4626        fn inline_align(_context: fidl::encoding::Context) -> usize {
4627            4
4628        }
4629
4630        #[inline(always)]
4631        fn inline_size(_context: fidl::encoding::Context) -> usize {
4632            4
4633        }
4634        #[inline(always)]
4635        fn encode_is_copy() -> bool {
4636            true
4637        }
4638
4639        #[inline(always)]
4640        fn decode_is_copy() -> bool {
4641            true
4642        }
4643    }
4644
4645    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EntityNodeArgs, D>
4646        for &EntityNodeArgs
4647    {
4648        #[inline]
4649        unsafe fn encode(
4650            self,
4651            encoder: &mut fidl::encoding::Encoder<'_, D>,
4652            offset: usize,
4653            _depth: fidl::encoding::Depth,
4654        ) -> fidl::Result<()> {
4655            encoder.debug_check_bounds::<EntityNodeArgs>(offset);
4656            unsafe {
4657                // Copy the object into the buffer.
4658                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4659                (buf_ptr as *mut EntityNodeArgs)
4660                    .write_unaligned((self as *const EntityNodeArgs).read());
4661                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4662                // done second because the memcpy will write garbage to these bytes.
4663            }
4664            Ok(())
4665        }
4666    }
4667    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
4668        fidl::encoding::Encode<EntityNodeArgs, D> for (T0,)
4669    {
4670        #[inline]
4671        unsafe fn encode(
4672            self,
4673            encoder: &mut fidl::encoding::Encoder<'_, D>,
4674            offset: usize,
4675            depth: fidl::encoding::Depth,
4676        ) -> fidl::Result<()> {
4677            encoder.debug_check_bounds::<EntityNodeArgs>(offset);
4678            // Zero out padding regions. There's no need to apply masks
4679            // because the unmasked parts will be overwritten by fields.
4680            // Write the fields.
4681            self.0.encode(encoder, offset + 0, depth)?;
4682            Ok(())
4683        }
4684    }
4685
4686    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EntityNodeArgs {
4687        #[inline(always)]
4688        fn new_empty() -> Self {
4689            Self { unused: fidl::new_empty!(u32, D) }
4690        }
4691
4692        #[inline]
4693        unsafe fn decode(
4694            &mut self,
4695            decoder: &mut fidl::encoding::Decoder<'_, D>,
4696            offset: usize,
4697            _depth: fidl::encoding::Depth,
4698        ) -> fidl::Result<()> {
4699            decoder.debug_check_bounds::<Self>(offset);
4700            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4701            // Verify that padding bytes are zero.
4702            // Copy from the buffer into the object.
4703            unsafe {
4704                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
4705            }
4706            Ok(())
4707        }
4708    }
4709
4710    impl fidl::encoding::ValueTypeMarker for FactoredTransform {
4711        type Borrowed<'a> = &'a Self;
4712        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4713            value
4714        }
4715    }
4716
4717    unsafe impl fidl::encoding::TypeMarker for FactoredTransform {
4718        type Owned = Self;
4719
4720        #[inline(always)]
4721        fn inline_align(_context: fidl::encoding::Context) -> usize {
4722            4
4723        }
4724
4725        #[inline(always)]
4726        fn inline_size(_context: fidl::encoding::Context) -> usize {
4727            52
4728        }
4729    }
4730
4731    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FactoredTransform, D>
4732        for &FactoredTransform
4733    {
4734        #[inline]
4735        unsafe fn encode(
4736            self,
4737            encoder: &mut fidl::encoding::Encoder<'_, D>,
4738            offset: usize,
4739            _depth: fidl::encoding::Depth,
4740        ) -> fidl::Result<()> {
4741            encoder.debug_check_bounds::<FactoredTransform>(offset);
4742            // Delegate to tuple encoding.
4743            fidl::encoding::Encode::<FactoredTransform, D>::encode(
4744                (
4745                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.translation),
4746                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.scale),
4747                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.anchor),
4748                    <Quaternion as fidl::encoding::ValueTypeMarker>::borrow(&self.rotation),
4749                ),
4750                encoder,
4751                offset,
4752                _depth,
4753            )
4754        }
4755    }
4756    unsafe impl<
4757            D: fidl::encoding::ResourceDialect,
4758            T0: fidl::encoding::Encode<Vec3, D>,
4759            T1: fidl::encoding::Encode<Vec3, D>,
4760            T2: fidl::encoding::Encode<Vec3, D>,
4761            T3: fidl::encoding::Encode<Quaternion, D>,
4762        > fidl::encoding::Encode<FactoredTransform, D> for (T0, T1, T2, T3)
4763    {
4764        #[inline]
4765        unsafe fn encode(
4766            self,
4767            encoder: &mut fidl::encoding::Encoder<'_, D>,
4768            offset: usize,
4769            depth: fidl::encoding::Depth,
4770        ) -> fidl::Result<()> {
4771            encoder.debug_check_bounds::<FactoredTransform>(offset);
4772            // Zero out padding regions. There's no need to apply masks
4773            // because the unmasked parts will be overwritten by fields.
4774            // Write the fields.
4775            self.0.encode(encoder, offset + 0, depth)?;
4776            self.1.encode(encoder, offset + 12, depth)?;
4777            self.2.encode(encoder, offset + 24, depth)?;
4778            self.3.encode(encoder, offset + 36, depth)?;
4779            Ok(())
4780        }
4781    }
4782
4783    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FactoredTransform {
4784        #[inline(always)]
4785        fn new_empty() -> Self {
4786            Self {
4787                translation: fidl::new_empty!(Vec3, D),
4788                scale: fidl::new_empty!(Vec3, D),
4789                anchor: fidl::new_empty!(Vec3, D),
4790                rotation: fidl::new_empty!(Quaternion, D),
4791            }
4792        }
4793
4794        #[inline]
4795        unsafe fn decode(
4796            &mut self,
4797            decoder: &mut fidl::encoding::Decoder<'_, D>,
4798            offset: usize,
4799            _depth: fidl::encoding::Depth,
4800        ) -> fidl::Result<()> {
4801            decoder.debug_check_bounds::<Self>(offset);
4802            // Verify that padding bytes are zero.
4803            fidl::decode!(Vec3, D, &mut self.translation, decoder, offset + 0, _depth)?;
4804            fidl::decode!(Vec3, D, &mut self.scale, decoder, offset + 12, _depth)?;
4805            fidl::decode!(Vec3, D, &mut self.anchor, decoder, offset + 24, _depth)?;
4806            fidl::decode!(Quaternion, D, &mut self.rotation, decoder, offset + 36, _depth)?;
4807            Ok(())
4808        }
4809    }
4810
4811    impl fidl::encoding::ValueTypeMarker for FloatValue {
4812        type Borrowed<'a> = &'a Self;
4813        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4814            value
4815        }
4816    }
4817
4818    unsafe impl fidl::encoding::TypeMarker for FloatValue {
4819        type Owned = Self;
4820
4821        #[inline(always)]
4822        fn inline_align(_context: fidl::encoding::Context) -> usize {
4823            4
4824        }
4825
4826        #[inline(always)]
4827        fn inline_size(_context: fidl::encoding::Context) -> usize {
4828            8
4829        }
4830    }
4831
4832    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FloatValue, D>
4833        for &FloatValue
4834    {
4835        #[inline]
4836        unsafe fn encode(
4837            self,
4838            encoder: &mut fidl::encoding::Encoder<'_, D>,
4839            offset: usize,
4840            _depth: fidl::encoding::Depth,
4841        ) -> fidl::Result<()> {
4842            encoder.debug_check_bounds::<FloatValue>(offset);
4843            // Delegate to tuple encoding.
4844            fidl::encoding::Encode::<FloatValue, D>::encode(
4845                (
4846                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
4847                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
4848                ),
4849                encoder,
4850                offset,
4851                _depth,
4852            )
4853        }
4854    }
4855    unsafe impl<
4856            D: fidl::encoding::ResourceDialect,
4857            T0: fidl::encoding::Encode<f32, D>,
4858            T1: fidl::encoding::Encode<u32, D>,
4859        > fidl::encoding::Encode<FloatValue, D> for (T0, T1)
4860    {
4861        #[inline]
4862        unsafe fn encode(
4863            self,
4864            encoder: &mut fidl::encoding::Encoder<'_, D>,
4865            offset: usize,
4866            depth: fidl::encoding::Depth,
4867        ) -> fidl::Result<()> {
4868            encoder.debug_check_bounds::<FloatValue>(offset);
4869            // Zero out padding regions. There's no need to apply masks
4870            // because the unmasked parts will be overwritten by fields.
4871            // Write the fields.
4872            self.0.encode(encoder, offset + 0, depth)?;
4873            self.1.encode(encoder, offset + 4, depth)?;
4874            Ok(())
4875        }
4876    }
4877
4878    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FloatValue {
4879        #[inline(always)]
4880        fn new_empty() -> Self {
4881            Self { value: fidl::new_empty!(f32, D), variable_id: fidl::new_empty!(u32, D) }
4882        }
4883
4884        #[inline]
4885        unsafe fn decode(
4886            &mut self,
4887            decoder: &mut fidl::encoding::Decoder<'_, D>,
4888            offset: usize,
4889            _depth: fidl::encoding::Depth,
4890        ) -> fidl::Result<()> {
4891            decoder.debug_check_bounds::<Self>(offset);
4892            // Verify that padding bytes are zero.
4893            fidl::decode!(f32, D, &mut self.value, decoder, offset + 0, _depth)?;
4894            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 4, _depth)?;
4895            Ok(())
4896        }
4897    }
4898
4899    impl fidl::encoding::ValueTypeMarker for ImageArgs {
4900        type Borrowed<'a> = &'a Self;
4901        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4902            value
4903        }
4904    }
4905
4906    unsafe impl fidl::encoding::TypeMarker for ImageArgs {
4907        type Owned = Self;
4908
4909        #[inline(always)]
4910        fn inline_align(_context: fidl::encoding::Context) -> usize {
4911            4
4912        }
4913
4914        #[inline(always)]
4915        fn inline_size(_context: fidl::encoding::Context) -> usize {
4916            40
4917        }
4918    }
4919
4920    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ImageArgs, D>
4921        for &ImageArgs
4922    {
4923        #[inline]
4924        unsafe fn encode(
4925            self,
4926            encoder: &mut fidl::encoding::Encoder<'_, D>,
4927            offset: usize,
4928            _depth: fidl::encoding::Depth,
4929        ) -> fidl::Result<()> {
4930            encoder.debug_check_bounds::<ImageArgs>(offset);
4931            // Delegate to tuple encoding.
4932            fidl::encoding::Encode::<ImageArgs, D>::encode(
4933                (
4934                    <fidl_fuchsia_images__common::ImageInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),
4935                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.memory_id),
4936                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.memory_offset),
4937                ),
4938                encoder, offset, _depth
4939            )
4940        }
4941    }
4942    unsafe impl<
4943            D: fidl::encoding::ResourceDialect,
4944            T0: fidl::encoding::Encode<fidl_fuchsia_images__common::ImageInfo, D>,
4945            T1: fidl::encoding::Encode<u32, D>,
4946            T2: fidl::encoding::Encode<u32, D>,
4947        > fidl::encoding::Encode<ImageArgs, D> for (T0, T1, T2)
4948    {
4949        #[inline]
4950        unsafe fn encode(
4951            self,
4952            encoder: &mut fidl::encoding::Encoder<'_, D>,
4953            offset: usize,
4954            depth: fidl::encoding::Depth,
4955        ) -> fidl::Result<()> {
4956            encoder.debug_check_bounds::<ImageArgs>(offset);
4957            // Zero out padding regions. There's no need to apply masks
4958            // because the unmasked parts will be overwritten by fields.
4959            // Write the fields.
4960            self.0.encode(encoder, offset + 0, depth)?;
4961            self.1.encode(encoder, offset + 32, depth)?;
4962            self.2.encode(encoder, offset + 36, depth)?;
4963            Ok(())
4964        }
4965    }
4966
4967    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ImageArgs {
4968        #[inline(always)]
4969        fn new_empty() -> Self {
4970            Self {
4971                info: fidl::new_empty!(fidl_fuchsia_images__common::ImageInfo, D),
4972                memory_id: fidl::new_empty!(u32, D),
4973                memory_offset: fidl::new_empty!(u32, D),
4974            }
4975        }
4976
4977        #[inline]
4978        unsafe fn decode(
4979            &mut self,
4980            decoder: &mut fidl::encoding::Decoder<'_, D>,
4981            offset: usize,
4982            _depth: fidl::encoding::Depth,
4983        ) -> fidl::Result<()> {
4984            decoder.debug_check_bounds::<Self>(offset);
4985            // Verify that padding bytes are zero.
4986            fidl::decode!(
4987                fidl_fuchsia_images__common::ImageInfo,
4988                D,
4989                &mut self.info,
4990                decoder,
4991                offset + 0,
4992                _depth
4993            )?;
4994            fidl::decode!(u32, D, &mut self.memory_id, decoder, offset + 32, _depth)?;
4995            fidl::decode!(u32, D, &mut self.memory_offset, decoder, offset + 36, _depth)?;
4996            Ok(())
4997        }
4998    }
4999
5000    impl fidl::encoding::ValueTypeMarker for ImageArgs2 {
5001        type Borrowed<'a> = &'a Self;
5002        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5003            value
5004        }
5005    }
5006
5007    unsafe impl fidl::encoding::TypeMarker for ImageArgs2 {
5008        type Owned = Self;
5009
5010        #[inline(always)]
5011        fn inline_align(_context: fidl::encoding::Context) -> usize {
5012            4
5013        }
5014
5015        #[inline(always)]
5016        fn inline_size(_context: fidl::encoding::Context) -> usize {
5017            16
5018        }
5019        #[inline(always)]
5020        fn encode_is_copy() -> bool {
5021            true
5022        }
5023
5024        #[inline(always)]
5025        fn decode_is_copy() -> bool {
5026            true
5027        }
5028    }
5029
5030    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ImageArgs2, D>
5031        for &ImageArgs2
5032    {
5033        #[inline]
5034        unsafe fn encode(
5035            self,
5036            encoder: &mut fidl::encoding::Encoder<'_, D>,
5037            offset: usize,
5038            _depth: fidl::encoding::Depth,
5039        ) -> fidl::Result<()> {
5040            encoder.debug_check_bounds::<ImageArgs2>(offset);
5041            unsafe {
5042                // Copy the object into the buffer.
5043                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5044                (buf_ptr as *mut ImageArgs2).write_unaligned((self as *const ImageArgs2).read());
5045                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5046                // done second because the memcpy will write garbage to these bytes.
5047            }
5048            Ok(())
5049        }
5050    }
5051    unsafe impl<
5052            D: fidl::encoding::ResourceDialect,
5053            T0: fidl::encoding::Encode<u32, D>,
5054            T1: fidl::encoding::Encode<u32, D>,
5055            T2: fidl::encoding::Encode<u32, D>,
5056            T3: fidl::encoding::Encode<u32, D>,
5057        > fidl::encoding::Encode<ImageArgs2, D> for (T0, T1, T2, T3)
5058    {
5059        #[inline]
5060        unsafe fn encode(
5061            self,
5062            encoder: &mut fidl::encoding::Encoder<'_, D>,
5063            offset: usize,
5064            depth: fidl::encoding::Depth,
5065        ) -> fidl::Result<()> {
5066            encoder.debug_check_bounds::<ImageArgs2>(offset);
5067            // Zero out padding regions. There's no need to apply masks
5068            // because the unmasked parts will be overwritten by fields.
5069            // Write the fields.
5070            self.0.encode(encoder, offset + 0, depth)?;
5071            self.1.encode(encoder, offset + 4, depth)?;
5072            self.2.encode(encoder, offset + 8, depth)?;
5073            self.3.encode(encoder, offset + 12, depth)?;
5074            Ok(())
5075        }
5076    }
5077
5078    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ImageArgs2 {
5079        #[inline(always)]
5080        fn new_empty() -> Self {
5081            Self {
5082                width: fidl::new_empty!(u32, D),
5083                height: fidl::new_empty!(u32, D),
5084                buffer_collection_id: fidl::new_empty!(u32, D),
5085                buffer_collection_index: fidl::new_empty!(u32, D),
5086            }
5087        }
5088
5089        #[inline]
5090        unsafe fn decode(
5091            &mut self,
5092            decoder: &mut fidl::encoding::Decoder<'_, D>,
5093            offset: usize,
5094            _depth: fidl::encoding::Depth,
5095        ) -> fidl::Result<()> {
5096            decoder.debug_check_bounds::<Self>(offset);
5097            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5098            // Verify that padding bytes are zero.
5099            // Copy from the buffer into the object.
5100            unsafe {
5101                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
5102            }
5103            Ok(())
5104        }
5105    }
5106
5107    impl fidl::encoding::ValueTypeMarker for ImportUnboundEvent {
5108        type Borrowed<'a> = &'a Self;
5109        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5110            value
5111        }
5112    }
5113
5114    unsafe impl fidl::encoding::TypeMarker for ImportUnboundEvent {
5115        type Owned = Self;
5116
5117        #[inline(always)]
5118        fn inline_align(_context: fidl::encoding::Context) -> usize {
5119            4
5120        }
5121
5122        #[inline(always)]
5123        fn inline_size(_context: fidl::encoding::Context) -> usize {
5124            4
5125        }
5126        #[inline(always)]
5127        fn encode_is_copy() -> bool {
5128            true
5129        }
5130
5131        #[inline(always)]
5132        fn decode_is_copy() -> bool {
5133            true
5134        }
5135    }
5136
5137    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ImportUnboundEvent, D>
5138        for &ImportUnboundEvent
5139    {
5140        #[inline]
5141        unsafe fn encode(
5142            self,
5143            encoder: &mut fidl::encoding::Encoder<'_, D>,
5144            offset: usize,
5145            _depth: fidl::encoding::Depth,
5146        ) -> fidl::Result<()> {
5147            encoder.debug_check_bounds::<ImportUnboundEvent>(offset);
5148            unsafe {
5149                // Copy the object into the buffer.
5150                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5151                (buf_ptr as *mut ImportUnboundEvent)
5152                    .write_unaligned((self as *const ImportUnboundEvent).read());
5153                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5154                // done second because the memcpy will write garbage to these bytes.
5155            }
5156            Ok(())
5157        }
5158    }
5159    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5160        fidl::encoding::Encode<ImportUnboundEvent, D> for (T0,)
5161    {
5162        #[inline]
5163        unsafe fn encode(
5164            self,
5165            encoder: &mut fidl::encoding::Encoder<'_, D>,
5166            offset: usize,
5167            depth: fidl::encoding::Depth,
5168        ) -> fidl::Result<()> {
5169            encoder.debug_check_bounds::<ImportUnboundEvent>(offset);
5170            // Zero out padding regions. There's no need to apply masks
5171            // because the unmasked parts will be overwritten by fields.
5172            // Write the fields.
5173            self.0.encode(encoder, offset + 0, depth)?;
5174            Ok(())
5175        }
5176    }
5177
5178    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ImportUnboundEvent {
5179        #[inline(always)]
5180        fn new_empty() -> Self {
5181            Self { resource_id: fidl::new_empty!(u32, D) }
5182        }
5183
5184        #[inline]
5185        unsafe fn decode(
5186            &mut self,
5187            decoder: &mut fidl::encoding::Decoder<'_, D>,
5188            offset: usize,
5189            _depth: fidl::encoding::Depth,
5190        ) -> fidl::Result<()> {
5191            decoder.debug_check_bounds::<Self>(offset);
5192            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5193            // Verify that padding bytes are zero.
5194            // Copy from the buffer into the object.
5195            unsafe {
5196                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5197            }
5198            Ok(())
5199        }
5200    }
5201
5202    impl fidl::encoding::ValueTypeMarker for LayerArgs {
5203        type Borrowed<'a> = &'a Self;
5204        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5205            value
5206        }
5207    }
5208
5209    unsafe impl fidl::encoding::TypeMarker for LayerArgs {
5210        type Owned = Self;
5211
5212        #[inline(always)]
5213        fn inline_align(_context: fidl::encoding::Context) -> usize {
5214            4
5215        }
5216
5217        #[inline(always)]
5218        fn inline_size(_context: fidl::encoding::Context) -> usize {
5219            4
5220        }
5221        #[inline(always)]
5222        fn encode_is_copy() -> bool {
5223            true
5224        }
5225
5226        #[inline(always)]
5227        fn decode_is_copy() -> bool {
5228            true
5229        }
5230    }
5231
5232    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LayerArgs, D>
5233        for &LayerArgs
5234    {
5235        #[inline]
5236        unsafe fn encode(
5237            self,
5238            encoder: &mut fidl::encoding::Encoder<'_, D>,
5239            offset: usize,
5240            _depth: fidl::encoding::Depth,
5241        ) -> fidl::Result<()> {
5242            encoder.debug_check_bounds::<LayerArgs>(offset);
5243            unsafe {
5244                // Copy the object into the buffer.
5245                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5246                (buf_ptr as *mut LayerArgs).write_unaligned((self as *const LayerArgs).read());
5247                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5248                // done second because the memcpy will write garbage to these bytes.
5249            }
5250            Ok(())
5251        }
5252    }
5253    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5254        fidl::encoding::Encode<LayerArgs, D> for (T0,)
5255    {
5256        #[inline]
5257        unsafe fn encode(
5258            self,
5259            encoder: &mut fidl::encoding::Encoder<'_, D>,
5260            offset: usize,
5261            depth: fidl::encoding::Depth,
5262        ) -> fidl::Result<()> {
5263            encoder.debug_check_bounds::<LayerArgs>(offset);
5264            // Zero out padding regions. There's no need to apply masks
5265            // because the unmasked parts will be overwritten by fields.
5266            // Write the fields.
5267            self.0.encode(encoder, offset + 0, depth)?;
5268            Ok(())
5269        }
5270    }
5271
5272    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LayerArgs {
5273        #[inline(always)]
5274        fn new_empty() -> Self {
5275            Self { dummy: fidl::new_empty!(u32, D) }
5276        }
5277
5278        #[inline]
5279        unsafe fn decode(
5280            &mut self,
5281            decoder: &mut fidl::encoding::Decoder<'_, D>,
5282            offset: usize,
5283            _depth: fidl::encoding::Depth,
5284        ) -> fidl::Result<()> {
5285            decoder.debug_check_bounds::<Self>(offset);
5286            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5287            // Verify that padding bytes are zero.
5288            // Copy from the buffer into the object.
5289            unsafe {
5290                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5291            }
5292            Ok(())
5293        }
5294    }
5295
5296    impl fidl::encoding::ValueTypeMarker for LayerStackArgs {
5297        type Borrowed<'a> = &'a Self;
5298        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5299            value
5300        }
5301    }
5302
5303    unsafe impl fidl::encoding::TypeMarker for LayerStackArgs {
5304        type Owned = Self;
5305
5306        #[inline(always)]
5307        fn inline_align(_context: fidl::encoding::Context) -> usize {
5308            4
5309        }
5310
5311        #[inline(always)]
5312        fn inline_size(_context: fidl::encoding::Context) -> usize {
5313            4
5314        }
5315        #[inline(always)]
5316        fn encode_is_copy() -> bool {
5317            true
5318        }
5319
5320        #[inline(always)]
5321        fn decode_is_copy() -> bool {
5322            true
5323        }
5324    }
5325
5326    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LayerStackArgs, D>
5327        for &LayerStackArgs
5328    {
5329        #[inline]
5330        unsafe fn encode(
5331            self,
5332            encoder: &mut fidl::encoding::Encoder<'_, D>,
5333            offset: usize,
5334            _depth: fidl::encoding::Depth,
5335        ) -> fidl::Result<()> {
5336            encoder.debug_check_bounds::<LayerStackArgs>(offset);
5337            unsafe {
5338                // Copy the object into the buffer.
5339                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5340                (buf_ptr as *mut LayerStackArgs)
5341                    .write_unaligned((self as *const LayerStackArgs).read());
5342                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5343                // done second because the memcpy will write garbage to these bytes.
5344            }
5345            Ok(())
5346        }
5347    }
5348    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5349        fidl::encoding::Encode<LayerStackArgs, D> for (T0,)
5350    {
5351        #[inline]
5352        unsafe fn encode(
5353            self,
5354            encoder: &mut fidl::encoding::Encoder<'_, D>,
5355            offset: usize,
5356            depth: fidl::encoding::Depth,
5357        ) -> fidl::Result<()> {
5358            encoder.debug_check_bounds::<LayerStackArgs>(offset);
5359            // Zero out padding regions. There's no need to apply masks
5360            // because the unmasked parts will be overwritten by fields.
5361            // Write the fields.
5362            self.0.encode(encoder, offset + 0, depth)?;
5363            Ok(())
5364        }
5365    }
5366
5367    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LayerStackArgs {
5368        #[inline(always)]
5369        fn new_empty() -> Self {
5370            Self { dummy: fidl::new_empty!(u32, D) }
5371        }
5372
5373        #[inline]
5374        unsafe fn decode(
5375            &mut self,
5376            decoder: &mut fidl::encoding::Decoder<'_, D>,
5377            offset: usize,
5378            _depth: fidl::encoding::Depth,
5379        ) -> fidl::Result<()> {
5380            decoder.debug_check_bounds::<Self>(offset);
5381            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5382            // Verify that padding bytes are zero.
5383            // Copy from the buffer into the object.
5384            unsafe {
5385                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5386            }
5387            Ok(())
5388        }
5389    }
5390
5391    impl fidl::encoding::ValueTypeMarker for MaterialArgs {
5392        type Borrowed<'a> = &'a Self;
5393        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5394            value
5395        }
5396    }
5397
5398    unsafe impl fidl::encoding::TypeMarker for MaterialArgs {
5399        type Owned = Self;
5400
5401        #[inline(always)]
5402        fn inline_align(_context: fidl::encoding::Context) -> usize {
5403            4
5404        }
5405
5406        #[inline(always)]
5407        fn inline_size(_context: fidl::encoding::Context) -> usize {
5408            4
5409        }
5410        #[inline(always)]
5411        fn encode_is_copy() -> bool {
5412            true
5413        }
5414
5415        #[inline(always)]
5416        fn decode_is_copy() -> bool {
5417            true
5418        }
5419    }
5420
5421    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MaterialArgs, D>
5422        for &MaterialArgs
5423    {
5424        #[inline]
5425        unsafe fn encode(
5426            self,
5427            encoder: &mut fidl::encoding::Encoder<'_, D>,
5428            offset: usize,
5429            _depth: fidl::encoding::Depth,
5430        ) -> fidl::Result<()> {
5431            encoder.debug_check_bounds::<MaterialArgs>(offset);
5432            unsafe {
5433                // Copy the object into the buffer.
5434                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5435                (buf_ptr as *mut MaterialArgs)
5436                    .write_unaligned((self as *const MaterialArgs).read());
5437                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5438                // done second because the memcpy will write garbage to these bytes.
5439            }
5440            Ok(())
5441        }
5442    }
5443    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5444        fidl::encoding::Encode<MaterialArgs, D> for (T0,)
5445    {
5446        #[inline]
5447        unsafe fn encode(
5448            self,
5449            encoder: &mut fidl::encoding::Encoder<'_, D>,
5450            offset: usize,
5451            depth: fidl::encoding::Depth,
5452        ) -> fidl::Result<()> {
5453            encoder.debug_check_bounds::<MaterialArgs>(offset);
5454            // Zero out padding regions. There's no need to apply masks
5455            // because the unmasked parts will be overwritten by fields.
5456            // Write the fields.
5457            self.0.encode(encoder, offset + 0, depth)?;
5458            Ok(())
5459        }
5460    }
5461
5462    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MaterialArgs {
5463        #[inline(always)]
5464        fn new_empty() -> Self {
5465            Self { dummy: fidl::new_empty!(u32, D) }
5466        }
5467
5468        #[inline]
5469        unsafe fn decode(
5470            &mut self,
5471            decoder: &mut fidl::encoding::Decoder<'_, D>,
5472            offset: usize,
5473            _depth: fidl::encoding::Depth,
5474        ) -> fidl::Result<()> {
5475            decoder.debug_check_bounds::<Self>(offset);
5476            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5477            // Verify that padding bytes are zero.
5478            // Copy from the buffer into the object.
5479            unsafe {
5480                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5481            }
5482            Ok(())
5483        }
5484    }
5485
5486    impl fidl::encoding::ValueTypeMarker for Matrix4Value {
5487        type Borrowed<'a> = &'a Self;
5488        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5489            value
5490        }
5491    }
5492
5493    unsafe impl fidl::encoding::TypeMarker for Matrix4Value {
5494        type Owned = Self;
5495
5496        #[inline(always)]
5497        fn inline_align(_context: fidl::encoding::Context) -> usize {
5498            4
5499        }
5500
5501        #[inline(always)]
5502        fn inline_size(_context: fidl::encoding::Context) -> usize {
5503            68
5504        }
5505    }
5506
5507    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Matrix4Value, D>
5508        for &Matrix4Value
5509    {
5510        #[inline]
5511        unsafe fn encode(
5512            self,
5513            encoder: &mut fidl::encoding::Encoder<'_, D>,
5514            offset: usize,
5515            _depth: fidl::encoding::Depth,
5516        ) -> fidl::Result<()> {
5517            encoder.debug_check_bounds::<Matrix4Value>(offset);
5518            // Delegate to tuple encoding.
5519            fidl::encoding::Encode::<Matrix4Value, D>::encode(
5520                (
5521                    <Mat4 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
5522                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
5523                ),
5524                encoder,
5525                offset,
5526                _depth,
5527            )
5528        }
5529    }
5530    unsafe impl<
5531            D: fidl::encoding::ResourceDialect,
5532            T0: fidl::encoding::Encode<Mat4, D>,
5533            T1: fidl::encoding::Encode<u32, D>,
5534        > fidl::encoding::Encode<Matrix4Value, D> for (T0, T1)
5535    {
5536        #[inline]
5537        unsafe fn encode(
5538            self,
5539            encoder: &mut fidl::encoding::Encoder<'_, D>,
5540            offset: usize,
5541            depth: fidl::encoding::Depth,
5542        ) -> fidl::Result<()> {
5543            encoder.debug_check_bounds::<Matrix4Value>(offset);
5544            // Zero out padding regions. There's no need to apply masks
5545            // because the unmasked parts will be overwritten by fields.
5546            // Write the fields.
5547            self.0.encode(encoder, offset + 0, depth)?;
5548            self.1.encode(encoder, offset + 64, depth)?;
5549            Ok(())
5550        }
5551    }
5552
5553    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Matrix4Value {
5554        #[inline(always)]
5555        fn new_empty() -> Self {
5556            Self { value: fidl::new_empty!(Mat4, D), variable_id: fidl::new_empty!(u32, D) }
5557        }
5558
5559        #[inline]
5560        unsafe fn decode(
5561            &mut self,
5562            decoder: &mut fidl::encoding::Decoder<'_, D>,
5563            offset: usize,
5564            _depth: fidl::encoding::Depth,
5565        ) -> fidl::Result<()> {
5566            decoder.debug_check_bounds::<Self>(offset);
5567            // Verify that padding bytes are zero.
5568            fidl::decode!(Mat4, D, &mut self.value, decoder, offset + 0, _depth)?;
5569            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 64, _depth)?;
5570            Ok(())
5571        }
5572    }
5573
5574    impl fidl::encoding::ValueTypeMarker for MeshArgs {
5575        type Borrowed<'a> = &'a Self;
5576        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5577            value
5578        }
5579    }
5580
5581    unsafe impl fidl::encoding::TypeMarker for MeshArgs {
5582        type Owned = Self;
5583
5584        #[inline(always)]
5585        fn inline_align(_context: fidl::encoding::Context) -> usize {
5586            1
5587        }
5588
5589        #[inline(always)]
5590        fn inline_size(_context: fidl::encoding::Context) -> usize {
5591            1
5592        }
5593    }
5594
5595    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MeshArgs, D> for &MeshArgs {
5596        #[inline]
5597        unsafe fn encode(
5598            self,
5599            encoder: &mut fidl::encoding::Encoder<'_, D>,
5600            offset: usize,
5601            _depth: fidl::encoding::Depth,
5602        ) -> fidl::Result<()> {
5603            encoder.debug_check_bounds::<MeshArgs>(offset);
5604            encoder.write_num(0u8, offset);
5605            Ok(())
5606        }
5607    }
5608
5609    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MeshArgs {
5610        #[inline(always)]
5611        fn new_empty() -> Self {
5612            Self
5613        }
5614
5615        #[inline]
5616        unsafe fn decode(
5617            &mut self,
5618            decoder: &mut fidl::encoding::Decoder<'_, D>,
5619            offset: usize,
5620            _depth: fidl::encoding::Depth,
5621        ) -> fidl::Result<()> {
5622            decoder.debug_check_bounds::<Self>(offset);
5623            match decoder.read_num::<u8>(offset) {
5624                0 => Ok(()),
5625                _ => Err(fidl::Error::Invalid),
5626            }
5627        }
5628    }
5629
5630    impl fidl::encoding::ValueTypeMarker for MeshVertexFormat {
5631        type Borrowed<'a> = &'a Self;
5632        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5633            value
5634        }
5635    }
5636
5637    unsafe impl fidl::encoding::TypeMarker for MeshVertexFormat {
5638        type Owned = Self;
5639
5640        #[inline(always)]
5641        fn inline_align(_context: fidl::encoding::Context) -> usize {
5642            4
5643        }
5644
5645        #[inline(always)]
5646        fn inline_size(_context: fidl::encoding::Context) -> usize {
5647            12
5648        }
5649    }
5650
5651    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MeshVertexFormat, D>
5652        for &MeshVertexFormat
5653    {
5654        #[inline]
5655        unsafe fn encode(
5656            self,
5657            encoder: &mut fidl::encoding::Encoder<'_, D>,
5658            offset: usize,
5659            _depth: fidl::encoding::Depth,
5660        ) -> fidl::Result<()> {
5661            encoder.debug_check_bounds::<MeshVertexFormat>(offset);
5662            // Delegate to tuple encoding.
5663            fidl::encoding::Encode::<MeshVertexFormat, D>::encode(
5664                (
5665                    <ValueType as fidl::encoding::ValueTypeMarker>::borrow(&self.position_type),
5666                    <ValueType as fidl::encoding::ValueTypeMarker>::borrow(&self.normal_type),
5667                    <ValueType as fidl::encoding::ValueTypeMarker>::borrow(&self.tex_coord_type),
5668                ),
5669                encoder,
5670                offset,
5671                _depth,
5672            )
5673        }
5674    }
5675    unsafe impl<
5676            D: fidl::encoding::ResourceDialect,
5677            T0: fidl::encoding::Encode<ValueType, D>,
5678            T1: fidl::encoding::Encode<ValueType, D>,
5679            T2: fidl::encoding::Encode<ValueType, D>,
5680        > fidl::encoding::Encode<MeshVertexFormat, D> for (T0, T1, T2)
5681    {
5682        #[inline]
5683        unsafe fn encode(
5684            self,
5685            encoder: &mut fidl::encoding::Encoder<'_, D>,
5686            offset: usize,
5687            depth: fidl::encoding::Depth,
5688        ) -> fidl::Result<()> {
5689            encoder.debug_check_bounds::<MeshVertexFormat>(offset);
5690            // Zero out padding regions. There's no need to apply masks
5691            // because the unmasked parts will be overwritten by fields.
5692            // Write the fields.
5693            self.0.encode(encoder, offset + 0, depth)?;
5694            self.1.encode(encoder, offset + 4, depth)?;
5695            self.2.encode(encoder, offset + 8, depth)?;
5696            Ok(())
5697        }
5698    }
5699
5700    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MeshVertexFormat {
5701        #[inline(always)]
5702        fn new_empty() -> Self {
5703            Self {
5704                position_type: fidl::new_empty!(ValueType, D),
5705                normal_type: fidl::new_empty!(ValueType, D),
5706                tex_coord_type: fidl::new_empty!(ValueType, D),
5707            }
5708        }
5709
5710        #[inline]
5711        unsafe fn decode(
5712            &mut self,
5713            decoder: &mut fidl::encoding::Decoder<'_, D>,
5714            offset: usize,
5715            _depth: fidl::encoding::Depth,
5716        ) -> fidl::Result<()> {
5717            decoder.debug_check_bounds::<Self>(offset);
5718            // Verify that padding bytes are zero.
5719            fidl::decode!(ValueType, D, &mut self.position_type, decoder, offset + 0, _depth)?;
5720            fidl::decode!(ValueType, D, &mut self.normal_type, decoder, offset + 4, _depth)?;
5721            fidl::decode!(ValueType, D, &mut self.tex_coord_type, decoder, offset + 8, _depth)?;
5722            Ok(())
5723        }
5724    }
5725
5726    impl fidl::encoding::ValueTypeMarker for Metrics {
5727        type Borrowed<'a> = &'a Self;
5728        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5729            value
5730        }
5731    }
5732
5733    unsafe impl fidl::encoding::TypeMarker for Metrics {
5734        type Owned = Self;
5735
5736        #[inline(always)]
5737        fn inline_align(_context: fidl::encoding::Context) -> usize {
5738            4
5739        }
5740
5741        #[inline(always)]
5742        fn inline_size(_context: fidl::encoding::Context) -> usize {
5743            12
5744        }
5745    }
5746
5747    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Metrics, D> for &Metrics {
5748        #[inline]
5749        unsafe fn encode(
5750            self,
5751            encoder: &mut fidl::encoding::Encoder<'_, D>,
5752            offset: usize,
5753            _depth: fidl::encoding::Depth,
5754        ) -> fidl::Result<()> {
5755            encoder.debug_check_bounds::<Metrics>(offset);
5756            // Delegate to tuple encoding.
5757            fidl::encoding::Encode::<Metrics, D>::encode(
5758                (
5759                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.scale_x),
5760                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.scale_y),
5761                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.scale_z),
5762                ),
5763                encoder,
5764                offset,
5765                _depth,
5766            )
5767        }
5768    }
5769    unsafe impl<
5770            D: fidl::encoding::ResourceDialect,
5771            T0: fidl::encoding::Encode<f32, D>,
5772            T1: fidl::encoding::Encode<f32, D>,
5773            T2: fidl::encoding::Encode<f32, D>,
5774        > fidl::encoding::Encode<Metrics, D> for (T0, T1, T2)
5775    {
5776        #[inline]
5777        unsafe fn encode(
5778            self,
5779            encoder: &mut fidl::encoding::Encoder<'_, D>,
5780            offset: usize,
5781            depth: fidl::encoding::Depth,
5782        ) -> fidl::Result<()> {
5783            encoder.debug_check_bounds::<Metrics>(offset);
5784            // Zero out padding regions. There's no need to apply masks
5785            // because the unmasked parts will be overwritten by fields.
5786            // Write the fields.
5787            self.0.encode(encoder, offset + 0, depth)?;
5788            self.1.encode(encoder, offset + 4, depth)?;
5789            self.2.encode(encoder, offset + 8, depth)?;
5790            Ok(())
5791        }
5792    }
5793
5794    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Metrics {
5795        #[inline(always)]
5796        fn new_empty() -> Self {
5797            Self {
5798                scale_x: fidl::new_empty!(f32, D),
5799                scale_y: fidl::new_empty!(f32, D),
5800                scale_z: fidl::new_empty!(f32, D),
5801            }
5802        }
5803
5804        #[inline]
5805        unsafe fn decode(
5806            &mut self,
5807            decoder: &mut fidl::encoding::Decoder<'_, D>,
5808            offset: usize,
5809            _depth: fidl::encoding::Depth,
5810        ) -> fidl::Result<()> {
5811            decoder.debug_check_bounds::<Self>(offset);
5812            // Verify that padding bytes are zero.
5813            fidl::decode!(f32, D, &mut self.scale_x, decoder, offset + 0, _depth)?;
5814            fidl::decode!(f32, D, &mut self.scale_y, decoder, offset + 4, _depth)?;
5815            fidl::decode!(f32, D, &mut self.scale_z, decoder, offset + 8, _depth)?;
5816            Ok(())
5817        }
5818    }
5819
5820    impl fidl::encoding::ValueTypeMarker for MetricsEvent {
5821        type Borrowed<'a> = &'a Self;
5822        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5823            value
5824        }
5825    }
5826
5827    unsafe impl fidl::encoding::TypeMarker for MetricsEvent {
5828        type Owned = Self;
5829
5830        #[inline(always)]
5831        fn inline_align(_context: fidl::encoding::Context) -> usize {
5832            4
5833        }
5834
5835        #[inline(always)]
5836        fn inline_size(_context: fidl::encoding::Context) -> usize {
5837            16
5838        }
5839    }
5840
5841    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MetricsEvent, D>
5842        for &MetricsEvent
5843    {
5844        #[inline]
5845        unsafe fn encode(
5846            self,
5847            encoder: &mut fidl::encoding::Encoder<'_, D>,
5848            offset: usize,
5849            _depth: fidl::encoding::Depth,
5850        ) -> fidl::Result<()> {
5851            encoder.debug_check_bounds::<MetricsEvent>(offset);
5852            // Delegate to tuple encoding.
5853            fidl::encoding::Encode::<MetricsEvent, D>::encode(
5854                (
5855                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
5856                    <Metrics as fidl::encoding::ValueTypeMarker>::borrow(&self.metrics),
5857                ),
5858                encoder,
5859                offset,
5860                _depth,
5861            )
5862        }
5863    }
5864    unsafe impl<
5865            D: fidl::encoding::ResourceDialect,
5866            T0: fidl::encoding::Encode<u32, D>,
5867            T1: fidl::encoding::Encode<Metrics, D>,
5868        > fidl::encoding::Encode<MetricsEvent, D> for (T0, T1)
5869    {
5870        #[inline]
5871        unsafe fn encode(
5872            self,
5873            encoder: &mut fidl::encoding::Encoder<'_, D>,
5874            offset: usize,
5875            depth: fidl::encoding::Depth,
5876        ) -> fidl::Result<()> {
5877            encoder.debug_check_bounds::<MetricsEvent>(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            self.1.encode(encoder, offset + 4, depth)?;
5883            Ok(())
5884        }
5885    }
5886
5887    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MetricsEvent {
5888        #[inline(always)]
5889        fn new_empty() -> Self {
5890            Self { node_id: fidl::new_empty!(u32, D), metrics: fidl::new_empty!(Metrics, D) }
5891        }
5892
5893        #[inline]
5894        unsafe fn decode(
5895            &mut self,
5896            decoder: &mut fidl::encoding::Decoder<'_, D>,
5897            offset: usize,
5898            _depth: fidl::encoding::Depth,
5899        ) -> fidl::Result<()> {
5900            decoder.debug_check_bounds::<Self>(offset);
5901            // Verify that padding bytes are zero.
5902            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
5903            fidl::decode!(Metrics, D, &mut self.metrics, decoder, offset + 4, _depth)?;
5904            Ok(())
5905        }
5906    }
5907
5908    impl fidl::encoding::ValueTypeMarker for OpacityNodeArgsHack {
5909        type Borrowed<'a> = &'a Self;
5910        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5911            value
5912        }
5913    }
5914
5915    unsafe impl fidl::encoding::TypeMarker for OpacityNodeArgsHack {
5916        type Owned = Self;
5917
5918        #[inline(always)]
5919        fn inline_align(_context: fidl::encoding::Context) -> usize {
5920            4
5921        }
5922
5923        #[inline(always)]
5924        fn inline_size(_context: fidl::encoding::Context) -> usize {
5925            4
5926        }
5927        #[inline(always)]
5928        fn encode_is_copy() -> bool {
5929            true
5930        }
5931
5932        #[inline(always)]
5933        fn decode_is_copy() -> bool {
5934            true
5935        }
5936    }
5937
5938    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<OpacityNodeArgsHack, D>
5939        for &OpacityNodeArgsHack
5940    {
5941        #[inline]
5942        unsafe fn encode(
5943            self,
5944            encoder: &mut fidl::encoding::Encoder<'_, D>,
5945            offset: usize,
5946            _depth: fidl::encoding::Depth,
5947        ) -> fidl::Result<()> {
5948            encoder.debug_check_bounds::<OpacityNodeArgsHack>(offset);
5949            unsafe {
5950                // Copy the object into the buffer.
5951                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5952                (buf_ptr as *mut OpacityNodeArgsHack)
5953                    .write_unaligned((self as *const OpacityNodeArgsHack).read());
5954                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
5955                // done second because the memcpy will write garbage to these bytes.
5956            }
5957            Ok(())
5958        }
5959    }
5960    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5961        fidl::encoding::Encode<OpacityNodeArgsHack, D> for (T0,)
5962    {
5963        #[inline]
5964        unsafe fn encode(
5965            self,
5966            encoder: &mut fidl::encoding::Encoder<'_, D>,
5967            offset: usize,
5968            depth: fidl::encoding::Depth,
5969        ) -> fidl::Result<()> {
5970            encoder.debug_check_bounds::<OpacityNodeArgsHack>(offset);
5971            // Zero out padding regions. There's no need to apply masks
5972            // because the unmasked parts will be overwritten by fields.
5973            // Write the fields.
5974            self.0.encode(encoder, offset + 0, depth)?;
5975            Ok(())
5976        }
5977    }
5978
5979    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OpacityNodeArgsHack {
5980        #[inline(always)]
5981        fn new_empty() -> Self {
5982            Self { unused: fidl::new_empty!(u32, D) }
5983        }
5984
5985        #[inline]
5986        unsafe fn decode(
5987            &mut self,
5988            decoder: &mut fidl::encoding::Decoder<'_, D>,
5989            offset: usize,
5990            _depth: fidl::encoding::Depth,
5991        ) -> fidl::Result<()> {
5992            decoder.debug_check_bounds::<Self>(offset);
5993            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5994            // Verify that padding bytes are zero.
5995            // Copy from the buffer into the object.
5996            unsafe {
5997                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5998            }
5999            Ok(())
6000        }
6001    }
6002
6003    impl fidl::encoding::ValueTypeMarker for Plane3 {
6004        type Borrowed<'a> = &'a Self;
6005        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6006            value
6007        }
6008    }
6009
6010    unsafe impl fidl::encoding::TypeMarker for Plane3 {
6011        type Owned = Self;
6012
6013        #[inline(always)]
6014        fn inline_align(_context: fidl::encoding::Context) -> usize {
6015            4
6016        }
6017
6018        #[inline(always)]
6019        fn inline_size(_context: fidl::encoding::Context) -> usize {
6020            16
6021        }
6022    }
6023
6024    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Plane3, D> for &Plane3 {
6025        #[inline]
6026        unsafe fn encode(
6027            self,
6028            encoder: &mut fidl::encoding::Encoder<'_, D>,
6029            offset: usize,
6030            _depth: fidl::encoding::Depth,
6031        ) -> fidl::Result<()> {
6032            encoder.debug_check_bounds::<Plane3>(offset);
6033            // Delegate to tuple encoding.
6034            fidl::encoding::Encode::<Plane3, D>::encode(
6035                (
6036                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.dir),
6037                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.dist),
6038                ),
6039                encoder,
6040                offset,
6041                _depth,
6042            )
6043        }
6044    }
6045    unsafe impl<
6046            D: fidl::encoding::ResourceDialect,
6047            T0: fidl::encoding::Encode<Vec3, D>,
6048            T1: fidl::encoding::Encode<f32, D>,
6049        > fidl::encoding::Encode<Plane3, D> for (T0, T1)
6050    {
6051        #[inline]
6052        unsafe fn encode(
6053            self,
6054            encoder: &mut fidl::encoding::Encoder<'_, D>,
6055            offset: usize,
6056            depth: fidl::encoding::Depth,
6057        ) -> fidl::Result<()> {
6058            encoder.debug_check_bounds::<Plane3>(offset);
6059            // Zero out padding regions. There's no need to apply masks
6060            // because the unmasked parts will be overwritten by fields.
6061            // Write the fields.
6062            self.0.encode(encoder, offset + 0, depth)?;
6063            self.1.encode(encoder, offset + 12, depth)?;
6064            Ok(())
6065        }
6066    }
6067
6068    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Plane3 {
6069        #[inline(always)]
6070        fn new_empty() -> Self {
6071            Self { dir: fidl::new_empty!(Vec3, D), dist: fidl::new_empty!(f32, D) }
6072        }
6073
6074        #[inline]
6075        unsafe fn decode(
6076            &mut self,
6077            decoder: &mut fidl::encoding::Decoder<'_, D>,
6078            offset: usize,
6079            _depth: fidl::encoding::Depth,
6080        ) -> fidl::Result<()> {
6081            decoder.debug_check_bounds::<Self>(offset);
6082            // Verify that padding bytes are zero.
6083            fidl::decode!(Vec3, D, &mut self.dir, decoder, offset + 0, _depth)?;
6084            fidl::decode!(f32, D, &mut self.dist, decoder, offset + 12, _depth)?;
6085            Ok(())
6086        }
6087    }
6088
6089    impl fidl::encoding::ValueTypeMarker for PointLightArgs {
6090        type Borrowed<'a> = &'a Self;
6091        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6092            value
6093        }
6094    }
6095
6096    unsafe impl fidl::encoding::TypeMarker for PointLightArgs {
6097        type Owned = Self;
6098
6099        #[inline(always)]
6100        fn inline_align(_context: fidl::encoding::Context) -> usize {
6101            4
6102        }
6103
6104        #[inline(always)]
6105        fn inline_size(_context: fidl::encoding::Context) -> usize {
6106            4
6107        }
6108        #[inline(always)]
6109        fn encode_is_copy() -> bool {
6110            true
6111        }
6112
6113        #[inline(always)]
6114        fn decode_is_copy() -> bool {
6115            true
6116        }
6117    }
6118
6119    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PointLightArgs, D>
6120        for &PointLightArgs
6121    {
6122        #[inline]
6123        unsafe fn encode(
6124            self,
6125            encoder: &mut fidl::encoding::Encoder<'_, D>,
6126            offset: usize,
6127            _depth: fidl::encoding::Depth,
6128        ) -> fidl::Result<()> {
6129            encoder.debug_check_bounds::<PointLightArgs>(offset);
6130            unsafe {
6131                // Copy the object into the buffer.
6132                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6133                (buf_ptr as *mut PointLightArgs)
6134                    .write_unaligned((self as *const PointLightArgs).read());
6135                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6136                // done second because the memcpy will write garbage to these bytes.
6137            }
6138            Ok(())
6139        }
6140    }
6141    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
6142        fidl::encoding::Encode<PointLightArgs, D> for (T0,)
6143    {
6144        #[inline]
6145        unsafe fn encode(
6146            self,
6147            encoder: &mut fidl::encoding::Encoder<'_, D>,
6148            offset: usize,
6149            depth: fidl::encoding::Depth,
6150        ) -> fidl::Result<()> {
6151            encoder.debug_check_bounds::<PointLightArgs>(offset);
6152            // Zero out padding regions. There's no need to apply masks
6153            // because the unmasked parts will be overwritten by fields.
6154            // Write the fields.
6155            self.0.encode(encoder, offset + 0, depth)?;
6156            Ok(())
6157        }
6158    }
6159
6160    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PointLightArgs {
6161        #[inline(always)]
6162        fn new_empty() -> Self {
6163            Self { dummy: fidl::new_empty!(u32, D) }
6164        }
6165
6166        #[inline]
6167        unsafe fn decode(
6168            &mut self,
6169            decoder: &mut fidl::encoding::Decoder<'_, D>,
6170            offset: usize,
6171            _depth: fidl::encoding::Depth,
6172        ) -> fidl::Result<()> {
6173            decoder.debug_check_bounds::<Self>(offset);
6174            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6175            // Verify that padding bytes are zero.
6176            // Copy from the buffer into the object.
6177            unsafe {
6178                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
6179            }
6180            Ok(())
6181        }
6182    }
6183
6184    impl fidl::encoding::ValueTypeMarker for Quaternion {
6185        type Borrowed<'a> = &'a Self;
6186        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6187            value
6188        }
6189    }
6190
6191    unsafe impl fidl::encoding::TypeMarker for Quaternion {
6192        type Owned = Self;
6193
6194        #[inline(always)]
6195        fn inline_align(_context: fidl::encoding::Context) -> usize {
6196            4
6197        }
6198
6199        #[inline(always)]
6200        fn inline_size(_context: fidl::encoding::Context) -> usize {
6201            16
6202        }
6203    }
6204
6205    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Quaternion, D>
6206        for &Quaternion
6207    {
6208        #[inline]
6209        unsafe fn encode(
6210            self,
6211            encoder: &mut fidl::encoding::Encoder<'_, D>,
6212            offset: usize,
6213            _depth: fidl::encoding::Depth,
6214        ) -> fidl::Result<()> {
6215            encoder.debug_check_bounds::<Quaternion>(offset);
6216            // Delegate to tuple encoding.
6217            fidl::encoding::Encode::<Quaternion, D>::encode(
6218                (
6219                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
6220                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
6221                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.z),
6222                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.w),
6223                ),
6224                encoder,
6225                offset,
6226                _depth,
6227            )
6228        }
6229    }
6230    unsafe impl<
6231            D: fidl::encoding::ResourceDialect,
6232            T0: fidl::encoding::Encode<f32, D>,
6233            T1: fidl::encoding::Encode<f32, D>,
6234            T2: fidl::encoding::Encode<f32, D>,
6235            T3: fidl::encoding::Encode<f32, D>,
6236        > fidl::encoding::Encode<Quaternion, D> for (T0, T1, T2, T3)
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::<Quaternion>(offset);
6246            // Zero out padding regions. There's no need to apply masks
6247            // because the unmasked parts will be overwritten by fields.
6248            // Write the fields.
6249            self.0.encode(encoder, offset + 0, depth)?;
6250            self.1.encode(encoder, offset + 4, depth)?;
6251            self.2.encode(encoder, offset + 8, depth)?;
6252            self.3.encode(encoder, offset + 12, depth)?;
6253            Ok(())
6254        }
6255    }
6256
6257    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Quaternion {
6258        #[inline(always)]
6259        fn new_empty() -> Self {
6260            Self {
6261                x: fidl::new_empty!(f32, D),
6262                y: fidl::new_empty!(f32, D),
6263                z: fidl::new_empty!(f32, D),
6264                w: fidl::new_empty!(f32, D),
6265            }
6266        }
6267
6268        #[inline]
6269        unsafe fn decode(
6270            &mut self,
6271            decoder: &mut fidl::encoding::Decoder<'_, D>,
6272            offset: usize,
6273            _depth: fidl::encoding::Depth,
6274        ) -> fidl::Result<()> {
6275            decoder.debug_check_bounds::<Self>(offset);
6276            // Verify that padding bytes are zero.
6277            fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
6278            fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
6279            fidl::decode!(f32, D, &mut self.z, decoder, offset + 8, _depth)?;
6280            fidl::decode!(f32, D, &mut self.w, decoder, offset + 12, _depth)?;
6281            Ok(())
6282        }
6283    }
6284
6285    impl fidl::encoding::ValueTypeMarker for QuaternionValue {
6286        type Borrowed<'a> = &'a Self;
6287        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6288            value
6289        }
6290    }
6291
6292    unsafe impl fidl::encoding::TypeMarker for QuaternionValue {
6293        type Owned = Self;
6294
6295        #[inline(always)]
6296        fn inline_align(_context: fidl::encoding::Context) -> usize {
6297            4
6298        }
6299
6300        #[inline(always)]
6301        fn inline_size(_context: fidl::encoding::Context) -> usize {
6302            20
6303        }
6304    }
6305
6306    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<QuaternionValue, D>
6307        for &QuaternionValue
6308    {
6309        #[inline]
6310        unsafe fn encode(
6311            self,
6312            encoder: &mut fidl::encoding::Encoder<'_, D>,
6313            offset: usize,
6314            _depth: fidl::encoding::Depth,
6315        ) -> fidl::Result<()> {
6316            encoder.debug_check_bounds::<QuaternionValue>(offset);
6317            // Delegate to tuple encoding.
6318            fidl::encoding::Encode::<QuaternionValue, D>::encode(
6319                (
6320                    <Quaternion as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
6321                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
6322                ),
6323                encoder,
6324                offset,
6325                _depth,
6326            )
6327        }
6328    }
6329    unsafe impl<
6330            D: fidl::encoding::ResourceDialect,
6331            T0: fidl::encoding::Encode<Quaternion, D>,
6332            T1: fidl::encoding::Encode<u32, D>,
6333        > fidl::encoding::Encode<QuaternionValue, D> for (T0, T1)
6334    {
6335        #[inline]
6336        unsafe fn encode(
6337            self,
6338            encoder: &mut fidl::encoding::Encoder<'_, D>,
6339            offset: usize,
6340            depth: fidl::encoding::Depth,
6341        ) -> fidl::Result<()> {
6342            encoder.debug_check_bounds::<QuaternionValue>(offset);
6343            // Zero out padding regions. There's no need to apply masks
6344            // because the unmasked parts will be overwritten by fields.
6345            // Write the fields.
6346            self.0.encode(encoder, offset + 0, depth)?;
6347            self.1.encode(encoder, offset + 16, depth)?;
6348            Ok(())
6349        }
6350    }
6351
6352    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for QuaternionValue {
6353        #[inline(always)]
6354        fn new_empty() -> Self {
6355            Self { value: fidl::new_empty!(Quaternion, D), variable_id: fidl::new_empty!(u32, D) }
6356        }
6357
6358        #[inline]
6359        unsafe fn decode(
6360            &mut self,
6361            decoder: &mut fidl::encoding::Decoder<'_, D>,
6362            offset: usize,
6363            _depth: fidl::encoding::Depth,
6364        ) -> fidl::Result<()> {
6365            decoder.debug_check_bounds::<Self>(offset);
6366            // Verify that padding bytes are zero.
6367            fidl::decode!(Quaternion, D, &mut self.value, decoder, offset + 0, _depth)?;
6368            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 16, _depth)?;
6369            Ok(())
6370        }
6371    }
6372
6373    impl fidl::encoding::ValueTypeMarker for RectangleArgs {
6374        type Borrowed<'a> = &'a Self;
6375        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6376            value
6377        }
6378    }
6379
6380    unsafe impl fidl::encoding::TypeMarker for RectangleArgs {
6381        type Owned = Self;
6382
6383        #[inline(always)]
6384        fn inline_align(_context: fidl::encoding::Context) -> usize {
6385            8
6386        }
6387
6388        #[inline(always)]
6389        fn inline_size(_context: fidl::encoding::Context) -> usize {
6390            32
6391        }
6392    }
6393
6394    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RectangleArgs, D>
6395        for &RectangleArgs
6396    {
6397        #[inline]
6398        unsafe fn encode(
6399            self,
6400            encoder: &mut fidl::encoding::Encoder<'_, D>,
6401            offset: usize,
6402            _depth: fidl::encoding::Depth,
6403        ) -> fidl::Result<()> {
6404            encoder.debug_check_bounds::<RectangleArgs>(offset);
6405            // Delegate to tuple encoding.
6406            fidl::encoding::Encode::<RectangleArgs, D>::encode(
6407                (
6408                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.width),
6409                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.height),
6410                ),
6411                encoder,
6412                offset,
6413                _depth,
6414            )
6415        }
6416    }
6417    unsafe impl<
6418            D: fidl::encoding::ResourceDialect,
6419            T0: fidl::encoding::Encode<Value, D>,
6420            T1: fidl::encoding::Encode<Value, D>,
6421        > fidl::encoding::Encode<RectangleArgs, D> for (T0, T1)
6422    {
6423        #[inline]
6424        unsafe fn encode(
6425            self,
6426            encoder: &mut fidl::encoding::Encoder<'_, D>,
6427            offset: usize,
6428            depth: fidl::encoding::Depth,
6429        ) -> fidl::Result<()> {
6430            encoder.debug_check_bounds::<RectangleArgs>(offset);
6431            // Zero out padding regions. There's no need to apply masks
6432            // because the unmasked parts will be overwritten by fields.
6433            // Write the fields.
6434            self.0.encode(encoder, offset + 0, depth)?;
6435            self.1.encode(encoder, offset + 16, depth)?;
6436            Ok(())
6437        }
6438    }
6439
6440    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RectangleArgs {
6441        #[inline(always)]
6442        fn new_empty() -> Self {
6443            Self { width: fidl::new_empty!(Value, D), height: fidl::new_empty!(Value, D) }
6444        }
6445
6446        #[inline]
6447        unsafe fn decode(
6448            &mut self,
6449            decoder: &mut fidl::encoding::Decoder<'_, D>,
6450            offset: usize,
6451            _depth: fidl::encoding::Depth,
6452        ) -> fidl::Result<()> {
6453            decoder.debug_check_bounds::<Self>(offset);
6454            // Verify that padding bytes are zero.
6455            fidl::decode!(Value, D, &mut self.width, decoder, offset + 0, _depth)?;
6456            fidl::decode!(Value, D, &mut self.height, decoder, offset + 16, _depth)?;
6457            Ok(())
6458        }
6459    }
6460
6461    impl fidl::encoding::ValueTypeMarker for ReleaseResourceCmd {
6462        type Borrowed<'a> = &'a Self;
6463        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6464            value
6465        }
6466    }
6467
6468    unsafe impl fidl::encoding::TypeMarker for ReleaseResourceCmd {
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        #[inline(always)]
6481        fn encode_is_copy() -> bool {
6482            true
6483        }
6484
6485        #[inline(always)]
6486        fn decode_is_copy() -> bool {
6487            true
6488        }
6489    }
6490
6491    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReleaseResourceCmd, D>
6492        for &ReleaseResourceCmd
6493    {
6494        #[inline]
6495        unsafe fn encode(
6496            self,
6497            encoder: &mut fidl::encoding::Encoder<'_, D>,
6498            offset: usize,
6499            _depth: fidl::encoding::Depth,
6500        ) -> fidl::Result<()> {
6501            encoder.debug_check_bounds::<ReleaseResourceCmd>(offset);
6502            unsafe {
6503                // Copy the object into the buffer.
6504                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6505                (buf_ptr as *mut ReleaseResourceCmd)
6506                    .write_unaligned((self as *const ReleaseResourceCmd).read());
6507                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6508                // done second because the memcpy will write garbage to these bytes.
6509            }
6510            Ok(())
6511        }
6512    }
6513    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
6514        fidl::encoding::Encode<ReleaseResourceCmd, D> for (T0,)
6515    {
6516        #[inline]
6517        unsafe fn encode(
6518            self,
6519            encoder: &mut fidl::encoding::Encoder<'_, D>,
6520            offset: usize,
6521            depth: fidl::encoding::Depth,
6522        ) -> fidl::Result<()> {
6523            encoder.debug_check_bounds::<ReleaseResourceCmd>(offset);
6524            // Zero out padding regions. There's no need to apply masks
6525            // because the unmasked parts will be overwritten by fields.
6526            // Write the fields.
6527            self.0.encode(encoder, offset + 0, depth)?;
6528            Ok(())
6529        }
6530    }
6531
6532    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReleaseResourceCmd {
6533        #[inline(always)]
6534        fn new_empty() -> Self {
6535            Self { id: fidl::new_empty!(u32, D) }
6536        }
6537
6538        #[inline]
6539        unsafe fn decode(
6540            &mut self,
6541            decoder: &mut fidl::encoding::Decoder<'_, D>,
6542            offset: usize,
6543            _depth: fidl::encoding::Depth,
6544        ) -> fidl::Result<()> {
6545            decoder.debug_check_bounds::<Self>(offset);
6546            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6547            // Verify that padding bytes are zero.
6548            // Copy from the buffer into the object.
6549            unsafe {
6550                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
6551            }
6552            Ok(())
6553        }
6554    }
6555
6556    impl fidl::encoding::ValueTypeMarker for RemoveAllLayersCmd {
6557        type Borrowed<'a> = &'a Self;
6558        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6559            value
6560        }
6561    }
6562
6563    unsafe impl fidl::encoding::TypeMarker for RemoveAllLayersCmd {
6564        type Owned = Self;
6565
6566        #[inline(always)]
6567        fn inline_align(_context: fidl::encoding::Context) -> usize {
6568            4
6569        }
6570
6571        #[inline(always)]
6572        fn inline_size(_context: fidl::encoding::Context) -> usize {
6573            4
6574        }
6575        #[inline(always)]
6576        fn encode_is_copy() -> bool {
6577            true
6578        }
6579
6580        #[inline(always)]
6581        fn decode_is_copy() -> bool {
6582            true
6583        }
6584    }
6585
6586    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RemoveAllLayersCmd, D>
6587        for &RemoveAllLayersCmd
6588    {
6589        #[inline]
6590        unsafe fn encode(
6591            self,
6592            encoder: &mut fidl::encoding::Encoder<'_, D>,
6593            offset: usize,
6594            _depth: fidl::encoding::Depth,
6595        ) -> fidl::Result<()> {
6596            encoder.debug_check_bounds::<RemoveAllLayersCmd>(offset);
6597            unsafe {
6598                // Copy the object into the buffer.
6599                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6600                (buf_ptr as *mut RemoveAllLayersCmd)
6601                    .write_unaligned((self as *const RemoveAllLayersCmd).read());
6602                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6603                // done second because the memcpy will write garbage to these bytes.
6604            }
6605            Ok(())
6606        }
6607    }
6608    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
6609        fidl::encoding::Encode<RemoveAllLayersCmd, D> for (T0,)
6610    {
6611        #[inline]
6612        unsafe fn encode(
6613            self,
6614            encoder: &mut fidl::encoding::Encoder<'_, D>,
6615            offset: usize,
6616            depth: fidl::encoding::Depth,
6617        ) -> fidl::Result<()> {
6618            encoder.debug_check_bounds::<RemoveAllLayersCmd>(offset);
6619            // Zero out padding regions. There's no need to apply masks
6620            // because the unmasked parts will be overwritten by fields.
6621            // Write the fields.
6622            self.0.encode(encoder, offset + 0, depth)?;
6623            Ok(())
6624        }
6625    }
6626
6627    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RemoveAllLayersCmd {
6628        #[inline(always)]
6629        fn new_empty() -> Self {
6630            Self { layer_stack_id: fidl::new_empty!(u32, D) }
6631        }
6632
6633        #[inline]
6634        unsafe fn decode(
6635            &mut self,
6636            decoder: &mut fidl::encoding::Decoder<'_, D>,
6637            offset: usize,
6638            _depth: fidl::encoding::Depth,
6639        ) -> fidl::Result<()> {
6640            decoder.debug_check_bounds::<Self>(offset);
6641            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6642            // Verify that padding bytes are zero.
6643            // Copy from the buffer into the object.
6644            unsafe {
6645                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
6646            }
6647            Ok(())
6648        }
6649    }
6650
6651    impl fidl::encoding::ValueTypeMarker for RemoveLayerCmd {
6652        type Borrowed<'a> = &'a Self;
6653        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6654            value
6655        }
6656    }
6657
6658    unsafe impl fidl::encoding::TypeMarker for RemoveLayerCmd {
6659        type Owned = Self;
6660
6661        #[inline(always)]
6662        fn inline_align(_context: fidl::encoding::Context) -> usize {
6663            4
6664        }
6665
6666        #[inline(always)]
6667        fn inline_size(_context: fidl::encoding::Context) -> usize {
6668            8
6669        }
6670        #[inline(always)]
6671        fn encode_is_copy() -> bool {
6672            true
6673        }
6674
6675        #[inline(always)]
6676        fn decode_is_copy() -> bool {
6677            true
6678        }
6679    }
6680
6681    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RemoveLayerCmd, D>
6682        for &RemoveLayerCmd
6683    {
6684        #[inline]
6685        unsafe fn encode(
6686            self,
6687            encoder: &mut fidl::encoding::Encoder<'_, D>,
6688            offset: usize,
6689            _depth: fidl::encoding::Depth,
6690        ) -> fidl::Result<()> {
6691            encoder.debug_check_bounds::<RemoveLayerCmd>(offset);
6692            unsafe {
6693                // Copy the object into the buffer.
6694                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6695                (buf_ptr as *mut RemoveLayerCmd)
6696                    .write_unaligned((self as *const RemoveLayerCmd).read());
6697                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6698                // done second because the memcpy will write garbage to these bytes.
6699            }
6700            Ok(())
6701        }
6702    }
6703    unsafe impl<
6704            D: fidl::encoding::ResourceDialect,
6705            T0: fidl::encoding::Encode<u32, D>,
6706            T1: fidl::encoding::Encode<u32, D>,
6707        > fidl::encoding::Encode<RemoveLayerCmd, D> for (T0, T1)
6708    {
6709        #[inline]
6710        unsafe fn encode(
6711            self,
6712            encoder: &mut fidl::encoding::Encoder<'_, D>,
6713            offset: usize,
6714            depth: fidl::encoding::Depth,
6715        ) -> fidl::Result<()> {
6716            encoder.debug_check_bounds::<RemoveLayerCmd>(offset);
6717            // Zero out padding regions. There's no need to apply masks
6718            // because the unmasked parts will be overwritten by fields.
6719            // Write the fields.
6720            self.0.encode(encoder, offset + 0, depth)?;
6721            self.1.encode(encoder, offset + 4, depth)?;
6722            Ok(())
6723        }
6724    }
6725
6726    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RemoveLayerCmd {
6727        #[inline(always)]
6728        fn new_empty() -> Self {
6729            Self { layer_stack_id: fidl::new_empty!(u32, D), layer_id: fidl::new_empty!(u32, D) }
6730        }
6731
6732        #[inline]
6733        unsafe fn decode(
6734            &mut self,
6735            decoder: &mut fidl::encoding::Decoder<'_, D>,
6736            offset: usize,
6737            _depth: fidl::encoding::Depth,
6738        ) -> fidl::Result<()> {
6739            decoder.debug_check_bounds::<Self>(offset);
6740            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6741            // Verify that padding bytes are zero.
6742            // Copy from the buffer into the object.
6743            unsafe {
6744                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
6745            }
6746            Ok(())
6747        }
6748    }
6749
6750    impl fidl::encoding::ValueTypeMarker for RendererArgs {
6751        type Borrowed<'a> = &'a Self;
6752        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6753            value
6754        }
6755    }
6756
6757    unsafe impl fidl::encoding::TypeMarker for RendererArgs {
6758        type Owned = Self;
6759
6760        #[inline(always)]
6761        fn inline_align(_context: fidl::encoding::Context) -> usize {
6762            4
6763        }
6764
6765        #[inline(always)]
6766        fn inline_size(_context: fidl::encoding::Context) -> usize {
6767            4
6768        }
6769        #[inline(always)]
6770        fn encode_is_copy() -> bool {
6771            true
6772        }
6773
6774        #[inline(always)]
6775        fn decode_is_copy() -> bool {
6776            true
6777        }
6778    }
6779
6780    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RendererArgs, D>
6781        for &RendererArgs
6782    {
6783        #[inline]
6784        unsafe fn encode(
6785            self,
6786            encoder: &mut fidl::encoding::Encoder<'_, D>,
6787            offset: usize,
6788            _depth: fidl::encoding::Depth,
6789        ) -> fidl::Result<()> {
6790            encoder.debug_check_bounds::<RendererArgs>(offset);
6791            unsafe {
6792                // Copy the object into the buffer.
6793                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6794                (buf_ptr as *mut RendererArgs)
6795                    .write_unaligned((self as *const RendererArgs).read());
6796                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
6797                // done second because the memcpy will write garbage to these bytes.
6798            }
6799            Ok(())
6800        }
6801    }
6802    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
6803        fidl::encoding::Encode<RendererArgs, D> for (T0,)
6804    {
6805        #[inline]
6806        unsafe fn encode(
6807            self,
6808            encoder: &mut fidl::encoding::Encoder<'_, D>,
6809            offset: usize,
6810            depth: fidl::encoding::Depth,
6811        ) -> fidl::Result<()> {
6812            encoder.debug_check_bounds::<RendererArgs>(offset);
6813            // Zero out padding regions. There's no need to apply masks
6814            // because the unmasked parts will be overwritten by fields.
6815            // Write the fields.
6816            self.0.encode(encoder, offset + 0, depth)?;
6817            Ok(())
6818        }
6819    }
6820
6821    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RendererArgs {
6822        #[inline(always)]
6823        fn new_empty() -> Self {
6824            Self { dummy: fidl::new_empty!(u32, D) }
6825        }
6826
6827        #[inline]
6828        unsafe fn decode(
6829            &mut self,
6830            decoder: &mut fidl::encoding::Decoder<'_, D>,
6831            offset: usize,
6832            _depth: fidl::encoding::Depth,
6833        ) -> fidl::Result<()> {
6834            decoder.debug_check_bounds::<Self>(offset);
6835            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6836            // Verify that padding bytes are zero.
6837            // Copy from the buffer into the object.
6838            unsafe {
6839                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
6840            }
6841            Ok(())
6842        }
6843    }
6844
6845    impl fidl::encoding::ValueTypeMarker for RoundedRectangleArgs {
6846        type Borrowed<'a> = &'a Self;
6847        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6848            value
6849        }
6850    }
6851
6852    unsafe impl fidl::encoding::TypeMarker for RoundedRectangleArgs {
6853        type Owned = Self;
6854
6855        #[inline(always)]
6856        fn inline_align(_context: fidl::encoding::Context) -> usize {
6857            8
6858        }
6859
6860        #[inline(always)]
6861        fn inline_size(_context: fidl::encoding::Context) -> usize {
6862            96
6863        }
6864    }
6865
6866    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RoundedRectangleArgs, D>
6867        for &RoundedRectangleArgs
6868    {
6869        #[inline]
6870        unsafe fn encode(
6871            self,
6872            encoder: &mut fidl::encoding::Encoder<'_, D>,
6873            offset: usize,
6874            _depth: fidl::encoding::Depth,
6875        ) -> fidl::Result<()> {
6876            encoder.debug_check_bounds::<RoundedRectangleArgs>(offset);
6877            // Delegate to tuple encoding.
6878            fidl::encoding::Encode::<RoundedRectangleArgs, D>::encode(
6879                (
6880                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.width),
6881                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.height),
6882                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.top_left_radius),
6883                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.top_right_radius),
6884                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.bottom_right_radius),
6885                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.bottom_left_radius),
6886                ),
6887                encoder,
6888                offset,
6889                _depth,
6890            )
6891        }
6892    }
6893    unsafe impl<
6894            D: fidl::encoding::ResourceDialect,
6895            T0: fidl::encoding::Encode<Value, D>,
6896            T1: fidl::encoding::Encode<Value, D>,
6897            T2: fidl::encoding::Encode<Value, D>,
6898            T3: fidl::encoding::Encode<Value, D>,
6899            T4: fidl::encoding::Encode<Value, D>,
6900            T5: fidl::encoding::Encode<Value, D>,
6901        > fidl::encoding::Encode<RoundedRectangleArgs, D> for (T0, T1, T2, T3, T4, T5)
6902    {
6903        #[inline]
6904        unsafe fn encode(
6905            self,
6906            encoder: &mut fidl::encoding::Encoder<'_, D>,
6907            offset: usize,
6908            depth: fidl::encoding::Depth,
6909        ) -> fidl::Result<()> {
6910            encoder.debug_check_bounds::<RoundedRectangleArgs>(offset);
6911            // Zero out padding regions. There's no need to apply masks
6912            // because the unmasked parts will be overwritten by fields.
6913            // Write the fields.
6914            self.0.encode(encoder, offset + 0, depth)?;
6915            self.1.encode(encoder, offset + 16, depth)?;
6916            self.2.encode(encoder, offset + 32, depth)?;
6917            self.3.encode(encoder, offset + 48, depth)?;
6918            self.4.encode(encoder, offset + 64, depth)?;
6919            self.5.encode(encoder, offset + 80, depth)?;
6920            Ok(())
6921        }
6922    }
6923
6924    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RoundedRectangleArgs {
6925        #[inline(always)]
6926        fn new_empty() -> Self {
6927            Self {
6928                width: fidl::new_empty!(Value, D),
6929                height: fidl::new_empty!(Value, D),
6930                top_left_radius: fidl::new_empty!(Value, D),
6931                top_right_radius: fidl::new_empty!(Value, D),
6932                bottom_right_radius: fidl::new_empty!(Value, D),
6933                bottom_left_radius: fidl::new_empty!(Value, D),
6934            }
6935        }
6936
6937        #[inline]
6938        unsafe fn decode(
6939            &mut self,
6940            decoder: &mut fidl::encoding::Decoder<'_, D>,
6941            offset: usize,
6942            _depth: fidl::encoding::Depth,
6943        ) -> fidl::Result<()> {
6944            decoder.debug_check_bounds::<Self>(offset);
6945            // Verify that padding bytes are zero.
6946            fidl::decode!(Value, D, &mut self.width, decoder, offset + 0, _depth)?;
6947            fidl::decode!(Value, D, &mut self.height, decoder, offset + 16, _depth)?;
6948            fidl::decode!(Value, D, &mut self.top_left_radius, decoder, offset + 32, _depth)?;
6949            fidl::decode!(Value, D, &mut self.top_right_radius, decoder, offset + 48, _depth)?;
6950            fidl::decode!(Value, D, &mut self.bottom_right_radius, decoder, offset + 64, _depth)?;
6951            fidl::decode!(Value, D, &mut self.bottom_left_radius, decoder, offset + 80, _depth)?;
6952            Ok(())
6953        }
6954    }
6955
6956    impl fidl::encoding::ValueTypeMarker for SceneAddAmbientLightCmd {
6957        type Borrowed<'a> = &'a Self;
6958        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6959            value
6960        }
6961    }
6962
6963    unsafe impl fidl::encoding::TypeMarker for SceneAddAmbientLightCmd {
6964        type Owned = Self;
6965
6966        #[inline(always)]
6967        fn inline_align(_context: fidl::encoding::Context) -> usize {
6968            4
6969        }
6970
6971        #[inline(always)]
6972        fn inline_size(_context: fidl::encoding::Context) -> usize {
6973            8
6974        }
6975        #[inline(always)]
6976        fn encode_is_copy() -> bool {
6977            true
6978        }
6979
6980        #[inline(always)]
6981        fn decode_is_copy() -> bool {
6982            true
6983        }
6984    }
6985
6986    unsafe impl<D: fidl::encoding::ResourceDialect>
6987        fidl::encoding::Encode<SceneAddAmbientLightCmd, D> for &SceneAddAmbientLightCmd
6988    {
6989        #[inline]
6990        unsafe fn encode(
6991            self,
6992            encoder: &mut fidl::encoding::Encoder<'_, D>,
6993            offset: usize,
6994            _depth: fidl::encoding::Depth,
6995        ) -> fidl::Result<()> {
6996            encoder.debug_check_bounds::<SceneAddAmbientLightCmd>(offset);
6997            unsafe {
6998                // Copy the object into the buffer.
6999                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7000                (buf_ptr as *mut SceneAddAmbientLightCmd)
7001                    .write_unaligned((self as *const SceneAddAmbientLightCmd).read());
7002                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7003                // done second because the memcpy will write garbage to these bytes.
7004            }
7005            Ok(())
7006        }
7007    }
7008    unsafe impl<
7009            D: fidl::encoding::ResourceDialect,
7010            T0: fidl::encoding::Encode<u32, D>,
7011            T1: fidl::encoding::Encode<u32, D>,
7012        > fidl::encoding::Encode<SceneAddAmbientLightCmd, D> for (T0, T1)
7013    {
7014        #[inline]
7015        unsafe fn encode(
7016            self,
7017            encoder: &mut fidl::encoding::Encoder<'_, D>,
7018            offset: usize,
7019            depth: fidl::encoding::Depth,
7020        ) -> fidl::Result<()> {
7021            encoder.debug_check_bounds::<SceneAddAmbientLightCmd>(offset);
7022            // Zero out padding regions. There's no need to apply masks
7023            // because the unmasked parts will be overwritten by fields.
7024            // Write the fields.
7025            self.0.encode(encoder, offset + 0, depth)?;
7026            self.1.encode(encoder, offset + 4, depth)?;
7027            Ok(())
7028        }
7029    }
7030
7031    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7032        for SceneAddAmbientLightCmd
7033    {
7034        #[inline(always)]
7035        fn new_empty() -> Self {
7036            Self { scene_id: fidl::new_empty!(u32, D), light_id: fidl::new_empty!(u32, D) }
7037        }
7038
7039        #[inline]
7040        unsafe fn decode(
7041            &mut self,
7042            decoder: &mut fidl::encoding::Decoder<'_, D>,
7043            offset: usize,
7044            _depth: fidl::encoding::Depth,
7045        ) -> fidl::Result<()> {
7046            decoder.debug_check_bounds::<Self>(offset);
7047            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7048            // Verify that padding bytes are zero.
7049            // Copy from the buffer into the object.
7050            unsafe {
7051                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7052            }
7053            Ok(())
7054        }
7055    }
7056
7057    impl fidl::encoding::ValueTypeMarker for SceneAddDirectionalLightCmd {
7058        type Borrowed<'a> = &'a Self;
7059        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7060            value
7061        }
7062    }
7063
7064    unsafe impl fidl::encoding::TypeMarker for SceneAddDirectionalLightCmd {
7065        type Owned = Self;
7066
7067        #[inline(always)]
7068        fn inline_align(_context: fidl::encoding::Context) -> usize {
7069            4
7070        }
7071
7072        #[inline(always)]
7073        fn inline_size(_context: fidl::encoding::Context) -> usize {
7074            8
7075        }
7076        #[inline(always)]
7077        fn encode_is_copy() -> bool {
7078            true
7079        }
7080
7081        #[inline(always)]
7082        fn decode_is_copy() -> bool {
7083            true
7084        }
7085    }
7086
7087    unsafe impl<D: fidl::encoding::ResourceDialect>
7088        fidl::encoding::Encode<SceneAddDirectionalLightCmd, D> for &SceneAddDirectionalLightCmd
7089    {
7090        #[inline]
7091        unsafe fn encode(
7092            self,
7093            encoder: &mut fidl::encoding::Encoder<'_, D>,
7094            offset: usize,
7095            _depth: fidl::encoding::Depth,
7096        ) -> fidl::Result<()> {
7097            encoder.debug_check_bounds::<SceneAddDirectionalLightCmd>(offset);
7098            unsafe {
7099                // Copy the object into the buffer.
7100                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7101                (buf_ptr as *mut SceneAddDirectionalLightCmd)
7102                    .write_unaligned((self as *const SceneAddDirectionalLightCmd).read());
7103                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7104                // done second because the memcpy will write garbage to these bytes.
7105            }
7106            Ok(())
7107        }
7108    }
7109    unsafe impl<
7110            D: fidl::encoding::ResourceDialect,
7111            T0: fidl::encoding::Encode<u32, D>,
7112            T1: fidl::encoding::Encode<u32, D>,
7113        > fidl::encoding::Encode<SceneAddDirectionalLightCmd, D> for (T0, T1)
7114    {
7115        #[inline]
7116        unsafe fn encode(
7117            self,
7118            encoder: &mut fidl::encoding::Encoder<'_, D>,
7119            offset: usize,
7120            depth: fidl::encoding::Depth,
7121        ) -> fidl::Result<()> {
7122            encoder.debug_check_bounds::<SceneAddDirectionalLightCmd>(offset);
7123            // Zero out padding regions. There's no need to apply masks
7124            // because the unmasked parts will be overwritten by fields.
7125            // Write the fields.
7126            self.0.encode(encoder, offset + 0, depth)?;
7127            self.1.encode(encoder, offset + 4, depth)?;
7128            Ok(())
7129        }
7130    }
7131
7132    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7133        for SceneAddDirectionalLightCmd
7134    {
7135        #[inline(always)]
7136        fn new_empty() -> Self {
7137            Self { scene_id: fidl::new_empty!(u32, D), light_id: fidl::new_empty!(u32, D) }
7138        }
7139
7140        #[inline]
7141        unsafe fn decode(
7142            &mut self,
7143            decoder: &mut fidl::encoding::Decoder<'_, D>,
7144            offset: usize,
7145            _depth: fidl::encoding::Depth,
7146        ) -> fidl::Result<()> {
7147            decoder.debug_check_bounds::<Self>(offset);
7148            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7149            // Verify that padding bytes are zero.
7150            // Copy from the buffer into the object.
7151            unsafe {
7152                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7153            }
7154            Ok(())
7155        }
7156    }
7157
7158    impl fidl::encoding::ValueTypeMarker for SceneAddPointLightCmd {
7159        type Borrowed<'a> = &'a Self;
7160        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7161            value
7162        }
7163    }
7164
7165    unsafe impl fidl::encoding::TypeMarker for SceneAddPointLightCmd {
7166        type Owned = Self;
7167
7168        #[inline(always)]
7169        fn inline_align(_context: fidl::encoding::Context) -> usize {
7170            4
7171        }
7172
7173        #[inline(always)]
7174        fn inline_size(_context: fidl::encoding::Context) -> usize {
7175            8
7176        }
7177        #[inline(always)]
7178        fn encode_is_copy() -> bool {
7179            true
7180        }
7181
7182        #[inline(always)]
7183        fn decode_is_copy() -> bool {
7184            true
7185        }
7186    }
7187
7188    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SceneAddPointLightCmd, D>
7189        for &SceneAddPointLightCmd
7190    {
7191        #[inline]
7192        unsafe fn encode(
7193            self,
7194            encoder: &mut fidl::encoding::Encoder<'_, D>,
7195            offset: usize,
7196            _depth: fidl::encoding::Depth,
7197        ) -> fidl::Result<()> {
7198            encoder.debug_check_bounds::<SceneAddPointLightCmd>(offset);
7199            unsafe {
7200                // Copy the object into the buffer.
7201                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7202                (buf_ptr as *mut SceneAddPointLightCmd)
7203                    .write_unaligned((self as *const SceneAddPointLightCmd).read());
7204                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7205                // done second because the memcpy will write garbage to these bytes.
7206            }
7207            Ok(())
7208        }
7209    }
7210    unsafe impl<
7211            D: fidl::encoding::ResourceDialect,
7212            T0: fidl::encoding::Encode<u32, D>,
7213            T1: fidl::encoding::Encode<u32, D>,
7214        > fidl::encoding::Encode<SceneAddPointLightCmd, D> for (T0, T1)
7215    {
7216        #[inline]
7217        unsafe fn encode(
7218            self,
7219            encoder: &mut fidl::encoding::Encoder<'_, D>,
7220            offset: usize,
7221            depth: fidl::encoding::Depth,
7222        ) -> fidl::Result<()> {
7223            encoder.debug_check_bounds::<SceneAddPointLightCmd>(offset);
7224            // Zero out padding regions. There's no need to apply masks
7225            // because the unmasked parts will be overwritten by fields.
7226            // Write the fields.
7227            self.0.encode(encoder, offset + 0, depth)?;
7228            self.1.encode(encoder, offset + 4, depth)?;
7229            Ok(())
7230        }
7231    }
7232
7233    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SceneAddPointLightCmd {
7234        #[inline(always)]
7235        fn new_empty() -> Self {
7236            Self { scene_id: fidl::new_empty!(u32, D), light_id: fidl::new_empty!(u32, D) }
7237        }
7238
7239        #[inline]
7240        unsafe fn decode(
7241            &mut self,
7242            decoder: &mut fidl::encoding::Decoder<'_, D>,
7243            offset: usize,
7244            _depth: fidl::encoding::Depth,
7245        ) -> fidl::Result<()> {
7246            decoder.debug_check_bounds::<Self>(offset);
7247            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7248            // Verify that padding bytes are zero.
7249            // Copy from the buffer into the object.
7250            unsafe {
7251                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7252            }
7253            Ok(())
7254        }
7255    }
7256
7257    impl fidl::encoding::ValueTypeMarker for SceneArgs {
7258        type Borrowed<'a> = &'a Self;
7259        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7260            value
7261        }
7262    }
7263
7264    unsafe impl fidl::encoding::TypeMarker for SceneArgs {
7265        type Owned = Self;
7266
7267        #[inline(always)]
7268        fn inline_align(_context: fidl::encoding::Context) -> usize {
7269            4
7270        }
7271
7272        #[inline(always)]
7273        fn inline_size(_context: fidl::encoding::Context) -> usize {
7274            4
7275        }
7276        #[inline(always)]
7277        fn encode_is_copy() -> bool {
7278            true
7279        }
7280
7281        #[inline(always)]
7282        fn decode_is_copy() -> bool {
7283            true
7284        }
7285    }
7286
7287    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SceneArgs, D>
7288        for &SceneArgs
7289    {
7290        #[inline]
7291        unsafe fn encode(
7292            self,
7293            encoder: &mut fidl::encoding::Encoder<'_, D>,
7294            offset: usize,
7295            _depth: fidl::encoding::Depth,
7296        ) -> fidl::Result<()> {
7297            encoder.debug_check_bounds::<SceneArgs>(offset);
7298            unsafe {
7299                // Copy the object into the buffer.
7300                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7301                (buf_ptr as *mut SceneArgs).write_unaligned((self as *const SceneArgs).read());
7302                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7303                // done second because the memcpy will write garbage to these bytes.
7304            }
7305            Ok(())
7306        }
7307    }
7308    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
7309        fidl::encoding::Encode<SceneArgs, D> for (T0,)
7310    {
7311        #[inline]
7312        unsafe fn encode(
7313            self,
7314            encoder: &mut fidl::encoding::Encoder<'_, D>,
7315            offset: usize,
7316            depth: fidl::encoding::Depth,
7317        ) -> fidl::Result<()> {
7318            encoder.debug_check_bounds::<SceneArgs>(offset);
7319            // Zero out padding regions. There's no need to apply masks
7320            // because the unmasked parts will be overwritten by fields.
7321            // Write the fields.
7322            self.0.encode(encoder, offset + 0, depth)?;
7323            Ok(())
7324        }
7325    }
7326
7327    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SceneArgs {
7328        #[inline(always)]
7329        fn new_empty() -> Self {
7330            Self { dummy: fidl::new_empty!(u32, D) }
7331        }
7332
7333        #[inline]
7334        unsafe fn decode(
7335            &mut self,
7336            decoder: &mut fidl::encoding::Decoder<'_, D>,
7337            offset: usize,
7338            _depth: fidl::encoding::Depth,
7339        ) -> fidl::Result<()> {
7340            decoder.debug_check_bounds::<Self>(offset);
7341            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7342            // Verify that padding bytes are zero.
7343            // Copy from the buffer into the object.
7344            unsafe {
7345                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
7346            }
7347            Ok(())
7348        }
7349    }
7350
7351    impl fidl::encoding::ValueTypeMarker for SendSizeChangeHintCmdHack {
7352        type Borrowed<'a> = &'a Self;
7353        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7354            value
7355        }
7356    }
7357
7358    unsafe impl fidl::encoding::TypeMarker for SendSizeChangeHintCmdHack {
7359        type Owned = Self;
7360
7361        #[inline(always)]
7362        fn inline_align(_context: fidl::encoding::Context) -> usize {
7363            4
7364        }
7365
7366        #[inline(always)]
7367        fn inline_size(_context: fidl::encoding::Context) -> usize {
7368            12
7369        }
7370    }
7371
7372    unsafe impl<D: fidl::encoding::ResourceDialect>
7373        fidl::encoding::Encode<SendSizeChangeHintCmdHack, D> for &SendSizeChangeHintCmdHack
7374    {
7375        #[inline]
7376        unsafe fn encode(
7377            self,
7378            encoder: &mut fidl::encoding::Encoder<'_, D>,
7379            offset: usize,
7380            _depth: fidl::encoding::Depth,
7381        ) -> fidl::Result<()> {
7382            encoder.debug_check_bounds::<SendSizeChangeHintCmdHack>(offset);
7383            // Delegate to tuple encoding.
7384            fidl::encoding::Encode::<SendSizeChangeHintCmdHack, D>::encode(
7385                (
7386                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
7387                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.width_change_factor),
7388                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.height_change_factor),
7389                ),
7390                encoder,
7391                offset,
7392                _depth,
7393            )
7394        }
7395    }
7396    unsafe impl<
7397            D: fidl::encoding::ResourceDialect,
7398            T0: fidl::encoding::Encode<u32, D>,
7399            T1: fidl::encoding::Encode<f32, D>,
7400            T2: fidl::encoding::Encode<f32, D>,
7401        > fidl::encoding::Encode<SendSizeChangeHintCmdHack, D> for (T0, T1, T2)
7402    {
7403        #[inline]
7404        unsafe fn encode(
7405            self,
7406            encoder: &mut fidl::encoding::Encoder<'_, D>,
7407            offset: usize,
7408            depth: fidl::encoding::Depth,
7409        ) -> fidl::Result<()> {
7410            encoder.debug_check_bounds::<SendSizeChangeHintCmdHack>(offset);
7411            // Zero out padding regions. There's no need to apply masks
7412            // because the unmasked parts will be overwritten by fields.
7413            // Write the fields.
7414            self.0.encode(encoder, offset + 0, depth)?;
7415            self.1.encode(encoder, offset + 4, depth)?;
7416            self.2.encode(encoder, offset + 8, depth)?;
7417            Ok(())
7418        }
7419    }
7420
7421    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7422        for SendSizeChangeHintCmdHack
7423    {
7424        #[inline(always)]
7425        fn new_empty() -> Self {
7426            Self {
7427                node_id: fidl::new_empty!(u32, D),
7428                width_change_factor: fidl::new_empty!(f32, D),
7429                height_change_factor: fidl::new_empty!(f32, D),
7430            }
7431        }
7432
7433        #[inline]
7434        unsafe fn decode(
7435            &mut self,
7436            decoder: &mut fidl::encoding::Decoder<'_, D>,
7437            offset: usize,
7438            _depth: fidl::encoding::Depth,
7439        ) -> fidl::Result<()> {
7440            decoder.debug_check_bounds::<Self>(offset);
7441            // Verify that padding bytes are zero.
7442            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
7443            fidl::decode!(f32, D, &mut self.width_change_factor, decoder, offset + 4, _depth)?;
7444            fidl::decode!(f32, D, &mut self.height_change_factor, decoder, offset + 8, _depth)?;
7445            Ok(())
7446        }
7447    }
7448
7449    impl fidl::encoding::ValueTypeMarker for SetAnchorCmd {
7450        type Borrowed<'a> = &'a Self;
7451        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7452            value
7453        }
7454    }
7455
7456    unsafe impl fidl::encoding::TypeMarker for SetAnchorCmd {
7457        type Owned = Self;
7458
7459        #[inline(always)]
7460        fn inline_align(_context: fidl::encoding::Context) -> usize {
7461            4
7462        }
7463
7464        #[inline(always)]
7465        fn inline_size(_context: fidl::encoding::Context) -> usize {
7466            20
7467        }
7468    }
7469
7470    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetAnchorCmd, D>
7471        for &SetAnchorCmd
7472    {
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::<SetAnchorCmd>(offset);
7481            // Delegate to tuple encoding.
7482            fidl::encoding::Encode::<SetAnchorCmd, D>::encode(
7483                (
7484                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
7485                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
7486                ),
7487                encoder,
7488                offset,
7489                _depth,
7490            )
7491        }
7492    }
7493    unsafe impl<
7494            D: fidl::encoding::ResourceDialect,
7495            T0: fidl::encoding::Encode<u32, D>,
7496            T1: fidl::encoding::Encode<Vector3Value, D>,
7497        > fidl::encoding::Encode<SetAnchorCmd, D> for (T0, T1)
7498    {
7499        #[inline]
7500        unsafe fn encode(
7501            self,
7502            encoder: &mut fidl::encoding::Encoder<'_, D>,
7503            offset: usize,
7504            depth: fidl::encoding::Depth,
7505        ) -> fidl::Result<()> {
7506            encoder.debug_check_bounds::<SetAnchorCmd>(offset);
7507            // Zero out padding regions. There's no need to apply masks
7508            // because the unmasked parts will be overwritten by fields.
7509            // Write the fields.
7510            self.0.encode(encoder, offset + 0, depth)?;
7511            self.1.encode(encoder, offset + 4, depth)?;
7512            Ok(())
7513        }
7514    }
7515
7516    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetAnchorCmd {
7517        #[inline(always)]
7518        fn new_empty() -> Self {
7519            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Vector3Value, D) }
7520        }
7521
7522        #[inline]
7523        unsafe fn decode(
7524            &mut self,
7525            decoder: &mut fidl::encoding::Decoder<'_, D>,
7526            offset: usize,
7527            _depth: fidl::encoding::Depth,
7528        ) -> fidl::Result<()> {
7529            decoder.debug_check_bounds::<Self>(offset);
7530            // Verify that padding bytes are zero.
7531            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
7532            fidl::decode!(Vector3Value, D, &mut self.value, decoder, offset + 4, _depth)?;
7533            Ok(())
7534        }
7535    }
7536
7537    impl fidl::encoding::ValueTypeMarker for SetCameraClipSpaceTransformCmd {
7538        type Borrowed<'a> = &'a Self;
7539        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7540            value
7541        }
7542    }
7543
7544    unsafe impl fidl::encoding::TypeMarker for SetCameraClipSpaceTransformCmd {
7545        type Owned = Self;
7546
7547        #[inline(always)]
7548        fn inline_align(_context: fidl::encoding::Context) -> usize {
7549            4
7550        }
7551
7552        #[inline(always)]
7553        fn inline_size(_context: fidl::encoding::Context) -> usize {
7554            16
7555        }
7556    }
7557
7558    unsafe impl<D: fidl::encoding::ResourceDialect>
7559        fidl::encoding::Encode<SetCameraClipSpaceTransformCmd, D>
7560        for &SetCameraClipSpaceTransformCmd
7561    {
7562        #[inline]
7563        unsafe fn encode(
7564            self,
7565            encoder: &mut fidl::encoding::Encoder<'_, D>,
7566            offset: usize,
7567            _depth: fidl::encoding::Depth,
7568        ) -> fidl::Result<()> {
7569            encoder.debug_check_bounds::<SetCameraClipSpaceTransformCmd>(offset);
7570            // Delegate to tuple encoding.
7571            fidl::encoding::Encode::<SetCameraClipSpaceTransformCmd, D>::encode(
7572                (
7573                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.camera_id),
7574                    <Vec2 as fidl::encoding::ValueTypeMarker>::borrow(&self.translation),
7575                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.scale),
7576                ),
7577                encoder,
7578                offset,
7579                _depth,
7580            )
7581        }
7582    }
7583    unsafe impl<
7584            D: fidl::encoding::ResourceDialect,
7585            T0: fidl::encoding::Encode<u32, D>,
7586            T1: fidl::encoding::Encode<Vec2, D>,
7587            T2: fidl::encoding::Encode<f32, D>,
7588        > fidl::encoding::Encode<SetCameraClipSpaceTransformCmd, D> for (T0, T1, T2)
7589    {
7590        #[inline]
7591        unsafe fn encode(
7592            self,
7593            encoder: &mut fidl::encoding::Encoder<'_, D>,
7594            offset: usize,
7595            depth: fidl::encoding::Depth,
7596        ) -> fidl::Result<()> {
7597            encoder.debug_check_bounds::<SetCameraClipSpaceTransformCmd>(offset);
7598            // Zero out padding regions. There's no need to apply masks
7599            // because the unmasked parts will be overwritten by fields.
7600            // Write the fields.
7601            self.0.encode(encoder, offset + 0, depth)?;
7602            self.1.encode(encoder, offset + 4, depth)?;
7603            self.2.encode(encoder, offset + 12, depth)?;
7604            Ok(())
7605        }
7606    }
7607
7608    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7609        for SetCameraClipSpaceTransformCmd
7610    {
7611        #[inline(always)]
7612        fn new_empty() -> Self {
7613            Self {
7614                camera_id: fidl::new_empty!(u32, D),
7615                translation: fidl::new_empty!(Vec2, D),
7616                scale: fidl::new_empty!(f32, D),
7617            }
7618        }
7619
7620        #[inline]
7621        unsafe fn decode(
7622            &mut self,
7623            decoder: &mut fidl::encoding::Decoder<'_, D>,
7624            offset: usize,
7625            _depth: fidl::encoding::Depth,
7626        ) -> fidl::Result<()> {
7627            decoder.debug_check_bounds::<Self>(offset);
7628            // Verify that padding bytes are zero.
7629            fidl::decode!(u32, D, &mut self.camera_id, decoder, offset + 0, _depth)?;
7630            fidl::decode!(Vec2, D, &mut self.translation, decoder, offset + 4, _depth)?;
7631            fidl::decode!(f32, D, &mut self.scale, decoder, offset + 12, _depth)?;
7632            Ok(())
7633        }
7634    }
7635
7636    impl fidl::encoding::ValueTypeMarker for SetCameraCmd {
7637        type Borrowed<'a> = &'a Self;
7638        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7639            value
7640        }
7641    }
7642
7643    unsafe impl fidl::encoding::TypeMarker for SetCameraCmd {
7644        type Owned = Self;
7645
7646        #[inline(always)]
7647        fn inline_align(_context: fidl::encoding::Context) -> usize {
7648            4
7649        }
7650
7651        #[inline(always)]
7652        fn inline_size(_context: fidl::encoding::Context) -> usize {
7653            8
7654        }
7655        #[inline(always)]
7656        fn encode_is_copy() -> bool {
7657            true
7658        }
7659
7660        #[inline(always)]
7661        fn decode_is_copy() -> bool {
7662            true
7663        }
7664    }
7665
7666    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetCameraCmd, D>
7667        for &SetCameraCmd
7668    {
7669        #[inline]
7670        unsafe fn encode(
7671            self,
7672            encoder: &mut fidl::encoding::Encoder<'_, D>,
7673            offset: usize,
7674            _depth: fidl::encoding::Depth,
7675        ) -> fidl::Result<()> {
7676            encoder.debug_check_bounds::<SetCameraCmd>(offset);
7677            unsafe {
7678                // Copy the object into the buffer.
7679                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7680                (buf_ptr as *mut SetCameraCmd)
7681                    .write_unaligned((self as *const SetCameraCmd).read());
7682                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7683                // done second because the memcpy will write garbage to these bytes.
7684            }
7685            Ok(())
7686        }
7687    }
7688    unsafe impl<
7689            D: fidl::encoding::ResourceDialect,
7690            T0: fidl::encoding::Encode<u32, D>,
7691            T1: fidl::encoding::Encode<u32, D>,
7692        > fidl::encoding::Encode<SetCameraCmd, D> for (T0, T1)
7693    {
7694        #[inline]
7695        unsafe fn encode(
7696            self,
7697            encoder: &mut fidl::encoding::Encoder<'_, D>,
7698            offset: usize,
7699            depth: fidl::encoding::Depth,
7700        ) -> fidl::Result<()> {
7701            encoder.debug_check_bounds::<SetCameraCmd>(offset);
7702            // Zero out padding regions. There's no need to apply masks
7703            // because the unmasked parts will be overwritten by fields.
7704            // Write the fields.
7705            self.0.encode(encoder, offset + 0, depth)?;
7706            self.1.encode(encoder, offset + 4, depth)?;
7707            Ok(())
7708        }
7709    }
7710
7711    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetCameraCmd {
7712        #[inline(always)]
7713        fn new_empty() -> Self {
7714            Self { renderer_id: fidl::new_empty!(u32, D), camera_id: fidl::new_empty!(u32, D) }
7715        }
7716
7717        #[inline]
7718        unsafe fn decode(
7719            &mut self,
7720            decoder: &mut fidl::encoding::Decoder<'_, D>,
7721            offset: usize,
7722            _depth: fidl::encoding::Depth,
7723        ) -> fidl::Result<()> {
7724            decoder.debug_check_bounds::<Self>(offset);
7725            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7726            // Verify that padding bytes are zero.
7727            // Copy from the buffer into the object.
7728            unsafe {
7729                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
7730            }
7731            Ok(())
7732        }
7733    }
7734
7735    impl fidl::encoding::ValueTypeMarker for SetCameraPoseBufferCmd {
7736        type Borrowed<'a> = &'a Self;
7737        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7738            value
7739        }
7740    }
7741
7742    unsafe impl fidl::encoding::TypeMarker for SetCameraPoseBufferCmd {
7743        type Owned = Self;
7744
7745        #[inline(always)]
7746        fn inline_align(_context: fidl::encoding::Context) -> usize {
7747            8
7748        }
7749
7750        #[inline(always)]
7751        fn inline_size(_context: fidl::encoding::Context) -> usize {
7752            32
7753        }
7754    }
7755
7756    unsafe impl<D: fidl::encoding::ResourceDialect>
7757        fidl::encoding::Encode<SetCameraPoseBufferCmd, D> for &SetCameraPoseBufferCmd
7758    {
7759        #[inline]
7760        unsafe fn encode(
7761            self,
7762            encoder: &mut fidl::encoding::Encoder<'_, D>,
7763            offset: usize,
7764            _depth: fidl::encoding::Depth,
7765        ) -> fidl::Result<()> {
7766            encoder.debug_check_bounds::<SetCameraPoseBufferCmd>(offset);
7767            unsafe {
7768                // Copy the object into the buffer.
7769                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7770                (buf_ptr as *mut SetCameraPoseBufferCmd)
7771                    .write_unaligned((self as *const SetCameraPoseBufferCmd).read());
7772                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
7773                // done second because the memcpy will write garbage to these bytes.
7774                let padding_ptr = buf_ptr.offset(8) as *mut u64;
7775                let padding_mask = 0xffffffff00000000u64;
7776                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
7777            }
7778            Ok(())
7779        }
7780    }
7781    unsafe impl<
7782            D: fidl::encoding::ResourceDialect,
7783            T0: fidl::encoding::Encode<u32, D>,
7784            T1: fidl::encoding::Encode<u32, D>,
7785            T2: fidl::encoding::Encode<u32, D>,
7786            T3: fidl::encoding::Encode<i64, D>,
7787            T4: fidl::encoding::Encode<u64, D>,
7788        > fidl::encoding::Encode<SetCameraPoseBufferCmd, D> for (T0, T1, T2, T3, T4)
7789    {
7790        #[inline]
7791        unsafe fn encode(
7792            self,
7793            encoder: &mut fidl::encoding::Encoder<'_, D>,
7794            offset: usize,
7795            depth: fidl::encoding::Depth,
7796        ) -> fidl::Result<()> {
7797            encoder.debug_check_bounds::<SetCameraPoseBufferCmd>(offset);
7798            // Zero out padding regions. There's no need to apply masks
7799            // because the unmasked parts will be overwritten by fields.
7800            unsafe {
7801                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
7802                (ptr as *mut u64).write_unaligned(0);
7803            }
7804            // Write the fields.
7805            self.0.encode(encoder, offset + 0, depth)?;
7806            self.1.encode(encoder, offset + 4, depth)?;
7807            self.2.encode(encoder, offset + 8, depth)?;
7808            self.3.encode(encoder, offset + 16, depth)?;
7809            self.4.encode(encoder, offset + 24, depth)?;
7810            Ok(())
7811        }
7812    }
7813
7814    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7815        for SetCameraPoseBufferCmd
7816    {
7817        #[inline(always)]
7818        fn new_empty() -> Self {
7819            Self {
7820                camera_id: fidl::new_empty!(u32, D),
7821                buffer_id: fidl::new_empty!(u32, D),
7822                num_entries: fidl::new_empty!(u32, D),
7823                base_time: fidl::new_empty!(i64, D),
7824                time_interval: fidl::new_empty!(u64, D),
7825            }
7826        }
7827
7828        #[inline]
7829        unsafe fn decode(
7830            &mut self,
7831            decoder: &mut fidl::encoding::Decoder<'_, D>,
7832            offset: usize,
7833            _depth: fidl::encoding::Depth,
7834        ) -> fidl::Result<()> {
7835            decoder.debug_check_bounds::<Self>(offset);
7836            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7837            // Verify that padding bytes are zero.
7838            let ptr = unsafe { buf_ptr.offset(8) };
7839            let padval = unsafe { (ptr as *const u64).read_unaligned() };
7840            let mask = 0xffffffff00000000u64;
7841            let maskedval = padval & mask;
7842            if maskedval != 0 {
7843                return Err(fidl::Error::NonZeroPadding {
7844                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
7845                });
7846            }
7847            // Copy from the buffer into the object.
7848            unsafe {
7849                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
7850            }
7851            Ok(())
7852        }
7853    }
7854
7855    impl fidl::encoding::ValueTypeMarker for SetCameraProjectionCmd {
7856        type Borrowed<'a> = &'a Self;
7857        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7858            value
7859        }
7860    }
7861
7862    unsafe impl fidl::encoding::TypeMarker for SetCameraProjectionCmd {
7863        type Owned = Self;
7864
7865        #[inline(always)]
7866        fn inline_align(_context: fidl::encoding::Context) -> usize {
7867            4
7868        }
7869
7870        #[inline(always)]
7871        fn inline_size(_context: fidl::encoding::Context) -> usize {
7872            12
7873        }
7874    }
7875
7876    unsafe impl<D: fidl::encoding::ResourceDialect>
7877        fidl::encoding::Encode<SetCameraProjectionCmd, D> for &SetCameraProjectionCmd
7878    {
7879        #[inline]
7880        unsafe fn encode(
7881            self,
7882            encoder: &mut fidl::encoding::Encoder<'_, D>,
7883            offset: usize,
7884            _depth: fidl::encoding::Depth,
7885        ) -> fidl::Result<()> {
7886            encoder.debug_check_bounds::<SetCameraProjectionCmd>(offset);
7887            // Delegate to tuple encoding.
7888            fidl::encoding::Encode::<SetCameraProjectionCmd, D>::encode(
7889                (
7890                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.camera_id),
7891                    <FloatValue as fidl::encoding::ValueTypeMarker>::borrow(&self.fovy),
7892                ),
7893                encoder,
7894                offset,
7895                _depth,
7896            )
7897        }
7898    }
7899    unsafe impl<
7900            D: fidl::encoding::ResourceDialect,
7901            T0: fidl::encoding::Encode<u32, D>,
7902            T1: fidl::encoding::Encode<FloatValue, D>,
7903        > fidl::encoding::Encode<SetCameraProjectionCmd, D> for (T0, T1)
7904    {
7905        #[inline]
7906        unsafe fn encode(
7907            self,
7908            encoder: &mut fidl::encoding::Encoder<'_, D>,
7909            offset: usize,
7910            depth: fidl::encoding::Depth,
7911        ) -> fidl::Result<()> {
7912            encoder.debug_check_bounds::<SetCameraProjectionCmd>(offset);
7913            // Zero out padding regions. There's no need to apply masks
7914            // because the unmasked parts will be overwritten by fields.
7915            // Write the fields.
7916            self.0.encode(encoder, offset + 0, depth)?;
7917            self.1.encode(encoder, offset + 4, depth)?;
7918            Ok(())
7919        }
7920    }
7921
7922    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
7923        for SetCameraProjectionCmd
7924    {
7925        #[inline(always)]
7926        fn new_empty() -> Self {
7927            Self { camera_id: fidl::new_empty!(u32, D), fovy: fidl::new_empty!(FloatValue, D) }
7928        }
7929
7930        #[inline]
7931        unsafe fn decode(
7932            &mut self,
7933            decoder: &mut fidl::encoding::Decoder<'_, D>,
7934            offset: usize,
7935            _depth: fidl::encoding::Depth,
7936        ) -> fidl::Result<()> {
7937            decoder.debug_check_bounds::<Self>(offset);
7938            // Verify that padding bytes are zero.
7939            fidl::decode!(u32, D, &mut self.camera_id, decoder, offset + 0, _depth)?;
7940            fidl::decode!(FloatValue, D, &mut self.fovy, decoder, offset + 4, _depth)?;
7941            Ok(())
7942        }
7943    }
7944
7945    impl fidl::encoding::ValueTypeMarker for SetCameraTransformCmd {
7946        type Borrowed<'a> = &'a Self;
7947        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7948            value
7949        }
7950    }
7951
7952    unsafe impl fidl::encoding::TypeMarker for SetCameraTransformCmd {
7953        type Owned = Self;
7954
7955        #[inline(always)]
7956        fn inline_align(_context: fidl::encoding::Context) -> usize {
7957            4
7958        }
7959
7960        #[inline(always)]
7961        fn inline_size(_context: fidl::encoding::Context) -> usize {
7962            52
7963        }
7964    }
7965
7966    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetCameraTransformCmd, D>
7967        for &SetCameraTransformCmd
7968    {
7969        #[inline]
7970        unsafe fn encode(
7971            self,
7972            encoder: &mut fidl::encoding::Encoder<'_, D>,
7973            offset: usize,
7974            _depth: fidl::encoding::Depth,
7975        ) -> fidl::Result<()> {
7976            encoder.debug_check_bounds::<SetCameraTransformCmd>(offset);
7977            // Delegate to tuple encoding.
7978            fidl::encoding::Encode::<SetCameraTransformCmd, D>::encode(
7979                (
7980                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.camera_id),
7981                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.eye_position),
7982                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.eye_look_at),
7983                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.eye_up),
7984                ),
7985                encoder,
7986                offset,
7987                _depth,
7988            )
7989        }
7990    }
7991    unsafe impl<
7992            D: fidl::encoding::ResourceDialect,
7993            T0: fidl::encoding::Encode<u32, D>,
7994            T1: fidl::encoding::Encode<Vector3Value, D>,
7995            T2: fidl::encoding::Encode<Vector3Value, D>,
7996            T3: fidl::encoding::Encode<Vector3Value, D>,
7997        > fidl::encoding::Encode<SetCameraTransformCmd, D> for (T0, T1, T2, T3)
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::<SetCameraTransformCmd>(offset);
8007            // Zero out padding regions. There's no need to apply masks
8008            // because the unmasked parts will be overwritten by fields.
8009            // Write the fields.
8010            self.0.encode(encoder, offset + 0, depth)?;
8011            self.1.encode(encoder, offset + 4, depth)?;
8012            self.2.encode(encoder, offset + 20, depth)?;
8013            self.3.encode(encoder, offset + 36, depth)?;
8014            Ok(())
8015        }
8016    }
8017
8018    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetCameraTransformCmd {
8019        #[inline(always)]
8020        fn new_empty() -> Self {
8021            Self {
8022                camera_id: fidl::new_empty!(u32, D),
8023                eye_position: fidl::new_empty!(Vector3Value, D),
8024                eye_look_at: fidl::new_empty!(Vector3Value, D),
8025                eye_up: fidl::new_empty!(Vector3Value, D),
8026            }
8027        }
8028
8029        #[inline]
8030        unsafe fn decode(
8031            &mut self,
8032            decoder: &mut fidl::encoding::Decoder<'_, D>,
8033            offset: usize,
8034            _depth: fidl::encoding::Depth,
8035        ) -> fidl::Result<()> {
8036            decoder.debug_check_bounds::<Self>(offset);
8037            // Verify that padding bytes are zero.
8038            fidl::decode!(u32, D, &mut self.camera_id, decoder, offset + 0, _depth)?;
8039            fidl::decode!(Vector3Value, D, &mut self.eye_position, decoder, offset + 4, _depth)?;
8040            fidl::decode!(Vector3Value, D, &mut self.eye_look_at, decoder, offset + 20, _depth)?;
8041            fidl::decode!(Vector3Value, D, &mut self.eye_up, decoder, offset + 36, _depth)?;
8042            Ok(())
8043        }
8044    }
8045
8046    impl fidl::encoding::ValueTypeMarker for SetClipCmd {
8047        type Borrowed<'a> = &'a Self;
8048        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8049            value
8050        }
8051    }
8052
8053    unsafe impl fidl::encoding::TypeMarker for SetClipCmd {
8054        type Owned = Self;
8055
8056        #[inline(always)]
8057        fn inline_align(_context: fidl::encoding::Context) -> usize {
8058            4
8059        }
8060
8061        #[inline(always)]
8062        fn inline_size(_context: fidl::encoding::Context) -> usize {
8063            12
8064        }
8065    }
8066
8067    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetClipCmd, D>
8068        for &SetClipCmd
8069    {
8070        #[inline]
8071        unsafe fn encode(
8072            self,
8073            encoder: &mut fidl::encoding::Encoder<'_, D>,
8074            offset: usize,
8075            _depth: fidl::encoding::Depth,
8076        ) -> fidl::Result<()> {
8077            encoder.debug_check_bounds::<SetClipCmd>(offset);
8078            // Delegate to tuple encoding.
8079            fidl::encoding::Encode::<SetClipCmd, D>::encode(
8080                (
8081                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
8082                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.clip_id),
8083                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.clip_to_self),
8084                ),
8085                encoder,
8086                offset,
8087                _depth,
8088            )
8089        }
8090    }
8091    unsafe impl<
8092            D: fidl::encoding::ResourceDialect,
8093            T0: fidl::encoding::Encode<u32, D>,
8094            T1: fidl::encoding::Encode<u32, D>,
8095            T2: fidl::encoding::Encode<bool, D>,
8096        > fidl::encoding::Encode<SetClipCmd, D> for (T0, T1, T2)
8097    {
8098        #[inline]
8099        unsafe fn encode(
8100            self,
8101            encoder: &mut fidl::encoding::Encoder<'_, D>,
8102            offset: usize,
8103            depth: fidl::encoding::Depth,
8104        ) -> fidl::Result<()> {
8105            encoder.debug_check_bounds::<SetClipCmd>(offset);
8106            // Zero out padding regions. There's no need to apply masks
8107            // because the unmasked parts will be overwritten by fields.
8108            unsafe {
8109                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
8110                (ptr as *mut u32).write_unaligned(0);
8111            }
8112            // Write the fields.
8113            self.0.encode(encoder, offset + 0, depth)?;
8114            self.1.encode(encoder, offset + 4, depth)?;
8115            self.2.encode(encoder, offset + 8, depth)?;
8116            Ok(())
8117        }
8118    }
8119
8120    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetClipCmd {
8121        #[inline(always)]
8122        fn new_empty() -> Self {
8123            Self {
8124                node_id: fidl::new_empty!(u32, D),
8125                clip_id: fidl::new_empty!(u32, D),
8126                clip_to_self: fidl::new_empty!(bool, D),
8127            }
8128        }
8129
8130        #[inline]
8131        unsafe fn decode(
8132            &mut self,
8133            decoder: &mut fidl::encoding::Decoder<'_, D>,
8134            offset: usize,
8135            _depth: fidl::encoding::Depth,
8136        ) -> fidl::Result<()> {
8137            decoder.debug_check_bounds::<Self>(offset);
8138            // Verify that padding bytes are zero.
8139            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
8140            let padval = unsafe { (ptr as *const u32).read_unaligned() };
8141            let mask = 0xffffff00u32;
8142            let maskedval = padval & mask;
8143            if maskedval != 0 {
8144                return Err(fidl::Error::NonZeroPadding {
8145                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
8146                });
8147            }
8148            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
8149            fidl::decode!(u32, D, &mut self.clip_id, decoder, offset + 4, _depth)?;
8150            fidl::decode!(bool, D, &mut self.clip_to_self, decoder, offset + 8, _depth)?;
8151            Ok(())
8152        }
8153    }
8154
8155    impl fidl::encoding::ValueTypeMarker for SetClipPlanesCmd {
8156        type Borrowed<'a> = &'a Self;
8157        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8158            value
8159        }
8160    }
8161
8162    unsafe impl fidl::encoding::TypeMarker for SetClipPlanesCmd {
8163        type Owned = Self;
8164
8165        #[inline(always)]
8166        fn inline_align(_context: fidl::encoding::Context) -> usize {
8167            8
8168        }
8169
8170        #[inline(always)]
8171        fn inline_size(_context: fidl::encoding::Context) -> usize {
8172            24
8173        }
8174    }
8175
8176    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetClipPlanesCmd, D>
8177        for &SetClipPlanesCmd
8178    {
8179        #[inline]
8180        unsafe fn encode(
8181            self,
8182            encoder: &mut fidl::encoding::Encoder<'_, D>,
8183            offset: usize,
8184            _depth: fidl::encoding::Depth,
8185        ) -> fidl::Result<()> {
8186            encoder.debug_check_bounds::<SetClipPlanesCmd>(offset);
8187            // Delegate to tuple encoding.
8188            fidl::encoding::Encode::<SetClipPlanesCmd, D>::encode(
8189                (
8190                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
8191                    <fidl::encoding::UnboundedVector<Plane3> as fidl::encoding::ValueTypeMarker>::borrow(&self.clip_planes),
8192                ),
8193                encoder, offset, _depth
8194            )
8195        }
8196    }
8197    unsafe impl<
8198            D: fidl::encoding::ResourceDialect,
8199            T0: fidl::encoding::Encode<u32, D>,
8200            T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Plane3>, D>,
8201        > fidl::encoding::Encode<SetClipPlanesCmd, D> for (T0, T1)
8202    {
8203        #[inline]
8204        unsafe fn encode(
8205            self,
8206            encoder: &mut fidl::encoding::Encoder<'_, D>,
8207            offset: usize,
8208            depth: fidl::encoding::Depth,
8209        ) -> fidl::Result<()> {
8210            encoder.debug_check_bounds::<SetClipPlanesCmd>(offset);
8211            // Zero out padding regions. There's no need to apply masks
8212            // because the unmasked parts will be overwritten by fields.
8213            unsafe {
8214                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
8215                (ptr as *mut u64).write_unaligned(0);
8216            }
8217            // Write the fields.
8218            self.0.encode(encoder, offset + 0, depth)?;
8219            self.1.encode(encoder, offset + 8, depth)?;
8220            Ok(())
8221        }
8222    }
8223
8224    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetClipPlanesCmd {
8225        #[inline(always)]
8226        fn new_empty() -> Self {
8227            Self {
8228                node_id: fidl::new_empty!(u32, D),
8229                clip_planes: fidl::new_empty!(fidl::encoding::UnboundedVector<Plane3>, D),
8230            }
8231        }
8232
8233        #[inline]
8234        unsafe fn decode(
8235            &mut self,
8236            decoder: &mut fidl::encoding::Decoder<'_, D>,
8237            offset: usize,
8238            _depth: fidl::encoding::Depth,
8239        ) -> fidl::Result<()> {
8240            decoder.debug_check_bounds::<Self>(offset);
8241            // Verify that padding bytes are zero.
8242            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
8243            let padval = unsafe { (ptr as *const u64).read_unaligned() };
8244            let mask = 0xffffffff00000000u64;
8245            let maskedval = padval & mask;
8246            if maskedval != 0 {
8247                return Err(fidl::Error::NonZeroPadding {
8248                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8249                });
8250            }
8251            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
8252            fidl::decode!(
8253                fidl::encoding::UnboundedVector<Plane3>,
8254                D,
8255                &mut self.clip_planes,
8256                decoder,
8257                offset + 8,
8258                _depth
8259            )?;
8260            Ok(())
8261        }
8262    }
8263
8264    impl fidl::encoding::ValueTypeMarker for SetColorCmd {
8265        type Borrowed<'a> = &'a Self;
8266        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8267            value
8268        }
8269    }
8270
8271    unsafe impl fidl::encoding::TypeMarker for SetColorCmd {
8272        type Owned = Self;
8273
8274        #[inline(always)]
8275        fn inline_align(_context: fidl::encoding::Context) -> usize {
8276            4
8277        }
8278
8279        #[inline(always)]
8280        fn inline_size(_context: fidl::encoding::Context) -> usize {
8281            12
8282        }
8283        #[inline(always)]
8284        fn encode_is_copy() -> bool {
8285            true
8286        }
8287
8288        #[inline(always)]
8289        fn decode_is_copy() -> bool {
8290            true
8291        }
8292    }
8293
8294    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetColorCmd, D>
8295        for &SetColorCmd
8296    {
8297        #[inline]
8298        unsafe fn encode(
8299            self,
8300            encoder: &mut fidl::encoding::Encoder<'_, D>,
8301            offset: usize,
8302            _depth: fidl::encoding::Depth,
8303        ) -> fidl::Result<()> {
8304            encoder.debug_check_bounds::<SetColorCmd>(offset);
8305            unsafe {
8306                // Copy the object into the buffer.
8307                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8308                (buf_ptr as *mut SetColorCmd).write_unaligned((self as *const SetColorCmd).read());
8309                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8310                // done second because the memcpy will write garbage to these bytes.
8311            }
8312            Ok(())
8313        }
8314    }
8315    unsafe impl<
8316            D: fidl::encoding::ResourceDialect,
8317            T0: fidl::encoding::Encode<u32, D>,
8318            T1: fidl::encoding::Encode<ColorRgbaValue, D>,
8319        > fidl::encoding::Encode<SetColorCmd, D> for (T0, T1)
8320    {
8321        #[inline]
8322        unsafe fn encode(
8323            self,
8324            encoder: &mut fidl::encoding::Encoder<'_, D>,
8325            offset: usize,
8326            depth: fidl::encoding::Depth,
8327        ) -> fidl::Result<()> {
8328            encoder.debug_check_bounds::<SetColorCmd>(offset);
8329            // Zero out padding regions. There's no need to apply masks
8330            // because the unmasked parts will be overwritten by fields.
8331            // Write the fields.
8332            self.0.encode(encoder, offset + 0, depth)?;
8333            self.1.encode(encoder, offset + 4, depth)?;
8334            Ok(())
8335        }
8336    }
8337
8338    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetColorCmd {
8339        #[inline(always)]
8340        fn new_empty() -> Self {
8341            Self {
8342                material_id: fidl::new_empty!(u32, D),
8343                color: fidl::new_empty!(ColorRgbaValue, D),
8344            }
8345        }
8346
8347        #[inline]
8348        unsafe fn decode(
8349            &mut self,
8350            decoder: &mut fidl::encoding::Decoder<'_, D>,
8351            offset: usize,
8352            _depth: fidl::encoding::Depth,
8353        ) -> fidl::Result<()> {
8354            decoder.debug_check_bounds::<Self>(offset);
8355            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8356            // Verify that padding bytes are zero.
8357            // Copy from the buffer into the object.
8358            unsafe {
8359                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 12);
8360            }
8361            Ok(())
8362        }
8363    }
8364
8365    impl fidl::encoding::ValueTypeMarker for SetDisableClippingCmd {
8366        type Borrowed<'a> = &'a Self;
8367        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8368            value
8369        }
8370    }
8371
8372    unsafe impl fidl::encoding::TypeMarker for SetDisableClippingCmd {
8373        type Owned = Self;
8374
8375        #[inline(always)]
8376        fn inline_align(_context: fidl::encoding::Context) -> usize {
8377            4
8378        }
8379
8380        #[inline(always)]
8381        fn inline_size(_context: fidl::encoding::Context) -> usize {
8382            8
8383        }
8384    }
8385
8386    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetDisableClippingCmd, D>
8387        for &SetDisableClippingCmd
8388    {
8389        #[inline]
8390        unsafe fn encode(
8391            self,
8392            encoder: &mut fidl::encoding::Encoder<'_, D>,
8393            offset: usize,
8394            _depth: fidl::encoding::Depth,
8395        ) -> fidl::Result<()> {
8396            encoder.debug_check_bounds::<SetDisableClippingCmd>(offset);
8397            // Delegate to tuple encoding.
8398            fidl::encoding::Encode::<SetDisableClippingCmd, D>::encode(
8399                (
8400                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.renderer_id),
8401                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.disable_clipping),
8402                ),
8403                encoder,
8404                offset,
8405                _depth,
8406            )
8407        }
8408    }
8409    unsafe impl<
8410            D: fidl::encoding::ResourceDialect,
8411            T0: fidl::encoding::Encode<u32, D>,
8412            T1: fidl::encoding::Encode<bool, D>,
8413        > fidl::encoding::Encode<SetDisableClippingCmd, D> for (T0, T1)
8414    {
8415        #[inline]
8416        unsafe fn encode(
8417            self,
8418            encoder: &mut fidl::encoding::Encoder<'_, D>,
8419            offset: usize,
8420            depth: fidl::encoding::Depth,
8421        ) -> fidl::Result<()> {
8422            encoder.debug_check_bounds::<SetDisableClippingCmd>(offset);
8423            // Zero out padding regions. There's no need to apply masks
8424            // because the unmasked parts will be overwritten by fields.
8425            unsafe {
8426                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
8427                (ptr as *mut u32).write_unaligned(0);
8428            }
8429            // Write the fields.
8430            self.0.encode(encoder, offset + 0, depth)?;
8431            self.1.encode(encoder, offset + 4, depth)?;
8432            Ok(())
8433        }
8434    }
8435
8436    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetDisableClippingCmd {
8437        #[inline(always)]
8438        fn new_empty() -> Self {
8439            Self {
8440                renderer_id: fidl::new_empty!(u32, D),
8441                disable_clipping: fidl::new_empty!(bool, D),
8442            }
8443        }
8444
8445        #[inline]
8446        unsafe fn decode(
8447            &mut self,
8448            decoder: &mut fidl::encoding::Decoder<'_, D>,
8449            offset: usize,
8450            _depth: fidl::encoding::Depth,
8451        ) -> fidl::Result<()> {
8452            decoder.debug_check_bounds::<Self>(offset);
8453            // Verify that padding bytes are zero.
8454            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
8455            let padval = unsafe { (ptr as *const u32).read_unaligned() };
8456            let mask = 0xffffff00u32;
8457            let maskedval = padval & mask;
8458            if maskedval != 0 {
8459                return Err(fidl::Error::NonZeroPadding {
8460                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
8461                });
8462            }
8463            fidl::decode!(u32, D, &mut self.renderer_id, decoder, offset + 0, _depth)?;
8464            fidl::decode!(bool, D, &mut self.disable_clipping, decoder, offset + 4, _depth)?;
8465            Ok(())
8466        }
8467    }
8468
8469    impl fidl::encoding::ValueTypeMarker for SetDisplayColorConversionCmdHack {
8470        type Borrowed<'a> = &'a Self;
8471        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8472            value
8473        }
8474    }
8475
8476    unsafe impl fidl::encoding::TypeMarker for SetDisplayColorConversionCmdHack {
8477        type Owned = Self;
8478
8479        #[inline(always)]
8480        fn inline_align(_context: fidl::encoding::Context) -> usize {
8481            4
8482        }
8483
8484        #[inline(always)]
8485        fn inline_size(_context: fidl::encoding::Context) -> usize {
8486            64
8487        }
8488    }
8489
8490    unsafe impl<D: fidl::encoding::ResourceDialect>
8491        fidl::encoding::Encode<SetDisplayColorConversionCmdHack, D>
8492        for &SetDisplayColorConversionCmdHack
8493    {
8494        #[inline]
8495        unsafe fn encode(
8496            self,
8497            encoder: &mut fidl::encoding::Encoder<'_, D>,
8498            offset: usize,
8499            _depth: fidl::encoding::Depth,
8500        ) -> fidl::Result<()> {
8501            encoder.debug_check_bounds::<SetDisplayColorConversionCmdHack>(offset);
8502            // Delegate to tuple encoding.
8503            fidl::encoding::Encode::<SetDisplayColorConversionCmdHack, D>::encode(
8504                (
8505                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.compositor_id),
8506                    <fidl::encoding::Array<f32, 3> as fidl::encoding::ValueTypeMarker>::borrow(
8507                        &self.preoffsets,
8508                    ),
8509                    <fidl::encoding::Array<f32, 9> as fidl::encoding::ValueTypeMarker>::borrow(
8510                        &self.matrix,
8511                    ),
8512                    <fidl::encoding::Array<f32, 3> as fidl::encoding::ValueTypeMarker>::borrow(
8513                        &self.postoffsets,
8514                    ),
8515                ),
8516                encoder,
8517                offset,
8518                _depth,
8519            )
8520        }
8521    }
8522    unsafe impl<
8523            D: fidl::encoding::ResourceDialect,
8524            T0: fidl::encoding::Encode<u32, D>,
8525            T1: fidl::encoding::Encode<fidl::encoding::Array<f32, 3>, D>,
8526            T2: fidl::encoding::Encode<fidl::encoding::Array<f32, 9>, D>,
8527            T3: fidl::encoding::Encode<fidl::encoding::Array<f32, 3>, D>,
8528        > fidl::encoding::Encode<SetDisplayColorConversionCmdHack, D> for (T0, T1, T2, T3)
8529    {
8530        #[inline]
8531        unsafe fn encode(
8532            self,
8533            encoder: &mut fidl::encoding::Encoder<'_, D>,
8534            offset: usize,
8535            depth: fidl::encoding::Depth,
8536        ) -> fidl::Result<()> {
8537            encoder.debug_check_bounds::<SetDisplayColorConversionCmdHack>(offset);
8538            // Zero out padding regions. There's no need to apply masks
8539            // because the unmasked parts will be overwritten by fields.
8540            // Write the fields.
8541            self.0.encode(encoder, offset + 0, depth)?;
8542            self.1.encode(encoder, offset + 4, depth)?;
8543            self.2.encode(encoder, offset + 16, depth)?;
8544            self.3.encode(encoder, offset + 52, depth)?;
8545            Ok(())
8546        }
8547    }
8548
8549    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8550        for SetDisplayColorConversionCmdHack
8551    {
8552        #[inline(always)]
8553        fn new_empty() -> Self {
8554            Self {
8555                compositor_id: fidl::new_empty!(u32, D),
8556                preoffsets: fidl::new_empty!(fidl::encoding::Array<f32, 3>, D),
8557                matrix: fidl::new_empty!(fidl::encoding::Array<f32, 9>, D),
8558                postoffsets: fidl::new_empty!(fidl::encoding::Array<f32, 3>, D),
8559            }
8560        }
8561
8562        #[inline]
8563        unsafe fn decode(
8564            &mut self,
8565            decoder: &mut fidl::encoding::Decoder<'_, D>,
8566            offset: usize,
8567            _depth: fidl::encoding::Depth,
8568        ) -> fidl::Result<()> {
8569            decoder.debug_check_bounds::<Self>(offset);
8570            // Verify that padding bytes are zero.
8571            fidl::decode!(u32, D, &mut self.compositor_id, decoder, offset + 0, _depth)?;
8572            fidl::decode!(fidl::encoding::Array<f32, 3>, D, &mut self.preoffsets, decoder, offset + 4, _depth)?;
8573            fidl::decode!(fidl::encoding::Array<f32, 9>, D, &mut self.matrix, decoder, offset + 16, _depth)?;
8574            fidl::decode!(fidl::encoding::Array<f32, 3>, D, &mut self.postoffsets, decoder, offset + 52, _depth)?;
8575            Ok(())
8576        }
8577    }
8578
8579    impl fidl::encoding::ValueTypeMarker for SetDisplayMinimumRgbCmdHack {
8580        type Borrowed<'a> = &'a Self;
8581        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8582            value
8583        }
8584    }
8585
8586    unsafe impl fidl::encoding::TypeMarker for SetDisplayMinimumRgbCmdHack {
8587        type Owned = Self;
8588
8589        #[inline(always)]
8590        fn inline_align(_context: fidl::encoding::Context) -> usize {
8591            1
8592        }
8593
8594        #[inline(always)]
8595        fn inline_size(_context: fidl::encoding::Context) -> usize {
8596            1
8597        }
8598        #[inline(always)]
8599        fn encode_is_copy() -> bool {
8600            true
8601        }
8602
8603        #[inline(always)]
8604        fn decode_is_copy() -> bool {
8605            true
8606        }
8607    }
8608
8609    unsafe impl<D: fidl::encoding::ResourceDialect>
8610        fidl::encoding::Encode<SetDisplayMinimumRgbCmdHack, D> for &SetDisplayMinimumRgbCmdHack
8611    {
8612        #[inline]
8613        unsafe fn encode(
8614            self,
8615            encoder: &mut fidl::encoding::Encoder<'_, D>,
8616            offset: usize,
8617            _depth: fidl::encoding::Depth,
8618        ) -> fidl::Result<()> {
8619            encoder.debug_check_bounds::<SetDisplayMinimumRgbCmdHack>(offset);
8620            unsafe {
8621                // Copy the object into the buffer.
8622                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8623                (buf_ptr as *mut SetDisplayMinimumRgbCmdHack)
8624                    .write_unaligned((self as *const SetDisplayMinimumRgbCmdHack).read());
8625                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8626                // done second because the memcpy will write garbage to these bytes.
8627            }
8628            Ok(())
8629        }
8630    }
8631    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
8632        fidl::encoding::Encode<SetDisplayMinimumRgbCmdHack, D> for (T0,)
8633    {
8634        #[inline]
8635        unsafe fn encode(
8636            self,
8637            encoder: &mut fidl::encoding::Encoder<'_, D>,
8638            offset: usize,
8639            depth: fidl::encoding::Depth,
8640        ) -> fidl::Result<()> {
8641            encoder.debug_check_bounds::<SetDisplayMinimumRgbCmdHack>(offset);
8642            // Zero out padding regions. There's no need to apply masks
8643            // because the unmasked parts will be overwritten by fields.
8644            // Write the fields.
8645            self.0.encode(encoder, offset + 0, depth)?;
8646            Ok(())
8647        }
8648    }
8649
8650    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8651        for SetDisplayMinimumRgbCmdHack
8652    {
8653        #[inline(always)]
8654        fn new_empty() -> Self {
8655            Self { min_value: fidl::new_empty!(u8, D) }
8656        }
8657
8658        #[inline]
8659        unsafe fn decode(
8660            &mut self,
8661            decoder: &mut fidl::encoding::Decoder<'_, D>,
8662            offset: usize,
8663            _depth: fidl::encoding::Depth,
8664        ) -> fidl::Result<()> {
8665            decoder.debug_check_bounds::<Self>(offset);
8666            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8667            // Verify that padding bytes are zero.
8668            // Copy from the buffer into the object.
8669            unsafe {
8670                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
8671            }
8672            Ok(())
8673        }
8674    }
8675
8676    impl fidl::encoding::ValueTypeMarker for SetDisplayRotationCmdHack {
8677        type Borrowed<'a> = &'a Self;
8678        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8679            value
8680        }
8681    }
8682
8683    unsafe impl fidl::encoding::TypeMarker for SetDisplayRotationCmdHack {
8684        type Owned = Self;
8685
8686        #[inline(always)]
8687        fn inline_align(_context: fidl::encoding::Context) -> usize {
8688            4
8689        }
8690
8691        #[inline(always)]
8692        fn inline_size(_context: fidl::encoding::Context) -> usize {
8693            8
8694        }
8695        #[inline(always)]
8696        fn encode_is_copy() -> bool {
8697            true
8698        }
8699
8700        #[inline(always)]
8701        fn decode_is_copy() -> bool {
8702            true
8703        }
8704    }
8705
8706    unsafe impl<D: fidl::encoding::ResourceDialect>
8707        fidl::encoding::Encode<SetDisplayRotationCmdHack, D> for &SetDisplayRotationCmdHack
8708    {
8709        #[inline]
8710        unsafe fn encode(
8711            self,
8712            encoder: &mut fidl::encoding::Encoder<'_, D>,
8713            offset: usize,
8714            _depth: fidl::encoding::Depth,
8715        ) -> fidl::Result<()> {
8716            encoder.debug_check_bounds::<SetDisplayRotationCmdHack>(offset);
8717            unsafe {
8718                // Copy the object into the buffer.
8719                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8720                (buf_ptr as *mut SetDisplayRotationCmdHack)
8721                    .write_unaligned((self as *const SetDisplayRotationCmdHack).read());
8722                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8723                // done second because the memcpy will write garbage to these bytes.
8724            }
8725            Ok(())
8726        }
8727    }
8728    unsafe impl<
8729            D: fidl::encoding::ResourceDialect,
8730            T0: fidl::encoding::Encode<u32, D>,
8731            T1: fidl::encoding::Encode<u32, D>,
8732        > fidl::encoding::Encode<SetDisplayRotationCmdHack, D> for (T0, T1)
8733    {
8734        #[inline]
8735        unsafe fn encode(
8736            self,
8737            encoder: &mut fidl::encoding::Encoder<'_, D>,
8738            offset: usize,
8739            depth: fidl::encoding::Depth,
8740        ) -> fidl::Result<()> {
8741            encoder.debug_check_bounds::<SetDisplayRotationCmdHack>(offset);
8742            // Zero out padding regions. There's no need to apply masks
8743            // because the unmasked parts will be overwritten by fields.
8744            // Write the fields.
8745            self.0.encode(encoder, offset + 0, depth)?;
8746            self.1.encode(encoder, offset + 4, depth)?;
8747            Ok(())
8748        }
8749    }
8750
8751    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8752        for SetDisplayRotationCmdHack
8753    {
8754        #[inline(always)]
8755        fn new_empty() -> Self {
8756            Self {
8757                compositor_id: fidl::new_empty!(u32, D),
8758                rotation_degrees: fidl::new_empty!(u32, D),
8759            }
8760        }
8761
8762        #[inline]
8763        unsafe fn decode(
8764            &mut self,
8765            decoder: &mut fidl::encoding::Decoder<'_, D>,
8766            offset: usize,
8767            _depth: fidl::encoding::Depth,
8768        ) -> fidl::Result<()> {
8769            decoder.debug_check_bounds::<Self>(offset);
8770            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8771            // Verify that padding bytes are zero.
8772            // Copy from the buffer into the object.
8773            unsafe {
8774                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8775            }
8776            Ok(())
8777        }
8778    }
8779
8780    impl fidl::encoding::ValueTypeMarker for SetEnableDebugViewBoundsCmd {
8781        type Borrowed<'a> = &'a Self;
8782        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8783            value
8784        }
8785    }
8786
8787    unsafe impl fidl::encoding::TypeMarker for SetEnableDebugViewBoundsCmd {
8788        type Owned = Self;
8789
8790        #[inline(always)]
8791        fn inline_align(_context: fidl::encoding::Context) -> usize {
8792            4
8793        }
8794
8795        #[inline(always)]
8796        fn inline_size(_context: fidl::encoding::Context) -> usize {
8797            8
8798        }
8799    }
8800
8801    unsafe impl<D: fidl::encoding::ResourceDialect>
8802        fidl::encoding::Encode<SetEnableDebugViewBoundsCmd, D> for &SetEnableDebugViewBoundsCmd
8803    {
8804        #[inline]
8805        unsafe fn encode(
8806            self,
8807            encoder: &mut fidl::encoding::Encoder<'_, D>,
8808            offset: usize,
8809            _depth: fidl::encoding::Depth,
8810        ) -> fidl::Result<()> {
8811            encoder.debug_check_bounds::<SetEnableDebugViewBoundsCmd>(offset);
8812            // Delegate to tuple encoding.
8813            fidl::encoding::Encode::<SetEnableDebugViewBoundsCmd, D>::encode(
8814                (
8815                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.view_id),
8816                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.enable),
8817                ),
8818                encoder,
8819                offset,
8820                _depth,
8821            )
8822        }
8823    }
8824    unsafe impl<
8825            D: fidl::encoding::ResourceDialect,
8826            T0: fidl::encoding::Encode<u32, D>,
8827            T1: fidl::encoding::Encode<bool, D>,
8828        > fidl::encoding::Encode<SetEnableDebugViewBoundsCmd, D> for (T0, T1)
8829    {
8830        #[inline]
8831        unsafe fn encode(
8832            self,
8833            encoder: &mut fidl::encoding::Encoder<'_, D>,
8834            offset: usize,
8835            depth: fidl::encoding::Depth,
8836        ) -> fidl::Result<()> {
8837            encoder.debug_check_bounds::<SetEnableDebugViewBoundsCmd>(offset);
8838            // Zero out padding regions. There's no need to apply masks
8839            // because the unmasked parts will be overwritten by fields.
8840            unsafe {
8841                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
8842                (ptr as *mut u32).write_unaligned(0);
8843            }
8844            // Write the fields.
8845            self.0.encode(encoder, offset + 0, depth)?;
8846            self.1.encode(encoder, offset + 4, depth)?;
8847            Ok(())
8848        }
8849    }
8850
8851    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8852        for SetEnableDebugViewBoundsCmd
8853    {
8854        #[inline(always)]
8855        fn new_empty() -> Self {
8856            Self { view_id: fidl::new_empty!(u32, D), enable: fidl::new_empty!(bool, D) }
8857        }
8858
8859        #[inline]
8860        unsafe fn decode(
8861            &mut self,
8862            decoder: &mut fidl::encoding::Decoder<'_, D>,
8863            offset: usize,
8864            _depth: fidl::encoding::Depth,
8865        ) -> fidl::Result<()> {
8866            decoder.debug_check_bounds::<Self>(offset);
8867            // Verify that padding bytes are zero.
8868            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
8869            let padval = unsafe { (ptr as *const u32).read_unaligned() };
8870            let mask = 0xffffff00u32;
8871            let maskedval = padval & mask;
8872            if maskedval != 0 {
8873                return Err(fidl::Error::NonZeroPadding {
8874                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
8875                });
8876            }
8877            fidl::decode!(u32, D, &mut self.view_id, decoder, offset + 0, _depth)?;
8878            fidl::decode!(bool, D, &mut self.enable, decoder, offset + 4, _depth)?;
8879            Ok(())
8880        }
8881    }
8882
8883    impl fidl::encoding::ValueTypeMarker for SetEventMaskCmd {
8884        type Borrowed<'a> = &'a Self;
8885        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8886            value
8887        }
8888    }
8889
8890    unsafe impl fidl::encoding::TypeMarker for SetEventMaskCmd {
8891        type Owned = Self;
8892
8893        #[inline(always)]
8894        fn inline_align(_context: fidl::encoding::Context) -> usize {
8895            4
8896        }
8897
8898        #[inline(always)]
8899        fn inline_size(_context: fidl::encoding::Context) -> usize {
8900            8
8901        }
8902        #[inline(always)]
8903        fn encode_is_copy() -> bool {
8904            true
8905        }
8906
8907        #[inline(always)]
8908        fn decode_is_copy() -> bool {
8909            true
8910        }
8911    }
8912
8913    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetEventMaskCmd, D>
8914        for &SetEventMaskCmd
8915    {
8916        #[inline]
8917        unsafe fn encode(
8918            self,
8919            encoder: &mut fidl::encoding::Encoder<'_, D>,
8920            offset: usize,
8921            _depth: fidl::encoding::Depth,
8922        ) -> fidl::Result<()> {
8923            encoder.debug_check_bounds::<SetEventMaskCmd>(offset);
8924            unsafe {
8925                // Copy the object into the buffer.
8926                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8927                (buf_ptr as *mut SetEventMaskCmd)
8928                    .write_unaligned((self as *const SetEventMaskCmd).read());
8929                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
8930                // done second because the memcpy will write garbage to these bytes.
8931            }
8932            Ok(())
8933        }
8934    }
8935    unsafe impl<
8936            D: fidl::encoding::ResourceDialect,
8937            T0: fidl::encoding::Encode<u32, D>,
8938            T1: fidl::encoding::Encode<u32, D>,
8939        > fidl::encoding::Encode<SetEventMaskCmd, D> for (T0, T1)
8940    {
8941        #[inline]
8942        unsafe fn encode(
8943            self,
8944            encoder: &mut fidl::encoding::Encoder<'_, D>,
8945            offset: usize,
8946            depth: fidl::encoding::Depth,
8947        ) -> fidl::Result<()> {
8948            encoder.debug_check_bounds::<SetEventMaskCmd>(offset);
8949            // Zero out padding regions. There's no need to apply masks
8950            // because the unmasked parts will be overwritten by fields.
8951            // Write the fields.
8952            self.0.encode(encoder, offset + 0, depth)?;
8953            self.1.encode(encoder, offset + 4, depth)?;
8954            Ok(())
8955        }
8956    }
8957
8958    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetEventMaskCmd {
8959        #[inline(always)]
8960        fn new_empty() -> Self {
8961            Self { id: fidl::new_empty!(u32, D), event_mask: fidl::new_empty!(u32, D) }
8962        }
8963
8964        #[inline]
8965        unsafe fn decode(
8966            &mut self,
8967            decoder: &mut fidl::encoding::Decoder<'_, D>,
8968            offset: usize,
8969            _depth: fidl::encoding::Depth,
8970        ) -> fidl::Result<()> {
8971            decoder.debug_check_bounds::<Self>(offset);
8972            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8973            // Verify that padding bytes are zero.
8974            // Copy from the buffer into the object.
8975            unsafe {
8976                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
8977            }
8978            Ok(())
8979        }
8980    }
8981
8982    impl fidl::encoding::ValueTypeMarker for SetHitTestBehaviorCmd {
8983        type Borrowed<'a> = &'a Self;
8984        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8985            value
8986        }
8987    }
8988
8989    unsafe impl fidl::encoding::TypeMarker for SetHitTestBehaviorCmd {
8990        type Owned = Self;
8991
8992        #[inline(always)]
8993        fn inline_align(_context: fidl::encoding::Context) -> usize {
8994            4
8995        }
8996
8997        #[inline(always)]
8998        fn inline_size(_context: fidl::encoding::Context) -> usize {
8999            8
9000        }
9001    }
9002
9003    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetHitTestBehaviorCmd, D>
9004        for &SetHitTestBehaviorCmd
9005    {
9006        #[inline]
9007        unsafe fn encode(
9008            self,
9009            encoder: &mut fidl::encoding::Encoder<'_, D>,
9010            offset: usize,
9011            _depth: fidl::encoding::Depth,
9012        ) -> fidl::Result<()> {
9013            encoder.debug_check_bounds::<SetHitTestBehaviorCmd>(offset);
9014            // Delegate to tuple encoding.
9015            fidl::encoding::Encode::<SetHitTestBehaviorCmd, D>::encode(
9016                (
9017                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
9018                    <HitTestBehavior as fidl::encoding::ValueTypeMarker>::borrow(
9019                        &self.hit_test_behavior,
9020                    ),
9021                ),
9022                encoder,
9023                offset,
9024                _depth,
9025            )
9026        }
9027    }
9028    unsafe impl<
9029            D: fidl::encoding::ResourceDialect,
9030            T0: fidl::encoding::Encode<u32, D>,
9031            T1: fidl::encoding::Encode<HitTestBehavior, D>,
9032        > fidl::encoding::Encode<SetHitTestBehaviorCmd, D> for (T0, T1)
9033    {
9034        #[inline]
9035        unsafe fn encode(
9036            self,
9037            encoder: &mut fidl::encoding::Encoder<'_, D>,
9038            offset: usize,
9039            depth: fidl::encoding::Depth,
9040        ) -> fidl::Result<()> {
9041            encoder.debug_check_bounds::<SetHitTestBehaviorCmd>(offset);
9042            // Zero out padding regions. There's no need to apply masks
9043            // because the unmasked parts will be overwritten by fields.
9044            // Write the fields.
9045            self.0.encode(encoder, offset + 0, depth)?;
9046            self.1.encode(encoder, offset + 4, depth)?;
9047            Ok(())
9048        }
9049    }
9050
9051    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetHitTestBehaviorCmd {
9052        #[inline(always)]
9053        fn new_empty() -> Self {
9054            Self {
9055                node_id: fidl::new_empty!(u32, D),
9056                hit_test_behavior: fidl::new_empty!(HitTestBehavior, D),
9057            }
9058        }
9059
9060        #[inline]
9061        unsafe fn decode(
9062            &mut self,
9063            decoder: &mut fidl::encoding::Decoder<'_, D>,
9064            offset: usize,
9065            _depth: fidl::encoding::Depth,
9066        ) -> fidl::Result<()> {
9067            decoder.debug_check_bounds::<Self>(offset);
9068            // Verify that padding bytes are zero.
9069            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
9070            fidl::decode!(
9071                HitTestBehavior,
9072                D,
9073                &mut self.hit_test_behavior,
9074                decoder,
9075                offset + 4,
9076                _depth
9077            )?;
9078            Ok(())
9079        }
9080    }
9081
9082    impl fidl::encoding::ValueTypeMarker for SetImportFocusCmdDeprecated {
9083        type Borrowed<'a> = &'a Self;
9084        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9085            value
9086        }
9087    }
9088
9089    unsafe impl fidl::encoding::TypeMarker for SetImportFocusCmdDeprecated {
9090        type Owned = Self;
9091
9092        #[inline(always)]
9093        fn inline_align(_context: fidl::encoding::Context) -> usize {
9094            1
9095        }
9096
9097        #[inline(always)]
9098        fn inline_size(_context: fidl::encoding::Context) -> usize {
9099            1
9100        }
9101    }
9102
9103    unsafe impl<D: fidl::encoding::ResourceDialect>
9104        fidl::encoding::Encode<SetImportFocusCmdDeprecated, D> for &SetImportFocusCmdDeprecated
9105    {
9106        #[inline]
9107        unsafe fn encode(
9108            self,
9109            encoder: &mut fidl::encoding::Encoder<'_, D>,
9110            offset: usize,
9111            _depth: fidl::encoding::Depth,
9112        ) -> fidl::Result<()> {
9113            encoder.debug_check_bounds::<SetImportFocusCmdDeprecated>(offset);
9114            encoder.write_num(0u8, offset);
9115            Ok(())
9116        }
9117    }
9118
9119    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9120        for SetImportFocusCmdDeprecated
9121    {
9122        #[inline(always)]
9123        fn new_empty() -> Self {
9124            Self
9125        }
9126
9127        #[inline]
9128        unsafe fn decode(
9129            &mut self,
9130            decoder: &mut fidl::encoding::Decoder<'_, D>,
9131            offset: usize,
9132            _depth: fidl::encoding::Depth,
9133        ) -> fidl::Result<()> {
9134            decoder.debug_check_bounds::<Self>(offset);
9135            match decoder.read_num::<u8>(offset) {
9136                0 => Ok(()),
9137                _ => Err(fidl::Error::Invalid),
9138            }
9139        }
9140    }
9141
9142    impl fidl::encoding::ValueTypeMarker for SetLabelCmd {
9143        type Borrowed<'a> = &'a Self;
9144        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9145            value
9146        }
9147    }
9148
9149    unsafe impl fidl::encoding::TypeMarker for SetLabelCmd {
9150        type Owned = Self;
9151
9152        #[inline(always)]
9153        fn inline_align(_context: fidl::encoding::Context) -> usize {
9154            8
9155        }
9156
9157        #[inline(always)]
9158        fn inline_size(_context: fidl::encoding::Context) -> usize {
9159            24
9160        }
9161    }
9162
9163    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetLabelCmd, D>
9164        for &SetLabelCmd
9165    {
9166        #[inline]
9167        unsafe fn encode(
9168            self,
9169            encoder: &mut fidl::encoding::Encoder<'_, D>,
9170            offset: usize,
9171            _depth: fidl::encoding::Depth,
9172        ) -> fidl::Result<()> {
9173            encoder.debug_check_bounds::<SetLabelCmd>(offset);
9174            // Delegate to tuple encoding.
9175            fidl::encoding::Encode::<SetLabelCmd, D>::encode(
9176                (
9177                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
9178                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
9179                        &self.label,
9180                    ),
9181                ),
9182                encoder,
9183                offset,
9184                _depth,
9185            )
9186        }
9187    }
9188    unsafe impl<
9189            D: fidl::encoding::ResourceDialect,
9190            T0: fidl::encoding::Encode<u32, D>,
9191            T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
9192        > fidl::encoding::Encode<SetLabelCmd, D> for (T0, T1)
9193    {
9194        #[inline]
9195        unsafe fn encode(
9196            self,
9197            encoder: &mut fidl::encoding::Encoder<'_, D>,
9198            offset: usize,
9199            depth: fidl::encoding::Depth,
9200        ) -> fidl::Result<()> {
9201            encoder.debug_check_bounds::<SetLabelCmd>(offset);
9202            // Zero out padding regions. There's no need to apply masks
9203            // because the unmasked parts will be overwritten by fields.
9204            unsafe {
9205                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9206                (ptr as *mut u64).write_unaligned(0);
9207            }
9208            // Write the fields.
9209            self.0.encode(encoder, offset + 0, depth)?;
9210            self.1.encode(encoder, offset + 8, depth)?;
9211            Ok(())
9212        }
9213    }
9214
9215    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetLabelCmd {
9216        #[inline(always)]
9217        fn new_empty() -> Self {
9218            Self {
9219                id: fidl::new_empty!(u32, D),
9220                label: fidl::new_empty!(fidl::encoding::UnboundedString, D),
9221            }
9222        }
9223
9224        #[inline]
9225        unsafe fn decode(
9226            &mut self,
9227            decoder: &mut fidl::encoding::Decoder<'_, D>,
9228            offset: usize,
9229            _depth: fidl::encoding::Depth,
9230        ) -> fidl::Result<()> {
9231            decoder.debug_check_bounds::<Self>(offset);
9232            // Verify that padding bytes are zero.
9233            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
9234            let padval = unsafe { (ptr as *const u64).read_unaligned() };
9235            let mask = 0xffffffff00000000u64;
9236            let maskedval = padval & mask;
9237            if maskedval != 0 {
9238                return Err(fidl::Error::NonZeroPadding {
9239                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9240                });
9241            }
9242            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
9243            fidl::decode!(
9244                fidl::encoding::UnboundedString,
9245                D,
9246                &mut self.label,
9247                decoder,
9248                offset + 8,
9249                _depth
9250            )?;
9251            Ok(())
9252        }
9253    }
9254
9255    impl fidl::encoding::ValueTypeMarker for SetLayerStackCmd {
9256        type Borrowed<'a> = &'a Self;
9257        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9258            value
9259        }
9260    }
9261
9262    unsafe impl fidl::encoding::TypeMarker for SetLayerStackCmd {
9263        type Owned = Self;
9264
9265        #[inline(always)]
9266        fn inline_align(_context: fidl::encoding::Context) -> usize {
9267            4
9268        }
9269
9270        #[inline(always)]
9271        fn inline_size(_context: fidl::encoding::Context) -> usize {
9272            8
9273        }
9274        #[inline(always)]
9275        fn encode_is_copy() -> bool {
9276            true
9277        }
9278
9279        #[inline(always)]
9280        fn decode_is_copy() -> bool {
9281            true
9282        }
9283    }
9284
9285    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetLayerStackCmd, D>
9286        for &SetLayerStackCmd
9287    {
9288        #[inline]
9289        unsafe fn encode(
9290            self,
9291            encoder: &mut fidl::encoding::Encoder<'_, D>,
9292            offset: usize,
9293            _depth: fidl::encoding::Depth,
9294        ) -> fidl::Result<()> {
9295            encoder.debug_check_bounds::<SetLayerStackCmd>(offset);
9296            unsafe {
9297                // Copy the object into the buffer.
9298                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9299                (buf_ptr as *mut SetLayerStackCmd)
9300                    .write_unaligned((self as *const SetLayerStackCmd).read());
9301                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9302                // done second because the memcpy will write garbage to these bytes.
9303            }
9304            Ok(())
9305        }
9306    }
9307    unsafe impl<
9308            D: fidl::encoding::ResourceDialect,
9309            T0: fidl::encoding::Encode<u32, D>,
9310            T1: fidl::encoding::Encode<u32, D>,
9311        > fidl::encoding::Encode<SetLayerStackCmd, D> for (T0, T1)
9312    {
9313        #[inline]
9314        unsafe fn encode(
9315            self,
9316            encoder: &mut fidl::encoding::Encoder<'_, D>,
9317            offset: usize,
9318            depth: fidl::encoding::Depth,
9319        ) -> fidl::Result<()> {
9320            encoder.debug_check_bounds::<SetLayerStackCmd>(offset);
9321            // Zero out padding regions. There's no need to apply masks
9322            // because the unmasked parts will be overwritten by fields.
9323            // Write the fields.
9324            self.0.encode(encoder, offset + 0, depth)?;
9325            self.1.encode(encoder, offset + 4, depth)?;
9326            Ok(())
9327        }
9328    }
9329
9330    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetLayerStackCmd {
9331        #[inline(always)]
9332        fn new_empty() -> Self {
9333            Self {
9334                compositor_id: fidl::new_empty!(u32, D),
9335                layer_stack_id: fidl::new_empty!(u32, D),
9336            }
9337        }
9338
9339        #[inline]
9340        unsafe fn decode(
9341            &mut self,
9342            decoder: &mut fidl::encoding::Decoder<'_, D>,
9343            offset: usize,
9344            _depth: fidl::encoding::Depth,
9345        ) -> fidl::Result<()> {
9346            decoder.debug_check_bounds::<Self>(offset);
9347            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9348            // Verify that padding bytes are zero.
9349            // Copy from the buffer into the object.
9350            unsafe {
9351                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9352            }
9353            Ok(())
9354        }
9355    }
9356
9357    impl fidl::encoding::ValueTypeMarker for SetLightColorCmd {
9358        type Borrowed<'a> = &'a Self;
9359        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9360            value
9361        }
9362    }
9363
9364    unsafe impl fidl::encoding::TypeMarker for SetLightColorCmd {
9365        type Owned = Self;
9366
9367        #[inline(always)]
9368        fn inline_align(_context: fidl::encoding::Context) -> usize {
9369            4
9370        }
9371
9372        #[inline(always)]
9373        fn inline_size(_context: fidl::encoding::Context) -> usize {
9374            20
9375        }
9376    }
9377
9378    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetLightColorCmd, D>
9379        for &SetLightColorCmd
9380    {
9381        #[inline]
9382        unsafe fn encode(
9383            self,
9384            encoder: &mut fidl::encoding::Encoder<'_, D>,
9385            offset: usize,
9386            _depth: fidl::encoding::Depth,
9387        ) -> fidl::Result<()> {
9388            encoder.debug_check_bounds::<SetLightColorCmd>(offset);
9389            // Delegate to tuple encoding.
9390            fidl::encoding::Encode::<SetLightColorCmd, D>::encode(
9391                (
9392                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.light_id),
9393                    <ColorRgbValue as fidl::encoding::ValueTypeMarker>::borrow(&self.color),
9394                ),
9395                encoder,
9396                offset,
9397                _depth,
9398            )
9399        }
9400    }
9401    unsafe impl<
9402            D: fidl::encoding::ResourceDialect,
9403            T0: fidl::encoding::Encode<u32, D>,
9404            T1: fidl::encoding::Encode<ColorRgbValue, D>,
9405        > fidl::encoding::Encode<SetLightColorCmd, D> for (T0, T1)
9406    {
9407        #[inline]
9408        unsafe fn encode(
9409            self,
9410            encoder: &mut fidl::encoding::Encoder<'_, D>,
9411            offset: usize,
9412            depth: fidl::encoding::Depth,
9413        ) -> fidl::Result<()> {
9414            encoder.debug_check_bounds::<SetLightColorCmd>(offset);
9415            // Zero out padding regions. There's no need to apply masks
9416            // because the unmasked parts will be overwritten by fields.
9417            // Write the fields.
9418            self.0.encode(encoder, offset + 0, depth)?;
9419            self.1.encode(encoder, offset + 4, depth)?;
9420            Ok(())
9421        }
9422    }
9423
9424    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetLightColorCmd {
9425        #[inline(always)]
9426        fn new_empty() -> Self {
9427            Self { light_id: fidl::new_empty!(u32, D), color: fidl::new_empty!(ColorRgbValue, D) }
9428        }
9429
9430        #[inline]
9431        unsafe fn decode(
9432            &mut self,
9433            decoder: &mut fidl::encoding::Decoder<'_, D>,
9434            offset: usize,
9435            _depth: fidl::encoding::Depth,
9436        ) -> fidl::Result<()> {
9437            decoder.debug_check_bounds::<Self>(offset);
9438            // Verify that padding bytes are zero.
9439            fidl::decode!(u32, D, &mut self.light_id, decoder, offset + 0, _depth)?;
9440            fidl::decode!(ColorRgbValue, D, &mut self.color, decoder, offset + 4, _depth)?;
9441            Ok(())
9442        }
9443    }
9444
9445    impl fidl::encoding::ValueTypeMarker for SetLightDirectionCmd {
9446        type Borrowed<'a> = &'a Self;
9447        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9448            value
9449        }
9450    }
9451
9452    unsafe impl fidl::encoding::TypeMarker for SetLightDirectionCmd {
9453        type Owned = Self;
9454
9455        #[inline(always)]
9456        fn inline_align(_context: fidl::encoding::Context) -> usize {
9457            4
9458        }
9459
9460        #[inline(always)]
9461        fn inline_size(_context: fidl::encoding::Context) -> usize {
9462            20
9463        }
9464    }
9465
9466    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetLightDirectionCmd, D>
9467        for &SetLightDirectionCmd
9468    {
9469        #[inline]
9470        unsafe fn encode(
9471            self,
9472            encoder: &mut fidl::encoding::Encoder<'_, D>,
9473            offset: usize,
9474            _depth: fidl::encoding::Depth,
9475        ) -> fidl::Result<()> {
9476            encoder.debug_check_bounds::<SetLightDirectionCmd>(offset);
9477            // Delegate to tuple encoding.
9478            fidl::encoding::Encode::<SetLightDirectionCmd, D>::encode(
9479                (
9480                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.light_id),
9481                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.direction),
9482                ),
9483                encoder,
9484                offset,
9485                _depth,
9486            )
9487        }
9488    }
9489    unsafe impl<
9490            D: fidl::encoding::ResourceDialect,
9491            T0: fidl::encoding::Encode<u32, D>,
9492            T1: fidl::encoding::Encode<Vector3Value, D>,
9493        > fidl::encoding::Encode<SetLightDirectionCmd, D> for (T0, T1)
9494    {
9495        #[inline]
9496        unsafe fn encode(
9497            self,
9498            encoder: &mut fidl::encoding::Encoder<'_, D>,
9499            offset: usize,
9500            depth: fidl::encoding::Depth,
9501        ) -> fidl::Result<()> {
9502            encoder.debug_check_bounds::<SetLightDirectionCmd>(offset);
9503            // Zero out padding regions. There's no need to apply masks
9504            // because the unmasked parts will be overwritten by fields.
9505            // Write the fields.
9506            self.0.encode(encoder, offset + 0, depth)?;
9507            self.1.encode(encoder, offset + 4, depth)?;
9508            Ok(())
9509        }
9510    }
9511
9512    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetLightDirectionCmd {
9513        #[inline(always)]
9514        fn new_empty() -> Self {
9515            Self {
9516                light_id: fidl::new_empty!(u32, D),
9517                direction: fidl::new_empty!(Vector3Value, D),
9518            }
9519        }
9520
9521        #[inline]
9522        unsafe fn decode(
9523            &mut self,
9524            decoder: &mut fidl::encoding::Decoder<'_, D>,
9525            offset: usize,
9526            _depth: fidl::encoding::Depth,
9527        ) -> fidl::Result<()> {
9528            decoder.debug_check_bounds::<Self>(offset);
9529            // Verify that padding bytes are zero.
9530            fidl::decode!(u32, D, &mut self.light_id, decoder, offset + 0, _depth)?;
9531            fidl::decode!(Vector3Value, D, &mut self.direction, decoder, offset + 4, _depth)?;
9532            Ok(())
9533        }
9534    }
9535
9536    impl fidl::encoding::ValueTypeMarker for SetMaterialCmd {
9537        type Borrowed<'a> = &'a Self;
9538        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9539            value
9540        }
9541    }
9542
9543    unsafe impl fidl::encoding::TypeMarker for SetMaterialCmd {
9544        type Owned = Self;
9545
9546        #[inline(always)]
9547        fn inline_align(_context: fidl::encoding::Context) -> usize {
9548            4
9549        }
9550
9551        #[inline(always)]
9552        fn inline_size(_context: fidl::encoding::Context) -> usize {
9553            8
9554        }
9555        #[inline(always)]
9556        fn encode_is_copy() -> bool {
9557            true
9558        }
9559
9560        #[inline(always)]
9561        fn decode_is_copy() -> bool {
9562            true
9563        }
9564    }
9565
9566    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetMaterialCmd, D>
9567        for &SetMaterialCmd
9568    {
9569        #[inline]
9570        unsafe fn encode(
9571            self,
9572            encoder: &mut fidl::encoding::Encoder<'_, D>,
9573            offset: usize,
9574            _depth: fidl::encoding::Depth,
9575        ) -> fidl::Result<()> {
9576            encoder.debug_check_bounds::<SetMaterialCmd>(offset);
9577            unsafe {
9578                // Copy the object into the buffer.
9579                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9580                (buf_ptr as *mut SetMaterialCmd)
9581                    .write_unaligned((self as *const SetMaterialCmd).read());
9582                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9583                // done second because the memcpy will write garbage to these bytes.
9584            }
9585            Ok(())
9586        }
9587    }
9588    unsafe impl<
9589            D: fidl::encoding::ResourceDialect,
9590            T0: fidl::encoding::Encode<u32, D>,
9591            T1: fidl::encoding::Encode<u32, D>,
9592        > fidl::encoding::Encode<SetMaterialCmd, D> for (T0, T1)
9593    {
9594        #[inline]
9595        unsafe fn encode(
9596            self,
9597            encoder: &mut fidl::encoding::Encoder<'_, D>,
9598            offset: usize,
9599            depth: fidl::encoding::Depth,
9600        ) -> fidl::Result<()> {
9601            encoder.debug_check_bounds::<SetMaterialCmd>(offset);
9602            // Zero out padding regions. There's no need to apply masks
9603            // because the unmasked parts will be overwritten by fields.
9604            // Write the fields.
9605            self.0.encode(encoder, offset + 0, depth)?;
9606            self.1.encode(encoder, offset + 4, depth)?;
9607            Ok(())
9608        }
9609    }
9610
9611    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetMaterialCmd {
9612        #[inline(always)]
9613        fn new_empty() -> Self {
9614            Self { node_id: fidl::new_empty!(u32, D), material_id: fidl::new_empty!(u32, D) }
9615        }
9616
9617        #[inline]
9618        unsafe fn decode(
9619            &mut self,
9620            decoder: &mut fidl::encoding::Decoder<'_, D>,
9621            offset: usize,
9622            _depth: fidl::encoding::Depth,
9623        ) -> fidl::Result<()> {
9624            decoder.debug_check_bounds::<Self>(offset);
9625            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9626            // Verify that padding bytes are zero.
9627            // Copy from the buffer into the object.
9628            unsafe {
9629                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9630            }
9631            Ok(())
9632        }
9633    }
9634
9635    impl fidl::encoding::ValueTypeMarker for SetOpacityCmd {
9636        type Borrowed<'a> = &'a Self;
9637        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9638            value
9639        }
9640    }
9641
9642    unsafe impl fidl::encoding::TypeMarker for SetOpacityCmd {
9643        type Owned = Self;
9644
9645        #[inline(always)]
9646        fn inline_align(_context: fidl::encoding::Context) -> usize {
9647            4
9648        }
9649
9650        #[inline(always)]
9651        fn inline_size(_context: fidl::encoding::Context) -> usize {
9652            8
9653        }
9654    }
9655
9656    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetOpacityCmd, D>
9657        for &SetOpacityCmd
9658    {
9659        #[inline]
9660        unsafe fn encode(
9661            self,
9662            encoder: &mut fidl::encoding::Encoder<'_, D>,
9663            offset: usize,
9664            _depth: fidl::encoding::Depth,
9665        ) -> fidl::Result<()> {
9666            encoder.debug_check_bounds::<SetOpacityCmd>(offset);
9667            // Delegate to tuple encoding.
9668            fidl::encoding::Encode::<SetOpacityCmd, D>::encode(
9669                (
9670                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
9671                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.opacity),
9672                ),
9673                encoder,
9674                offset,
9675                _depth,
9676            )
9677        }
9678    }
9679    unsafe impl<
9680            D: fidl::encoding::ResourceDialect,
9681            T0: fidl::encoding::Encode<u32, D>,
9682            T1: fidl::encoding::Encode<f32, D>,
9683        > fidl::encoding::Encode<SetOpacityCmd, D> for (T0, T1)
9684    {
9685        #[inline]
9686        unsafe fn encode(
9687            self,
9688            encoder: &mut fidl::encoding::Encoder<'_, D>,
9689            offset: usize,
9690            depth: fidl::encoding::Depth,
9691        ) -> fidl::Result<()> {
9692            encoder.debug_check_bounds::<SetOpacityCmd>(offset);
9693            // Zero out padding regions. There's no need to apply masks
9694            // because the unmasked parts will be overwritten by fields.
9695            // Write the fields.
9696            self.0.encode(encoder, offset + 0, depth)?;
9697            self.1.encode(encoder, offset + 4, depth)?;
9698            Ok(())
9699        }
9700    }
9701
9702    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetOpacityCmd {
9703        #[inline(always)]
9704        fn new_empty() -> Self {
9705            Self { node_id: fidl::new_empty!(u32, D), opacity: fidl::new_empty!(f32, D) }
9706        }
9707
9708        #[inline]
9709        unsafe fn decode(
9710            &mut self,
9711            decoder: &mut fidl::encoding::Decoder<'_, D>,
9712            offset: usize,
9713            _depth: fidl::encoding::Depth,
9714        ) -> fidl::Result<()> {
9715            decoder.debug_check_bounds::<Self>(offset);
9716            // Verify that padding bytes are zero.
9717            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
9718            fidl::decode!(f32, D, &mut self.opacity, decoder, offset + 4, _depth)?;
9719            Ok(())
9720        }
9721    }
9722
9723    impl fidl::encoding::ValueTypeMarker for SetPointLightFalloffCmd {
9724        type Borrowed<'a> = &'a Self;
9725        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9726            value
9727        }
9728    }
9729
9730    unsafe impl fidl::encoding::TypeMarker for SetPointLightFalloffCmd {
9731        type Owned = Self;
9732
9733        #[inline(always)]
9734        fn inline_align(_context: fidl::encoding::Context) -> usize {
9735            4
9736        }
9737
9738        #[inline(always)]
9739        fn inline_size(_context: fidl::encoding::Context) -> usize {
9740            12
9741        }
9742    }
9743
9744    unsafe impl<D: fidl::encoding::ResourceDialect>
9745        fidl::encoding::Encode<SetPointLightFalloffCmd, D> for &SetPointLightFalloffCmd
9746    {
9747        #[inline]
9748        unsafe fn encode(
9749            self,
9750            encoder: &mut fidl::encoding::Encoder<'_, D>,
9751            offset: usize,
9752            _depth: fidl::encoding::Depth,
9753        ) -> fidl::Result<()> {
9754            encoder.debug_check_bounds::<SetPointLightFalloffCmd>(offset);
9755            // Delegate to tuple encoding.
9756            fidl::encoding::Encode::<SetPointLightFalloffCmd, D>::encode(
9757                (
9758                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.light_id),
9759                    <FloatValue as fidl::encoding::ValueTypeMarker>::borrow(&self.falloff),
9760                ),
9761                encoder,
9762                offset,
9763                _depth,
9764            )
9765        }
9766    }
9767    unsafe impl<
9768            D: fidl::encoding::ResourceDialect,
9769            T0: fidl::encoding::Encode<u32, D>,
9770            T1: fidl::encoding::Encode<FloatValue, D>,
9771        > fidl::encoding::Encode<SetPointLightFalloffCmd, D> for (T0, T1)
9772    {
9773        #[inline]
9774        unsafe fn encode(
9775            self,
9776            encoder: &mut fidl::encoding::Encoder<'_, D>,
9777            offset: usize,
9778            depth: fidl::encoding::Depth,
9779        ) -> fidl::Result<()> {
9780            encoder.debug_check_bounds::<SetPointLightFalloffCmd>(offset);
9781            // Zero out padding regions. There's no need to apply masks
9782            // because the unmasked parts will be overwritten by fields.
9783            // Write the fields.
9784            self.0.encode(encoder, offset + 0, depth)?;
9785            self.1.encode(encoder, offset + 4, depth)?;
9786            Ok(())
9787        }
9788    }
9789
9790    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9791        for SetPointLightFalloffCmd
9792    {
9793        #[inline(always)]
9794        fn new_empty() -> Self {
9795            Self { light_id: fidl::new_empty!(u32, D), falloff: fidl::new_empty!(FloatValue, D) }
9796        }
9797
9798        #[inline]
9799        unsafe fn decode(
9800            &mut self,
9801            decoder: &mut fidl::encoding::Decoder<'_, D>,
9802            offset: usize,
9803            _depth: fidl::encoding::Depth,
9804        ) -> fidl::Result<()> {
9805            decoder.debug_check_bounds::<Self>(offset);
9806            // Verify that padding bytes are zero.
9807            fidl::decode!(u32, D, &mut self.light_id, decoder, offset + 0, _depth)?;
9808            fidl::decode!(FloatValue, D, &mut self.falloff, decoder, offset + 4, _depth)?;
9809            Ok(())
9810        }
9811    }
9812
9813    impl fidl::encoding::ValueTypeMarker for SetPointLightPositionCmd {
9814        type Borrowed<'a> = &'a Self;
9815        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9816            value
9817        }
9818    }
9819
9820    unsafe impl fidl::encoding::TypeMarker for SetPointLightPositionCmd {
9821        type Owned = Self;
9822
9823        #[inline(always)]
9824        fn inline_align(_context: fidl::encoding::Context) -> usize {
9825            4
9826        }
9827
9828        #[inline(always)]
9829        fn inline_size(_context: fidl::encoding::Context) -> usize {
9830            20
9831        }
9832    }
9833
9834    unsafe impl<D: fidl::encoding::ResourceDialect>
9835        fidl::encoding::Encode<SetPointLightPositionCmd, D> for &SetPointLightPositionCmd
9836    {
9837        #[inline]
9838        unsafe fn encode(
9839            self,
9840            encoder: &mut fidl::encoding::Encoder<'_, D>,
9841            offset: usize,
9842            _depth: fidl::encoding::Depth,
9843        ) -> fidl::Result<()> {
9844            encoder.debug_check_bounds::<SetPointLightPositionCmd>(offset);
9845            // Delegate to tuple encoding.
9846            fidl::encoding::Encode::<SetPointLightPositionCmd, D>::encode(
9847                (
9848                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.light_id),
9849                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.position),
9850                ),
9851                encoder,
9852                offset,
9853                _depth,
9854            )
9855        }
9856    }
9857    unsafe impl<
9858            D: fidl::encoding::ResourceDialect,
9859            T0: fidl::encoding::Encode<u32, D>,
9860            T1: fidl::encoding::Encode<Vector3Value, D>,
9861        > fidl::encoding::Encode<SetPointLightPositionCmd, D> for (T0, T1)
9862    {
9863        #[inline]
9864        unsafe fn encode(
9865            self,
9866            encoder: &mut fidl::encoding::Encoder<'_, D>,
9867            offset: usize,
9868            depth: fidl::encoding::Depth,
9869        ) -> fidl::Result<()> {
9870            encoder.debug_check_bounds::<SetPointLightPositionCmd>(offset);
9871            // Zero out padding regions. There's no need to apply masks
9872            // because the unmasked parts will be overwritten by fields.
9873            // Write the fields.
9874            self.0.encode(encoder, offset + 0, depth)?;
9875            self.1.encode(encoder, offset + 4, depth)?;
9876            Ok(())
9877        }
9878    }
9879
9880    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9881        for SetPointLightPositionCmd
9882    {
9883        #[inline(always)]
9884        fn new_empty() -> Self {
9885            Self { light_id: fidl::new_empty!(u32, D), position: fidl::new_empty!(Vector3Value, D) }
9886        }
9887
9888        #[inline]
9889        unsafe fn decode(
9890            &mut self,
9891            decoder: &mut fidl::encoding::Decoder<'_, D>,
9892            offset: usize,
9893            _depth: fidl::encoding::Depth,
9894        ) -> fidl::Result<()> {
9895            decoder.debug_check_bounds::<Self>(offset);
9896            // Verify that padding bytes are zero.
9897            fidl::decode!(u32, D, &mut self.light_id, decoder, offset + 0, _depth)?;
9898            fidl::decode!(Vector3Value, D, &mut self.position, decoder, offset + 4, _depth)?;
9899            Ok(())
9900        }
9901    }
9902
9903    impl fidl::encoding::ValueTypeMarker for SetRendererCmd {
9904        type Borrowed<'a> = &'a Self;
9905        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9906            value
9907        }
9908    }
9909
9910    unsafe impl fidl::encoding::TypeMarker for SetRendererCmd {
9911        type Owned = Self;
9912
9913        #[inline(always)]
9914        fn inline_align(_context: fidl::encoding::Context) -> usize {
9915            4
9916        }
9917
9918        #[inline(always)]
9919        fn inline_size(_context: fidl::encoding::Context) -> usize {
9920            8
9921        }
9922        #[inline(always)]
9923        fn encode_is_copy() -> bool {
9924            true
9925        }
9926
9927        #[inline(always)]
9928        fn decode_is_copy() -> bool {
9929            true
9930        }
9931    }
9932
9933    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetRendererCmd, D>
9934        for &SetRendererCmd
9935    {
9936        #[inline]
9937        unsafe fn encode(
9938            self,
9939            encoder: &mut fidl::encoding::Encoder<'_, D>,
9940            offset: usize,
9941            _depth: fidl::encoding::Depth,
9942        ) -> fidl::Result<()> {
9943            encoder.debug_check_bounds::<SetRendererCmd>(offset);
9944            unsafe {
9945                // Copy the object into the buffer.
9946                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
9947                (buf_ptr as *mut SetRendererCmd)
9948                    .write_unaligned((self as *const SetRendererCmd).read());
9949                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
9950                // done second because the memcpy will write garbage to these bytes.
9951            }
9952            Ok(())
9953        }
9954    }
9955    unsafe impl<
9956            D: fidl::encoding::ResourceDialect,
9957            T0: fidl::encoding::Encode<u32, D>,
9958            T1: fidl::encoding::Encode<u32, D>,
9959        > fidl::encoding::Encode<SetRendererCmd, D> for (T0, T1)
9960    {
9961        #[inline]
9962        unsafe fn encode(
9963            self,
9964            encoder: &mut fidl::encoding::Encoder<'_, D>,
9965            offset: usize,
9966            depth: fidl::encoding::Depth,
9967        ) -> fidl::Result<()> {
9968            encoder.debug_check_bounds::<SetRendererCmd>(offset);
9969            // Zero out padding regions. There's no need to apply masks
9970            // because the unmasked parts will be overwritten by fields.
9971            // Write the fields.
9972            self.0.encode(encoder, offset + 0, depth)?;
9973            self.1.encode(encoder, offset + 4, depth)?;
9974            Ok(())
9975        }
9976    }
9977
9978    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetRendererCmd {
9979        #[inline(always)]
9980        fn new_empty() -> Self {
9981            Self { layer_id: fidl::new_empty!(u32, D), renderer_id: fidl::new_empty!(u32, D) }
9982        }
9983
9984        #[inline]
9985        unsafe fn decode(
9986            &mut self,
9987            decoder: &mut fidl::encoding::Decoder<'_, D>,
9988            offset: usize,
9989            _depth: fidl::encoding::Depth,
9990        ) -> fidl::Result<()> {
9991            decoder.debug_check_bounds::<Self>(offset);
9992            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
9993            // Verify that padding bytes are zero.
9994            // Copy from the buffer into the object.
9995            unsafe {
9996                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
9997            }
9998            Ok(())
9999        }
10000    }
10001
10002    impl fidl::encoding::ValueTypeMarker for SetRendererParamCmd {
10003        type Borrowed<'a> = &'a Self;
10004        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10005            value
10006        }
10007    }
10008
10009    unsafe impl fidl::encoding::TypeMarker for SetRendererParamCmd {
10010        type Owned = Self;
10011
10012        #[inline(always)]
10013        fn inline_align(_context: fidl::encoding::Context) -> usize {
10014            8
10015        }
10016
10017        #[inline(always)]
10018        fn inline_size(_context: fidl::encoding::Context) -> usize {
10019            24
10020        }
10021    }
10022
10023    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetRendererParamCmd, D>
10024        for &SetRendererParamCmd
10025    {
10026        #[inline]
10027        unsafe fn encode(
10028            self,
10029            encoder: &mut fidl::encoding::Encoder<'_, D>,
10030            offset: usize,
10031            _depth: fidl::encoding::Depth,
10032        ) -> fidl::Result<()> {
10033            encoder.debug_check_bounds::<SetRendererParamCmd>(offset);
10034            // Delegate to tuple encoding.
10035            fidl::encoding::Encode::<SetRendererParamCmd, D>::encode(
10036                (
10037                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.renderer_id),
10038                    <RendererParam as fidl::encoding::ValueTypeMarker>::borrow(&self.param),
10039                ),
10040                encoder,
10041                offset,
10042                _depth,
10043            )
10044        }
10045    }
10046    unsafe impl<
10047            D: fidl::encoding::ResourceDialect,
10048            T0: fidl::encoding::Encode<u32, D>,
10049            T1: fidl::encoding::Encode<RendererParam, D>,
10050        > fidl::encoding::Encode<SetRendererParamCmd, D> for (T0, T1)
10051    {
10052        #[inline]
10053        unsafe fn encode(
10054            self,
10055            encoder: &mut fidl::encoding::Encoder<'_, D>,
10056            offset: usize,
10057            depth: fidl::encoding::Depth,
10058        ) -> fidl::Result<()> {
10059            encoder.debug_check_bounds::<SetRendererParamCmd>(offset);
10060            // Zero out padding regions. There's no need to apply masks
10061            // because the unmasked parts will be overwritten by fields.
10062            unsafe {
10063                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10064                (ptr as *mut u64).write_unaligned(0);
10065            }
10066            // Write the fields.
10067            self.0.encode(encoder, offset + 0, depth)?;
10068            self.1.encode(encoder, offset + 8, depth)?;
10069            Ok(())
10070        }
10071    }
10072
10073    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetRendererParamCmd {
10074        #[inline(always)]
10075        fn new_empty() -> Self {
10076            Self {
10077                renderer_id: fidl::new_empty!(u32, D),
10078                param: fidl::new_empty!(RendererParam, D),
10079            }
10080        }
10081
10082        #[inline]
10083        unsafe fn decode(
10084            &mut self,
10085            decoder: &mut fidl::encoding::Decoder<'_, D>,
10086            offset: usize,
10087            _depth: fidl::encoding::Depth,
10088        ) -> fidl::Result<()> {
10089            decoder.debug_check_bounds::<Self>(offset);
10090            // Verify that padding bytes are zero.
10091            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10092            let padval = unsafe { (ptr as *const u64).read_unaligned() };
10093            let mask = 0xffffffff00000000u64;
10094            let maskedval = padval & mask;
10095            if maskedval != 0 {
10096                return Err(fidl::Error::NonZeroPadding {
10097                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10098                });
10099            }
10100            fidl::decode!(u32, D, &mut self.renderer_id, decoder, offset + 0, _depth)?;
10101            fidl::decode!(RendererParam, D, &mut self.param, decoder, offset + 8, _depth)?;
10102            Ok(())
10103        }
10104    }
10105
10106    impl fidl::encoding::ValueTypeMarker for SetRotationCmd {
10107        type Borrowed<'a> = &'a Self;
10108        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10109            value
10110        }
10111    }
10112
10113    unsafe impl fidl::encoding::TypeMarker for SetRotationCmd {
10114        type Owned = Self;
10115
10116        #[inline(always)]
10117        fn inline_align(_context: fidl::encoding::Context) -> usize {
10118            4
10119        }
10120
10121        #[inline(always)]
10122        fn inline_size(_context: fidl::encoding::Context) -> usize {
10123            24
10124        }
10125    }
10126
10127    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetRotationCmd, D>
10128        for &SetRotationCmd
10129    {
10130        #[inline]
10131        unsafe fn encode(
10132            self,
10133            encoder: &mut fidl::encoding::Encoder<'_, D>,
10134            offset: usize,
10135            _depth: fidl::encoding::Depth,
10136        ) -> fidl::Result<()> {
10137            encoder.debug_check_bounds::<SetRotationCmd>(offset);
10138            // Delegate to tuple encoding.
10139            fidl::encoding::Encode::<SetRotationCmd, D>::encode(
10140                (
10141                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
10142                    <QuaternionValue as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
10143                ),
10144                encoder,
10145                offset,
10146                _depth,
10147            )
10148        }
10149    }
10150    unsafe impl<
10151            D: fidl::encoding::ResourceDialect,
10152            T0: fidl::encoding::Encode<u32, D>,
10153            T1: fidl::encoding::Encode<QuaternionValue, D>,
10154        > fidl::encoding::Encode<SetRotationCmd, D> for (T0, T1)
10155    {
10156        #[inline]
10157        unsafe fn encode(
10158            self,
10159            encoder: &mut fidl::encoding::Encoder<'_, D>,
10160            offset: usize,
10161            depth: fidl::encoding::Depth,
10162        ) -> fidl::Result<()> {
10163            encoder.debug_check_bounds::<SetRotationCmd>(offset);
10164            // Zero out padding regions. There's no need to apply masks
10165            // because the unmasked parts will be overwritten by fields.
10166            // Write the fields.
10167            self.0.encode(encoder, offset + 0, depth)?;
10168            self.1.encode(encoder, offset + 4, depth)?;
10169            Ok(())
10170        }
10171    }
10172
10173    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetRotationCmd {
10174        #[inline(always)]
10175        fn new_empty() -> Self {
10176            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(QuaternionValue, D) }
10177        }
10178
10179        #[inline]
10180        unsafe fn decode(
10181            &mut self,
10182            decoder: &mut fidl::encoding::Decoder<'_, D>,
10183            offset: usize,
10184            _depth: fidl::encoding::Depth,
10185        ) -> fidl::Result<()> {
10186            decoder.debug_check_bounds::<Self>(offset);
10187            // Verify that padding bytes are zero.
10188            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
10189            fidl::decode!(QuaternionValue, D, &mut self.value, decoder, offset + 4, _depth)?;
10190            Ok(())
10191        }
10192    }
10193
10194    impl fidl::encoding::ValueTypeMarker for SetScaleCmd {
10195        type Borrowed<'a> = &'a Self;
10196        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10197            value
10198        }
10199    }
10200
10201    unsafe impl fidl::encoding::TypeMarker for SetScaleCmd {
10202        type Owned = Self;
10203
10204        #[inline(always)]
10205        fn inline_align(_context: fidl::encoding::Context) -> usize {
10206            4
10207        }
10208
10209        #[inline(always)]
10210        fn inline_size(_context: fidl::encoding::Context) -> usize {
10211            20
10212        }
10213    }
10214
10215    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetScaleCmd, D>
10216        for &SetScaleCmd
10217    {
10218        #[inline]
10219        unsafe fn encode(
10220            self,
10221            encoder: &mut fidl::encoding::Encoder<'_, D>,
10222            offset: usize,
10223            _depth: fidl::encoding::Depth,
10224        ) -> fidl::Result<()> {
10225            encoder.debug_check_bounds::<SetScaleCmd>(offset);
10226            // Delegate to tuple encoding.
10227            fidl::encoding::Encode::<SetScaleCmd, D>::encode(
10228                (
10229                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
10230                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
10231                ),
10232                encoder,
10233                offset,
10234                _depth,
10235            )
10236        }
10237    }
10238    unsafe impl<
10239            D: fidl::encoding::ResourceDialect,
10240            T0: fidl::encoding::Encode<u32, D>,
10241            T1: fidl::encoding::Encode<Vector3Value, D>,
10242        > fidl::encoding::Encode<SetScaleCmd, D> for (T0, T1)
10243    {
10244        #[inline]
10245        unsafe fn encode(
10246            self,
10247            encoder: &mut fidl::encoding::Encoder<'_, D>,
10248            offset: usize,
10249            depth: fidl::encoding::Depth,
10250        ) -> fidl::Result<()> {
10251            encoder.debug_check_bounds::<SetScaleCmd>(offset);
10252            // Zero out padding regions. There's no need to apply masks
10253            // because the unmasked parts will be overwritten by fields.
10254            // Write the fields.
10255            self.0.encode(encoder, offset + 0, depth)?;
10256            self.1.encode(encoder, offset + 4, depth)?;
10257            Ok(())
10258        }
10259    }
10260
10261    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetScaleCmd {
10262        #[inline(always)]
10263        fn new_empty() -> Self {
10264            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Vector3Value, D) }
10265        }
10266
10267        #[inline]
10268        unsafe fn decode(
10269            &mut self,
10270            decoder: &mut fidl::encoding::Decoder<'_, D>,
10271            offset: usize,
10272            _depth: fidl::encoding::Depth,
10273        ) -> fidl::Result<()> {
10274            decoder.debug_check_bounds::<Self>(offset);
10275            // Verify that padding bytes are zero.
10276            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
10277            fidl::decode!(Vector3Value, D, &mut self.value, decoder, offset + 4, _depth)?;
10278            Ok(())
10279        }
10280    }
10281
10282    impl fidl::encoding::ValueTypeMarker for SetSemanticVisibilityCmd {
10283        type Borrowed<'a> = &'a Self;
10284        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10285            value
10286        }
10287    }
10288
10289    unsafe impl fidl::encoding::TypeMarker for SetSemanticVisibilityCmd {
10290        type Owned = Self;
10291
10292        #[inline(always)]
10293        fn inline_align(_context: fidl::encoding::Context) -> usize {
10294            4
10295        }
10296
10297        #[inline(always)]
10298        fn inline_size(_context: fidl::encoding::Context) -> usize {
10299            8
10300        }
10301    }
10302
10303    unsafe impl<D: fidl::encoding::ResourceDialect>
10304        fidl::encoding::Encode<SetSemanticVisibilityCmd, D> for &SetSemanticVisibilityCmd
10305    {
10306        #[inline]
10307        unsafe fn encode(
10308            self,
10309            encoder: &mut fidl::encoding::Encoder<'_, D>,
10310            offset: usize,
10311            _depth: fidl::encoding::Depth,
10312        ) -> fidl::Result<()> {
10313            encoder.debug_check_bounds::<SetSemanticVisibilityCmd>(offset);
10314            // Delegate to tuple encoding.
10315            fidl::encoding::Encode::<SetSemanticVisibilityCmd, D>::encode(
10316                (
10317                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
10318                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.visible),
10319                ),
10320                encoder,
10321                offset,
10322                _depth,
10323            )
10324        }
10325    }
10326    unsafe impl<
10327            D: fidl::encoding::ResourceDialect,
10328            T0: fidl::encoding::Encode<u32, D>,
10329            T1: fidl::encoding::Encode<bool, D>,
10330        > fidl::encoding::Encode<SetSemanticVisibilityCmd, D> for (T0, T1)
10331    {
10332        #[inline]
10333        unsafe fn encode(
10334            self,
10335            encoder: &mut fidl::encoding::Encoder<'_, D>,
10336            offset: usize,
10337            depth: fidl::encoding::Depth,
10338        ) -> fidl::Result<()> {
10339            encoder.debug_check_bounds::<SetSemanticVisibilityCmd>(offset);
10340            // Zero out padding regions. There's no need to apply masks
10341            // because the unmasked parts will be overwritten by fields.
10342            unsafe {
10343                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
10344                (ptr as *mut u32).write_unaligned(0);
10345            }
10346            // Write the fields.
10347            self.0.encode(encoder, offset + 0, depth)?;
10348            self.1.encode(encoder, offset + 4, depth)?;
10349            Ok(())
10350        }
10351    }
10352
10353    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10354        for SetSemanticVisibilityCmd
10355    {
10356        #[inline(always)]
10357        fn new_empty() -> Self {
10358            Self { node_id: fidl::new_empty!(u32, D), visible: fidl::new_empty!(bool, D) }
10359        }
10360
10361        #[inline]
10362        unsafe fn decode(
10363            &mut self,
10364            decoder: &mut fidl::encoding::Decoder<'_, D>,
10365            offset: usize,
10366            _depth: fidl::encoding::Depth,
10367        ) -> fidl::Result<()> {
10368            decoder.debug_check_bounds::<Self>(offset);
10369            // Verify that padding bytes are zero.
10370            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
10371            let padval = unsafe { (ptr as *const u32).read_unaligned() };
10372            let mask = 0xffffff00u32;
10373            let maskedval = padval & mask;
10374            if maskedval != 0 {
10375                return Err(fidl::Error::NonZeroPadding {
10376                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
10377                });
10378            }
10379            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
10380            fidl::decode!(bool, D, &mut self.visible, decoder, offset + 4, _depth)?;
10381            Ok(())
10382        }
10383    }
10384
10385    impl fidl::encoding::ValueTypeMarker for SetShapeCmd {
10386        type Borrowed<'a> = &'a Self;
10387        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10388            value
10389        }
10390    }
10391
10392    unsafe impl fidl::encoding::TypeMarker for SetShapeCmd {
10393        type Owned = Self;
10394
10395        #[inline(always)]
10396        fn inline_align(_context: fidl::encoding::Context) -> usize {
10397            4
10398        }
10399
10400        #[inline(always)]
10401        fn inline_size(_context: fidl::encoding::Context) -> usize {
10402            8
10403        }
10404        #[inline(always)]
10405        fn encode_is_copy() -> bool {
10406            true
10407        }
10408
10409        #[inline(always)]
10410        fn decode_is_copy() -> bool {
10411            true
10412        }
10413    }
10414
10415    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetShapeCmd, D>
10416        for &SetShapeCmd
10417    {
10418        #[inline]
10419        unsafe fn encode(
10420            self,
10421            encoder: &mut fidl::encoding::Encoder<'_, D>,
10422            offset: usize,
10423            _depth: fidl::encoding::Depth,
10424        ) -> fidl::Result<()> {
10425            encoder.debug_check_bounds::<SetShapeCmd>(offset);
10426            unsafe {
10427                // Copy the object into the buffer.
10428                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10429                (buf_ptr as *mut SetShapeCmd).write_unaligned((self as *const SetShapeCmd).read());
10430                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10431                // done second because the memcpy will write garbage to these bytes.
10432            }
10433            Ok(())
10434        }
10435    }
10436    unsafe impl<
10437            D: fidl::encoding::ResourceDialect,
10438            T0: fidl::encoding::Encode<u32, D>,
10439            T1: fidl::encoding::Encode<u32, D>,
10440        > fidl::encoding::Encode<SetShapeCmd, D> for (T0, T1)
10441    {
10442        #[inline]
10443        unsafe fn encode(
10444            self,
10445            encoder: &mut fidl::encoding::Encoder<'_, D>,
10446            offset: usize,
10447            depth: fidl::encoding::Depth,
10448        ) -> fidl::Result<()> {
10449            encoder.debug_check_bounds::<SetShapeCmd>(offset);
10450            // Zero out padding regions. There's no need to apply masks
10451            // because the unmasked parts will be overwritten by fields.
10452            // Write the fields.
10453            self.0.encode(encoder, offset + 0, depth)?;
10454            self.1.encode(encoder, offset + 4, depth)?;
10455            Ok(())
10456        }
10457    }
10458
10459    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetShapeCmd {
10460        #[inline(always)]
10461        fn new_empty() -> Self {
10462            Self { node_id: fidl::new_empty!(u32, D), shape_id: fidl::new_empty!(u32, D) }
10463        }
10464
10465        #[inline]
10466        unsafe fn decode(
10467            &mut self,
10468            decoder: &mut fidl::encoding::Decoder<'_, D>,
10469            offset: usize,
10470            _depth: fidl::encoding::Depth,
10471        ) -> fidl::Result<()> {
10472            decoder.debug_check_bounds::<Self>(offset);
10473            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10474            // Verify that padding bytes are zero.
10475            // Copy from the buffer into the object.
10476            unsafe {
10477                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
10478            }
10479            Ok(())
10480        }
10481    }
10482
10483    impl fidl::encoding::ValueTypeMarker for SetSizeCmd {
10484        type Borrowed<'a> = &'a Self;
10485        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10486            value
10487        }
10488    }
10489
10490    unsafe impl fidl::encoding::TypeMarker for SetSizeCmd {
10491        type Owned = Self;
10492
10493        #[inline(always)]
10494        fn inline_align(_context: fidl::encoding::Context) -> usize {
10495            4
10496        }
10497
10498        #[inline(always)]
10499        fn inline_size(_context: fidl::encoding::Context) -> usize {
10500            16
10501        }
10502    }
10503
10504    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetSizeCmd, D>
10505        for &SetSizeCmd
10506    {
10507        #[inline]
10508        unsafe fn encode(
10509            self,
10510            encoder: &mut fidl::encoding::Encoder<'_, D>,
10511            offset: usize,
10512            _depth: fidl::encoding::Depth,
10513        ) -> fidl::Result<()> {
10514            encoder.debug_check_bounds::<SetSizeCmd>(offset);
10515            // Delegate to tuple encoding.
10516            fidl::encoding::Encode::<SetSizeCmd, D>::encode(
10517                (
10518                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
10519                    <Vector2Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
10520                ),
10521                encoder,
10522                offset,
10523                _depth,
10524            )
10525        }
10526    }
10527    unsafe impl<
10528            D: fidl::encoding::ResourceDialect,
10529            T0: fidl::encoding::Encode<u32, D>,
10530            T1: fidl::encoding::Encode<Vector2Value, D>,
10531        > fidl::encoding::Encode<SetSizeCmd, D> for (T0, T1)
10532    {
10533        #[inline]
10534        unsafe fn encode(
10535            self,
10536            encoder: &mut fidl::encoding::Encoder<'_, D>,
10537            offset: usize,
10538            depth: fidl::encoding::Depth,
10539        ) -> fidl::Result<()> {
10540            encoder.debug_check_bounds::<SetSizeCmd>(offset);
10541            // Zero out padding regions. There's no need to apply masks
10542            // because the unmasked parts will be overwritten by fields.
10543            // Write the fields.
10544            self.0.encode(encoder, offset + 0, depth)?;
10545            self.1.encode(encoder, offset + 4, depth)?;
10546            Ok(())
10547        }
10548    }
10549
10550    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetSizeCmd {
10551        #[inline(always)]
10552        fn new_empty() -> Self {
10553            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Vector2Value, D) }
10554        }
10555
10556        #[inline]
10557        unsafe fn decode(
10558            &mut self,
10559            decoder: &mut fidl::encoding::Decoder<'_, D>,
10560            offset: usize,
10561            _depth: fidl::encoding::Depth,
10562        ) -> fidl::Result<()> {
10563            decoder.debug_check_bounds::<Self>(offset);
10564            // Verify that padding bytes are zero.
10565            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
10566            fidl::decode!(Vector2Value, D, &mut self.value, decoder, offset + 4, _depth)?;
10567            Ok(())
10568        }
10569    }
10570
10571    impl fidl::encoding::ValueTypeMarker for SetStereoCameraProjectionCmd {
10572        type Borrowed<'a> = &'a Self;
10573        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10574            value
10575        }
10576    }
10577
10578    unsafe impl fidl::encoding::TypeMarker for SetStereoCameraProjectionCmd {
10579        type Owned = Self;
10580
10581        #[inline(always)]
10582        fn inline_align(_context: fidl::encoding::Context) -> usize {
10583            4
10584        }
10585
10586        #[inline(always)]
10587        fn inline_size(_context: fidl::encoding::Context) -> usize {
10588            140
10589        }
10590    }
10591
10592    unsafe impl<D: fidl::encoding::ResourceDialect>
10593        fidl::encoding::Encode<SetStereoCameraProjectionCmd, D> for &SetStereoCameraProjectionCmd
10594    {
10595        #[inline]
10596        unsafe fn encode(
10597            self,
10598            encoder: &mut fidl::encoding::Encoder<'_, D>,
10599            offset: usize,
10600            _depth: fidl::encoding::Depth,
10601        ) -> fidl::Result<()> {
10602            encoder.debug_check_bounds::<SetStereoCameraProjectionCmd>(offset);
10603            // Delegate to tuple encoding.
10604            fidl::encoding::Encode::<SetStereoCameraProjectionCmd, D>::encode(
10605                (
10606                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.camera_id),
10607                    <Matrix4Value as fidl::encoding::ValueTypeMarker>::borrow(
10608                        &self.left_projection,
10609                    ),
10610                    <Matrix4Value as fidl::encoding::ValueTypeMarker>::borrow(
10611                        &self.right_projection,
10612                    ),
10613                ),
10614                encoder,
10615                offset,
10616                _depth,
10617            )
10618        }
10619    }
10620    unsafe impl<
10621            D: fidl::encoding::ResourceDialect,
10622            T0: fidl::encoding::Encode<u32, D>,
10623            T1: fidl::encoding::Encode<Matrix4Value, D>,
10624            T2: fidl::encoding::Encode<Matrix4Value, D>,
10625        > fidl::encoding::Encode<SetStereoCameraProjectionCmd, D> for (T0, T1, T2)
10626    {
10627        #[inline]
10628        unsafe fn encode(
10629            self,
10630            encoder: &mut fidl::encoding::Encoder<'_, D>,
10631            offset: usize,
10632            depth: fidl::encoding::Depth,
10633        ) -> fidl::Result<()> {
10634            encoder.debug_check_bounds::<SetStereoCameraProjectionCmd>(offset);
10635            // Zero out padding regions. There's no need to apply masks
10636            // because the unmasked parts will be overwritten by fields.
10637            // Write the fields.
10638            self.0.encode(encoder, offset + 0, depth)?;
10639            self.1.encode(encoder, offset + 4, depth)?;
10640            self.2.encode(encoder, offset + 72, depth)?;
10641            Ok(())
10642        }
10643    }
10644
10645    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10646        for SetStereoCameraProjectionCmd
10647    {
10648        #[inline(always)]
10649        fn new_empty() -> Self {
10650            Self {
10651                camera_id: fidl::new_empty!(u32, D),
10652                left_projection: fidl::new_empty!(Matrix4Value, D),
10653                right_projection: fidl::new_empty!(Matrix4Value, D),
10654            }
10655        }
10656
10657        #[inline]
10658        unsafe fn decode(
10659            &mut self,
10660            decoder: &mut fidl::encoding::Decoder<'_, D>,
10661            offset: usize,
10662            _depth: fidl::encoding::Depth,
10663        ) -> fidl::Result<()> {
10664            decoder.debug_check_bounds::<Self>(offset);
10665            // Verify that padding bytes are zero.
10666            fidl::decode!(u32, D, &mut self.camera_id, decoder, offset + 0, _depth)?;
10667            fidl::decode!(Matrix4Value, D, &mut self.left_projection, decoder, offset + 4, _depth)?;
10668            fidl::decode!(
10669                Matrix4Value,
10670                D,
10671                &mut self.right_projection,
10672                decoder,
10673                offset + 72,
10674                _depth
10675            )?;
10676            Ok(())
10677        }
10678    }
10679
10680    impl fidl::encoding::ValueTypeMarker for SetTagCmd {
10681        type Borrowed<'a> = &'a Self;
10682        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10683            value
10684        }
10685    }
10686
10687    unsafe impl fidl::encoding::TypeMarker for SetTagCmd {
10688        type Owned = Self;
10689
10690        #[inline(always)]
10691        fn inline_align(_context: fidl::encoding::Context) -> usize {
10692            4
10693        }
10694
10695        #[inline(always)]
10696        fn inline_size(_context: fidl::encoding::Context) -> usize {
10697            8
10698        }
10699        #[inline(always)]
10700        fn encode_is_copy() -> bool {
10701            true
10702        }
10703
10704        #[inline(always)]
10705        fn decode_is_copy() -> bool {
10706            true
10707        }
10708    }
10709
10710    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetTagCmd, D>
10711        for &SetTagCmd
10712    {
10713        #[inline]
10714        unsafe fn encode(
10715            self,
10716            encoder: &mut fidl::encoding::Encoder<'_, D>,
10717            offset: usize,
10718            _depth: fidl::encoding::Depth,
10719        ) -> fidl::Result<()> {
10720            encoder.debug_check_bounds::<SetTagCmd>(offset);
10721            unsafe {
10722                // Copy the object into the buffer.
10723                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10724                (buf_ptr as *mut SetTagCmd).write_unaligned((self as *const SetTagCmd).read());
10725                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10726                // done second because the memcpy will write garbage to these bytes.
10727            }
10728            Ok(())
10729        }
10730    }
10731    unsafe impl<
10732            D: fidl::encoding::ResourceDialect,
10733            T0: fidl::encoding::Encode<u32, D>,
10734            T1: fidl::encoding::Encode<u32, D>,
10735        > fidl::encoding::Encode<SetTagCmd, D> for (T0, T1)
10736    {
10737        #[inline]
10738        unsafe fn encode(
10739            self,
10740            encoder: &mut fidl::encoding::Encoder<'_, D>,
10741            offset: usize,
10742            depth: fidl::encoding::Depth,
10743        ) -> fidl::Result<()> {
10744            encoder.debug_check_bounds::<SetTagCmd>(offset);
10745            // Zero out padding regions. There's no need to apply masks
10746            // because the unmasked parts will be overwritten by fields.
10747            // Write the fields.
10748            self.0.encode(encoder, offset + 0, depth)?;
10749            self.1.encode(encoder, offset + 4, depth)?;
10750            Ok(())
10751        }
10752    }
10753
10754    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetTagCmd {
10755        #[inline(always)]
10756        fn new_empty() -> Self {
10757            Self { node_id: fidl::new_empty!(u32, D), tag_value: fidl::new_empty!(u32, D) }
10758        }
10759
10760        #[inline]
10761        unsafe fn decode(
10762            &mut self,
10763            decoder: &mut fidl::encoding::Decoder<'_, D>,
10764            offset: usize,
10765            _depth: fidl::encoding::Depth,
10766        ) -> fidl::Result<()> {
10767            decoder.debug_check_bounds::<Self>(offset);
10768            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10769            // Verify that padding bytes are zero.
10770            // Copy from the buffer into the object.
10771            unsafe {
10772                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
10773            }
10774            Ok(())
10775        }
10776    }
10777
10778    impl fidl::encoding::ValueTypeMarker for SetTextureCmd {
10779        type Borrowed<'a> = &'a Self;
10780        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10781            value
10782        }
10783    }
10784
10785    unsafe impl fidl::encoding::TypeMarker for SetTextureCmd {
10786        type Owned = Self;
10787
10788        #[inline(always)]
10789        fn inline_align(_context: fidl::encoding::Context) -> usize {
10790            4
10791        }
10792
10793        #[inline(always)]
10794        fn inline_size(_context: fidl::encoding::Context) -> usize {
10795            8
10796        }
10797        #[inline(always)]
10798        fn encode_is_copy() -> bool {
10799            true
10800        }
10801
10802        #[inline(always)]
10803        fn decode_is_copy() -> bool {
10804            true
10805        }
10806    }
10807
10808    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetTextureCmd, D>
10809        for &SetTextureCmd
10810    {
10811        #[inline]
10812        unsafe fn encode(
10813            self,
10814            encoder: &mut fidl::encoding::Encoder<'_, D>,
10815            offset: usize,
10816            _depth: fidl::encoding::Depth,
10817        ) -> fidl::Result<()> {
10818            encoder.debug_check_bounds::<SetTextureCmd>(offset);
10819            unsafe {
10820                // Copy the object into the buffer.
10821                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
10822                (buf_ptr as *mut SetTextureCmd)
10823                    .write_unaligned((self as *const SetTextureCmd).read());
10824                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
10825                // done second because the memcpy will write garbage to these bytes.
10826            }
10827            Ok(())
10828        }
10829    }
10830    unsafe impl<
10831            D: fidl::encoding::ResourceDialect,
10832            T0: fidl::encoding::Encode<u32, D>,
10833            T1: fidl::encoding::Encode<u32, D>,
10834        > fidl::encoding::Encode<SetTextureCmd, D> for (T0, T1)
10835    {
10836        #[inline]
10837        unsafe fn encode(
10838            self,
10839            encoder: &mut fidl::encoding::Encoder<'_, D>,
10840            offset: usize,
10841            depth: fidl::encoding::Depth,
10842        ) -> fidl::Result<()> {
10843            encoder.debug_check_bounds::<SetTextureCmd>(offset);
10844            // Zero out padding regions. There's no need to apply masks
10845            // because the unmasked parts will be overwritten by fields.
10846            // Write the fields.
10847            self.0.encode(encoder, offset + 0, depth)?;
10848            self.1.encode(encoder, offset + 4, depth)?;
10849            Ok(())
10850        }
10851    }
10852
10853    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetTextureCmd {
10854        #[inline(always)]
10855        fn new_empty() -> Self {
10856            Self { material_id: fidl::new_empty!(u32, D), texture_id: fidl::new_empty!(u32, D) }
10857        }
10858
10859        #[inline]
10860        unsafe fn decode(
10861            &mut self,
10862            decoder: &mut fidl::encoding::Decoder<'_, D>,
10863            offset: usize,
10864            _depth: fidl::encoding::Depth,
10865        ) -> fidl::Result<()> {
10866            decoder.debug_check_bounds::<Self>(offset);
10867            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
10868            // Verify that padding bytes are zero.
10869            // Copy from the buffer into the object.
10870            unsafe {
10871                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
10872            }
10873            Ok(())
10874        }
10875    }
10876
10877    impl fidl::encoding::ValueTypeMarker for SetTranslationCmd {
10878        type Borrowed<'a> = &'a Self;
10879        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10880            value
10881        }
10882    }
10883
10884    unsafe impl fidl::encoding::TypeMarker for SetTranslationCmd {
10885        type Owned = Self;
10886
10887        #[inline(always)]
10888        fn inline_align(_context: fidl::encoding::Context) -> usize {
10889            4
10890        }
10891
10892        #[inline(always)]
10893        fn inline_size(_context: fidl::encoding::Context) -> usize {
10894            20
10895        }
10896    }
10897
10898    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetTranslationCmd, D>
10899        for &SetTranslationCmd
10900    {
10901        #[inline]
10902        unsafe fn encode(
10903            self,
10904            encoder: &mut fidl::encoding::Encoder<'_, D>,
10905            offset: usize,
10906            _depth: fidl::encoding::Depth,
10907        ) -> fidl::Result<()> {
10908            encoder.debug_check_bounds::<SetTranslationCmd>(offset);
10909            // Delegate to tuple encoding.
10910            fidl::encoding::Encode::<SetTranslationCmd, D>::encode(
10911                (
10912                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
10913                    <Vector3Value as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
10914                ),
10915                encoder,
10916                offset,
10917                _depth,
10918            )
10919        }
10920    }
10921    unsafe impl<
10922            D: fidl::encoding::ResourceDialect,
10923            T0: fidl::encoding::Encode<u32, D>,
10924            T1: fidl::encoding::Encode<Vector3Value, D>,
10925        > fidl::encoding::Encode<SetTranslationCmd, D> for (T0, T1)
10926    {
10927        #[inline]
10928        unsafe fn encode(
10929            self,
10930            encoder: &mut fidl::encoding::Encoder<'_, D>,
10931            offset: usize,
10932            depth: fidl::encoding::Depth,
10933        ) -> fidl::Result<()> {
10934            encoder.debug_check_bounds::<SetTranslationCmd>(offset);
10935            // Zero out padding regions. There's no need to apply masks
10936            // because the unmasked parts will be overwritten by fields.
10937            // Write the fields.
10938            self.0.encode(encoder, offset + 0, depth)?;
10939            self.1.encode(encoder, offset + 4, depth)?;
10940            Ok(())
10941        }
10942    }
10943
10944    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetTranslationCmd {
10945        #[inline(always)]
10946        fn new_empty() -> Self {
10947            Self { id: fidl::new_empty!(u32, D), value: fidl::new_empty!(Vector3Value, D) }
10948        }
10949
10950        #[inline]
10951        unsafe fn decode(
10952            &mut self,
10953            decoder: &mut fidl::encoding::Decoder<'_, D>,
10954            offset: usize,
10955            _depth: fidl::encoding::Depth,
10956        ) -> fidl::Result<()> {
10957            decoder.debug_check_bounds::<Self>(offset);
10958            // Verify that padding bytes are zero.
10959            fidl::decode!(u32, D, &mut self.id, decoder, offset + 0, _depth)?;
10960            fidl::decode!(Vector3Value, D, &mut self.value, decoder, offset + 4, _depth)?;
10961            Ok(())
10962        }
10963    }
10964
10965    impl fidl::encoding::ValueTypeMarker for SetViewHolderBoundsColorCmd {
10966        type Borrowed<'a> = &'a Self;
10967        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10968            value
10969        }
10970    }
10971
10972    unsafe impl fidl::encoding::TypeMarker for SetViewHolderBoundsColorCmd {
10973        type Owned = Self;
10974
10975        #[inline(always)]
10976        fn inline_align(_context: fidl::encoding::Context) -> usize {
10977            4
10978        }
10979
10980        #[inline(always)]
10981        fn inline_size(_context: fidl::encoding::Context) -> usize {
10982            20
10983        }
10984    }
10985
10986    unsafe impl<D: fidl::encoding::ResourceDialect>
10987        fidl::encoding::Encode<SetViewHolderBoundsColorCmd, D> for &SetViewHolderBoundsColorCmd
10988    {
10989        #[inline]
10990        unsafe fn encode(
10991            self,
10992            encoder: &mut fidl::encoding::Encoder<'_, D>,
10993            offset: usize,
10994            _depth: fidl::encoding::Depth,
10995        ) -> fidl::Result<()> {
10996            encoder.debug_check_bounds::<SetViewHolderBoundsColorCmd>(offset);
10997            // Delegate to tuple encoding.
10998            fidl::encoding::Encode::<SetViewHolderBoundsColorCmd, D>::encode(
10999                (
11000                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.view_holder_id),
11001                    <ColorRgbValue as fidl::encoding::ValueTypeMarker>::borrow(&self.color),
11002                ),
11003                encoder,
11004                offset,
11005                _depth,
11006            )
11007        }
11008    }
11009    unsafe impl<
11010            D: fidl::encoding::ResourceDialect,
11011            T0: fidl::encoding::Encode<u32, D>,
11012            T1: fidl::encoding::Encode<ColorRgbValue, D>,
11013        > fidl::encoding::Encode<SetViewHolderBoundsColorCmd, D> for (T0, T1)
11014    {
11015        #[inline]
11016        unsafe fn encode(
11017            self,
11018            encoder: &mut fidl::encoding::Encoder<'_, D>,
11019            offset: usize,
11020            depth: fidl::encoding::Depth,
11021        ) -> fidl::Result<()> {
11022            encoder.debug_check_bounds::<SetViewHolderBoundsColorCmd>(offset);
11023            // Zero out padding regions. There's no need to apply masks
11024            // because the unmasked parts will be overwritten by fields.
11025            // Write the fields.
11026            self.0.encode(encoder, offset + 0, depth)?;
11027            self.1.encode(encoder, offset + 4, depth)?;
11028            Ok(())
11029        }
11030    }
11031
11032    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11033        for SetViewHolderBoundsColorCmd
11034    {
11035        #[inline(always)]
11036        fn new_empty() -> Self {
11037            Self {
11038                view_holder_id: fidl::new_empty!(u32, D),
11039                color: fidl::new_empty!(ColorRgbValue, D),
11040            }
11041        }
11042
11043        #[inline]
11044        unsafe fn decode(
11045            &mut self,
11046            decoder: &mut fidl::encoding::Decoder<'_, D>,
11047            offset: usize,
11048            _depth: fidl::encoding::Depth,
11049        ) -> fidl::Result<()> {
11050            decoder.debug_check_bounds::<Self>(offset);
11051            // Verify that padding bytes are zero.
11052            fidl::decode!(u32, D, &mut self.view_holder_id, decoder, offset + 0, _depth)?;
11053            fidl::decode!(ColorRgbValue, D, &mut self.color, decoder, offset + 4, _depth)?;
11054            Ok(())
11055        }
11056    }
11057
11058    impl fidl::encoding::ValueTypeMarker for SetViewPropertiesCmd {
11059        type Borrowed<'a> = &'a Self;
11060        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11061            value
11062        }
11063    }
11064
11065    unsafe impl fidl::encoding::TypeMarker for SetViewPropertiesCmd {
11066        type Owned = Self;
11067
11068        #[inline(always)]
11069        fn inline_align(_context: fidl::encoding::Context) -> usize {
11070            4
11071        }
11072
11073        #[inline(always)]
11074        fn inline_size(_context: fidl::encoding::Context) -> usize {
11075            56
11076        }
11077    }
11078
11079    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SetViewPropertiesCmd, D>
11080        for &SetViewPropertiesCmd
11081    {
11082        #[inline]
11083        unsafe fn encode(
11084            self,
11085            encoder: &mut fidl::encoding::Encoder<'_, D>,
11086            offset: usize,
11087            _depth: fidl::encoding::Depth,
11088        ) -> fidl::Result<()> {
11089            encoder.debug_check_bounds::<SetViewPropertiesCmd>(offset);
11090            // Delegate to tuple encoding.
11091            fidl::encoding::Encode::<SetViewPropertiesCmd, D>::encode(
11092                (
11093                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.view_holder_id),
11094                    <ViewProperties as fidl::encoding::ValueTypeMarker>::borrow(&self.properties),
11095                ),
11096                encoder,
11097                offset,
11098                _depth,
11099            )
11100        }
11101    }
11102    unsafe impl<
11103            D: fidl::encoding::ResourceDialect,
11104            T0: fidl::encoding::Encode<u32, D>,
11105            T1: fidl::encoding::Encode<ViewProperties, D>,
11106        > fidl::encoding::Encode<SetViewPropertiesCmd, D> for (T0, T1)
11107    {
11108        #[inline]
11109        unsafe fn encode(
11110            self,
11111            encoder: &mut fidl::encoding::Encoder<'_, D>,
11112            offset: usize,
11113            depth: fidl::encoding::Depth,
11114        ) -> fidl::Result<()> {
11115            encoder.debug_check_bounds::<SetViewPropertiesCmd>(offset);
11116            // Zero out padding regions. There's no need to apply masks
11117            // because the unmasked parts will be overwritten by fields.
11118            // Write the fields.
11119            self.0.encode(encoder, offset + 0, depth)?;
11120            self.1.encode(encoder, offset + 4, depth)?;
11121            Ok(())
11122        }
11123    }
11124
11125    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SetViewPropertiesCmd {
11126        #[inline(always)]
11127        fn new_empty() -> Self {
11128            Self {
11129                view_holder_id: fidl::new_empty!(u32, D),
11130                properties: fidl::new_empty!(ViewProperties, D),
11131            }
11132        }
11133
11134        #[inline]
11135        unsafe fn decode(
11136            &mut self,
11137            decoder: &mut fidl::encoding::Decoder<'_, D>,
11138            offset: usize,
11139            _depth: fidl::encoding::Depth,
11140        ) -> fidl::Result<()> {
11141            decoder.debug_check_bounds::<Self>(offset);
11142            // Verify that padding bytes are zero.
11143            fidl::decode!(u32, D, &mut self.view_holder_id, decoder, offset + 0, _depth)?;
11144            fidl::decode!(ViewProperties, D, &mut self.properties, decoder, offset + 4, _depth)?;
11145            Ok(())
11146        }
11147    }
11148
11149    impl fidl::encoding::ValueTypeMarker for ShapeNodeArgs {
11150        type Borrowed<'a> = &'a Self;
11151        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11152            value
11153        }
11154    }
11155
11156    unsafe impl fidl::encoding::TypeMarker for ShapeNodeArgs {
11157        type Owned = Self;
11158
11159        #[inline(always)]
11160        fn inline_align(_context: fidl::encoding::Context) -> usize {
11161            4
11162        }
11163
11164        #[inline(always)]
11165        fn inline_size(_context: fidl::encoding::Context) -> usize {
11166            4
11167        }
11168        #[inline(always)]
11169        fn encode_is_copy() -> bool {
11170            true
11171        }
11172
11173        #[inline(always)]
11174        fn decode_is_copy() -> bool {
11175            true
11176        }
11177    }
11178
11179    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ShapeNodeArgs, D>
11180        for &ShapeNodeArgs
11181    {
11182        #[inline]
11183        unsafe fn encode(
11184            self,
11185            encoder: &mut fidl::encoding::Encoder<'_, D>,
11186            offset: usize,
11187            _depth: fidl::encoding::Depth,
11188        ) -> fidl::Result<()> {
11189            encoder.debug_check_bounds::<ShapeNodeArgs>(offset);
11190            unsafe {
11191                // Copy the object into the buffer.
11192                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11193                (buf_ptr as *mut ShapeNodeArgs)
11194                    .write_unaligned((self as *const ShapeNodeArgs).read());
11195                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11196                // done second because the memcpy will write garbage to these bytes.
11197            }
11198            Ok(())
11199        }
11200    }
11201    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11202        fidl::encoding::Encode<ShapeNodeArgs, D> for (T0,)
11203    {
11204        #[inline]
11205        unsafe fn encode(
11206            self,
11207            encoder: &mut fidl::encoding::Encoder<'_, D>,
11208            offset: usize,
11209            depth: fidl::encoding::Depth,
11210        ) -> fidl::Result<()> {
11211            encoder.debug_check_bounds::<ShapeNodeArgs>(offset);
11212            // Zero out padding regions. There's no need to apply masks
11213            // because the unmasked parts will be overwritten by fields.
11214            // Write the fields.
11215            self.0.encode(encoder, offset + 0, depth)?;
11216            Ok(())
11217        }
11218    }
11219
11220    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ShapeNodeArgs {
11221        #[inline(always)]
11222        fn new_empty() -> Self {
11223            Self { unused: fidl::new_empty!(u32, D) }
11224        }
11225
11226        #[inline]
11227        unsafe fn decode(
11228            &mut self,
11229            decoder: &mut fidl::encoding::Decoder<'_, D>,
11230            offset: usize,
11231            _depth: fidl::encoding::Depth,
11232        ) -> fidl::Result<()> {
11233            decoder.debug_check_bounds::<Self>(offset);
11234            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11235            // Verify that padding bytes are zero.
11236            // Copy from the buffer into the object.
11237            unsafe {
11238                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11239            }
11240            Ok(())
11241        }
11242    }
11243
11244    impl fidl::encoding::ValueTypeMarker for SizeChangeHintEvent {
11245        type Borrowed<'a> = &'a Self;
11246        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11247            value
11248        }
11249    }
11250
11251    unsafe impl fidl::encoding::TypeMarker for SizeChangeHintEvent {
11252        type Owned = Self;
11253
11254        #[inline(always)]
11255        fn inline_align(_context: fidl::encoding::Context) -> usize {
11256            4
11257        }
11258
11259        #[inline(always)]
11260        fn inline_size(_context: fidl::encoding::Context) -> usize {
11261            12
11262        }
11263    }
11264
11265    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SizeChangeHintEvent, D>
11266        for &SizeChangeHintEvent
11267    {
11268        #[inline]
11269        unsafe fn encode(
11270            self,
11271            encoder: &mut fidl::encoding::Encoder<'_, D>,
11272            offset: usize,
11273            _depth: fidl::encoding::Depth,
11274        ) -> fidl::Result<()> {
11275            encoder.debug_check_bounds::<SizeChangeHintEvent>(offset);
11276            // Delegate to tuple encoding.
11277            fidl::encoding::Encode::<SizeChangeHintEvent, D>::encode(
11278                (
11279                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
11280                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.width_change_factor),
11281                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.height_change_factor),
11282                ),
11283                encoder,
11284                offset,
11285                _depth,
11286            )
11287        }
11288    }
11289    unsafe impl<
11290            D: fidl::encoding::ResourceDialect,
11291            T0: fidl::encoding::Encode<u32, D>,
11292            T1: fidl::encoding::Encode<f32, D>,
11293            T2: fidl::encoding::Encode<f32, D>,
11294        > fidl::encoding::Encode<SizeChangeHintEvent, D> for (T0, T1, T2)
11295    {
11296        #[inline]
11297        unsafe fn encode(
11298            self,
11299            encoder: &mut fidl::encoding::Encoder<'_, D>,
11300            offset: usize,
11301            depth: fidl::encoding::Depth,
11302        ) -> fidl::Result<()> {
11303            encoder.debug_check_bounds::<SizeChangeHintEvent>(offset);
11304            // Zero out padding regions. There's no need to apply masks
11305            // because the unmasked parts will be overwritten by fields.
11306            // Write the fields.
11307            self.0.encode(encoder, offset + 0, depth)?;
11308            self.1.encode(encoder, offset + 4, depth)?;
11309            self.2.encode(encoder, offset + 8, depth)?;
11310            Ok(())
11311        }
11312    }
11313
11314    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SizeChangeHintEvent {
11315        #[inline(always)]
11316        fn new_empty() -> Self {
11317            Self {
11318                node_id: fidl::new_empty!(u32, D),
11319                width_change_factor: fidl::new_empty!(f32, D),
11320                height_change_factor: fidl::new_empty!(f32, D),
11321            }
11322        }
11323
11324        #[inline]
11325        unsafe fn decode(
11326            &mut self,
11327            decoder: &mut fidl::encoding::Decoder<'_, D>,
11328            offset: usize,
11329            _depth: fidl::encoding::Depth,
11330        ) -> fidl::Result<()> {
11331            decoder.debug_check_bounds::<Self>(offset);
11332            // Verify that padding bytes are zero.
11333            fidl::decode!(u32, D, &mut self.node_id, decoder, offset + 0, _depth)?;
11334            fidl::decode!(f32, D, &mut self.width_change_factor, decoder, offset + 4, _depth)?;
11335            fidl::decode!(f32, D, &mut self.height_change_factor, decoder, offset + 8, _depth)?;
11336            Ok(())
11337        }
11338    }
11339
11340    impl fidl::encoding::ValueTypeMarker for StereoCameraArgs {
11341        type Borrowed<'a> = &'a Self;
11342        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11343            value
11344        }
11345    }
11346
11347    unsafe impl fidl::encoding::TypeMarker for StereoCameraArgs {
11348        type Owned = Self;
11349
11350        #[inline(always)]
11351        fn inline_align(_context: fidl::encoding::Context) -> usize {
11352            4
11353        }
11354
11355        #[inline(always)]
11356        fn inline_size(_context: fidl::encoding::Context) -> usize {
11357            4
11358        }
11359        #[inline(always)]
11360        fn encode_is_copy() -> bool {
11361            true
11362        }
11363
11364        #[inline(always)]
11365        fn decode_is_copy() -> bool {
11366            true
11367        }
11368    }
11369
11370    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StereoCameraArgs, D>
11371        for &StereoCameraArgs
11372    {
11373        #[inline]
11374        unsafe fn encode(
11375            self,
11376            encoder: &mut fidl::encoding::Encoder<'_, D>,
11377            offset: usize,
11378            _depth: fidl::encoding::Depth,
11379        ) -> fidl::Result<()> {
11380            encoder.debug_check_bounds::<StereoCameraArgs>(offset);
11381            unsafe {
11382                // Copy the object into the buffer.
11383                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11384                (buf_ptr as *mut StereoCameraArgs)
11385                    .write_unaligned((self as *const StereoCameraArgs).read());
11386                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11387                // done second because the memcpy will write garbage to these bytes.
11388            }
11389            Ok(())
11390        }
11391    }
11392    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11393        fidl::encoding::Encode<StereoCameraArgs, D> for (T0,)
11394    {
11395        #[inline]
11396        unsafe fn encode(
11397            self,
11398            encoder: &mut fidl::encoding::Encoder<'_, D>,
11399            offset: usize,
11400            depth: fidl::encoding::Depth,
11401        ) -> fidl::Result<()> {
11402            encoder.debug_check_bounds::<StereoCameraArgs>(offset);
11403            // Zero out padding regions. There's no need to apply masks
11404            // because the unmasked parts will be overwritten by fields.
11405            // Write the fields.
11406            self.0.encode(encoder, offset + 0, depth)?;
11407            Ok(())
11408        }
11409    }
11410
11411    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StereoCameraArgs {
11412        #[inline(always)]
11413        fn new_empty() -> Self {
11414            Self { scene_id: fidl::new_empty!(u32, D) }
11415        }
11416
11417        #[inline]
11418        unsafe fn decode(
11419            &mut self,
11420            decoder: &mut fidl::encoding::Decoder<'_, D>,
11421            offset: usize,
11422            _depth: fidl::encoding::Depth,
11423        ) -> fidl::Result<()> {
11424            decoder.debug_check_bounds::<Self>(offset);
11425            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11426            // Verify that padding bytes are zero.
11427            // Copy from the buffer into the object.
11428            unsafe {
11429                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11430            }
11431            Ok(())
11432        }
11433    }
11434
11435    impl fidl::encoding::ValueTypeMarker for VariableArgs {
11436        type Borrowed<'a> = &'a Self;
11437        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11438            value
11439        }
11440    }
11441
11442    unsafe impl fidl::encoding::TypeMarker for VariableArgs {
11443        type Owned = Self;
11444
11445        #[inline(always)]
11446        fn inline_align(_context: fidl::encoding::Context) -> usize {
11447            8
11448        }
11449
11450        #[inline(always)]
11451        fn inline_size(_context: fidl::encoding::Context) -> usize {
11452            24
11453        }
11454    }
11455
11456    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VariableArgs, D>
11457        for &VariableArgs
11458    {
11459        #[inline]
11460        unsafe fn encode(
11461            self,
11462            encoder: &mut fidl::encoding::Encoder<'_, D>,
11463            offset: usize,
11464            _depth: fidl::encoding::Depth,
11465        ) -> fidl::Result<()> {
11466            encoder.debug_check_bounds::<VariableArgs>(offset);
11467            // Delegate to tuple encoding.
11468            fidl::encoding::Encode::<VariableArgs, D>::encode(
11469                (
11470                    <ValueType as fidl::encoding::ValueTypeMarker>::borrow(&self.type_),
11471                    <Value as fidl::encoding::ValueTypeMarker>::borrow(&self.initial_value),
11472                ),
11473                encoder,
11474                offset,
11475                _depth,
11476            )
11477        }
11478    }
11479    unsafe impl<
11480            D: fidl::encoding::ResourceDialect,
11481            T0: fidl::encoding::Encode<ValueType, D>,
11482            T1: fidl::encoding::Encode<Value, D>,
11483        > fidl::encoding::Encode<VariableArgs, D> for (T0, T1)
11484    {
11485        #[inline]
11486        unsafe fn encode(
11487            self,
11488            encoder: &mut fidl::encoding::Encoder<'_, D>,
11489            offset: usize,
11490            depth: fidl::encoding::Depth,
11491        ) -> fidl::Result<()> {
11492            encoder.debug_check_bounds::<VariableArgs>(offset);
11493            // Zero out padding regions. There's no need to apply masks
11494            // because the unmasked parts will be overwritten by fields.
11495            unsafe {
11496                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
11497                (ptr as *mut u64).write_unaligned(0);
11498            }
11499            // Write the fields.
11500            self.0.encode(encoder, offset + 0, depth)?;
11501            self.1.encode(encoder, offset + 8, depth)?;
11502            Ok(())
11503        }
11504    }
11505
11506    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VariableArgs {
11507        #[inline(always)]
11508        fn new_empty() -> Self {
11509            Self {
11510                type_: fidl::new_empty!(ValueType, D),
11511                initial_value: fidl::new_empty!(Value, D),
11512            }
11513        }
11514
11515        #[inline]
11516        unsafe fn decode(
11517            &mut self,
11518            decoder: &mut fidl::encoding::Decoder<'_, D>,
11519            offset: usize,
11520            _depth: fidl::encoding::Depth,
11521        ) -> fidl::Result<()> {
11522            decoder.debug_check_bounds::<Self>(offset);
11523            // Verify that padding bytes are zero.
11524            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
11525            let padval = unsafe { (ptr as *const u64).read_unaligned() };
11526            let mask = 0xffffffff00000000u64;
11527            let maskedval = padval & mask;
11528            if maskedval != 0 {
11529                return Err(fidl::Error::NonZeroPadding {
11530                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
11531                });
11532            }
11533            fidl::decode!(ValueType, D, &mut self.type_, decoder, offset + 0, _depth)?;
11534            fidl::decode!(Value, D, &mut self.initial_value, decoder, offset + 8, _depth)?;
11535            Ok(())
11536        }
11537    }
11538
11539    impl fidl::encoding::ValueTypeMarker for Vector2Value {
11540        type Borrowed<'a> = &'a Self;
11541        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11542            value
11543        }
11544    }
11545
11546    unsafe impl fidl::encoding::TypeMarker for Vector2Value {
11547        type Owned = Self;
11548
11549        #[inline(always)]
11550        fn inline_align(_context: fidl::encoding::Context) -> usize {
11551            4
11552        }
11553
11554        #[inline(always)]
11555        fn inline_size(_context: fidl::encoding::Context) -> usize {
11556            12
11557        }
11558    }
11559
11560    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vector2Value, D>
11561        for &Vector2Value
11562    {
11563        #[inline]
11564        unsafe fn encode(
11565            self,
11566            encoder: &mut fidl::encoding::Encoder<'_, D>,
11567            offset: usize,
11568            _depth: fidl::encoding::Depth,
11569        ) -> fidl::Result<()> {
11570            encoder.debug_check_bounds::<Vector2Value>(offset);
11571            // Delegate to tuple encoding.
11572            fidl::encoding::Encode::<Vector2Value, D>::encode(
11573                (
11574                    <Vec2 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
11575                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
11576                ),
11577                encoder,
11578                offset,
11579                _depth,
11580            )
11581        }
11582    }
11583    unsafe impl<
11584            D: fidl::encoding::ResourceDialect,
11585            T0: fidl::encoding::Encode<Vec2, D>,
11586            T1: fidl::encoding::Encode<u32, D>,
11587        > fidl::encoding::Encode<Vector2Value, D> for (T0, T1)
11588    {
11589        #[inline]
11590        unsafe fn encode(
11591            self,
11592            encoder: &mut fidl::encoding::Encoder<'_, D>,
11593            offset: usize,
11594            depth: fidl::encoding::Depth,
11595        ) -> fidl::Result<()> {
11596            encoder.debug_check_bounds::<Vector2Value>(offset);
11597            // Zero out padding regions. There's no need to apply masks
11598            // because the unmasked parts will be overwritten by fields.
11599            // Write the fields.
11600            self.0.encode(encoder, offset + 0, depth)?;
11601            self.1.encode(encoder, offset + 8, depth)?;
11602            Ok(())
11603        }
11604    }
11605
11606    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vector2Value {
11607        #[inline(always)]
11608        fn new_empty() -> Self {
11609            Self { value: fidl::new_empty!(Vec2, D), variable_id: fidl::new_empty!(u32, D) }
11610        }
11611
11612        #[inline]
11613        unsafe fn decode(
11614            &mut self,
11615            decoder: &mut fidl::encoding::Decoder<'_, D>,
11616            offset: usize,
11617            _depth: fidl::encoding::Depth,
11618        ) -> fidl::Result<()> {
11619            decoder.debug_check_bounds::<Self>(offset);
11620            // Verify that padding bytes are zero.
11621            fidl::decode!(Vec2, D, &mut self.value, decoder, offset + 0, _depth)?;
11622            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 8, _depth)?;
11623            Ok(())
11624        }
11625    }
11626
11627    impl fidl::encoding::ValueTypeMarker for Vector3Value {
11628        type Borrowed<'a> = &'a Self;
11629        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11630            value
11631        }
11632    }
11633
11634    unsafe impl fidl::encoding::TypeMarker for Vector3Value {
11635        type Owned = Self;
11636
11637        #[inline(always)]
11638        fn inline_align(_context: fidl::encoding::Context) -> usize {
11639            4
11640        }
11641
11642        #[inline(always)]
11643        fn inline_size(_context: fidl::encoding::Context) -> usize {
11644            16
11645        }
11646    }
11647
11648    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vector3Value, D>
11649        for &Vector3Value
11650    {
11651        #[inline]
11652        unsafe fn encode(
11653            self,
11654            encoder: &mut fidl::encoding::Encoder<'_, D>,
11655            offset: usize,
11656            _depth: fidl::encoding::Depth,
11657        ) -> fidl::Result<()> {
11658            encoder.debug_check_bounds::<Vector3Value>(offset);
11659            // Delegate to tuple encoding.
11660            fidl::encoding::Encode::<Vector3Value, D>::encode(
11661                (
11662                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
11663                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
11664                ),
11665                encoder,
11666                offset,
11667                _depth,
11668            )
11669        }
11670    }
11671    unsafe impl<
11672            D: fidl::encoding::ResourceDialect,
11673            T0: fidl::encoding::Encode<Vec3, D>,
11674            T1: fidl::encoding::Encode<u32, D>,
11675        > fidl::encoding::Encode<Vector3Value, D> for (T0, T1)
11676    {
11677        #[inline]
11678        unsafe fn encode(
11679            self,
11680            encoder: &mut fidl::encoding::Encoder<'_, D>,
11681            offset: usize,
11682            depth: fidl::encoding::Depth,
11683        ) -> fidl::Result<()> {
11684            encoder.debug_check_bounds::<Vector3Value>(offset);
11685            // Zero out padding regions. There's no need to apply masks
11686            // because the unmasked parts will be overwritten by fields.
11687            // Write the fields.
11688            self.0.encode(encoder, offset + 0, depth)?;
11689            self.1.encode(encoder, offset + 12, depth)?;
11690            Ok(())
11691        }
11692    }
11693
11694    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vector3Value {
11695        #[inline(always)]
11696        fn new_empty() -> Self {
11697            Self { value: fidl::new_empty!(Vec3, D), variable_id: fidl::new_empty!(u32, D) }
11698        }
11699
11700        #[inline]
11701        unsafe fn decode(
11702            &mut self,
11703            decoder: &mut fidl::encoding::Decoder<'_, D>,
11704            offset: usize,
11705            _depth: fidl::encoding::Depth,
11706        ) -> fidl::Result<()> {
11707            decoder.debug_check_bounds::<Self>(offset);
11708            // Verify that padding bytes are zero.
11709            fidl::decode!(Vec3, D, &mut self.value, decoder, offset + 0, _depth)?;
11710            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 12, _depth)?;
11711            Ok(())
11712        }
11713    }
11714
11715    impl fidl::encoding::ValueTypeMarker for Vector4Value {
11716        type Borrowed<'a> = &'a Self;
11717        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11718            value
11719        }
11720    }
11721
11722    unsafe impl fidl::encoding::TypeMarker for Vector4Value {
11723        type Owned = Self;
11724
11725        #[inline(always)]
11726        fn inline_align(_context: fidl::encoding::Context) -> usize {
11727            4
11728        }
11729
11730        #[inline(always)]
11731        fn inline_size(_context: fidl::encoding::Context) -> usize {
11732            20
11733        }
11734    }
11735
11736    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vector4Value, D>
11737        for &Vector4Value
11738    {
11739        #[inline]
11740        unsafe fn encode(
11741            self,
11742            encoder: &mut fidl::encoding::Encoder<'_, D>,
11743            offset: usize,
11744            _depth: fidl::encoding::Depth,
11745        ) -> fidl::Result<()> {
11746            encoder.debug_check_bounds::<Vector4Value>(offset);
11747            // Delegate to tuple encoding.
11748            fidl::encoding::Encode::<Vector4Value, D>::encode(
11749                (
11750                    <Vec4 as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
11751                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.variable_id),
11752                ),
11753                encoder,
11754                offset,
11755                _depth,
11756            )
11757        }
11758    }
11759    unsafe impl<
11760            D: fidl::encoding::ResourceDialect,
11761            T0: fidl::encoding::Encode<Vec4, D>,
11762            T1: fidl::encoding::Encode<u32, D>,
11763        > fidl::encoding::Encode<Vector4Value, D> for (T0, T1)
11764    {
11765        #[inline]
11766        unsafe fn encode(
11767            self,
11768            encoder: &mut fidl::encoding::Encoder<'_, D>,
11769            offset: usize,
11770            depth: fidl::encoding::Depth,
11771        ) -> fidl::Result<()> {
11772            encoder.debug_check_bounds::<Vector4Value>(offset);
11773            // Zero out padding regions. There's no need to apply masks
11774            // because the unmasked parts will be overwritten by fields.
11775            // Write the fields.
11776            self.0.encode(encoder, offset + 0, depth)?;
11777            self.1.encode(encoder, offset + 16, depth)?;
11778            Ok(())
11779        }
11780    }
11781
11782    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vector4Value {
11783        #[inline(always)]
11784        fn new_empty() -> Self {
11785            Self { value: fidl::new_empty!(Vec4, D), variable_id: fidl::new_empty!(u32, D) }
11786        }
11787
11788        #[inline]
11789        unsafe fn decode(
11790            &mut self,
11791            decoder: &mut fidl::encoding::Decoder<'_, D>,
11792            offset: usize,
11793            _depth: fidl::encoding::Depth,
11794        ) -> fidl::Result<()> {
11795            decoder.debug_check_bounds::<Self>(offset);
11796            // Verify that padding bytes are zero.
11797            fidl::decode!(Vec4, D, &mut self.value, decoder, offset + 0, _depth)?;
11798            fidl::decode!(u32, D, &mut self.variable_id, decoder, offset + 16, _depth)?;
11799            Ok(())
11800        }
11801    }
11802
11803    impl fidl::encoding::ValueTypeMarker for ViewAttachedToSceneEvent {
11804        type Borrowed<'a> = &'a Self;
11805        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11806            value
11807        }
11808    }
11809
11810    unsafe impl fidl::encoding::TypeMarker for ViewAttachedToSceneEvent {
11811        type Owned = Self;
11812
11813        #[inline(always)]
11814        fn inline_align(_context: fidl::encoding::Context) -> usize {
11815            4
11816        }
11817
11818        #[inline(always)]
11819        fn inline_size(_context: fidl::encoding::Context) -> usize {
11820            56
11821        }
11822    }
11823
11824    unsafe impl<D: fidl::encoding::ResourceDialect>
11825        fidl::encoding::Encode<ViewAttachedToSceneEvent, D> for &ViewAttachedToSceneEvent
11826    {
11827        #[inline]
11828        unsafe fn encode(
11829            self,
11830            encoder: &mut fidl::encoding::Encoder<'_, D>,
11831            offset: usize,
11832            _depth: fidl::encoding::Depth,
11833        ) -> fidl::Result<()> {
11834            encoder.debug_check_bounds::<ViewAttachedToSceneEvent>(offset);
11835            // Delegate to tuple encoding.
11836            fidl::encoding::Encode::<ViewAttachedToSceneEvent, D>::encode(
11837                (
11838                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.view_id),
11839                    <ViewProperties as fidl::encoding::ValueTypeMarker>::borrow(&self.properties),
11840                ),
11841                encoder,
11842                offset,
11843                _depth,
11844            )
11845        }
11846    }
11847    unsafe impl<
11848            D: fidl::encoding::ResourceDialect,
11849            T0: fidl::encoding::Encode<u32, D>,
11850            T1: fidl::encoding::Encode<ViewProperties, D>,
11851        > fidl::encoding::Encode<ViewAttachedToSceneEvent, D> for (T0, T1)
11852    {
11853        #[inline]
11854        unsafe fn encode(
11855            self,
11856            encoder: &mut fidl::encoding::Encoder<'_, D>,
11857            offset: usize,
11858            depth: fidl::encoding::Depth,
11859        ) -> fidl::Result<()> {
11860            encoder.debug_check_bounds::<ViewAttachedToSceneEvent>(offset);
11861            // Zero out padding regions. There's no need to apply masks
11862            // because the unmasked parts will be overwritten by fields.
11863            // Write the fields.
11864            self.0.encode(encoder, offset + 0, depth)?;
11865            self.1.encode(encoder, offset + 4, depth)?;
11866            Ok(())
11867        }
11868    }
11869
11870    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
11871        for ViewAttachedToSceneEvent
11872    {
11873        #[inline(always)]
11874        fn new_empty() -> Self {
11875            Self {
11876                view_id: fidl::new_empty!(u32, D),
11877                properties: fidl::new_empty!(ViewProperties, D),
11878            }
11879        }
11880
11881        #[inline]
11882        unsafe fn decode(
11883            &mut self,
11884            decoder: &mut fidl::encoding::Decoder<'_, D>,
11885            offset: usize,
11886            _depth: fidl::encoding::Depth,
11887        ) -> fidl::Result<()> {
11888            decoder.debug_check_bounds::<Self>(offset);
11889            // Verify that padding bytes are zero.
11890            fidl::decode!(u32, D, &mut self.view_id, decoder, offset + 0, _depth)?;
11891            fidl::decode!(ViewProperties, D, &mut self.properties, decoder, offset + 4, _depth)?;
11892            Ok(())
11893        }
11894    }
11895
11896    impl fidl::encoding::ValueTypeMarker for ViewConnectedEvent {
11897        type Borrowed<'a> = &'a Self;
11898        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11899            value
11900        }
11901    }
11902
11903    unsafe impl fidl::encoding::TypeMarker for ViewConnectedEvent {
11904        type Owned = Self;
11905
11906        #[inline(always)]
11907        fn inline_align(_context: fidl::encoding::Context) -> usize {
11908            4
11909        }
11910
11911        #[inline(always)]
11912        fn inline_size(_context: fidl::encoding::Context) -> usize {
11913            4
11914        }
11915        #[inline(always)]
11916        fn encode_is_copy() -> bool {
11917            true
11918        }
11919
11920        #[inline(always)]
11921        fn decode_is_copy() -> bool {
11922            true
11923        }
11924    }
11925
11926    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ViewConnectedEvent, D>
11927        for &ViewConnectedEvent
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::<ViewConnectedEvent>(offset);
11937            unsafe {
11938                // Copy the object into the buffer.
11939                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
11940                (buf_ptr as *mut ViewConnectedEvent)
11941                    .write_unaligned((self as *const ViewConnectedEvent).read());
11942                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
11943                // done second because the memcpy will write garbage to these bytes.
11944            }
11945            Ok(())
11946        }
11947    }
11948    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
11949        fidl::encoding::Encode<ViewConnectedEvent, D> for (T0,)
11950    {
11951        #[inline]
11952        unsafe fn encode(
11953            self,
11954            encoder: &mut fidl::encoding::Encoder<'_, D>,
11955            offset: usize,
11956            depth: fidl::encoding::Depth,
11957        ) -> fidl::Result<()> {
11958            encoder.debug_check_bounds::<ViewConnectedEvent>(offset);
11959            // Zero out padding regions. There's no need to apply masks
11960            // because the unmasked parts will be overwritten by fields.
11961            // Write the fields.
11962            self.0.encode(encoder, offset + 0, depth)?;
11963            Ok(())
11964        }
11965    }
11966
11967    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ViewConnectedEvent {
11968        #[inline(always)]
11969        fn new_empty() -> Self {
11970            Self { view_holder_id: fidl::new_empty!(u32, D) }
11971        }
11972
11973        #[inline]
11974        unsafe fn decode(
11975            &mut self,
11976            decoder: &mut fidl::encoding::Decoder<'_, D>,
11977            offset: usize,
11978            _depth: fidl::encoding::Depth,
11979        ) -> fidl::Result<()> {
11980            decoder.debug_check_bounds::<Self>(offset);
11981            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
11982            // Verify that padding bytes are zero.
11983            // Copy from the buffer into the object.
11984            unsafe {
11985                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
11986            }
11987            Ok(())
11988        }
11989    }
11990
11991    impl fidl::encoding::ValueTypeMarker for ViewDetachedFromSceneEvent {
11992        type Borrowed<'a> = &'a Self;
11993        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11994            value
11995        }
11996    }
11997
11998    unsafe impl fidl::encoding::TypeMarker for ViewDetachedFromSceneEvent {
11999        type Owned = Self;
12000
12001        #[inline(always)]
12002        fn inline_align(_context: fidl::encoding::Context) -> usize {
12003            4
12004        }
12005
12006        #[inline(always)]
12007        fn inline_size(_context: fidl::encoding::Context) -> usize {
12008            4
12009        }
12010        #[inline(always)]
12011        fn encode_is_copy() -> bool {
12012            true
12013        }
12014
12015        #[inline(always)]
12016        fn decode_is_copy() -> bool {
12017            true
12018        }
12019    }
12020
12021    unsafe impl<D: fidl::encoding::ResourceDialect>
12022        fidl::encoding::Encode<ViewDetachedFromSceneEvent, D> for &ViewDetachedFromSceneEvent
12023    {
12024        #[inline]
12025        unsafe fn encode(
12026            self,
12027            encoder: &mut fidl::encoding::Encoder<'_, D>,
12028            offset: usize,
12029            _depth: fidl::encoding::Depth,
12030        ) -> fidl::Result<()> {
12031            encoder.debug_check_bounds::<ViewDetachedFromSceneEvent>(offset);
12032            unsafe {
12033                // Copy the object into the buffer.
12034                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12035                (buf_ptr as *mut ViewDetachedFromSceneEvent)
12036                    .write_unaligned((self as *const ViewDetachedFromSceneEvent).read());
12037                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12038                // done second because the memcpy will write garbage to these bytes.
12039            }
12040            Ok(())
12041        }
12042    }
12043    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12044        fidl::encoding::Encode<ViewDetachedFromSceneEvent, D> for (T0,)
12045    {
12046        #[inline]
12047        unsafe fn encode(
12048            self,
12049            encoder: &mut fidl::encoding::Encoder<'_, D>,
12050            offset: usize,
12051            depth: fidl::encoding::Depth,
12052        ) -> fidl::Result<()> {
12053            encoder.debug_check_bounds::<ViewDetachedFromSceneEvent>(offset);
12054            // Zero out padding regions. There's no need to apply masks
12055            // because the unmasked parts will be overwritten by fields.
12056            // Write the fields.
12057            self.0.encode(encoder, offset + 0, depth)?;
12058            Ok(())
12059        }
12060    }
12061
12062    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12063        for ViewDetachedFromSceneEvent
12064    {
12065        #[inline(always)]
12066        fn new_empty() -> Self {
12067            Self { view_id: fidl::new_empty!(u32, D) }
12068        }
12069
12070        #[inline]
12071        unsafe fn decode(
12072            &mut self,
12073            decoder: &mut fidl::encoding::Decoder<'_, D>,
12074            offset: usize,
12075            _depth: fidl::encoding::Depth,
12076        ) -> fidl::Result<()> {
12077            decoder.debug_check_bounds::<Self>(offset);
12078            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12079            // Verify that padding bytes are zero.
12080            // Copy from the buffer into the object.
12081            unsafe {
12082                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12083            }
12084            Ok(())
12085        }
12086    }
12087
12088    impl fidl::encoding::ValueTypeMarker for ViewDisconnectedEvent {
12089        type Borrowed<'a> = &'a Self;
12090        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12091            value
12092        }
12093    }
12094
12095    unsafe impl fidl::encoding::TypeMarker for ViewDisconnectedEvent {
12096        type Owned = Self;
12097
12098        #[inline(always)]
12099        fn inline_align(_context: fidl::encoding::Context) -> usize {
12100            4
12101        }
12102
12103        #[inline(always)]
12104        fn inline_size(_context: fidl::encoding::Context) -> usize {
12105            4
12106        }
12107        #[inline(always)]
12108        fn encode_is_copy() -> bool {
12109            true
12110        }
12111
12112        #[inline(always)]
12113        fn decode_is_copy() -> bool {
12114            true
12115        }
12116    }
12117
12118    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ViewDisconnectedEvent, D>
12119        for &ViewDisconnectedEvent
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::<ViewDisconnectedEvent>(offset);
12129            unsafe {
12130                // Copy the object into the buffer.
12131                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12132                (buf_ptr as *mut ViewDisconnectedEvent)
12133                    .write_unaligned((self as *const ViewDisconnectedEvent).read());
12134                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12135                // done second because the memcpy will write garbage to these bytes.
12136            }
12137            Ok(())
12138        }
12139    }
12140    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12141        fidl::encoding::Encode<ViewDisconnectedEvent, D> for (T0,)
12142    {
12143        #[inline]
12144        unsafe fn encode(
12145            self,
12146            encoder: &mut fidl::encoding::Encoder<'_, D>,
12147            offset: usize,
12148            depth: fidl::encoding::Depth,
12149        ) -> fidl::Result<()> {
12150            encoder.debug_check_bounds::<ViewDisconnectedEvent>(offset);
12151            // Zero out padding regions. There's no need to apply masks
12152            // because the unmasked parts will be overwritten by fields.
12153            // Write the fields.
12154            self.0.encode(encoder, offset + 0, depth)?;
12155            Ok(())
12156        }
12157    }
12158
12159    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ViewDisconnectedEvent {
12160        #[inline(always)]
12161        fn new_empty() -> Self {
12162            Self { view_holder_id: fidl::new_empty!(u32, D) }
12163        }
12164
12165        #[inline]
12166        unsafe fn decode(
12167            &mut self,
12168            decoder: &mut fidl::encoding::Decoder<'_, D>,
12169            offset: usize,
12170            _depth: fidl::encoding::Depth,
12171        ) -> fidl::Result<()> {
12172            decoder.debug_check_bounds::<Self>(offset);
12173            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12174            // Verify that padding bytes are zero.
12175            // Copy from the buffer into the object.
12176            unsafe {
12177                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12178            }
12179            Ok(())
12180        }
12181    }
12182
12183    impl fidl::encoding::ValueTypeMarker for ViewHolderConnectedEvent {
12184        type Borrowed<'a> = &'a Self;
12185        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12186            value
12187        }
12188    }
12189
12190    unsafe impl fidl::encoding::TypeMarker for ViewHolderConnectedEvent {
12191        type Owned = Self;
12192
12193        #[inline(always)]
12194        fn inline_align(_context: fidl::encoding::Context) -> usize {
12195            4
12196        }
12197
12198        #[inline(always)]
12199        fn inline_size(_context: fidl::encoding::Context) -> usize {
12200            4
12201        }
12202        #[inline(always)]
12203        fn encode_is_copy() -> bool {
12204            true
12205        }
12206
12207        #[inline(always)]
12208        fn decode_is_copy() -> bool {
12209            true
12210        }
12211    }
12212
12213    unsafe impl<D: fidl::encoding::ResourceDialect>
12214        fidl::encoding::Encode<ViewHolderConnectedEvent, D> for &ViewHolderConnectedEvent
12215    {
12216        #[inline]
12217        unsafe fn encode(
12218            self,
12219            encoder: &mut fidl::encoding::Encoder<'_, D>,
12220            offset: usize,
12221            _depth: fidl::encoding::Depth,
12222        ) -> fidl::Result<()> {
12223            encoder.debug_check_bounds::<ViewHolderConnectedEvent>(offset);
12224            unsafe {
12225                // Copy the object into the buffer.
12226                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12227                (buf_ptr as *mut ViewHolderConnectedEvent)
12228                    .write_unaligned((self as *const ViewHolderConnectedEvent).read());
12229                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12230                // done second because the memcpy will write garbage to these bytes.
12231            }
12232            Ok(())
12233        }
12234    }
12235    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12236        fidl::encoding::Encode<ViewHolderConnectedEvent, D> for (T0,)
12237    {
12238        #[inline]
12239        unsafe fn encode(
12240            self,
12241            encoder: &mut fidl::encoding::Encoder<'_, D>,
12242            offset: usize,
12243            depth: fidl::encoding::Depth,
12244        ) -> fidl::Result<()> {
12245            encoder.debug_check_bounds::<ViewHolderConnectedEvent>(offset);
12246            // Zero out padding regions. There's no need to apply masks
12247            // because the unmasked parts will be overwritten by fields.
12248            // Write the fields.
12249            self.0.encode(encoder, offset + 0, depth)?;
12250            Ok(())
12251        }
12252    }
12253
12254    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12255        for ViewHolderConnectedEvent
12256    {
12257        #[inline(always)]
12258        fn new_empty() -> Self {
12259            Self { view_id: fidl::new_empty!(u32, D) }
12260        }
12261
12262        #[inline]
12263        unsafe fn decode(
12264            &mut self,
12265            decoder: &mut fidl::encoding::Decoder<'_, D>,
12266            offset: usize,
12267            _depth: fidl::encoding::Depth,
12268        ) -> fidl::Result<()> {
12269            decoder.debug_check_bounds::<Self>(offset);
12270            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12271            // Verify that padding bytes are zero.
12272            // Copy from the buffer into the object.
12273            unsafe {
12274                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12275            }
12276            Ok(())
12277        }
12278    }
12279
12280    impl fidl::encoding::ValueTypeMarker for ViewHolderDisconnectedEvent {
12281        type Borrowed<'a> = &'a Self;
12282        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12283            value
12284        }
12285    }
12286
12287    unsafe impl fidl::encoding::TypeMarker for ViewHolderDisconnectedEvent {
12288        type Owned = Self;
12289
12290        #[inline(always)]
12291        fn inline_align(_context: fidl::encoding::Context) -> usize {
12292            4
12293        }
12294
12295        #[inline(always)]
12296        fn inline_size(_context: fidl::encoding::Context) -> usize {
12297            4
12298        }
12299        #[inline(always)]
12300        fn encode_is_copy() -> bool {
12301            true
12302        }
12303
12304        #[inline(always)]
12305        fn decode_is_copy() -> bool {
12306            true
12307        }
12308    }
12309
12310    unsafe impl<D: fidl::encoding::ResourceDialect>
12311        fidl::encoding::Encode<ViewHolderDisconnectedEvent, D> for &ViewHolderDisconnectedEvent
12312    {
12313        #[inline]
12314        unsafe fn encode(
12315            self,
12316            encoder: &mut fidl::encoding::Encoder<'_, D>,
12317            offset: usize,
12318            _depth: fidl::encoding::Depth,
12319        ) -> fidl::Result<()> {
12320            encoder.debug_check_bounds::<ViewHolderDisconnectedEvent>(offset);
12321            unsafe {
12322                // Copy the object into the buffer.
12323                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
12324                (buf_ptr as *mut ViewHolderDisconnectedEvent)
12325                    .write_unaligned((self as *const ViewHolderDisconnectedEvent).read());
12326                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
12327                // done second because the memcpy will write garbage to these bytes.
12328            }
12329            Ok(())
12330        }
12331    }
12332    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
12333        fidl::encoding::Encode<ViewHolderDisconnectedEvent, D> for (T0,)
12334    {
12335        #[inline]
12336        unsafe fn encode(
12337            self,
12338            encoder: &mut fidl::encoding::Encoder<'_, D>,
12339            offset: usize,
12340            depth: fidl::encoding::Depth,
12341        ) -> fidl::Result<()> {
12342            encoder.debug_check_bounds::<ViewHolderDisconnectedEvent>(offset);
12343            // Zero out padding regions. There's no need to apply masks
12344            // because the unmasked parts will be overwritten by fields.
12345            // Write the fields.
12346            self.0.encode(encoder, offset + 0, depth)?;
12347            Ok(())
12348        }
12349    }
12350
12351    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12352        for ViewHolderDisconnectedEvent
12353    {
12354        #[inline(always)]
12355        fn new_empty() -> Self {
12356            Self { view_id: fidl::new_empty!(u32, D) }
12357        }
12358
12359        #[inline]
12360        unsafe fn decode(
12361            &mut self,
12362            decoder: &mut fidl::encoding::Decoder<'_, D>,
12363            offset: usize,
12364            _depth: fidl::encoding::Depth,
12365        ) -> fidl::Result<()> {
12366            decoder.debug_check_bounds::<Self>(offset);
12367            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
12368            // Verify that padding bytes are zero.
12369            // Copy from the buffer into the object.
12370            unsafe {
12371                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
12372            }
12373            Ok(())
12374        }
12375    }
12376
12377    impl fidl::encoding::ValueTypeMarker for ViewProperties {
12378        type Borrowed<'a> = &'a Self;
12379        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12380            value
12381        }
12382    }
12383
12384    unsafe impl fidl::encoding::TypeMarker for ViewProperties {
12385        type Owned = Self;
12386
12387        #[inline(always)]
12388        fn inline_align(_context: fidl::encoding::Context) -> usize {
12389            4
12390        }
12391
12392        #[inline(always)]
12393        fn inline_size(_context: fidl::encoding::Context) -> usize {
12394            52
12395        }
12396    }
12397
12398    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ViewProperties, D>
12399        for &ViewProperties
12400    {
12401        #[inline]
12402        unsafe fn encode(
12403            self,
12404            encoder: &mut fidl::encoding::Encoder<'_, D>,
12405            offset: usize,
12406            _depth: fidl::encoding::Depth,
12407        ) -> fidl::Result<()> {
12408            encoder.debug_check_bounds::<ViewProperties>(offset);
12409            // Delegate to tuple encoding.
12410            fidl::encoding::Encode::<ViewProperties, D>::encode(
12411                (
12412                    <BoundingBox as fidl::encoding::ValueTypeMarker>::borrow(&self.bounding_box),
12413                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.inset_from_min),
12414                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(&self.inset_from_max),
12415                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.focus_change),
12416                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.downward_input),
12417                ),
12418                encoder,
12419                offset,
12420                _depth,
12421            )
12422        }
12423    }
12424    unsafe impl<
12425            D: fidl::encoding::ResourceDialect,
12426            T0: fidl::encoding::Encode<BoundingBox, D>,
12427            T1: fidl::encoding::Encode<Vec3, D>,
12428            T2: fidl::encoding::Encode<Vec3, D>,
12429            T3: fidl::encoding::Encode<bool, D>,
12430            T4: fidl::encoding::Encode<bool, D>,
12431        > fidl::encoding::Encode<ViewProperties, D> for (T0, T1, T2, T3, T4)
12432    {
12433        #[inline]
12434        unsafe fn encode(
12435            self,
12436            encoder: &mut fidl::encoding::Encoder<'_, D>,
12437            offset: usize,
12438            depth: fidl::encoding::Depth,
12439        ) -> fidl::Result<()> {
12440            encoder.debug_check_bounds::<ViewProperties>(offset);
12441            // Zero out padding regions. There's no need to apply masks
12442            // because the unmasked parts will be overwritten by fields.
12443            unsafe {
12444                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(48);
12445                (ptr as *mut u32).write_unaligned(0);
12446            }
12447            // Write the fields.
12448            self.0.encode(encoder, offset + 0, depth)?;
12449            self.1.encode(encoder, offset + 24, depth)?;
12450            self.2.encode(encoder, offset + 36, depth)?;
12451            self.3.encode(encoder, offset + 48, depth)?;
12452            self.4.encode(encoder, offset + 49, depth)?;
12453            Ok(())
12454        }
12455    }
12456
12457    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ViewProperties {
12458        #[inline(always)]
12459        fn new_empty() -> Self {
12460            Self {
12461                bounding_box: fidl::new_empty!(BoundingBox, D),
12462                inset_from_min: fidl::new_empty!(Vec3, D),
12463                inset_from_max: fidl::new_empty!(Vec3, D),
12464                focus_change: fidl::new_empty!(bool, D),
12465                downward_input: fidl::new_empty!(bool, D),
12466            }
12467        }
12468
12469        #[inline]
12470        unsafe fn decode(
12471            &mut self,
12472            decoder: &mut fidl::encoding::Decoder<'_, D>,
12473            offset: usize,
12474            _depth: fidl::encoding::Depth,
12475        ) -> fidl::Result<()> {
12476            decoder.debug_check_bounds::<Self>(offset);
12477            // Verify that padding bytes are zero.
12478            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(48) };
12479            let padval = unsafe { (ptr as *const u32).read_unaligned() };
12480            let mask = 0xffff0000u32;
12481            let maskedval = padval & mask;
12482            if maskedval != 0 {
12483                return Err(fidl::Error::NonZeroPadding {
12484                    padding_start: offset + 48 + ((mask as u64).trailing_zeros() / 8) as usize,
12485                });
12486            }
12487            fidl::decode!(BoundingBox, D, &mut self.bounding_box, decoder, offset + 0, _depth)?;
12488            fidl::decode!(Vec3, D, &mut self.inset_from_min, decoder, offset + 24, _depth)?;
12489            fidl::decode!(Vec3, D, &mut self.inset_from_max, decoder, offset + 36, _depth)?;
12490            fidl::decode!(bool, D, &mut self.focus_change, decoder, offset + 48, _depth)?;
12491            fidl::decode!(bool, D, &mut self.downward_input, decoder, offset + 49, _depth)?;
12492            Ok(())
12493        }
12494    }
12495
12496    impl fidl::encoding::ValueTypeMarker for ViewPropertiesChangedEvent {
12497        type Borrowed<'a> = &'a Self;
12498        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12499            value
12500        }
12501    }
12502
12503    unsafe impl fidl::encoding::TypeMarker for ViewPropertiesChangedEvent {
12504        type Owned = Self;
12505
12506        #[inline(always)]
12507        fn inline_align(_context: fidl::encoding::Context) -> usize {
12508            4
12509        }
12510
12511        #[inline(always)]
12512        fn inline_size(_context: fidl::encoding::Context) -> usize {
12513            56
12514        }
12515    }
12516
12517    unsafe impl<D: fidl::encoding::ResourceDialect>
12518        fidl::encoding::Encode<ViewPropertiesChangedEvent, D> for &ViewPropertiesChangedEvent
12519    {
12520        #[inline]
12521        unsafe fn encode(
12522            self,
12523            encoder: &mut fidl::encoding::Encoder<'_, D>,
12524            offset: usize,
12525            _depth: fidl::encoding::Depth,
12526        ) -> fidl::Result<()> {
12527            encoder.debug_check_bounds::<ViewPropertiesChangedEvent>(offset);
12528            // Delegate to tuple encoding.
12529            fidl::encoding::Encode::<ViewPropertiesChangedEvent, D>::encode(
12530                (
12531                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.view_id),
12532                    <ViewProperties as fidl::encoding::ValueTypeMarker>::borrow(&self.properties),
12533                ),
12534                encoder,
12535                offset,
12536                _depth,
12537            )
12538        }
12539    }
12540    unsafe impl<
12541            D: fidl::encoding::ResourceDialect,
12542            T0: fidl::encoding::Encode<u32, D>,
12543            T1: fidl::encoding::Encode<ViewProperties, D>,
12544        > fidl::encoding::Encode<ViewPropertiesChangedEvent, D> for (T0, T1)
12545    {
12546        #[inline]
12547        unsafe fn encode(
12548            self,
12549            encoder: &mut fidl::encoding::Encoder<'_, D>,
12550            offset: usize,
12551            depth: fidl::encoding::Depth,
12552        ) -> fidl::Result<()> {
12553            encoder.debug_check_bounds::<ViewPropertiesChangedEvent>(offset);
12554            // Zero out padding regions. There's no need to apply masks
12555            // because the unmasked parts will be overwritten by fields.
12556            // Write the fields.
12557            self.0.encode(encoder, offset + 0, depth)?;
12558            self.1.encode(encoder, offset + 4, depth)?;
12559            Ok(())
12560        }
12561    }
12562
12563    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
12564        for ViewPropertiesChangedEvent
12565    {
12566        #[inline(always)]
12567        fn new_empty() -> Self {
12568            Self {
12569                view_id: fidl::new_empty!(u32, D),
12570                properties: fidl::new_empty!(ViewProperties, D),
12571            }
12572        }
12573
12574        #[inline]
12575        unsafe fn decode(
12576            &mut self,
12577            decoder: &mut fidl::encoding::Decoder<'_, D>,
12578            offset: usize,
12579            _depth: fidl::encoding::Depth,
12580        ) -> fidl::Result<()> {
12581            decoder.debug_check_bounds::<Self>(offset);
12582            // Verify that padding bytes are zero.
12583            fidl::decode!(u32, D, &mut self.view_id, decoder, offset + 0, _depth)?;
12584            fidl::decode!(ViewProperties, D, &mut self.properties, decoder, offset + 4, _depth)?;
12585            Ok(())
12586        }
12587    }
12588
12589    impl fidl::encoding::ValueTypeMarker for ViewState {
12590        type Borrowed<'a> = &'a Self;
12591        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12592            value
12593        }
12594    }
12595
12596    unsafe impl fidl::encoding::TypeMarker for ViewState {
12597        type Owned = Self;
12598
12599        #[inline(always)]
12600        fn inline_align(_context: fidl::encoding::Context) -> usize {
12601            1
12602        }
12603
12604        #[inline(always)]
12605        fn inline_size(_context: fidl::encoding::Context) -> usize {
12606            1
12607        }
12608    }
12609
12610    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ViewState, D>
12611        for &ViewState
12612    {
12613        #[inline]
12614        unsafe fn encode(
12615            self,
12616            encoder: &mut fidl::encoding::Encoder<'_, D>,
12617            offset: usize,
12618            _depth: fidl::encoding::Depth,
12619        ) -> fidl::Result<()> {
12620            encoder.debug_check_bounds::<ViewState>(offset);
12621            // Delegate to tuple encoding.
12622            fidl::encoding::Encode::<ViewState, D>::encode(
12623                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.is_rendering),),
12624                encoder,
12625                offset,
12626                _depth,
12627            )
12628        }
12629    }
12630    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
12631        fidl::encoding::Encode<ViewState, D> for (T0,)
12632    {
12633        #[inline]
12634        unsafe fn encode(
12635            self,
12636            encoder: &mut fidl::encoding::Encoder<'_, D>,
12637            offset: usize,
12638            depth: fidl::encoding::Depth,
12639        ) -> fidl::Result<()> {
12640            encoder.debug_check_bounds::<ViewState>(offset);
12641            // Zero out padding regions. There's no need to apply masks
12642            // because the unmasked parts will be overwritten by fields.
12643            // Write the fields.
12644            self.0.encode(encoder, offset + 0, depth)?;
12645            Ok(())
12646        }
12647    }
12648
12649    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ViewState {
12650        #[inline(always)]
12651        fn new_empty() -> Self {
12652            Self { is_rendering: fidl::new_empty!(bool, D) }
12653        }
12654
12655        #[inline]
12656        unsafe fn decode(
12657            &mut self,
12658            decoder: &mut fidl::encoding::Decoder<'_, D>,
12659            offset: usize,
12660            _depth: fidl::encoding::Depth,
12661        ) -> fidl::Result<()> {
12662            decoder.debug_check_bounds::<Self>(offset);
12663            // Verify that padding bytes are zero.
12664            fidl::decode!(bool, D, &mut self.is_rendering, decoder, offset + 0, _depth)?;
12665            Ok(())
12666        }
12667    }
12668
12669    impl fidl::encoding::ValueTypeMarker for ViewStateChangedEvent {
12670        type Borrowed<'a> = &'a Self;
12671        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12672            value
12673        }
12674    }
12675
12676    unsafe impl fidl::encoding::TypeMarker for ViewStateChangedEvent {
12677        type Owned = Self;
12678
12679        #[inline(always)]
12680        fn inline_align(_context: fidl::encoding::Context) -> usize {
12681            4
12682        }
12683
12684        #[inline(always)]
12685        fn inline_size(_context: fidl::encoding::Context) -> usize {
12686            8
12687        }
12688    }
12689
12690    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ViewStateChangedEvent, D>
12691        for &ViewStateChangedEvent
12692    {
12693        #[inline]
12694        unsafe fn encode(
12695            self,
12696            encoder: &mut fidl::encoding::Encoder<'_, D>,
12697            offset: usize,
12698            _depth: fidl::encoding::Depth,
12699        ) -> fidl::Result<()> {
12700            encoder.debug_check_bounds::<ViewStateChangedEvent>(offset);
12701            // Delegate to tuple encoding.
12702            fidl::encoding::Encode::<ViewStateChangedEvent, D>::encode(
12703                (
12704                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.view_holder_id),
12705                    <ViewState as fidl::encoding::ValueTypeMarker>::borrow(&self.state),
12706                ),
12707                encoder,
12708                offset,
12709                _depth,
12710            )
12711        }
12712    }
12713    unsafe impl<
12714            D: fidl::encoding::ResourceDialect,
12715            T0: fidl::encoding::Encode<u32, D>,
12716            T1: fidl::encoding::Encode<ViewState, D>,
12717        > fidl::encoding::Encode<ViewStateChangedEvent, D> for (T0, T1)
12718    {
12719        #[inline]
12720        unsafe fn encode(
12721            self,
12722            encoder: &mut fidl::encoding::Encoder<'_, D>,
12723            offset: usize,
12724            depth: fidl::encoding::Depth,
12725        ) -> fidl::Result<()> {
12726            encoder.debug_check_bounds::<ViewStateChangedEvent>(offset);
12727            // Zero out padding regions. There's no need to apply masks
12728            // because the unmasked parts will be overwritten by fields.
12729            unsafe {
12730                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(4);
12731                (ptr as *mut u32).write_unaligned(0);
12732            }
12733            // Write the fields.
12734            self.0.encode(encoder, offset + 0, depth)?;
12735            self.1.encode(encoder, offset + 4, depth)?;
12736            Ok(())
12737        }
12738    }
12739
12740    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ViewStateChangedEvent {
12741        #[inline(always)]
12742        fn new_empty() -> Self {
12743            Self { view_holder_id: fidl::new_empty!(u32, D), state: fidl::new_empty!(ViewState, D) }
12744        }
12745
12746        #[inline]
12747        unsafe fn decode(
12748            &mut self,
12749            decoder: &mut fidl::encoding::Decoder<'_, D>,
12750            offset: usize,
12751            _depth: fidl::encoding::Depth,
12752        ) -> fidl::Result<()> {
12753            decoder.debug_check_bounds::<Self>(offset);
12754            // Verify that padding bytes are zero.
12755            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(4) };
12756            let padval = unsafe { (ptr as *const u32).read_unaligned() };
12757            let mask = 0xffffff00u32;
12758            let maskedval = padval & mask;
12759            if maskedval != 0 {
12760                return Err(fidl::Error::NonZeroPadding {
12761                    padding_start: offset + 4 + ((mask as u64).trailing_zeros() / 8) as usize,
12762                });
12763            }
12764            fidl::decode!(u32, D, &mut self.view_holder_id, decoder, offset + 0, _depth)?;
12765            fidl::decode!(ViewState, D, &mut self.state, decoder, offset + 4, _depth)?;
12766            Ok(())
12767        }
12768    }
12769
12770    impl fidl::encoding::ValueTypeMarker for Mat4 {
12771        type Borrowed<'a> = &'a Self;
12772        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12773            value
12774        }
12775    }
12776
12777    unsafe impl fidl::encoding::TypeMarker for Mat4 {
12778        type Owned = Self;
12779
12780        #[inline(always)]
12781        fn inline_align(_context: fidl::encoding::Context) -> usize {
12782            4
12783        }
12784
12785        #[inline(always)]
12786        fn inline_size(_context: fidl::encoding::Context) -> usize {
12787            64
12788        }
12789    }
12790
12791    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Mat4, D> for &Mat4 {
12792        #[inline]
12793        unsafe fn encode(
12794            self,
12795            encoder: &mut fidl::encoding::Encoder<'_, D>,
12796            offset: usize,
12797            _depth: fidl::encoding::Depth,
12798        ) -> fidl::Result<()> {
12799            encoder.debug_check_bounds::<Mat4>(offset);
12800            // Delegate to tuple encoding.
12801            fidl::encoding::Encode::<Mat4, D>::encode(
12802                (<fidl::encoding::Array<f32, 16> as fidl::encoding::ValueTypeMarker>::borrow(
12803                    &self.matrix,
12804                ),),
12805                encoder,
12806                offset,
12807                _depth,
12808            )
12809        }
12810    }
12811    unsafe impl<
12812            D: fidl::encoding::ResourceDialect,
12813            T0: fidl::encoding::Encode<fidl::encoding::Array<f32, 16>, D>,
12814        > fidl::encoding::Encode<Mat4, D> for (T0,)
12815    {
12816        #[inline]
12817        unsafe fn encode(
12818            self,
12819            encoder: &mut fidl::encoding::Encoder<'_, D>,
12820            offset: usize,
12821            depth: fidl::encoding::Depth,
12822        ) -> fidl::Result<()> {
12823            encoder.debug_check_bounds::<Mat4>(offset);
12824            // Zero out padding regions. There's no need to apply masks
12825            // because the unmasked parts will be overwritten by fields.
12826            // Write the fields.
12827            self.0.encode(encoder, offset + 0, depth)?;
12828            Ok(())
12829        }
12830    }
12831
12832    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Mat4 {
12833        #[inline(always)]
12834        fn new_empty() -> Self {
12835            Self { matrix: fidl::new_empty!(fidl::encoding::Array<f32, 16>, D) }
12836        }
12837
12838        #[inline]
12839        unsafe fn decode(
12840            &mut self,
12841            decoder: &mut fidl::encoding::Decoder<'_, D>,
12842            offset: usize,
12843            _depth: fidl::encoding::Depth,
12844        ) -> fidl::Result<()> {
12845            decoder.debug_check_bounds::<Self>(offset);
12846            // Verify that padding bytes are zero.
12847            fidl::decode!(fidl::encoding::Array<f32, 16>, D, &mut self.matrix, decoder, offset + 0, _depth)?;
12848            Ok(())
12849        }
12850    }
12851
12852    impl fidl::encoding::ValueTypeMarker for Vec2 {
12853        type Borrowed<'a> = &'a Self;
12854        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12855            value
12856        }
12857    }
12858
12859    unsafe impl fidl::encoding::TypeMarker for Vec2 {
12860        type Owned = Self;
12861
12862        #[inline(always)]
12863        fn inline_align(_context: fidl::encoding::Context) -> usize {
12864            4
12865        }
12866
12867        #[inline(always)]
12868        fn inline_size(_context: fidl::encoding::Context) -> usize {
12869            8
12870        }
12871    }
12872
12873    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vec2, D> for &Vec2 {
12874        #[inline]
12875        unsafe fn encode(
12876            self,
12877            encoder: &mut fidl::encoding::Encoder<'_, D>,
12878            offset: usize,
12879            _depth: fidl::encoding::Depth,
12880        ) -> fidl::Result<()> {
12881            encoder.debug_check_bounds::<Vec2>(offset);
12882            // Delegate to tuple encoding.
12883            fidl::encoding::Encode::<Vec2, D>::encode(
12884                (
12885                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
12886                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
12887                ),
12888                encoder,
12889                offset,
12890                _depth,
12891            )
12892        }
12893    }
12894    unsafe impl<
12895            D: fidl::encoding::ResourceDialect,
12896            T0: fidl::encoding::Encode<f32, D>,
12897            T1: fidl::encoding::Encode<f32, D>,
12898        > fidl::encoding::Encode<Vec2, D> for (T0, T1)
12899    {
12900        #[inline]
12901        unsafe fn encode(
12902            self,
12903            encoder: &mut fidl::encoding::Encoder<'_, D>,
12904            offset: usize,
12905            depth: fidl::encoding::Depth,
12906        ) -> fidl::Result<()> {
12907            encoder.debug_check_bounds::<Vec2>(offset);
12908            // Zero out padding regions. There's no need to apply masks
12909            // because the unmasked parts will be overwritten by fields.
12910            // Write the fields.
12911            self.0.encode(encoder, offset + 0, depth)?;
12912            self.1.encode(encoder, offset + 4, depth)?;
12913            Ok(())
12914        }
12915    }
12916
12917    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vec2 {
12918        #[inline(always)]
12919        fn new_empty() -> Self {
12920            Self { x: fidl::new_empty!(f32, D), y: fidl::new_empty!(f32, D) }
12921        }
12922
12923        #[inline]
12924        unsafe fn decode(
12925            &mut self,
12926            decoder: &mut fidl::encoding::Decoder<'_, D>,
12927            offset: usize,
12928            _depth: fidl::encoding::Depth,
12929        ) -> fidl::Result<()> {
12930            decoder.debug_check_bounds::<Self>(offset);
12931            // Verify that padding bytes are zero.
12932            fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
12933            fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
12934            Ok(())
12935        }
12936    }
12937
12938    impl fidl::encoding::ValueTypeMarker for Vec3 {
12939        type Borrowed<'a> = &'a Self;
12940        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12941            value
12942        }
12943    }
12944
12945    unsafe impl fidl::encoding::TypeMarker for Vec3 {
12946        type Owned = Self;
12947
12948        #[inline(always)]
12949        fn inline_align(_context: fidl::encoding::Context) -> usize {
12950            4
12951        }
12952
12953        #[inline(always)]
12954        fn inline_size(_context: fidl::encoding::Context) -> usize {
12955            12
12956        }
12957    }
12958
12959    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vec3, D> for &Vec3 {
12960        #[inline]
12961        unsafe fn encode(
12962            self,
12963            encoder: &mut fidl::encoding::Encoder<'_, D>,
12964            offset: usize,
12965            _depth: fidl::encoding::Depth,
12966        ) -> fidl::Result<()> {
12967            encoder.debug_check_bounds::<Vec3>(offset);
12968            // Delegate to tuple encoding.
12969            fidl::encoding::Encode::<Vec3, D>::encode(
12970                (
12971                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
12972                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
12973                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.z),
12974                ),
12975                encoder,
12976                offset,
12977                _depth,
12978            )
12979        }
12980    }
12981    unsafe impl<
12982            D: fidl::encoding::ResourceDialect,
12983            T0: fidl::encoding::Encode<f32, D>,
12984            T1: fidl::encoding::Encode<f32, D>,
12985            T2: fidl::encoding::Encode<f32, D>,
12986        > fidl::encoding::Encode<Vec3, D> for (T0, T1, T2)
12987    {
12988        #[inline]
12989        unsafe fn encode(
12990            self,
12991            encoder: &mut fidl::encoding::Encoder<'_, D>,
12992            offset: usize,
12993            depth: fidl::encoding::Depth,
12994        ) -> fidl::Result<()> {
12995            encoder.debug_check_bounds::<Vec3>(offset);
12996            // Zero out padding regions. There's no need to apply masks
12997            // because the unmasked parts will be overwritten by fields.
12998            // Write the fields.
12999            self.0.encode(encoder, offset + 0, depth)?;
13000            self.1.encode(encoder, offset + 4, depth)?;
13001            self.2.encode(encoder, offset + 8, depth)?;
13002            Ok(())
13003        }
13004    }
13005
13006    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vec3 {
13007        #[inline(always)]
13008        fn new_empty() -> Self {
13009            Self {
13010                x: fidl::new_empty!(f32, D),
13011                y: fidl::new_empty!(f32, D),
13012                z: fidl::new_empty!(f32, D),
13013            }
13014        }
13015
13016        #[inline]
13017        unsafe fn decode(
13018            &mut self,
13019            decoder: &mut fidl::encoding::Decoder<'_, D>,
13020            offset: usize,
13021            _depth: fidl::encoding::Depth,
13022        ) -> fidl::Result<()> {
13023            decoder.debug_check_bounds::<Self>(offset);
13024            // Verify that padding bytes are zero.
13025            fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
13026            fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
13027            fidl::decode!(f32, D, &mut self.z, decoder, offset + 8, _depth)?;
13028            Ok(())
13029        }
13030    }
13031
13032    impl fidl::encoding::ValueTypeMarker for Vec4 {
13033        type Borrowed<'a> = &'a Self;
13034        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13035            value
13036        }
13037    }
13038
13039    unsafe impl fidl::encoding::TypeMarker for Vec4 {
13040        type Owned = Self;
13041
13042        #[inline(always)]
13043        fn inline_align(_context: fidl::encoding::Context) -> usize {
13044            4
13045        }
13046
13047        #[inline(always)]
13048        fn inline_size(_context: fidl::encoding::Context) -> usize {
13049            16
13050        }
13051    }
13052
13053    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Vec4, D> for &Vec4 {
13054        #[inline]
13055        unsafe fn encode(
13056            self,
13057            encoder: &mut fidl::encoding::Encoder<'_, D>,
13058            offset: usize,
13059            _depth: fidl::encoding::Depth,
13060        ) -> fidl::Result<()> {
13061            encoder.debug_check_bounds::<Vec4>(offset);
13062            // Delegate to tuple encoding.
13063            fidl::encoding::Encode::<Vec4, D>::encode(
13064                (
13065                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.x),
13066                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.y),
13067                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.z),
13068                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.w),
13069                ),
13070                encoder,
13071                offset,
13072                _depth,
13073            )
13074        }
13075    }
13076    unsafe impl<
13077            D: fidl::encoding::ResourceDialect,
13078            T0: fidl::encoding::Encode<f32, D>,
13079            T1: fidl::encoding::Encode<f32, D>,
13080            T2: fidl::encoding::Encode<f32, D>,
13081            T3: fidl::encoding::Encode<f32, D>,
13082        > fidl::encoding::Encode<Vec4, D> for (T0, T1, T2, T3)
13083    {
13084        #[inline]
13085        unsafe fn encode(
13086            self,
13087            encoder: &mut fidl::encoding::Encoder<'_, D>,
13088            offset: usize,
13089            depth: fidl::encoding::Depth,
13090        ) -> fidl::Result<()> {
13091            encoder.debug_check_bounds::<Vec4>(offset);
13092            // Zero out padding regions. There's no need to apply masks
13093            // because the unmasked parts will be overwritten by fields.
13094            // Write the fields.
13095            self.0.encode(encoder, offset + 0, depth)?;
13096            self.1.encode(encoder, offset + 4, depth)?;
13097            self.2.encode(encoder, offset + 8, depth)?;
13098            self.3.encode(encoder, offset + 12, depth)?;
13099            Ok(())
13100        }
13101    }
13102
13103    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Vec4 {
13104        #[inline(always)]
13105        fn new_empty() -> Self {
13106            Self {
13107                x: fidl::new_empty!(f32, D),
13108                y: fidl::new_empty!(f32, D),
13109                z: fidl::new_empty!(f32, D),
13110                w: fidl::new_empty!(f32, D),
13111            }
13112        }
13113
13114        #[inline]
13115        unsafe fn decode(
13116            &mut self,
13117            decoder: &mut fidl::encoding::Decoder<'_, D>,
13118            offset: usize,
13119            _depth: fidl::encoding::Depth,
13120        ) -> fidl::Result<()> {
13121            decoder.debug_check_bounds::<Self>(offset);
13122            // Verify that padding bytes are zero.
13123            fidl::decode!(f32, D, &mut self.x, decoder, offset + 0, _depth)?;
13124            fidl::decode!(f32, D, &mut self.y, decoder, offset + 4, _depth)?;
13125            fidl::decode!(f32, D, &mut self.z, decoder, offset + 8, _depth)?;
13126            fidl::decode!(f32, D, &mut self.w, decoder, offset + 12, _depth)?;
13127            Ok(())
13128        }
13129    }
13130
13131    impl fidl::encoding::ValueTypeMarker for Event {
13132        type Borrowed<'a> = &'a Self;
13133        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13134            value
13135        }
13136    }
13137
13138    unsafe impl fidl::encoding::TypeMarker for Event {
13139        type Owned = Self;
13140
13141        #[inline(always)]
13142        fn inline_align(_context: fidl::encoding::Context) -> usize {
13143            8
13144        }
13145
13146        #[inline(always)]
13147        fn inline_size(_context: fidl::encoding::Context) -> usize {
13148            16
13149        }
13150    }
13151
13152    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Event, D> for &Event {
13153        #[inline]
13154        unsafe fn encode(
13155            self,
13156            encoder: &mut fidl::encoding::Encoder<'_, D>,
13157            offset: usize,
13158            _depth: fidl::encoding::Depth,
13159        ) -> fidl::Result<()> {
13160            encoder.debug_check_bounds::<Event>(offset);
13161            encoder.write_num::<u64>(self.ordinal(), offset);
13162            match self {
13163                Event::Metrics(ref val) => fidl::encoding::encode_in_envelope::<MetricsEvent, D>(
13164                    <MetricsEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
13165                    encoder,
13166                    offset + 8,
13167                    _depth,
13168                ),
13169                Event::SizeChangeHint(ref val) => {
13170                    fidl::encoding::encode_in_envelope::<SizeChangeHintEvent, D>(
13171                        <SizeChangeHintEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
13172                        encoder,
13173                        offset + 8,
13174                        _depth,
13175                    )
13176                }
13177                Event::ImportUnbound(ref val) => {
13178                    fidl::encoding::encode_in_envelope::<ImportUnboundEvent, D>(
13179                        <ImportUnboundEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
13180                        encoder,
13181                        offset + 8,
13182                        _depth,
13183                    )
13184                }
13185                Event::ViewConnected(ref val) => {
13186                    fidl::encoding::encode_in_envelope::<ViewConnectedEvent, D>(
13187                        <ViewConnectedEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
13188                        encoder,
13189                        offset + 8,
13190                        _depth,
13191                    )
13192                }
13193                Event::ViewDisconnected(ref val) => {
13194                    fidl::encoding::encode_in_envelope::<ViewDisconnectedEvent, D>(
13195                        <ViewDisconnectedEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
13196                        encoder,
13197                        offset + 8,
13198                        _depth,
13199                    )
13200                }
13201                Event::ViewHolderDisconnected(ref val) => fidl::encoding::encode_in_envelope::<
13202                    ViewHolderDisconnectedEvent,
13203                    D,
13204                >(
13205                    <ViewHolderDisconnectedEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
13206                    encoder,
13207                    offset + 8,
13208                    _depth,
13209                ),
13210                Event::ViewAttachedToScene(ref val) => {
13211                    fidl::encoding::encode_in_envelope::<ViewAttachedToSceneEvent, D>(
13212                        <ViewAttachedToSceneEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
13213                        encoder,
13214                        offset + 8,
13215                        _depth,
13216                    )
13217                }
13218                Event::ViewDetachedFromScene(ref val) => fidl::encoding::encode_in_envelope::<
13219                    ViewDetachedFromSceneEvent,
13220                    D,
13221                >(
13222                    <ViewDetachedFromSceneEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
13223                    encoder,
13224                    offset + 8,
13225                    _depth,
13226                ),
13227                Event::ViewPropertiesChanged(ref val) => fidl::encoding::encode_in_envelope::<
13228                    ViewPropertiesChangedEvent,
13229                    D,
13230                >(
13231                    <ViewPropertiesChangedEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
13232                    encoder,
13233                    offset + 8,
13234                    _depth,
13235                ),
13236                Event::ViewStateChanged(ref val) => {
13237                    fidl::encoding::encode_in_envelope::<ViewStateChangedEvent, D>(
13238                        <ViewStateChangedEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
13239                        encoder,
13240                        offset + 8,
13241                        _depth,
13242                    )
13243                }
13244                Event::ViewHolderConnected(ref val) => {
13245                    fidl::encoding::encode_in_envelope::<ViewHolderConnectedEvent, D>(
13246                        <ViewHolderConnectedEvent as fidl::encoding::ValueTypeMarker>::borrow(val),
13247                        encoder,
13248                        offset + 8,
13249                        _depth,
13250                    )
13251                }
13252            }
13253        }
13254    }
13255
13256    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Event {
13257        #[inline(always)]
13258        fn new_empty() -> Self {
13259            Self::Metrics(fidl::new_empty!(MetricsEvent, D))
13260        }
13261
13262        #[inline]
13263        unsafe fn decode(
13264            &mut self,
13265            decoder: &mut fidl::encoding::Decoder<'_, D>,
13266            offset: usize,
13267            mut depth: fidl::encoding::Depth,
13268        ) -> fidl::Result<()> {
13269            decoder.debug_check_bounds::<Self>(offset);
13270            #[allow(unused_variables)]
13271            let next_out_of_line = decoder.next_out_of_line();
13272            let handles_before = decoder.remaining_handles();
13273            let (ordinal, inlined, num_bytes, num_handles) =
13274                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13275
13276            let member_inline_size = match ordinal {
13277                1 => <MetricsEvent as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13278                2 => <SizeChangeHintEvent as fidl::encoding::TypeMarker>::inline_size(
13279                    decoder.context,
13280                ),
13281                3 => {
13282                    <ImportUnboundEvent as fidl::encoding::TypeMarker>::inline_size(decoder.context)
13283                }
13284                4 => {
13285                    <ViewConnectedEvent as fidl::encoding::TypeMarker>::inline_size(decoder.context)
13286                }
13287                5 => <ViewDisconnectedEvent as fidl::encoding::TypeMarker>::inline_size(
13288                    decoder.context,
13289                ),
13290                6 => <ViewHolderDisconnectedEvent as fidl::encoding::TypeMarker>::inline_size(
13291                    decoder.context,
13292                ),
13293                7 => <ViewAttachedToSceneEvent as fidl::encoding::TypeMarker>::inline_size(
13294                    decoder.context,
13295                ),
13296                8 => <ViewDetachedFromSceneEvent as fidl::encoding::TypeMarker>::inline_size(
13297                    decoder.context,
13298                ),
13299                9 => <ViewPropertiesChangedEvent as fidl::encoding::TypeMarker>::inline_size(
13300                    decoder.context,
13301                ),
13302                10 => <ViewStateChangedEvent as fidl::encoding::TypeMarker>::inline_size(
13303                    decoder.context,
13304                ),
13305                11 => <ViewHolderConnectedEvent as fidl::encoding::TypeMarker>::inline_size(
13306                    decoder.context,
13307                ),
13308                _ => return Err(fidl::Error::UnknownUnionTag),
13309            };
13310
13311            if inlined != (member_inline_size <= 4) {
13312                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13313            }
13314            let _inner_offset;
13315            if inlined {
13316                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13317                _inner_offset = offset + 8;
13318            } else {
13319                depth.increment()?;
13320                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13321            }
13322            match ordinal {
13323                1 => {
13324                    #[allow(irrefutable_let_patterns)]
13325                    if let Event::Metrics(_) = self {
13326                        // Do nothing, read the value into the object
13327                    } else {
13328                        // Initialize `self` to the right variant
13329                        *self = Event::Metrics(fidl::new_empty!(MetricsEvent, D));
13330                    }
13331                    #[allow(irrefutable_let_patterns)]
13332                    if let Event::Metrics(ref mut val) = self {
13333                        fidl::decode!(MetricsEvent, D, val, decoder, _inner_offset, depth)?;
13334                    } else {
13335                        unreachable!()
13336                    }
13337                }
13338                2 => {
13339                    #[allow(irrefutable_let_patterns)]
13340                    if let Event::SizeChangeHint(_) = self {
13341                        // Do nothing, read the value into the object
13342                    } else {
13343                        // Initialize `self` to the right variant
13344                        *self = Event::SizeChangeHint(fidl::new_empty!(SizeChangeHintEvent, D));
13345                    }
13346                    #[allow(irrefutable_let_patterns)]
13347                    if let Event::SizeChangeHint(ref mut val) = self {
13348                        fidl::decode!(SizeChangeHintEvent, D, val, decoder, _inner_offset, depth)?;
13349                    } else {
13350                        unreachable!()
13351                    }
13352                }
13353                3 => {
13354                    #[allow(irrefutable_let_patterns)]
13355                    if let Event::ImportUnbound(_) = self {
13356                        // Do nothing, read the value into the object
13357                    } else {
13358                        // Initialize `self` to the right variant
13359                        *self = Event::ImportUnbound(fidl::new_empty!(ImportUnboundEvent, D));
13360                    }
13361                    #[allow(irrefutable_let_patterns)]
13362                    if let Event::ImportUnbound(ref mut val) = self {
13363                        fidl::decode!(ImportUnboundEvent, D, val, decoder, _inner_offset, depth)?;
13364                    } else {
13365                        unreachable!()
13366                    }
13367                }
13368                4 => {
13369                    #[allow(irrefutable_let_patterns)]
13370                    if let Event::ViewConnected(_) = self {
13371                        // Do nothing, read the value into the object
13372                    } else {
13373                        // Initialize `self` to the right variant
13374                        *self = Event::ViewConnected(fidl::new_empty!(ViewConnectedEvent, D));
13375                    }
13376                    #[allow(irrefutable_let_patterns)]
13377                    if let Event::ViewConnected(ref mut val) = self {
13378                        fidl::decode!(ViewConnectedEvent, D, val, decoder, _inner_offset, depth)?;
13379                    } else {
13380                        unreachable!()
13381                    }
13382                }
13383                5 => {
13384                    #[allow(irrefutable_let_patterns)]
13385                    if let Event::ViewDisconnected(_) = self {
13386                        // Do nothing, read the value into the object
13387                    } else {
13388                        // Initialize `self` to the right variant
13389                        *self = Event::ViewDisconnected(fidl::new_empty!(ViewDisconnectedEvent, D));
13390                    }
13391                    #[allow(irrefutable_let_patterns)]
13392                    if let Event::ViewDisconnected(ref mut val) = self {
13393                        fidl::decode!(
13394                            ViewDisconnectedEvent,
13395                            D,
13396                            val,
13397                            decoder,
13398                            _inner_offset,
13399                            depth
13400                        )?;
13401                    } else {
13402                        unreachable!()
13403                    }
13404                }
13405                6 => {
13406                    #[allow(irrefutable_let_patterns)]
13407                    if let Event::ViewHolderDisconnected(_) = self {
13408                        // Do nothing, read the value into the object
13409                    } else {
13410                        // Initialize `self` to the right variant
13411                        *self = Event::ViewHolderDisconnected(fidl::new_empty!(
13412                            ViewHolderDisconnectedEvent,
13413                            D
13414                        ));
13415                    }
13416                    #[allow(irrefutable_let_patterns)]
13417                    if let Event::ViewHolderDisconnected(ref mut val) = self {
13418                        fidl::decode!(
13419                            ViewHolderDisconnectedEvent,
13420                            D,
13421                            val,
13422                            decoder,
13423                            _inner_offset,
13424                            depth
13425                        )?;
13426                    } else {
13427                        unreachable!()
13428                    }
13429                }
13430                7 => {
13431                    #[allow(irrefutable_let_patterns)]
13432                    if let Event::ViewAttachedToScene(_) = self {
13433                        // Do nothing, read the value into the object
13434                    } else {
13435                        // Initialize `self` to the right variant
13436                        *self = Event::ViewAttachedToScene(fidl::new_empty!(
13437                            ViewAttachedToSceneEvent,
13438                            D
13439                        ));
13440                    }
13441                    #[allow(irrefutable_let_patterns)]
13442                    if let Event::ViewAttachedToScene(ref mut val) = self {
13443                        fidl::decode!(
13444                            ViewAttachedToSceneEvent,
13445                            D,
13446                            val,
13447                            decoder,
13448                            _inner_offset,
13449                            depth
13450                        )?;
13451                    } else {
13452                        unreachable!()
13453                    }
13454                }
13455                8 => {
13456                    #[allow(irrefutable_let_patterns)]
13457                    if let Event::ViewDetachedFromScene(_) = self {
13458                        // Do nothing, read the value into the object
13459                    } else {
13460                        // Initialize `self` to the right variant
13461                        *self = Event::ViewDetachedFromScene(fidl::new_empty!(
13462                            ViewDetachedFromSceneEvent,
13463                            D
13464                        ));
13465                    }
13466                    #[allow(irrefutable_let_patterns)]
13467                    if let Event::ViewDetachedFromScene(ref mut val) = self {
13468                        fidl::decode!(
13469                            ViewDetachedFromSceneEvent,
13470                            D,
13471                            val,
13472                            decoder,
13473                            _inner_offset,
13474                            depth
13475                        )?;
13476                    } else {
13477                        unreachable!()
13478                    }
13479                }
13480                9 => {
13481                    #[allow(irrefutable_let_patterns)]
13482                    if let Event::ViewPropertiesChanged(_) = self {
13483                        // Do nothing, read the value into the object
13484                    } else {
13485                        // Initialize `self` to the right variant
13486                        *self = Event::ViewPropertiesChanged(fidl::new_empty!(
13487                            ViewPropertiesChangedEvent,
13488                            D
13489                        ));
13490                    }
13491                    #[allow(irrefutable_let_patterns)]
13492                    if let Event::ViewPropertiesChanged(ref mut val) = self {
13493                        fidl::decode!(
13494                            ViewPropertiesChangedEvent,
13495                            D,
13496                            val,
13497                            decoder,
13498                            _inner_offset,
13499                            depth
13500                        )?;
13501                    } else {
13502                        unreachable!()
13503                    }
13504                }
13505                10 => {
13506                    #[allow(irrefutable_let_patterns)]
13507                    if let Event::ViewStateChanged(_) = self {
13508                        // Do nothing, read the value into the object
13509                    } else {
13510                        // Initialize `self` to the right variant
13511                        *self = Event::ViewStateChanged(fidl::new_empty!(ViewStateChangedEvent, D));
13512                    }
13513                    #[allow(irrefutable_let_patterns)]
13514                    if let Event::ViewStateChanged(ref mut val) = self {
13515                        fidl::decode!(
13516                            ViewStateChangedEvent,
13517                            D,
13518                            val,
13519                            decoder,
13520                            _inner_offset,
13521                            depth
13522                        )?;
13523                    } else {
13524                        unreachable!()
13525                    }
13526                }
13527                11 => {
13528                    #[allow(irrefutable_let_patterns)]
13529                    if let Event::ViewHolderConnected(_) = self {
13530                        // Do nothing, read the value into the object
13531                    } else {
13532                        // Initialize `self` to the right variant
13533                        *self = Event::ViewHolderConnected(fidl::new_empty!(
13534                            ViewHolderConnectedEvent,
13535                            D
13536                        ));
13537                    }
13538                    #[allow(irrefutable_let_patterns)]
13539                    if let Event::ViewHolderConnected(ref mut val) = self {
13540                        fidl::decode!(
13541                            ViewHolderConnectedEvent,
13542                            D,
13543                            val,
13544                            decoder,
13545                            _inner_offset,
13546                            depth
13547                        )?;
13548                    } else {
13549                        unreachable!()
13550                    }
13551                }
13552                ordinal => panic!("unexpected ordinal {:?}", ordinal),
13553            }
13554            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13555                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13556            }
13557            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13558                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13559            }
13560            Ok(())
13561        }
13562    }
13563
13564    impl fidl::encoding::ValueTypeMarker for RendererParam {
13565        type Borrowed<'a> = &'a Self;
13566        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13567            value
13568        }
13569    }
13570
13571    unsafe impl fidl::encoding::TypeMarker for RendererParam {
13572        type Owned = Self;
13573
13574        #[inline(always)]
13575        fn inline_align(_context: fidl::encoding::Context) -> usize {
13576            8
13577        }
13578
13579        #[inline(always)]
13580        fn inline_size(_context: fidl::encoding::Context) -> usize {
13581            16
13582        }
13583    }
13584
13585    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RendererParam, D>
13586        for &RendererParam
13587    {
13588        #[inline]
13589        unsafe fn encode(
13590            self,
13591            encoder: &mut fidl::encoding::Encoder<'_, D>,
13592            offset: usize,
13593            _depth: fidl::encoding::Depth,
13594        ) -> fidl::Result<()> {
13595            encoder.debug_check_bounds::<RendererParam>(offset);
13596            encoder.write_num::<u64>(self.ordinal(), offset);
13597            match self {
13598                RendererParam::ShadowTechnique(ref val) => {
13599                    fidl::encoding::encode_in_envelope::<ShadowTechnique, D>(
13600                        <ShadowTechnique as fidl::encoding::ValueTypeMarker>::borrow(val),
13601                        encoder,
13602                        offset + 8,
13603                        _depth,
13604                    )
13605                }
13606                RendererParam::Reserved(ref val) => {
13607                    fidl::encoding::encode_in_envelope::<RenderFrequency, D>(
13608                        <RenderFrequency as fidl::encoding::ValueTypeMarker>::borrow(val),
13609                        encoder,
13610                        offset + 8,
13611                        _depth,
13612                    )
13613                }
13614                RendererParam::EnableDebugging(ref val) => {
13615                    fidl::encoding::encode_in_envelope::<bool, D>(
13616                        <bool as fidl::encoding::ValueTypeMarker>::borrow(val),
13617                        encoder,
13618                        offset + 8,
13619                        _depth,
13620                    )
13621                }
13622            }
13623        }
13624    }
13625
13626    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RendererParam {
13627        #[inline(always)]
13628        fn new_empty() -> Self {
13629            Self::ShadowTechnique(fidl::new_empty!(ShadowTechnique, D))
13630        }
13631
13632        #[inline]
13633        unsafe fn decode(
13634            &mut self,
13635            decoder: &mut fidl::encoding::Decoder<'_, D>,
13636            offset: usize,
13637            mut depth: fidl::encoding::Depth,
13638        ) -> fidl::Result<()> {
13639            decoder.debug_check_bounds::<Self>(offset);
13640            #[allow(unused_variables)]
13641            let next_out_of_line = decoder.next_out_of_line();
13642            let handles_before = decoder.remaining_handles();
13643            let (ordinal, inlined, num_bytes, num_handles) =
13644                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13645
13646            let member_inline_size = match ordinal {
13647                1 => <ShadowTechnique as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13648                2 => <RenderFrequency as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13649                3 => <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13650                _ => return Err(fidl::Error::UnknownUnionTag),
13651            };
13652
13653            if inlined != (member_inline_size <= 4) {
13654                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13655            }
13656            let _inner_offset;
13657            if inlined {
13658                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13659                _inner_offset = offset + 8;
13660            } else {
13661                depth.increment()?;
13662                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13663            }
13664            match ordinal {
13665                1 => {
13666                    #[allow(irrefutable_let_patterns)]
13667                    if let RendererParam::ShadowTechnique(_) = self {
13668                        // Do nothing, read the value into the object
13669                    } else {
13670                        // Initialize `self` to the right variant
13671                        *self =
13672                            RendererParam::ShadowTechnique(fidl::new_empty!(ShadowTechnique, D));
13673                    }
13674                    #[allow(irrefutable_let_patterns)]
13675                    if let RendererParam::ShadowTechnique(ref mut val) = self {
13676                        fidl::decode!(ShadowTechnique, D, val, decoder, _inner_offset, depth)?;
13677                    } else {
13678                        unreachable!()
13679                    }
13680                }
13681                2 => {
13682                    #[allow(irrefutable_let_patterns)]
13683                    if let RendererParam::Reserved(_) = self {
13684                        // Do nothing, read the value into the object
13685                    } else {
13686                        // Initialize `self` to the right variant
13687                        *self = RendererParam::Reserved(fidl::new_empty!(RenderFrequency, D));
13688                    }
13689                    #[allow(irrefutable_let_patterns)]
13690                    if let RendererParam::Reserved(ref mut val) = self {
13691                        fidl::decode!(RenderFrequency, D, val, decoder, _inner_offset, depth)?;
13692                    } else {
13693                        unreachable!()
13694                    }
13695                }
13696                3 => {
13697                    #[allow(irrefutable_let_patterns)]
13698                    if let RendererParam::EnableDebugging(_) = self {
13699                        // Do nothing, read the value into the object
13700                    } else {
13701                        // Initialize `self` to the right variant
13702                        *self = RendererParam::EnableDebugging(fidl::new_empty!(bool, D));
13703                    }
13704                    #[allow(irrefutable_let_patterns)]
13705                    if let RendererParam::EnableDebugging(ref mut val) = self {
13706                        fidl::decode!(bool, D, val, decoder, _inner_offset, depth)?;
13707                    } else {
13708                        unreachable!()
13709                    }
13710                }
13711                ordinal => panic!("unexpected ordinal {:?}", ordinal),
13712            }
13713            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13714                return Err(fidl::Error::InvalidNumBytesInEnvelope);
13715            }
13716            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13717                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13718            }
13719            Ok(())
13720        }
13721    }
13722
13723    impl fidl::encoding::ValueTypeMarker for Value {
13724        type Borrowed<'a> = &'a Self;
13725        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
13726            value
13727        }
13728    }
13729
13730    unsafe impl fidl::encoding::TypeMarker for Value {
13731        type Owned = Self;
13732
13733        #[inline(always)]
13734        fn inline_align(_context: fidl::encoding::Context) -> usize {
13735            8
13736        }
13737
13738        #[inline(always)]
13739        fn inline_size(_context: fidl::encoding::Context) -> usize {
13740            16
13741        }
13742    }
13743
13744    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Value, D> for &Value {
13745        #[inline]
13746        unsafe fn encode(
13747            self,
13748            encoder: &mut fidl::encoding::Encoder<'_, D>,
13749            offset: usize,
13750            _depth: fidl::encoding::Depth,
13751        ) -> fidl::Result<()> {
13752            encoder.debug_check_bounds::<Value>(offset);
13753            encoder.write_num::<u64>(self.ordinal(), offset);
13754            match self {
13755                Value::Vector1(ref val) => fidl::encoding::encode_in_envelope::<f32, D>(
13756                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13757                    encoder,
13758                    offset + 8,
13759                    _depth,
13760                ),
13761                Value::Vector2(ref val) => fidl::encoding::encode_in_envelope::<Vec2, D>(
13762                    <Vec2 as fidl::encoding::ValueTypeMarker>::borrow(val),
13763                    encoder,
13764                    offset + 8,
13765                    _depth,
13766                ),
13767                Value::Vector3(ref val) => fidl::encoding::encode_in_envelope::<Vec3, D>(
13768                    <Vec3 as fidl::encoding::ValueTypeMarker>::borrow(val),
13769                    encoder,
13770                    offset + 8,
13771                    _depth,
13772                ),
13773                Value::Vector4(ref val) => fidl::encoding::encode_in_envelope::<Vec4, D>(
13774                    <Vec4 as fidl::encoding::ValueTypeMarker>::borrow(val),
13775                    encoder,
13776                    offset + 8,
13777                    _depth,
13778                ),
13779                Value::Matrix4x4(ref val) => fidl::encoding::encode_in_envelope::<Mat4, D>(
13780                    <Mat4 as fidl::encoding::ValueTypeMarker>::borrow(val),
13781                    encoder,
13782                    offset + 8,
13783                    _depth,
13784                ),
13785                Value::ColorRgba(ref val) => fidl::encoding::encode_in_envelope::<ColorRgba, D>(
13786                    <ColorRgba as fidl::encoding::ValueTypeMarker>::borrow(val),
13787                    encoder,
13788                    offset + 8,
13789                    _depth,
13790                ),
13791                Value::ColorRgb(ref val) => fidl::encoding::encode_in_envelope::<ColorRgb, D>(
13792                    <ColorRgb as fidl::encoding::ValueTypeMarker>::borrow(val),
13793                    encoder,
13794                    offset + 8,
13795                    _depth,
13796                ),
13797                Value::Degrees(ref val) => fidl::encoding::encode_in_envelope::<f32, D>(
13798                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13799                    encoder,
13800                    offset + 8,
13801                    _depth,
13802                ),
13803                Value::Quaternion(ref val) => fidl::encoding::encode_in_envelope::<Quaternion, D>(
13804                    <Quaternion as fidl::encoding::ValueTypeMarker>::borrow(val),
13805                    encoder,
13806                    offset + 8,
13807                    _depth,
13808                ),
13809                Value::Transform(ref val) => {
13810                    fidl::encoding::encode_in_envelope::<FactoredTransform, D>(
13811                        <FactoredTransform as fidl::encoding::ValueTypeMarker>::borrow(val),
13812                        encoder,
13813                        offset + 8,
13814                        _depth,
13815                    )
13816                }
13817                Value::VariableId(ref val) => fidl::encoding::encode_in_envelope::<u32, D>(
13818                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(val),
13819                    encoder,
13820                    offset + 8,
13821                    _depth,
13822                ),
13823            }
13824        }
13825    }
13826
13827    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Value {
13828        #[inline(always)]
13829        fn new_empty() -> Self {
13830            Self::Vector1(fidl::new_empty!(f32, D))
13831        }
13832
13833        #[inline]
13834        unsafe fn decode(
13835            &mut self,
13836            decoder: &mut fidl::encoding::Decoder<'_, D>,
13837            offset: usize,
13838            mut depth: fidl::encoding::Depth,
13839        ) -> fidl::Result<()> {
13840            decoder.debug_check_bounds::<Self>(offset);
13841            #[allow(unused_variables)]
13842            let next_out_of_line = decoder.next_out_of_line();
13843            let handles_before = decoder.remaining_handles();
13844            let (ordinal, inlined, num_bytes, num_handles) =
13845                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13846
13847            let member_inline_size = match ordinal {
13848                1 => <f32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13849                2 => <Vec2 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13850                3 => <Vec3 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13851                4 => <Vec4 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13852                5 => <Mat4 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13853                6 => <ColorRgba as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13854                7 => <ColorRgb as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13855                8 => <f32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13856                9 => <Quaternion as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13857                10 => {
13858                    <FactoredTransform as fidl::encoding::TypeMarker>::inline_size(decoder.context)
13859                }
13860                11 => <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13861                _ => return Err(fidl::Error::UnknownUnionTag),
13862            };
13863
13864            if inlined != (member_inline_size <= 4) {
13865                return Err(fidl::Error::InvalidInlineBitInEnvelope);
13866            }
13867            let _inner_offset;
13868            if inlined {
13869                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13870                _inner_offset = offset + 8;
13871            } else {
13872                depth.increment()?;
13873                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13874            }
13875            match ordinal {
13876                1 => {
13877                    #[allow(irrefutable_let_patterns)]
13878                    if let Value::Vector1(_) = self {
13879                        // Do nothing, read the value into the object
13880                    } else {
13881                        // Initialize `self` to the right variant
13882                        *self = Value::Vector1(fidl::new_empty!(f32, D));
13883                    }
13884                    #[allow(irrefutable_let_patterns)]
13885                    if let Value::Vector1(ref mut val) = self {
13886                        fidl::decode!(f32, D, val, decoder, _inner_offset, depth)?;
13887                    } else {
13888                        unreachable!()
13889                    }
13890                }
13891                2 => {
13892                    #[allow(irrefutable_let_patterns)]
13893                    if let Value::Vector2(_) = self {
13894                        // Do nothing, read the value into the object
13895                    } else {
13896                        // Initialize `self` to the right variant
13897                        *self = Value::Vector2(fidl::new_empty!(Vec2, D));
13898                    }
13899                    #[allow(irrefutable_let_patterns)]
13900                    if let Value::Vector2(ref mut val) = self {
13901                        fidl::decode!(Vec2, D, val, decoder, _inner_offset, depth)?;
13902                    } else {
13903                        unreachable!()
13904                    }
13905                }
13906                3 => {
13907                    #[allow(irrefutable_let_patterns)]
13908                    if let Value::Vector3(_) = self {
13909                        // Do nothing, read the value into the object
13910                    } else {
13911                        // Initialize `self` to the right variant
13912                        *self = Value::Vector3(fidl::new_empty!(Vec3, D));
13913                    }
13914                    #[allow(irrefutable_let_patterns)]
13915                    if let Value::Vector3(ref mut val) = self {
13916                        fidl::decode!(Vec3, D, val, decoder, _inner_offset, depth)?;
13917                    } else {
13918                        unreachable!()
13919                    }
13920                }
13921                4 => {
13922                    #[allow(irrefutable_let_patterns)]
13923                    if let Value::Vector4(_) = self {
13924                        // Do nothing, read the value into the object
13925                    } else {
13926                        // Initialize `self` to the right variant
13927                        *self = Value::Vector4(fidl::new_empty!(Vec4, D));
13928                    }
13929                    #[allow(irrefutable_let_patterns)]
13930                    if let Value::Vector4(ref mut val) = self {
13931                        fidl::decode!(Vec4, D, val, decoder, _inner_offset, depth)?;
13932                    } else {
13933                        unreachable!()
13934                    }
13935                }
13936                5 => {
13937                    #[allow(irrefutable_let_patterns)]
13938                    if let Value::Matrix4x4(_) = self {
13939                        // Do nothing, read the value into the object
13940                    } else {
13941                        // Initialize `self` to the right variant
13942                        *self = Value::Matrix4x4(fidl::new_empty!(Mat4, D));
13943                    }
13944                    #[allow(irrefutable_let_patterns)]
13945                    if let Value::Matrix4x4(ref mut val) = self {
13946                        fidl::decode!(Mat4, D, val, decoder, _inner_offset, depth)?;
13947                    } else {
13948                        unreachable!()
13949                    }
13950                }
13951                6 => {
13952                    #[allow(irrefutable_let_patterns)]
13953                    if let Value::ColorRgba(_) = self {
13954                        // Do nothing, read the value into the object
13955                    } else {
13956                        // Initialize `self` to the right variant
13957                        *self = Value::ColorRgba(fidl::new_empty!(ColorRgba, D));
13958                    }
13959                    #[allow(irrefutable_let_patterns)]
13960                    if let Value::ColorRgba(ref mut val) = self {
13961                        fidl::decode!(ColorRgba, D, val, decoder, _inner_offset, depth)?;
13962                    } else {
13963                        unreachable!()
13964                    }
13965                }
13966                7 => {
13967                    #[allow(irrefutable_let_patterns)]
13968                    if let Value::ColorRgb(_) = self {
13969                        // Do nothing, read the value into the object
13970                    } else {
13971                        // Initialize `self` to the right variant
13972                        *self = Value::ColorRgb(fidl::new_empty!(ColorRgb, D));
13973                    }
13974                    #[allow(irrefutable_let_patterns)]
13975                    if let Value::ColorRgb(ref mut val) = self {
13976                        fidl::decode!(ColorRgb, D, val, decoder, _inner_offset, depth)?;
13977                    } else {
13978                        unreachable!()
13979                    }
13980                }
13981                8 => {
13982                    #[allow(irrefutable_let_patterns)]
13983                    if let Value::Degrees(_) = self {
13984                        // Do nothing, read the value into the object
13985                    } else {
13986                        // Initialize `self` to the right variant
13987                        *self = Value::Degrees(fidl::new_empty!(f32, D));
13988                    }
13989                    #[allow(irrefutable_let_patterns)]
13990                    if let Value::Degrees(ref mut val) = self {
13991                        fidl::decode!(f32, D, val, decoder, _inner_offset, depth)?;
13992                    } else {
13993                        unreachable!()
13994                    }
13995                }
13996                9 => {
13997                    #[allow(irrefutable_let_patterns)]
13998                    if let Value::Quaternion(_) = self {
13999                        // Do nothing, read the value into the object
14000                    } else {
14001                        // Initialize `self` to the right variant
14002                        *self = Value::Quaternion(fidl::new_empty!(Quaternion, D));
14003                    }
14004                    #[allow(irrefutable_let_patterns)]
14005                    if let Value::Quaternion(ref mut val) = self {
14006                        fidl::decode!(Quaternion, D, val, decoder, _inner_offset, depth)?;
14007                    } else {
14008                        unreachable!()
14009                    }
14010                }
14011                10 => {
14012                    #[allow(irrefutable_let_patterns)]
14013                    if let Value::Transform(_) = self {
14014                        // Do nothing, read the value into the object
14015                    } else {
14016                        // Initialize `self` to the right variant
14017                        *self = Value::Transform(fidl::new_empty!(FactoredTransform, D));
14018                    }
14019                    #[allow(irrefutable_let_patterns)]
14020                    if let Value::Transform(ref mut val) = self {
14021                        fidl::decode!(FactoredTransform, D, val, decoder, _inner_offset, depth)?;
14022                    } else {
14023                        unreachable!()
14024                    }
14025                }
14026                11 => {
14027                    #[allow(irrefutable_let_patterns)]
14028                    if let Value::VariableId(_) = self {
14029                        // Do nothing, read the value into the object
14030                    } else {
14031                        // Initialize `self` to the right variant
14032                        *self = Value::VariableId(fidl::new_empty!(u32, D));
14033                    }
14034                    #[allow(irrefutable_let_patterns)]
14035                    if let Value::VariableId(ref mut val) = self {
14036                        fidl::decode!(u32, D, val, decoder, _inner_offset, depth)?;
14037                    } else {
14038                        unreachable!()
14039                    }
14040                }
14041                ordinal => panic!("unexpected ordinal {:?}", ordinal),
14042            }
14043            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14044                return Err(fidl::Error::InvalidNumBytesInEnvelope);
14045            }
14046            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14047                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14048            }
14049            Ok(())
14050        }
14051    }
14052}