fidl_fuchsia_ui_gfx/
fidl_fuchsia_ui_gfx.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_fuchsia_ui_gfx_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14/// Instructs the compositor to create the specified `Resource`, and to register
15/// it in a table so that it can be referenced by subsequent commands.
16#[derive(Debug, PartialEq)]
17pub struct CreateResourceCmd {
18    /// An ID that is currently not used within the session.
19    pub id: u32,
20    pub resource: ResourceArgs,
21}
22
23impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for CreateResourceCmd {}
24
25/// Create an external reference to the specified resource, which can then be
26/// imported into another Session by passing a handle to `token`'s peer to
27/// ImportResourceCmd; see that comment for more details.
28///
29/// The importing client is typically in a different process than the exporter.
30/// No specific mechanism is provided for transferring a token from an exporter
31/// to an importer; collaborators may choose any out-of-band API they wish to do
32/// so.
33#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
34pub struct ExportResourceCmdDeprecated {
35    pub id: u32,
36    pub token: fidl::EventPair,
37}
38
39impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
40    for ExportResourceCmdDeprecated
41{
42}
43
44/// Token that uniquely identifies a root point for a subgraph in the global
45/// scene graph. Each `ExportToken` has exactly one corresponding `ImportToken`.
46///
47/// A Scenic client can have its contents referenced from another client by
48/// creating a typed resource using this token.  The other client must also
49/// create a correspondingly typed resource using the corresponding
50/// `ImportToken`.
51///
52/// The exact nature of the inter-client reference depends on the specific
53/// resources created from the tokens.  For example, creating a `View`
54/// resource from this token allows everything attached to the `View` to be
55/// embedded in another clients `ViewHolder`.
56#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
57pub struct ExportToken {
58    pub value: fidl::EventPair,
59}
60
61impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ExportToken {}
62
63/// An image that is backed by a `BufferCollection` registered with `Allocator`.
64#[derive(Debug, PartialEq)]
65pub struct ImageArgs3 {
66    pub width: u32,
67    pub height: u32,
68    /// Image creation requires an allocated `BufferCollection` registered with Allocator.
69    /// `import_token` should be the other end of a BufferCollectionExportToken that is
70    /// successfully registered. All clients of the specified BufferCollection must have set
71    /// their constraints and buffers should be allocated before calling.
72    pub import_token: fidl_fuchsia_ui_composition::BufferCollectionImportToken,
73    /// The index of the VMO from the `BufferCollection` that backs this image.
74    pub buffer_collection_index: u32,
75}
76
77impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ImageArgs3 {}
78
79/// `ImagePipe2` is a `Resource` that can be used as a `Texture` for a `Material`.
80#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
81pub struct ImagePipe2Args {
82    pub image_pipe_request: fidl::endpoints::ServerEnd<fidl_fuchsia_images::ImagePipe2Marker>,
83}
84
85impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ImagePipe2Args {}
86
87/// Import a resource that was exported via ExportResourceCmd().  `token` is
88/// a handle to the eventpair peer that was used to export the resource, and
89/// `spec` describes the type of the imported resource, and the commands which
90/// can legally be applied to it.  Afterward, `id` can be used to refer to the
91/// resource in an Command, similarly (but not identically: see below) to a
92/// resource that was created in the session.  For example, you can add children
93/// to an imported EntityNode via AddChildCmd.
94///
95/// However, note that the importer does not gain full access to the imported
96/// resource, but rather to an attenuated subset of its capabilities.  For
97/// example, you cannot use a DetachCmd to detach an imported EntityNode from
98/// its parent.
99///
100/// Unlike ExportResourceCmd, there is no configurable timeout.  There is an
101/// expectation that the exported resource will become available in a short
102/// amount of time.  TODO: this needs elaboration... e.g. we might notify via the
103/// SessionListener when we know that the link will never be made (e.g. if the
104/// peer of the import token is destroyed).
105#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
106pub struct ImportResourceCmdDeprecated {
107    pub id: u32,
108    pub token: fidl::EventPair,
109    pub spec: ImportSpec,
110}
111
112impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
113    for ImportResourceCmdDeprecated
114{
115}
116
117/// Token that uniquely identifies an attachment point for a subgraph in the
118/// global scene graph.  Each `ImportToken` has exactly one corresponding
119/// `ExportToken`.
120///
121/// A Scenic client can reference contents from another client by creating a
122/// typed resource using this token.  The other client must also create a
123/// correspondingly typed resource using the corresponding `ExportToken`.
124///
125/// The exact nature of the inter-client reference depends on the specific
126/// resources created from the tokens.  For example, creating a `ViewHolder`
127/// resource from this token allows a client to embed another client's `View`.
128#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
129pub struct ImportToken {
130    pub value: fidl::EventPair,
131}
132
133impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ImportToken {}
134
135/// `Memory` is a `Resource` that wraps a client-provided Zircon vmo to register
136/// it with Scenic.
137#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
138pub struct MemoryArgs {
139    /// The VMO which backs this memory.
140    pub vmo: fidl::Vmo,
141    /// The amount of memory from `vmo` that should be utilized.
142    pub allocation_size: u64,
143    /// The type of memory stored in the VMO, namely whether it's GPU memory or
144    /// host memory.
145    pub memory_type: fidl_fuchsia_images::MemoryType,
146}
147
148impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for MemoryArgs {}
149
150#[derive(Debug, PartialEq)]
151pub struct SnapshotCallbackDeprecatedOnDataRequest {
152    pub data: fidl_fuchsia_mem::Buffer,
153}
154
155impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
156    for SnapshotCallbackDeprecatedOnDataRequest
157{
158}
159
160#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
161pub struct TakeSnapshotCmdDeprecated {
162    pub node_id: u32,
163    pub callback: fidl::endpoints::ClientEnd<SnapshotCallbackDeprecatedMarker>,
164}
165
166impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for TakeSnapshotCmdDeprecated {}
167
168/// Represents the root of a subgraph within a larger scene graph.  Nodes can be
169/// attached to the `View` as children, and these Nodes will have the `View`s'
170/// coordinate transform applied to their own, in addition to being clipped to
171/// the `View`s' bounding box.
172/// See `ViewProperties`.
173///
174/// Each `View` is linked to a paired `ViewHolder` via a shared token pair.
175///
176/// Usually the `View` and its associated `ViewHolder` exist in separate
177/// processes.  By combining them, the UI for an entire system can be built
178/// using content contributed from many different processes.
179#[derive(Debug, PartialEq)]
180pub struct ViewArgs {
181    pub token: fidl_fuchsia_ui_views::ViewToken,
182    pub debug_name: Option<String>,
183}
184
185impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ViewArgs {}
186
187/// Represents the root of a subgraph within a larger scene graph.  Nodes can be
188/// attached to the `View` as children, and these Nodes will have the `View`s'
189/// coordinate transform applied to their own, in addition to being clipped to
190/// the `View`s' bounding box.
191/// See `ViewProperties`.
192///
193/// Each `View` is linked to a paired `ViewHolder` via a shared token pair.
194///
195/// Usually the `View` and its associated `ViewHolder` exist in separate
196/// processes.  By combining them, the UI for an entire system can be built
197/// using content contributed from many different processes.
198///
199/// Clients self-identify their `View` with a `ViewRef`, which is a stable
200/// identifier that may be cloned and passed to other components in a
201/// feed-forward style. It is accompanied by a `ViewRefControl`, which Scenic
202/// uses to signal `View` destruction across the system; the `ViewRefControl`
203/// must be unique - do not clone it.
204#[derive(Debug, PartialEq)]
205pub struct ViewArgs3 {
206    pub token: fidl_fuchsia_ui_views::ViewToken,
207    /// `control_ref.reference` must have default eventpair rights (i.e., with
208    /// signaling), minus ZX_RIGHT_DUPLICATE.
209    pub control_ref: fidl_fuchsia_ui_views::ViewRefControl,
210    /// `view_ref.reference` must have basic rights (i.e., no signaling).
211    pub view_ref: fidl_fuchsia_ui_views::ViewRef,
212    pub debug_name: Option<String>,
213}
214
215impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ViewArgs3 {}
216
217/// Represents an attachment point for a subgraph within a larger scene graph.
218/// The `ViewHolder` can be attached to a Node as a child, and the contents of
219/// the linked `View` will become a child of the Node as well.
220///
221/// Each `ViewHolder` is linked to a paired `View` via a shared token pair.
222///
223/// Usually the `ViewHolder` and its associated `View` exist in separate
224/// processes.  By combining them, the UI for an entire system can be built
225/// using content contributed from many different processes.
226#[derive(Debug, PartialEq)]
227pub struct ViewHolderArgs {
228    pub token: fidl_fuchsia_ui_views::ViewHolderToken,
229    pub debug_name: Option<String>,
230}
231
232impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ViewHolderArgs {}
233
234/// Commands that are used to modify the state of a `Session`.
235#[derive(Debug, PartialEq)]
236pub enum Command {
237    CreateResource(CreateResourceCmd),
238    ReleaseResource(ReleaseResourceCmd),
239    ExportResource(ExportResourceCmdDeprecated),
240    ImportResource(ImportResourceCmdDeprecated),
241    /// Tagging commands.
242    SetTag(SetTagCmd),
243    /// Grouping commands.
244    Detach(DetachCmd),
245    /// Spatial commands.
246    SetTranslation(SetTranslationCmd),
247    SetScale(SetScaleCmd),
248    SetRotation(SetRotationCmd),
249    SetAnchor(SetAnchorCmd),
250    SetSize(SetSizeCmd),
251    SetOpacity(SetOpacityCmd),
252    SendSizeChangeHintHack(SendSizeChangeHintCmdHack),
253    /// Node-specific commands.
254    AddChild(AddChildCmd),
255    /// re-parenting?
256    AddPart(AddPartCmd),
257    DetachChildren(DetachChildrenCmd),
258    SetShape(SetShapeCmd),
259    SetMaterial(SetMaterialCmd),
260    SetClip(SetClipCmd),
261    SetHitTestBehavior(SetHitTestBehaviorCmd),
262    SetViewProperties(SetViewPropertiesCmd),
263    TakeSnapshotCmd(TakeSnapshotCmdDeprecated),
264    /// Camera and lighting commands.
265    SetCamera(SetCameraCmd),
266    SetCameraTransform(SetCameraTransformCmd),
267    SetCameraProjection(SetCameraProjectionCmd),
268    SetStereoCameraProjection(SetStereoCameraProjectionCmd),
269    SetCameraPoseBuffer(SetCameraPoseBufferCmd),
270    SetLightColor(SetLightColorCmd),
271    SetLightDirection(SetLightDirectionCmd),
272    AddLight(AddLightCmd),
273    DetachLight(DetachLightCmd),
274    DetachLights(DetachLightsCmd),
275    SetTexture(SetTextureCmd),
276    SetColor(SetColorCmd),
277    /// Mesh commands.
278    BindMeshBuffers(BindMeshBuffersCmd),
279    /// Layer and renderer commands.
280    AddLayer(AddLayerCmd),
281    RemoveLayer(RemoveLayerCmd),
282    RemoveAllLayers(RemoveAllLayersCmd),
283    SetLayerStack(SetLayerStackCmd),
284    SetRenderer(SetRendererCmd),
285    SetRendererParam(SetRendererParamCmd),
286    /// Events.
287    SetEventMask(SetEventMaskCmd),
288    /// Diagnostic commands.
289    SetLabel(SetLabelCmd),
290    /// Debugging commands.
291    SetDisableClipping(SetDisableClippingCmd),
292    SetImportFocus(SetImportFocusCmdDeprecated),
293    SetClipPlanes(SetClipPlanesCmd),
294    SetPointLightPosition(SetPointLightPositionCmd),
295    SetPointLightFalloff(SetPointLightFalloffCmd),
296    Scene_AddAmbientLight(SceneAddAmbientLightCmd),
297    Scene_AddDirectionalLight(SceneAddDirectionalLightCmd),
298    Scene_AddPointLight(SceneAddPointLightCmd),
299    SetDisplayColorConversion(SetDisplayColorConversionCmdHack),
300    SetDisplayRotation(SetDisplayRotationCmdHack),
301    SetEnableViewDebugBounds(SetEnableDebugViewBoundsCmd),
302    SetViewHolderBoundsColor(SetViewHolderBoundsColorCmd),
303    SetCameraClipSpaceTransform(SetCameraClipSpaceTransformCmd),
304    SetDisplayMinimumRgb(SetDisplayMinimumRgbCmdHack),
305    SetSemanticVisibility(SetSemanticVisibilityCmd),
306}
307
308impl Command {
309    #[inline]
310    pub fn ordinal(&self) -> u64 {
311        match *self {
312            Self::CreateResource(_) => 1,
313            Self::ReleaseResource(_) => 2,
314            Self::ExportResource(_) => 3,
315            Self::ImportResource(_) => 4,
316            Self::SetTag(_) => 5,
317            Self::Detach(_) => 6,
318            Self::SetTranslation(_) => 7,
319            Self::SetScale(_) => 8,
320            Self::SetRotation(_) => 9,
321            Self::SetAnchor(_) => 10,
322            Self::SetSize(_) => 11,
323            Self::SetOpacity(_) => 12,
324            Self::SendSizeChangeHintHack(_) => 13,
325            Self::AddChild(_) => 14,
326            Self::AddPart(_) => 15,
327            Self::DetachChildren(_) => 16,
328            Self::SetShape(_) => 17,
329            Self::SetMaterial(_) => 18,
330            Self::SetClip(_) => 19,
331            Self::SetHitTestBehavior(_) => 20,
332            Self::SetViewProperties(_) => 21,
333            Self::TakeSnapshotCmd(_) => 22,
334            Self::SetCamera(_) => 23,
335            Self::SetCameraTransform(_) => 24,
336            Self::SetCameraProjection(_) => 25,
337            Self::SetStereoCameraProjection(_) => 26,
338            Self::SetCameraPoseBuffer(_) => 27,
339            Self::SetLightColor(_) => 28,
340            Self::SetLightDirection(_) => 29,
341            Self::AddLight(_) => 30,
342            Self::DetachLight(_) => 31,
343            Self::DetachLights(_) => 32,
344            Self::SetTexture(_) => 33,
345            Self::SetColor(_) => 34,
346            Self::BindMeshBuffers(_) => 35,
347            Self::AddLayer(_) => 36,
348            Self::RemoveLayer(_) => 37,
349            Self::RemoveAllLayers(_) => 38,
350            Self::SetLayerStack(_) => 39,
351            Self::SetRenderer(_) => 40,
352            Self::SetRendererParam(_) => 41,
353            Self::SetEventMask(_) => 42,
354            Self::SetLabel(_) => 43,
355            Self::SetDisableClipping(_) => 44,
356            Self::SetImportFocus(_) => 45,
357            Self::SetClipPlanes(_) => 46,
358            Self::SetPointLightPosition(_) => 47,
359            Self::SetPointLightFalloff(_) => 48,
360            Self::Scene_AddAmbientLight(_) => 49,
361            Self::Scene_AddDirectionalLight(_) => 50,
362            Self::Scene_AddPointLight(_) => 51,
363            Self::SetDisplayColorConversion(_) => 52,
364            Self::SetDisplayRotation(_) => 53,
365            Self::SetEnableViewDebugBounds(_) => 54,
366            Self::SetViewHolderBoundsColor(_) => 55,
367            Self::SetCameraClipSpaceTransform(_) => 56,
368            Self::SetDisplayMinimumRgb(_) => 57,
369            Self::SetSemanticVisibility(_) => 58,
370        }
371    }
372
373    #[deprecated = "Strict unions should not use `is_unknown`"]
374    #[inline]
375    pub fn is_unknown(&self) -> bool {
376        false
377    }
378}
379
380impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Command {}
381
382/// These are all of the types of resources that can be created within a
383/// `Session`. Add new fields only to the bottom of the list.
384#[derive(Debug, PartialEq)]
385pub enum ResourceArgs {
386    Memory(MemoryArgs),
387    Image(ImageArgs),
388    Buffer(BufferArgs),
389    View(ViewArgs),
390    ViewHolder(ViewHolderArgs),
391    Rectangle(RectangleArgs),
392    RoundedRectangle(RoundedRectangleArgs),
393    Circle(CircleArgs),
394    Mesh(MeshArgs),
395    ShapeNode(ShapeNodeArgs),
396    ClipNode(ClipNodeArgs),
397    EntityNode(EntityNodeArgs),
398    OpacityNode(OpacityNodeArgsHack),
399    Material(MaterialArgs),
400    Compositor(CompositorArgs),
401    DisplayCompositor(DisplayCompositorArgs),
402    LayerStack(LayerStackArgs),
403    Layer(LayerArgs),
404    Scene(SceneArgs),
405    Camera(CameraArgs),
406    StereoCamera(StereoCameraArgs),
407    Renderer(RendererArgs),
408    AmbientLight(AmbientLightArgs),
409    DirectionalLight(DirectionalLightArgs),
410    Variable(VariableArgs),
411    PointLight(PointLightArgs),
412    View3(ViewArgs3),
413    ImagePipe2(ImagePipe2Args),
414    Image2(ImageArgs2),
415    Image3(ImageArgs3),
416}
417
418impl ResourceArgs {
419    #[inline]
420    pub fn ordinal(&self) -> u64 {
421        match *self {
422            Self::Memory(_) => 1,
423            Self::Image(_) => 2,
424            Self::Buffer(_) => 4,
425            Self::View(_) => 5,
426            Self::ViewHolder(_) => 6,
427            Self::Rectangle(_) => 7,
428            Self::RoundedRectangle(_) => 8,
429            Self::Circle(_) => 9,
430            Self::Mesh(_) => 10,
431            Self::ShapeNode(_) => 11,
432            Self::ClipNode(_) => 12,
433            Self::EntityNode(_) => 13,
434            Self::OpacityNode(_) => 14,
435            Self::Material(_) => 15,
436            Self::Compositor(_) => 16,
437            Self::DisplayCompositor(_) => 17,
438            Self::LayerStack(_) => 19,
439            Self::Layer(_) => 20,
440            Self::Scene(_) => 21,
441            Self::Camera(_) => 22,
442            Self::StereoCamera(_) => 23,
443            Self::Renderer(_) => 24,
444            Self::AmbientLight(_) => 25,
445            Self::DirectionalLight(_) => 26,
446            Self::Variable(_) => 27,
447            Self::PointLight(_) => 28,
448            Self::View3(_) => 31,
449            Self::ImagePipe2(_) => 32,
450            Self::Image2(_) => 33,
451            Self::Image3(_) => 34,
452        }
453    }
454
455    #[deprecated = "Strict unions should not use `is_unknown`"]
456    #[inline]
457    pub fn is_unknown(&self) -> bool {
458        false
459    }
460}
461
462impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ResourceArgs {}
463
464#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
465pub struct SnapshotCallbackDeprecatedMarker;
466
467impl fidl::endpoints::ProtocolMarker for SnapshotCallbackDeprecatedMarker {
468    type Proxy = SnapshotCallbackDeprecatedProxy;
469    type RequestStream = SnapshotCallbackDeprecatedRequestStream;
470    #[cfg(target_os = "fuchsia")]
471    type SynchronousProxy = SnapshotCallbackDeprecatedSynchronousProxy;
472
473    const DEBUG_NAME: &'static str = "(anonymous) SnapshotCallbackDeprecated";
474}
475
476pub trait SnapshotCallbackDeprecatedProxyInterface: Send + Sync {
477    fn r#on_data(&self, data: fidl_fuchsia_mem::Buffer) -> Result<(), fidl::Error>;
478}
479#[derive(Debug)]
480#[cfg(target_os = "fuchsia")]
481pub struct SnapshotCallbackDeprecatedSynchronousProxy {
482    client: fidl::client::sync::Client,
483}
484
485#[cfg(target_os = "fuchsia")]
486impl fidl::endpoints::SynchronousProxy for SnapshotCallbackDeprecatedSynchronousProxy {
487    type Proxy = SnapshotCallbackDeprecatedProxy;
488    type Protocol = SnapshotCallbackDeprecatedMarker;
489
490    fn from_channel(inner: fidl::Channel) -> Self {
491        Self::new(inner)
492    }
493
494    fn into_channel(self) -> fidl::Channel {
495        self.client.into_channel()
496    }
497
498    fn as_channel(&self) -> &fidl::Channel {
499        self.client.as_channel()
500    }
501}
502
503#[cfg(target_os = "fuchsia")]
504impl SnapshotCallbackDeprecatedSynchronousProxy {
505    pub fn new(channel: fidl::Channel) -> Self {
506        let protocol_name =
507            <SnapshotCallbackDeprecatedMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
508        Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
509    }
510
511    pub fn into_channel(self) -> fidl::Channel {
512        self.client.into_channel()
513    }
514
515    /// Waits until an event arrives and returns it. It is safe for other
516    /// threads to make concurrent requests while waiting for an event.
517    pub fn wait_for_event(
518        &self,
519        deadline: zx::MonotonicInstant,
520    ) -> Result<SnapshotCallbackDeprecatedEvent, fidl::Error> {
521        SnapshotCallbackDeprecatedEvent::decode(self.client.wait_for_event(deadline)?)
522    }
523
524    pub fn r#on_data(&self, mut data: fidl_fuchsia_mem::Buffer) -> Result<(), fidl::Error> {
525        self.client.send::<SnapshotCallbackDeprecatedOnDataRequest>(
526            (&mut data,),
527            0x11d1a93b419b7d9f,
528            fidl::encoding::DynamicFlags::empty(),
529        )
530    }
531}
532
533#[cfg(target_os = "fuchsia")]
534impl From<SnapshotCallbackDeprecatedSynchronousProxy> for zx::Handle {
535    fn from(value: SnapshotCallbackDeprecatedSynchronousProxy) -> Self {
536        value.into_channel().into()
537    }
538}
539
540#[cfg(target_os = "fuchsia")]
541impl From<fidl::Channel> for SnapshotCallbackDeprecatedSynchronousProxy {
542    fn from(value: fidl::Channel) -> Self {
543        Self::new(value)
544    }
545}
546
547#[derive(Debug, Clone)]
548pub struct SnapshotCallbackDeprecatedProxy {
549    client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
550}
551
552impl fidl::endpoints::Proxy for SnapshotCallbackDeprecatedProxy {
553    type Protocol = SnapshotCallbackDeprecatedMarker;
554
555    fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
556        Self::new(inner)
557    }
558
559    fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
560        self.client.into_channel().map_err(|client| Self { client })
561    }
562
563    fn as_channel(&self) -> &::fidl::AsyncChannel {
564        self.client.as_channel()
565    }
566}
567
568impl SnapshotCallbackDeprecatedProxy {
569    /// Create a new Proxy for fuchsia.ui.gfx/SnapshotCallbackDEPRECATED.
570    pub fn new(channel: ::fidl::AsyncChannel) -> Self {
571        let protocol_name =
572            <SnapshotCallbackDeprecatedMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
573        Self { client: fidl::client::Client::new(channel, protocol_name) }
574    }
575
576    /// Get a Stream of events from the remote end of the protocol.
577    ///
578    /// # Panics
579    ///
580    /// Panics if the event stream was already taken.
581    pub fn take_event_stream(&self) -> SnapshotCallbackDeprecatedEventStream {
582        SnapshotCallbackDeprecatedEventStream { event_receiver: self.client.take_event_receiver() }
583    }
584
585    pub fn r#on_data(&self, mut data: fidl_fuchsia_mem::Buffer) -> Result<(), fidl::Error> {
586        SnapshotCallbackDeprecatedProxyInterface::r#on_data(self, data)
587    }
588}
589
590impl SnapshotCallbackDeprecatedProxyInterface for SnapshotCallbackDeprecatedProxy {
591    fn r#on_data(&self, mut data: fidl_fuchsia_mem::Buffer) -> Result<(), fidl::Error> {
592        self.client.send::<SnapshotCallbackDeprecatedOnDataRequest>(
593            (&mut data,),
594            0x11d1a93b419b7d9f,
595            fidl::encoding::DynamicFlags::empty(),
596        )
597    }
598}
599
600pub struct SnapshotCallbackDeprecatedEventStream {
601    event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
602}
603
604impl std::marker::Unpin for SnapshotCallbackDeprecatedEventStream {}
605
606impl futures::stream::FusedStream for SnapshotCallbackDeprecatedEventStream {
607    fn is_terminated(&self) -> bool {
608        self.event_receiver.is_terminated()
609    }
610}
611
612impl futures::Stream for SnapshotCallbackDeprecatedEventStream {
613    type Item = Result<SnapshotCallbackDeprecatedEvent, fidl::Error>;
614
615    fn poll_next(
616        mut self: std::pin::Pin<&mut Self>,
617        cx: &mut std::task::Context<'_>,
618    ) -> std::task::Poll<Option<Self::Item>> {
619        match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
620            &mut self.event_receiver,
621            cx
622        )?) {
623            Some(buf) => std::task::Poll::Ready(Some(SnapshotCallbackDeprecatedEvent::decode(buf))),
624            None => std::task::Poll::Ready(None),
625        }
626    }
627}
628
629#[derive(Debug)]
630pub enum SnapshotCallbackDeprecatedEvent {}
631
632impl SnapshotCallbackDeprecatedEvent {
633    /// Decodes a message buffer as a [`SnapshotCallbackDeprecatedEvent`].
634    fn decode(
635        mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
636    ) -> Result<SnapshotCallbackDeprecatedEvent, fidl::Error> {
637        let (bytes, _handles) = buf.split_mut();
638        let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
639        debug_assert_eq!(tx_header.tx_id, 0);
640        match tx_header.ordinal {
641            _ => Err(fidl::Error::UnknownOrdinal {
642                ordinal: tx_header.ordinal,
643                protocol_name: <SnapshotCallbackDeprecatedMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
644            })
645        }
646    }
647}
648
649/// A Stream of incoming requests for fuchsia.ui.gfx/SnapshotCallbackDEPRECATED.
650pub struct SnapshotCallbackDeprecatedRequestStream {
651    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
652    is_terminated: bool,
653}
654
655impl std::marker::Unpin for SnapshotCallbackDeprecatedRequestStream {}
656
657impl futures::stream::FusedStream for SnapshotCallbackDeprecatedRequestStream {
658    fn is_terminated(&self) -> bool {
659        self.is_terminated
660    }
661}
662
663impl fidl::endpoints::RequestStream for SnapshotCallbackDeprecatedRequestStream {
664    type Protocol = SnapshotCallbackDeprecatedMarker;
665    type ControlHandle = SnapshotCallbackDeprecatedControlHandle;
666
667    fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
668        Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
669    }
670
671    fn control_handle(&self) -> Self::ControlHandle {
672        SnapshotCallbackDeprecatedControlHandle { inner: self.inner.clone() }
673    }
674
675    fn into_inner(
676        self,
677    ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
678    {
679        (self.inner, self.is_terminated)
680    }
681
682    fn from_inner(
683        inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
684        is_terminated: bool,
685    ) -> Self {
686        Self { inner, is_terminated }
687    }
688}
689
690impl futures::Stream for SnapshotCallbackDeprecatedRequestStream {
691    type Item = Result<SnapshotCallbackDeprecatedRequest, fidl::Error>;
692
693    fn poll_next(
694        mut self: std::pin::Pin<&mut Self>,
695        cx: &mut std::task::Context<'_>,
696    ) -> std::task::Poll<Option<Self::Item>> {
697        let this = &mut *self;
698        if this.inner.check_shutdown(cx) {
699            this.is_terminated = true;
700            return std::task::Poll::Ready(None);
701        }
702        if this.is_terminated {
703            panic!("polled SnapshotCallbackDeprecatedRequestStream after completion");
704        }
705        fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
706            |bytes, handles| {
707                match this.inner.channel().read_etc(cx, bytes, handles) {
708                    std::task::Poll::Ready(Ok(())) => {}
709                    std::task::Poll::Pending => return std::task::Poll::Pending,
710                    std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
711                        this.is_terminated = true;
712                        return std::task::Poll::Ready(None);
713                    }
714                    std::task::Poll::Ready(Err(e)) => {
715                        return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
716                            e.into(),
717                        ))))
718                    }
719                }
720
721                // A message has been received from the channel
722                let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
723
724                std::task::Poll::Ready(Some(match header.ordinal {
725                0x11d1a93b419b7d9f => {
726                    header.validate_request_tx_id(fidl::MethodType::OneWay)?;
727                    let mut req = fidl::new_empty!(SnapshotCallbackDeprecatedOnDataRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
728                    fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SnapshotCallbackDeprecatedOnDataRequest>(&header, _body_bytes, handles, &mut req)?;
729                    let control_handle = SnapshotCallbackDeprecatedControlHandle {
730                        inner: this.inner.clone(),
731                    };
732                    Ok(SnapshotCallbackDeprecatedRequest::OnData {data: req.data,
733
734                        control_handle,
735                    })
736                }
737                _ => Err(fidl::Error::UnknownOrdinal {
738                    ordinal: header.ordinal,
739                    protocol_name: <SnapshotCallbackDeprecatedMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
740                }),
741            }))
742            },
743        )
744    }
745}
746
747#[derive(Debug)]
748pub enum SnapshotCallbackDeprecatedRequest {
749    OnData {
750        data: fidl_fuchsia_mem::Buffer,
751        control_handle: SnapshotCallbackDeprecatedControlHandle,
752    },
753}
754
755impl SnapshotCallbackDeprecatedRequest {
756    #[allow(irrefutable_let_patterns)]
757    pub fn into_on_data(
758        self,
759    ) -> Option<(fidl_fuchsia_mem::Buffer, SnapshotCallbackDeprecatedControlHandle)> {
760        if let SnapshotCallbackDeprecatedRequest::OnData { data, control_handle } = self {
761            Some((data, control_handle))
762        } else {
763            None
764        }
765    }
766
767    /// Name of the method defined in FIDL
768    pub fn method_name(&self) -> &'static str {
769        match *self {
770            SnapshotCallbackDeprecatedRequest::OnData { .. } => "on_data",
771        }
772    }
773}
774
775#[derive(Debug, Clone)]
776pub struct SnapshotCallbackDeprecatedControlHandle {
777    inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
778}
779
780impl fidl::endpoints::ControlHandle for SnapshotCallbackDeprecatedControlHandle {
781    fn shutdown(&self) {
782        self.inner.shutdown()
783    }
784    fn shutdown_with_epitaph(&self, status: zx_status::Status) {
785        self.inner.shutdown_with_epitaph(status)
786    }
787
788    fn is_closed(&self) -> bool {
789        self.inner.channel().is_closed()
790    }
791    fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
792        self.inner.channel().on_closed()
793    }
794
795    #[cfg(target_os = "fuchsia")]
796    fn signal_peer(
797        &self,
798        clear_mask: zx::Signals,
799        set_mask: zx::Signals,
800    ) -> Result<(), zx_status::Status> {
801        use fidl::Peered;
802        self.inner.channel().signal_peer(clear_mask, set_mask)
803    }
804}
805
806impl SnapshotCallbackDeprecatedControlHandle {}
807
808mod internal {
809    use super::*;
810
811    impl fidl::encoding::ResourceTypeMarker for CreateResourceCmd {
812        type Borrowed<'a> = &'a mut Self;
813        fn take_or_borrow<'a>(
814            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
815        ) -> Self::Borrowed<'a> {
816            value
817        }
818    }
819
820    unsafe impl fidl::encoding::TypeMarker for CreateResourceCmd {
821        type Owned = Self;
822
823        #[inline(always)]
824        fn inline_align(_context: fidl::encoding::Context) -> usize {
825            8
826        }
827
828        #[inline(always)]
829        fn inline_size(_context: fidl::encoding::Context) -> usize {
830            24
831        }
832    }
833
834    unsafe impl
835        fidl::encoding::Encode<CreateResourceCmd, fidl::encoding::DefaultFuchsiaResourceDialect>
836        for &mut CreateResourceCmd
837    {
838        #[inline]
839        unsafe fn encode(
840            self,
841            encoder: &mut fidl::encoding::Encoder<
842                '_,
843                fidl::encoding::DefaultFuchsiaResourceDialect,
844            >,
845            offset: usize,
846            _depth: fidl::encoding::Depth,
847        ) -> fidl::Result<()> {
848            encoder.debug_check_bounds::<CreateResourceCmd>(offset);
849            // Delegate to tuple encoding.
850            fidl::encoding::Encode::<CreateResourceCmd, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
851                (
852                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
853                    <ResourceArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.resource),
854                ),
855                encoder, offset, _depth
856            )
857        }
858    }
859    unsafe impl<
860            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
861            T1: fidl::encoding::Encode<ResourceArgs, fidl::encoding::DefaultFuchsiaResourceDialect>,
862        >
863        fidl::encoding::Encode<CreateResourceCmd, fidl::encoding::DefaultFuchsiaResourceDialect>
864        for (T0, T1)
865    {
866        #[inline]
867        unsafe fn encode(
868            self,
869            encoder: &mut fidl::encoding::Encoder<
870                '_,
871                fidl::encoding::DefaultFuchsiaResourceDialect,
872            >,
873            offset: usize,
874            depth: fidl::encoding::Depth,
875        ) -> fidl::Result<()> {
876            encoder.debug_check_bounds::<CreateResourceCmd>(offset);
877            // Zero out padding regions. There's no need to apply masks
878            // because the unmasked parts will be overwritten by fields.
879            unsafe {
880                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
881                (ptr as *mut u64).write_unaligned(0);
882            }
883            // Write the fields.
884            self.0.encode(encoder, offset + 0, depth)?;
885            self.1.encode(encoder, offset + 8, depth)?;
886            Ok(())
887        }
888    }
889
890    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
891        for CreateResourceCmd
892    {
893        #[inline(always)]
894        fn new_empty() -> Self {
895            Self {
896                id: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
897                resource: fidl::new_empty!(
898                    ResourceArgs,
899                    fidl::encoding::DefaultFuchsiaResourceDialect
900                ),
901            }
902        }
903
904        #[inline]
905        unsafe fn decode(
906            &mut self,
907            decoder: &mut fidl::encoding::Decoder<
908                '_,
909                fidl::encoding::DefaultFuchsiaResourceDialect,
910            >,
911            offset: usize,
912            _depth: fidl::encoding::Depth,
913        ) -> fidl::Result<()> {
914            decoder.debug_check_bounds::<Self>(offset);
915            // Verify that padding bytes are zero.
916            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
917            let padval = unsafe { (ptr as *const u64).read_unaligned() };
918            let mask = 0xffffffff00000000u64;
919            let maskedval = padval & mask;
920            if maskedval != 0 {
921                return Err(fidl::Error::NonZeroPadding {
922                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
923                });
924            }
925            fidl::decode!(
926                u32,
927                fidl::encoding::DefaultFuchsiaResourceDialect,
928                &mut self.id,
929                decoder,
930                offset + 0,
931                _depth
932            )?;
933            fidl::decode!(
934                ResourceArgs,
935                fidl::encoding::DefaultFuchsiaResourceDialect,
936                &mut self.resource,
937                decoder,
938                offset + 8,
939                _depth
940            )?;
941            Ok(())
942        }
943    }
944
945    impl fidl::encoding::ResourceTypeMarker for ExportResourceCmdDeprecated {
946        type Borrowed<'a> = &'a mut Self;
947        fn take_or_borrow<'a>(
948            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
949        ) -> Self::Borrowed<'a> {
950            value
951        }
952    }
953
954    unsafe impl fidl::encoding::TypeMarker for ExportResourceCmdDeprecated {
955        type Owned = Self;
956
957        #[inline(always)]
958        fn inline_align(_context: fidl::encoding::Context) -> usize {
959            4
960        }
961
962        #[inline(always)]
963        fn inline_size(_context: fidl::encoding::Context) -> usize {
964            8
965        }
966    }
967
968    unsafe impl
969        fidl::encoding::Encode<
970            ExportResourceCmdDeprecated,
971            fidl::encoding::DefaultFuchsiaResourceDialect,
972        > for &mut ExportResourceCmdDeprecated
973    {
974        #[inline]
975        unsafe fn encode(
976            self,
977            encoder: &mut fidl::encoding::Encoder<
978                '_,
979                fidl::encoding::DefaultFuchsiaResourceDialect,
980            >,
981            offset: usize,
982            _depth: fidl::encoding::Depth,
983        ) -> fidl::Result<()> {
984            encoder.debug_check_bounds::<ExportResourceCmdDeprecated>(offset);
985            // Delegate to tuple encoding.
986            fidl::encoding::Encode::<
987                ExportResourceCmdDeprecated,
988                fidl::encoding::DefaultFuchsiaResourceDialect,
989            >::encode(
990                (
991                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
992                    <fidl::encoding::HandleType<
993                        fidl::EventPair,
994                        { fidl::ObjectType::EVENTPAIR.into_raw() },
995                        2147483648,
996                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
997                        &mut self.token
998                    ),
999                ),
1000                encoder,
1001                offset,
1002                _depth,
1003            )
1004        }
1005    }
1006    unsafe impl<
1007            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
1008            T1: fidl::encoding::Encode<
1009                fidl::encoding::HandleType<
1010                    fidl::EventPair,
1011                    { fidl::ObjectType::EVENTPAIR.into_raw() },
1012                    2147483648,
1013                >,
1014                fidl::encoding::DefaultFuchsiaResourceDialect,
1015            >,
1016        >
1017        fidl::encoding::Encode<
1018            ExportResourceCmdDeprecated,
1019            fidl::encoding::DefaultFuchsiaResourceDialect,
1020        > for (T0, T1)
1021    {
1022        #[inline]
1023        unsafe fn encode(
1024            self,
1025            encoder: &mut fidl::encoding::Encoder<
1026                '_,
1027                fidl::encoding::DefaultFuchsiaResourceDialect,
1028            >,
1029            offset: usize,
1030            depth: fidl::encoding::Depth,
1031        ) -> fidl::Result<()> {
1032            encoder.debug_check_bounds::<ExportResourceCmdDeprecated>(offset);
1033            // Zero out padding regions. There's no need to apply masks
1034            // because the unmasked parts will be overwritten by fields.
1035            // Write the fields.
1036            self.0.encode(encoder, offset + 0, depth)?;
1037            self.1.encode(encoder, offset + 4, depth)?;
1038            Ok(())
1039        }
1040    }
1041
1042    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1043        for ExportResourceCmdDeprecated
1044    {
1045        #[inline(always)]
1046        fn new_empty() -> Self {
1047            Self {
1048                id: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
1049                token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1050            }
1051        }
1052
1053        #[inline]
1054        unsafe fn decode(
1055            &mut self,
1056            decoder: &mut fidl::encoding::Decoder<
1057                '_,
1058                fidl::encoding::DefaultFuchsiaResourceDialect,
1059            >,
1060            offset: usize,
1061            _depth: fidl::encoding::Depth,
1062        ) -> fidl::Result<()> {
1063            decoder.debug_check_bounds::<Self>(offset);
1064            // Verify that padding bytes are zero.
1065            fidl::decode!(
1066                u32,
1067                fidl::encoding::DefaultFuchsiaResourceDialect,
1068                &mut self.id,
1069                decoder,
1070                offset + 0,
1071                _depth
1072            )?;
1073            fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 4, _depth)?;
1074            Ok(())
1075        }
1076    }
1077
1078    impl fidl::encoding::ResourceTypeMarker for ExportToken {
1079        type Borrowed<'a> = &'a mut Self;
1080        fn take_or_borrow<'a>(
1081            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1082        ) -> Self::Borrowed<'a> {
1083            value
1084        }
1085    }
1086
1087    unsafe impl fidl::encoding::TypeMarker for ExportToken {
1088        type Owned = Self;
1089
1090        #[inline(always)]
1091        fn inline_align(_context: fidl::encoding::Context) -> usize {
1092            4
1093        }
1094
1095        #[inline(always)]
1096        fn inline_size(_context: fidl::encoding::Context) -> usize {
1097            4
1098        }
1099    }
1100
1101    unsafe impl fidl::encoding::Encode<ExportToken, fidl::encoding::DefaultFuchsiaResourceDialect>
1102        for &mut ExportToken
1103    {
1104        #[inline]
1105        unsafe fn encode(
1106            self,
1107            encoder: &mut fidl::encoding::Encoder<
1108                '_,
1109                fidl::encoding::DefaultFuchsiaResourceDialect,
1110            >,
1111            offset: usize,
1112            _depth: fidl::encoding::Depth,
1113        ) -> fidl::Result<()> {
1114            encoder.debug_check_bounds::<ExportToken>(offset);
1115            // Delegate to tuple encoding.
1116            fidl::encoding::Encode::<ExportToken, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
1117                (
1118                    <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),
1119                ),
1120                encoder, offset, _depth
1121            )
1122        }
1123    }
1124    unsafe impl<
1125            T0: fidl::encoding::Encode<
1126                fidl::encoding::HandleType<
1127                    fidl::EventPair,
1128                    { fidl::ObjectType::EVENTPAIR.into_raw() },
1129                    2147483648,
1130                >,
1131                fidl::encoding::DefaultFuchsiaResourceDialect,
1132            >,
1133        > fidl::encoding::Encode<ExportToken, fidl::encoding::DefaultFuchsiaResourceDialect>
1134        for (T0,)
1135    {
1136        #[inline]
1137        unsafe fn encode(
1138            self,
1139            encoder: &mut fidl::encoding::Encoder<
1140                '_,
1141                fidl::encoding::DefaultFuchsiaResourceDialect,
1142            >,
1143            offset: usize,
1144            depth: fidl::encoding::Depth,
1145        ) -> fidl::Result<()> {
1146            encoder.debug_check_bounds::<ExportToken>(offset);
1147            // Zero out padding regions. There's no need to apply masks
1148            // because the unmasked parts will be overwritten by fields.
1149            // Write the fields.
1150            self.0.encode(encoder, offset + 0, depth)?;
1151            Ok(())
1152        }
1153    }
1154
1155    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for ExportToken {
1156        #[inline(always)]
1157        fn new_empty() -> Self {
1158            Self {
1159                value: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1160            }
1161        }
1162
1163        #[inline]
1164        unsafe fn decode(
1165            &mut self,
1166            decoder: &mut fidl::encoding::Decoder<
1167                '_,
1168                fidl::encoding::DefaultFuchsiaResourceDialect,
1169            >,
1170            offset: usize,
1171            _depth: fidl::encoding::Depth,
1172        ) -> fidl::Result<()> {
1173            decoder.debug_check_bounds::<Self>(offset);
1174            // Verify that padding bytes are zero.
1175            fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.value, decoder, offset + 0, _depth)?;
1176            Ok(())
1177        }
1178    }
1179
1180    impl fidl::encoding::ResourceTypeMarker for ImageArgs3 {
1181        type Borrowed<'a> = &'a mut Self;
1182        fn take_or_borrow<'a>(
1183            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1184        ) -> Self::Borrowed<'a> {
1185            value
1186        }
1187    }
1188
1189    unsafe impl fidl::encoding::TypeMarker for ImageArgs3 {
1190        type Owned = Self;
1191
1192        #[inline(always)]
1193        fn inline_align(_context: fidl::encoding::Context) -> usize {
1194            4
1195        }
1196
1197        #[inline(always)]
1198        fn inline_size(_context: fidl::encoding::Context) -> usize {
1199            16
1200        }
1201    }
1202
1203    unsafe impl fidl::encoding::Encode<ImageArgs3, fidl::encoding::DefaultFuchsiaResourceDialect>
1204        for &mut ImageArgs3
1205    {
1206        #[inline]
1207        unsafe fn encode(
1208            self,
1209            encoder: &mut fidl::encoding::Encoder<
1210                '_,
1211                fidl::encoding::DefaultFuchsiaResourceDialect,
1212            >,
1213            offset: usize,
1214            _depth: fidl::encoding::Depth,
1215        ) -> fidl::Result<()> {
1216            encoder.debug_check_bounds::<ImageArgs3>(offset);
1217            // Delegate to tuple encoding.
1218            fidl::encoding::Encode::<ImageArgs3, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
1219                (
1220                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.width),
1221                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.height),
1222                    <fidl_fuchsia_ui_composition::BufferCollectionImportToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.import_token),
1223                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.buffer_collection_index),
1224                ),
1225                encoder, offset, _depth
1226            )
1227        }
1228    }
1229    unsafe impl<
1230            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
1231            T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
1232            T2: fidl::encoding::Encode<
1233                fidl_fuchsia_ui_composition::BufferCollectionImportToken,
1234                fidl::encoding::DefaultFuchsiaResourceDialect,
1235            >,
1236            T3: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
1237        > fidl::encoding::Encode<ImageArgs3, fidl::encoding::DefaultFuchsiaResourceDialect>
1238        for (T0, T1, T2, T3)
1239    {
1240        #[inline]
1241        unsafe fn encode(
1242            self,
1243            encoder: &mut fidl::encoding::Encoder<
1244                '_,
1245                fidl::encoding::DefaultFuchsiaResourceDialect,
1246            >,
1247            offset: usize,
1248            depth: fidl::encoding::Depth,
1249        ) -> fidl::Result<()> {
1250            encoder.debug_check_bounds::<ImageArgs3>(offset);
1251            // Zero out padding regions. There's no need to apply masks
1252            // because the unmasked parts will be overwritten by fields.
1253            // Write the fields.
1254            self.0.encode(encoder, offset + 0, depth)?;
1255            self.1.encode(encoder, offset + 4, depth)?;
1256            self.2.encode(encoder, offset + 8, depth)?;
1257            self.3.encode(encoder, offset + 12, depth)?;
1258            Ok(())
1259        }
1260    }
1261
1262    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for ImageArgs3 {
1263        #[inline(always)]
1264        fn new_empty() -> Self {
1265            Self {
1266                width: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
1267                height: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
1268                import_token: fidl::new_empty!(
1269                    fidl_fuchsia_ui_composition::BufferCollectionImportToken,
1270                    fidl::encoding::DefaultFuchsiaResourceDialect
1271                ),
1272                buffer_collection_index: fidl::new_empty!(
1273                    u32,
1274                    fidl::encoding::DefaultFuchsiaResourceDialect
1275                ),
1276            }
1277        }
1278
1279        #[inline]
1280        unsafe fn decode(
1281            &mut self,
1282            decoder: &mut fidl::encoding::Decoder<
1283                '_,
1284                fidl::encoding::DefaultFuchsiaResourceDialect,
1285            >,
1286            offset: usize,
1287            _depth: fidl::encoding::Depth,
1288        ) -> fidl::Result<()> {
1289            decoder.debug_check_bounds::<Self>(offset);
1290            // Verify that padding bytes are zero.
1291            fidl::decode!(
1292                u32,
1293                fidl::encoding::DefaultFuchsiaResourceDialect,
1294                &mut self.width,
1295                decoder,
1296                offset + 0,
1297                _depth
1298            )?;
1299            fidl::decode!(
1300                u32,
1301                fidl::encoding::DefaultFuchsiaResourceDialect,
1302                &mut self.height,
1303                decoder,
1304                offset + 4,
1305                _depth
1306            )?;
1307            fidl::decode!(
1308                fidl_fuchsia_ui_composition::BufferCollectionImportToken,
1309                fidl::encoding::DefaultFuchsiaResourceDialect,
1310                &mut self.import_token,
1311                decoder,
1312                offset + 8,
1313                _depth
1314            )?;
1315            fidl::decode!(
1316                u32,
1317                fidl::encoding::DefaultFuchsiaResourceDialect,
1318                &mut self.buffer_collection_index,
1319                decoder,
1320                offset + 12,
1321                _depth
1322            )?;
1323            Ok(())
1324        }
1325    }
1326
1327    impl fidl::encoding::ResourceTypeMarker for ImagePipe2Args {
1328        type Borrowed<'a> = &'a mut Self;
1329        fn take_or_borrow<'a>(
1330            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1331        ) -> Self::Borrowed<'a> {
1332            value
1333        }
1334    }
1335
1336    unsafe impl fidl::encoding::TypeMarker for ImagePipe2Args {
1337        type Owned = Self;
1338
1339        #[inline(always)]
1340        fn inline_align(_context: fidl::encoding::Context) -> usize {
1341            4
1342        }
1343
1344        #[inline(always)]
1345        fn inline_size(_context: fidl::encoding::Context) -> usize {
1346            4
1347        }
1348    }
1349
1350    unsafe impl
1351        fidl::encoding::Encode<ImagePipe2Args, fidl::encoding::DefaultFuchsiaResourceDialect>
1352        for &mut ImagePipe2Args
1353    {
1354        #[inline]
1355        unsafe fn encode(
1356            self,
1357            encoder: &mut fidl::encoding::Encoder<
1358                '_,
1359                fidl::encoding::DefaultFuchsiaResourceDialect,
1360            >,
1361            offset: usize,
1362            _depth: fidl::encoding::Depth,
1363        ) -> fidl::Result<()> {
1364            encoder.debug_check_bounds::<ImagePipe2Args>(offset);
1365            // Delegate to tuple encoding.
1366            fidl::encoding::Encode::<ImagePipe2Args, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
1367                (
1368                    <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<fidl_fuchsia_images::ImagePipe2Marker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.image_pipe_request),
1369                ),
1370                encoder, offset, _depth
1371            )
1372        }
1373    }
1374    unsafe impl<
1375            T0: fidl::encoding::Encode<
1376                fidl::encoding::Endpoint<
1377                    fidl::endpoints::ServerEnd<fidl_fuchsia_images::ImagePipe2Marker>,
1378                >,
1379                fidl::encoding::DefaultFuchsiaResourceDialect,
1380            >,
1381        > fidl::encoding::Encode<ImagePipe2Args, fidl::encoding::DefaultFuchsiaResourceDialect>
1382        for (T0,)
1383    {
1384        #[inline]
1385        unsafe fn encode(
1386            self,
1387            encoder: &mut fidl::encoding::Encoder<
1388                '_,
1389                fidl::encoding::DefaultFuchsiaResourceDialect,
1390            >,
1391            offset: usize,
1392            depth: fidl::encoding::Depth,
1393        ) -> fidl::Result<()> {
1394            encoder.debug_check_bounds::<ImagePipe2Args>(offset);
1395            // Zero out padding regions. There's no need to apply masks
1396            // because the unmasked parts will be overwritten by fields.
1397            // Write the fields.
1398            self.0.encode(encoder, offset + 0, depth)?;
1399            Ok(())
1400        }
1401    }
1402
1403    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1404        for ImagePipe2Args
1405    {
1406        #[inline(always)]
1407        fn new_empty() -> Self {
1408            Self {
1409                image_pipe_request: fidl::new_empty!(
1410                    fidl::encoding::Endpoint<
1411                        fidl::endpoints::ServerEnd<fidl_fuchsia_images::ImagePipe2Marker>,
1412                    >,
1413                    fidl::encoding::DefaultFuchsiaResourceDialect
1414                ),
1415            }
1416        }
1417
1418        #[inline]
1419        unsafe fn decode(
1420            &mut self,
1421            decoder: &mut fidl::encoding::Decoder<
1422                '_,
1423                fidl::encoding::DefaultFuchsiaResourceDialect,
1424            >,
1425            offset: usize,
1426            _depth: fidl::encoding::Depth,
1427        ) -> fidl::Result<()> {
1428            decoder.debug_check_bounds::<Self>(offset);
1429            // Verify that padding bytes are zero.
1430            fidl::decode!(
1431                fidl::encoding::Endpoint<
1432                    fidl::endpoints::ServerEnd<fidl_fuchsia_images::ImagePipe2Marker>,
1433                >,
1434                fidl::encoding::DefaultFuchsiaResourceDialect,
1435                &mut self.image_pipe_request,
1436                decoder,
1437                offset + 0,
1438                _depth
1439            )?;
1440            Ok(())
1441        }
1442    }
1443
1444    impl fidl::encoding::ResourceTypeMarker for ImportResourceCmdDeprecated {
1445        type Borrowed<'a> = &'a mut Self;
1446        fn take_or_borrow<'a>(
1447            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1448        ) -> Self::Borrowed<'a> {
1449            value
1450        }
1451    }
1452
1453    unsafe impl fidl::encoding::TypeMarker for ImportResourceCmdDeprecated {
1454        type Owned = Self;
1455
1456        #[inline(always)]
1457        fn inline_align(_context: fidl::encoding::Context) -> usize {
1458            4
1459        }
1460
1461        #[inline(always)]
1462        fn inline_size(_context: fidl::encoding::Context) -> usize {
1463            12
1464        }
1465    }
1466
1467    unsafe impl
1468        fidl::encoding::Encode<
1469            ImportResourceCmdDeprecated,
1470            fidl::encoding::DefaultFuchsiaResourceDialect,
1471        > for &mut ImportResourceCmdDeprecated
1472    {
1473        #[inline]
1474        unsafe fn encode(
1475            self,
1476            encoder: &mut fidl::encoding::Encoder<
1477                '_,
1478                fidl::encoding::DefaultFuchsiaResourceDialect,
1479            >,
1480            offset: usize,
1481            _depth: fidl::encoding::Depth,
1482        ) -> fidl::Result<()> {
1483            encoder.debug_check_bounds::<ImportResourceCmdDeprecated>(offset);
1484            // Delegate to tuple encoding.
1485            fidl::encoding::Encode::<
1486                ImportResourceCmdDeprecated,
1487                fidl::encoding::DefaultFuchsiaResourceDialect,
1488            >::encode(
1489                (
1490                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
1491                    <fidl::encoding::HandleType<
1492                        fidl::EventPair,
1493                        { fidl::ObjectType::EVENTPAIR.into_raw() },
1494                        2147483648,
1495                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1496                        &mut self.token
1497                    ),
1498                    <ImportSpec as fidl::encoding::ValueTypeMarker>::borrow(&self.spec),
1499                ),
1500                encoder,
1501                offset,
1502                _depth,
1503            )
1504        }
1505    }
1506    unsafe impl<
1507            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
1508            T1: fidl::encoding::Encode<
1509                fidl::encoding::HandleType<
1510                    fidl::EventPair,
1511                    { fidl::ObjectType::EVENTPAIR.into_raw() },
1512                    2147483648,
1513                >,
1514                fidl::encoding::DefaultFuchsiaResourceDialect,
1515            >,
1516            T2: fidl::encoding::Encode<ImportSpec, fidl::encoding::DefaultFuchsiaResourceDialect>,
1517        >
1518        fidl::encoding::Encode<
1519            ImportResourceCmdDeprecated,
1520            fidl::encoding::DefaultFuchsiaResourceDialect,
1521        > for (T0, T1, T2)
1522    {
1523        #[inline]
1524        unsafe fn encode(
1525            self,
1526            encoder: &mut fidl::encoding::Encoder<
1527                '_,
1528                fidl::encoding::DefaultFuchsiaResourceDialect,
1529            >,
1530            offset: usize,
1531            depth: fidl::encoding::Depth,
1532        ) -> fidl::Result<()> {
1533            encoder.debug_check_bounds::<ImportResourceCmdDeprecated>(offset);
1534            // Zero out padding regions. There's no need to apply masks
1535            // because the unmasked parts will be overwritten by fields.
1536            // Write the fields.
1537            self.0.encode(encoder, offset + 0, depth)?;
1538            self.1.encode(encoder, offset + 4, depth)?;
1539            self.2.encode(encoder, offset + 8, depth)?;
1540            Ok(())
1541        }
1542    }
1543
1544    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1545        for ImportResourceCmdDeprecated
1546    {
1547        #[inline(always)]
1548        fn new_empty() -> Self {
1549            Self {
1550                id: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
1551                token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1552                spec: fidl::new_empty!(ImportSpec, fidl::encoding::DefaultFuchsiaResourceDialect),
1553            }
1554        }
1555
1556        #[inline]
1557        unsafe fn decode(
1558            &mut self,
1559            decoder: &mut fidl::encoding::Decoder<
1560                '_,
1561                fidl::encoding::DefaultFuchsiaResourceDialect,
1562            >,
1563            offset: usize,
1564            _depth: fidl::encoding::Depth,
1565        ) -> fidl::Result<()> {
1566            decoder.debug_check_bounds::<Self>(offset);
1567            // Verify that padding bytes are zero.
1568            fidl::decode!(
1569                u32,
1570                fidl::encoding::DefaultFuchsiaResourceDialect,
1571                &mut self.id,
1572                decoder,
1573                offset + 0,
1574                _depth
1575            )?;
1576            fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 4, _depth)?;
1577            fidl::decode!(
1578                ImportSpec,
1579                fidl::encoding::DefaultFuchsiaResourceDialect,
1580                &mut self.spec,
1581                decoder,
1582                offset + 8,
1583                _depth
1584            )?;
1585            Ok(())
1586        }
1587    }
1588
1589    impl fidl::encoding::ResourceTypeMarker for ImportToken {
1590        type Borrowed<'a> = &'a mut Self;
1591        fn take_or_borrow<'a>(
1592            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1593        ) -> Self::Borrowed<'a> {
1594            value
1595        }
1596    }
1597
1598    unsafe impl fidl::encoding::TypeMarker for ImportToken {
1599        type Owned = Self;
1600
1601        #[inline(always)]
1602        fn inline_align(_context: fidl::encoding::Context) -> usize {
1603            4
1604        }
1605
1606        #[inline(always)]
1607        fn inline_size(_context: fidl::encoding::Context) -> usize {
1608            4
1609        }
1610    }
1611
1612    unsafe impl fidl::encoding::Encode<ImportToken, fidl::encoding::DefaultFuchsiaResourceDialect>
1613        for &mut ImportToken
1614    {
1615        #[inline]
1616        unsafe fn encode(
1617            self,
1618            encoder: &mut fidl::encoding::Encoder<
1619                '_,
1620                fidl::encoding::DefaultFuchsiaResourceDialect,
1621            >,
1622            offset: usize,
1623            _depth: fidl::encoding::Depth,
1624        ) -> fidl::Result<()> {
1625            encoder.debug_check_bounds::<ImportToken>(offset);
1626            // Delegate to tuple encoding.
1627            fidl::encoding::Encode::<ImportToken, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
1628                (
1629                    <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.value),
1630                ),
1631                encoder, offset, _depth
1632            )
1633        }
1634    }
1635    unsafe impl<
1636            T0: fidl::encoding::Encode<
1637                fidl::encoding::HandleType<
1638                    fidl::EventPair,
1639                    { fidl::ObjectType::EVENTPAIR.into_raw() },
1640                    2147483648,
1641                >,
1642                fidl::encoding::DefaultFuchsiaResourceDialect,
1643            >,
1644        > fidl::encoding::Encode<ImportToken, fidl::encoding::DefaultFuchsiaResourceDialect>
1645        for (T0,)
1646    {
1647        #[inline]
1648        unsafe fn encode(
1649            self,
1650            encoder: &mut fidl::encoding::Encoder<
1651                '_,
1652                fidl::encoding::DefaultFuchsiaResourceDialect,
1653            >,
1654            offset: usize,
1655            depth: fidl::encoding::Depth,
1656        ) -> fidl::Result<()> {
1657            encoder.debug_check_bounds::<ImportToken>(offset);
1658            // Zero out padding regions. There's no need to apply masks
1659            // because the unmasked parts will be overwritten by fields.
1660            // Write the fields.
1661            self.0.encode(encoder, offset + 0, depth)?;
1662            Ok(())
1663        }
1664    }
1665
1666    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for ImportToken {
1667        #[inline(always)]
1668        fn new_empty() -> Self {
1669            Self {
1670                value: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1671            }
1672        }
1673
1674        #[inline]
1675        unsafe fn decode(
1676            &mut self,
1677            decoder: &mut fidl::encoding::Decoder<
1678                '_,
1679                fidl::encoding::DefaultFuchsiaResourceDialect,
1680            >,
1681            offset: usize,
1682            _depth: fidl::encoding::Depth,
1683        ) -> fidl::Result<()> {
1684            decoder.debug_check_bounds::<Self>(offset);
1685            // Verify that padding bytes are zero.
1686            fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.value, decoder, offset + 0, _depth)?;
1687            Ok(())
1688        }
1689    }
1690
1691    impl fidl::encoding::ResourceTypeMarker for MemoryArgs {
1692        type Borrowed<'a> = &'a mut Self;
1693        fn take_or_borrow<'a>(
1694            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1695        ) -> Self::Borrowed<'a> {
1696            value
1697        }
1698    }
1699
1700    unsafe impl fidl::encoding::TypeMarker for MemoryArgs {
1701        type Owned = Self;
1702
1703        #[inline(always)]
1704        fn inline_align(_context: fidl::encoding::Context) -> usize {
1705            8
1706        }
1707
1708        #[inline(always)]
1709        fn inline_size(_context: fidl::encoding::Context) -> usize {
1710            24
1711        }
1712    }
1713
1714    unsafe impl fidl::encoding::Encode<MemoryArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
1715        for &mut MemoryArgs
1716    {
1717        #[inline]
1718        unsafe fn encode(
1719            self,
1720            encoder: &mut fidl::encoding::Encoder<
1721                '_,
1722                fidl::encoding::DefaultFuchsiaResourceDialect,
1723            >,
1724            offset: usize,
1725            _depth: fidl::encoding::Depth,
1726        ) -> fidl::Result<()> {
1727            encoder.debug_check_bounds::<MemoryArgs>(offset);
1728            // Delegate to tuple encoding.
1729            fidl::encoding::Encode::<MemoryArgs, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
1730                (
1731                    <fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.vmo),
1732                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.allocation_size),
1733                    <fidl_fuchsia_images::MemoryType as fidl::encoding::ValueTypeMarker>::borrow(&self.memory_type),
1734                ),
1735                encoder, offset, _depth
1736            )
1737        }
1738    }
1739    unsafe impl<
1740            T0: fidl::encoding::Encode<
1741                fidl::encoding::HandleType<
1742                    fidl::Vmo,
1743                    { fidl::ObjectType::VMO.into_raw() },
1744                    2147483648,
1745                >,
1746                fidl::encoding::DefaultFuchsiaResourceDialect,
1747            >,
1748            T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
1749            T2: fidl::encoding::Encode<
1750                fidl_fuchsia_images::MemoryType,
1751                fidl::encoding::DefaultFuchsiaResourceDialect,
1752            >,
1753        > fidl::encoding::Encode<MemoryArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
1754        for (T0, T1, T2)
1755    {
1756        #[inline]
1757        unsafe fn encode(
1758            self,
1759            encoder: &mut fidl::encoding::Encoder<
1760                '_,
1761                fidl::encoding::DefaultFuchsiaResourceDialect,
1762            >,
1763            offset: usize,
1764            depth: fidl::encoding::Depth,
1765        ) -> fidl::Result<()> {
1766            encoder.debug_check_bounds::<MemoryArgs>(offset);
1767            // Zero out padding regions. There's no need to apply masks
1768            // because the unmasked parts will be overwritten by fields.
1769            unsafe {
1770                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
1771                (ptr as *mut u64).write_unaligned(0);
1772            }
1773            unsafe {
1774                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
1775                (ptr as *mut u64).write_unaligned(0);
1776            }
1777            // Write the fields.
1778            self.0.encode(encoder, offset + 0, depth)?;
1779            self.1.encode(encoder, offset + 8, depth)?;
1780            self.2.encode(encoder, offset + 16, depth)?;
1781            Ok(())
1782        }
1783    }
1784
1785    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for MemoryArgs {
1786        #[inline(always)]
1787        fn new_empty() -> Self {
1788            Self {
1789                vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
1790                allocation_size: fidl::new_empty!(
1791                    u64,
1792                    fidl::encoding::DefaultFuchsiaResourceDialect
1793                ),
1794                memory_type: fidl::new_empty!(
1795                    fidl_fuchsia_images::MemoryType,
1796                    fidl::encoding::DefaultFuchsiaResourceDialect
1797                ),
1798            }
1799        }
1800
1801        #[inline]
1802        unsafe fn decode(
1803            &mut self,
1804            decoder: &mut fidl::encoding::Decoder<
1805                '_,
1806                fidl::encoding::DefaultFuchsiaResourceDialect,
1807            >,
1808            offset: usize,
1809            _depth: fidl::encoding::Depth,
1810        ) -> fidl::Result<()> {
1811            decoder.debug_check_bounds::<Self>(offset);
1812            // Verify that padding bytes are zero.
1813            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
1814            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1815            let mask = 0xffffffff00000000u64;
1816            let maskedval = padval & mask;
1817            if maskedval != 0 {
1818                return Err(fidl::Error::NonZeroPadding {
1819                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
1820                });
1821            }
1822            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
1823            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1824            let mask = 0xffffffff00000000u64;
1825            let maskedval = padval & mask;
1826            if maskedval != 0 {
1827                return Err(fidl::Error::NonZeroPadding {
1828                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
1829                });
1830            }
1831            fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
1832            fidl::decode!(
1833                u64,
1834                fidl::encoding::DefaultFuchsiaResourceDialect,
1835                &mut self.allocation_size,
1836                decoder,
1837                offset + 8,
1838                _depth
1839            )?;
1840            fidl::decode!(
1841                fidl_fuchsia_images::MemoryType,
1842                fidl::encoding::DefaultFuchsiaResourceDialect,
1843                &mut self.memory_type,
1844                decoder,
1845                offset + 16,
1846                _depth
1847            )?;
1848            Ok(())
1849        }
1850    }
1851
1852    impl fidl::encoding::ResourceTypeMarker for SnapshotCallbackDeprecatedOnDataRequest {
1853        type Borrowed<'a> = &'a mut Self;
1854        fn take_or_borrow<'a>(
1855            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1856        ) -> Self::Borrowed<'a> {
1857            value
1858        }
1859    }
1860
1861    unsafe impl fidl::encoding::TypeMarker for SnapshotCallbackDeprecatedOnDataRequest {
1862        type Owned = Self;
1863
1864        #[inline(always)]
1865        fn inline_align(_context: fidl::encoding::Context) -> usize {
1866            8
1867        }
1868
1869        #[inline(always)]
1870        fn inline_size(_context: fidl::encoding::Context) -> usize {
1871            16
1872        }
1873    }
1874
1875    unsafe impl
1876        fidl::encoding::Encode<
1877            SnapshotCallbackDeprecatedOnDataRequest,
1878            fidl::encoding::DefaultFuchsiaResourceDialect,
1879        > for &mut SnapshotCallbackDeprecatedOnDataRequest
1880    {
1881        #[inline]
1882        unsafe fn encode(
1883            self,
1884            encoder: &mut fidl::encoding::Encoder<
1885                '_,
1886                fidl::encoding::DefaultFuchsiaResourceDialect,
1887            >,
1888            offset: usize,
1889            _depth: fidl::encoding::Depth,
1890        ) -> fidl::Result<()> {
1891            encoder.debug_check_bounds::<SnapshotCallbackDeprecatedOnDataRequest>(offset);
1892            // Delegate to tuple encoding.
1893            fidl::encoding::Encode::<
1894                SnapshotCallbackDeprecatedOnDataRequest,
1895                fidl::encoding::DefaultFuchsiaResourceDialect,
1896            >::encode(
1897                (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1898                    &mut self.data,
1899                ),),
1900                encoder,
1901                offset,
1902                _depth,
1903            )
1904        }
1905    }
1906    unsafe impl<
1907            T0: fidl::encoding::Encode<
1908                fidl_fuchsia_mem::Buffer,
1909                fidl::encoding::DefaultFuchsiaResourceDialect,
1910            >,
1911        >
1912        fidl::encoding::Encode<
1913            SnapshotCallbackDeprecatedOnDataRequest,
1914            fidl::encoding::DefaultFuchsiaResourceDialect,
1915        > for (T0,)
1916    {
1917        #[inline]
1918        unsafe fn encode(
1919            self,
1920            encoder: &mut fidl::encoding::Encoder<
1921                '_,
1922                fidl::encoding::DefaultFuchsiaResourceDialect,
1923            >,
1924            offset: usize,
1925            depth: fidl::encoding::Depth,
1926        ) -> fidl::Result<()> {
1927            encoder.debug_check_bounds::<SnapshotCallbackDeprecatedOnDataRequest>(offset);
1928            // Zero out padding regions. There's no need to apply masks
1929            // because the unmasked parts will be overwritten by fields.
1930            // Write the fields.
1931            self.0.encode(encoder, offset + 0, depth)?;
1932            Ok(())
1933        }
1934    }
1935
1936    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1937        for SnapshotCallbackDeprecatedOnDataRequest
1938    {
1939        #[inline(always)]
1940        fn new_empty() -> Self {
1941            Self {
1942                data: fidl::new_empty!(
1943                    fidl_fuchsia_mem::Buffer,
1944                    fidl::encoding::DefaultFuchsiaResourceDialect
1945                ),
1946            }
1947        }
1948
1949        #[inline]
1950        unsafe fn decode(
1951            &mut self,
1952            decoder: &mut fidl::encoding::Decoder<
1953                '_,
1954                fidl::encoding::DefaultFuchsiaResourceDialect,
1955            >,
1956            offset: usize,
1957            _depth: fidl::encoding::Depth,
1958        ) -> fidl::Result<()> {
1959            decoder.debug_check_bounds::<Self>(offset);
1960            // Verify that padding bytes are zero.
1961            fidl::decode!(
1962                fidl_fuchsia_mem::Buffer,
1963                fidl::encoding::DefaultFuchsiaResourceDialect,
1964                &mut self.data,
1965                decoder,
1966                offset + 0,
1967                _depth
1968            )?;
1969            Ok(())
1970        }
1971    }
1972
1973    impl fidl::encoding::ResourceTypeMarker for TakeSnapshotCmdDeprecated {
1974        type Borrowed<'a> = &'a mut Self;
1975        fn take_or_borrow<'a>(
1976            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1977        ) -> Self::Borrowed<'a> {
1978            value
1979        }
1980    }
1981
1982    unsafe impl fidl::encoding::TypeMarker for TakeSnapshotCmdDeprecated {
1983        type Owned = Self;
1984
1985        #[inline(always)]
1986        fn inline_align(_context: fidl::encoding::Context) -> usize {
1987            4
1988        }
1989
1990        #[inline(always)]
1991        fn inline_size(_context: fidl::encoding::Context) -> usize {
1992            8
1993        }
1994    }
1995
1996    unsafe impl
1997        fidl::encoding::Encode<
1998            TakeSnapshotCmdDeprecated,
1999            fidl::encoding::DefaultFuchsiaResourceDialect,
2000        > for &mut TakeSnapshotCmdDeprecated
2001    {
2002        #[inline]
2003        unsafe fn encode(
2004            self,
2005            encoder: &mut fidl::encoding::Encoder<
2006                '_,
2007                fidl::encoding::DefaultFuchsiaResourceDialect,
2008            >,
2009            offset: usize,
2010            _depth: fidl::encoding::Depth,
2011        ) -> fidl::Result<()> {
2012            encoder.debug_check_bounds::<TakeSnapshotCmdDeprecated>(offset);
2013            // Delegate to tuple encoding.
2014            fidl::encoding::Encode::<
2015                TakeSnapshotCmdDeprecated,
2016                fidl::encoding::DefaultFuchsiaResourceDialect,
2017            >::encode(
2018                (
2019                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.node_id),
2020                    <fidl::encoding::Endpoint<
2021                        fidl::endpoints::ClientEnd<SnapshotCallbackDeprecatedMarker>,
2022                    > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2023                        &mut self.callback
2024                    ),
2025                ),
2026                encoder,
2027                offset,
2028                _depth,
2029            )
2030        }
2031    }
2032    unsafe impl<
2033            T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
2034            T1: fidl::encoding::Encode<
2035                fidl::encoding::Endpoint<
2036                    fidl::endpoints::ClientEnd<SnapshotCallbackDeprecatedMarker>,
2037                >,
2038                fidl::encoding::DefaultFuchsiaResourceDialect,
2039            >,
2040        >
2041        fidl::encoding::Encode<
2042            TakeSnapshotCmdDeprecated,
2043            fidl::encoding::DefaultFuchsiaResourceDialect,
2044        > for (T0, T1)
2045    {
2046        #[inline]
2047        unsafe fn encode(
2048            self,
2049            encoder: &mut fidl::encoding::Encoder<
2050                '_,
2051                fidl::encoding::DefaultFuchsiaResourceDialect,
2052            >,
2053            offset: usize,
2054            depth: fidl::encoding::Depth,
2055        ) -> fidl::Result<()> {
2056            encoder.debug_check_bounds::<TakeSnapshotCmdDeprecated>(offset);
2057            // Zero out padding regions. There's no need to apply masks
2058            // because the unmasked parts will be overwritten by fields.
2059            // Write the fields.
2060            self.0.encode(encoder, offset + 0, depth)?;
2061            self.1.encode(encoder, offset + 4, depth)?;
2062            Ok(())
2063        }
2064    }
2065
2066    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2067        for TakeSnapshotCmdDeprecated
2068    {
2069        #[inline(always)]
2070        fn new_empty() -> Self {
2071            Self {
2072                node_id: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
2073                callback: fidl::new_empty!(
2074                    fidl::encoding::Endpoint<
2075                        fidl::endpoints::ClientEnd<SnapshotCallbackDeprecatedMarker>,
2076                    >,
2077                    fidl::encoding::DefaultFuchsiaResourceDialect
2078                ),
2079            }
2080        }
2081
2082        #[inline]
2083        unsafe fn decode(
2084            &mut self,
2085            decoder: &mut fidl::encoding::Decoder<
2086                '_,
2087                fidl::encoding::DefaultFuchsiaResourceDialect,
2088            >,
2089            offset: usize,
2090            _depth: fidl::encoding::Depth,
2091        ) -> fidl::Result<()> {
2092            decoder.debug_check_bounds::<Self>(offset);
2093            // Verify that padding bytes are zero.
2094            fidl::decode!(
2095                u32,
2096                fidl::encoding::DefaultFuchsiaResourceDialect,
2097                &mut self.node_id,
2098                decoder,
2099                offset + 0,
2100                _depth
2101            )?;
2102            fidl::decode!(
2103                fidl::encoding::Endpoint<
2104                    fidl::endpoints::ClientEnd<SnapshotCallbackDeprecatedMarker>,
2105                >,
2106                fidl::encoding::DefaultFuchsiaResourceDialect,
2107                &mut self.callback,
2108                decoder,
2109                offset + 4,
2110                _depth
2111            )?;
2112            Ok(())
2113        }
2114    }
2115
2116    impl fidl::encoding::ResourceTypeMarker for ViewArgs {
2117        type Borrowed<'a> = &'a mut Self;
2118        fn take_or_borrow<'a>(
2119            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2120        ) -> Self::Borrowed<'a> {
2121            value
2122        }
2123    }
2124
2125    unsafe impl fidl::encoding::TypeMarker for ViewArgs {
2126        type Owned = Self;
2127
2128        #[inline(always)]
2129        fn inline_align(_context: fidl::encoding::Context) -> usize {
2130            8
2131        }
2132
2133        #[inline(always)]
2134        fn inline_size(_context: fidl::encoding::Context) -> usize {
2135            24
2136        }
2137    }
2138
2139    unsafe impl fidl::encoding::Encode<ViewArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
2140        for &mut ViewArgs
2141    {
2142        #[inline]
2143        unsafe fn encode(
2144            self,
2145            encoder: &mut fidl::encoding::Encoder<
2146                '_,
2147                fidl::encoding::DefaultFuchsiaResourceDialect,
2148            >,
2149            offset: usize,
2150            _depth: fidl::encoding::Depth,
2151        ) -> fidl::Result<()> {
2152            encoder.debug_check_bounds::<ViewArgs>(offset);
2153            // Delegate to tuple encoding.
2154            fidl::encoding::Encode::<ViewArgs, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2155                (
2156                    <fidl_fuchsia_ui_views::ViewToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
2157                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.debug_name),
2158                ),
2159                encoder, offset, _depth
2160            )
2161        }
2162    }
2163    unsafe impl<
2164            T0: fidl::encoding::Encode<
2165                fidl_fuchsia_ui_views::ViewToken,
2166                fidl::encoding::DefaultFuchsiaResourceDialect,
2167            >,
2168            T1: fidl::encoding::Encode<
2169                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
2170                fidl::encoding::DefaultFuchsiaResourceDialect,
2171            >,
2172        > fidl::encoding::Encode<ViewArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
2173        for (T0, T1)
2174    {
2175        #[inline]
2176        unsafe fn encode(
2177            self,
2178            encoder: &mut fidl::encoding::Encoder<
2179                '_,
2180                fidl::encoding::DefaultFuchsiaResourceDialect,
2181            >,
2182            offset: usize,
2183            depth: fidl::encoding::Depth,
2184        ) -> fidl::Result<()> {
2185            encoder.debug_check_bounds::<ViewArgs>(offset);
2186            // Zero out padding regions. There's no need to apply masks
2187            // because the unmasked parts will be overwritten by fields.
2188            unsafe {
2189                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2190                (ptr as *mut u64).write_unaligned(0);
2191            }
2192            // Write the fields.
2193            self.0.encode(encoder, offset + 0, depth)?;
2194            self.1.encode(encoder, offset + 8, depth)?;
2195            Ok(())
2196        }
2197    }
2198
2199    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for ViewArgs {
2200        #[inline(always)]
2201        fn new_empty() -> Self {
2202            Self {
2203                token: fidl::new_empty!(
2204                    fidl_fuchsia_ui_views::ViewToken,
2205                    fidl::encoding::DefaultFuchsiaResourceDialect
2206                ),
2207                debug_name: fidl::new_empty!(
2208                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
2209                    fidl::encoding::DefaultFuchsiaResourceDialect
2210                ),
2211            }
2212        }
2213
2214        #[inline]
2215        unsafe fn decode(
2216            &mut self,
2217            decoder: &mut fidl::encoding::Decoder<
2218                '_,
2219                fidl::encoding::DefaultFuchsiaResourceDialect,
2220            >,
2221            offset: usize,
2222            _depth: fidl::encoding::Depth,
2223        ) -> fidl::Result<()> {
2224            decoder.debug_check_bounds::<Self>(offset);
2225            // Verify that padding bytes are zero.
2226            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2227            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2228            let mask = 0xffffffff00000000u64;
2229            let maskedval = padval & mask;
2230            if maskedval != 0 {
2231                return Err(fidl::Error::NonZeroPadding {
2232                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2233                });
2234            }
2235            fidl::decode!(
2236                fidl_fuchsia_ui_views::ViewToken,
2237                fidl::encoding::DefaultFuchsiaResourceDialect,
2238                &mut self.token,
2239                decoder,
2240                offset + 0,
2241                _depth
2242            )?;
2243            fidl::decode!(
2244                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
2245                fidl::encoding::DefaultFuchsiaResourceDialect,
2246                &mut self.debug_name,
2247                decoder,
2248                offset + 8,
2249                _depth
2250            )?;
2251            Ok(())
2252        }
2253    }
2254
2255    impl fidl::encoding::ResourceTypeMarker for ViewArgs3 {
2256        type Borrowed<'a> = &'a mut Self;
2257        fn take_or_borrow<'a>(
2258            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2259        ) -> Self::Borrowed<'a> {
2260            value
2261        }
2262    }
2263
2264    unsafe impl fidl::encoding::TypeMarker for ViewArgs3 {
2265        type Owned = Self;
2266
2267        #[inline(always)]
2268        fn inline_align(_context: fidl::encoding::Context) -> usize {
2269            8
2270        }
2271
2272        #[inline(always)]
2273        fn inline_size(_context: fidl::encoding::Context) -> usize {
2274            32
2275        }
2276    }
2277
2278    unsafe impl fidl::encoding::Encode<ViewArgs3, fidl::encoding::DefaultFuchsiaResourceDialect>
2279        for &mut ViewArgs3
2280    {
2281        #[inline]
2282        unsafe fn encode(
2283            self,
2284            encoder: &mut fidl::encoding::Encoder<
2285                '_,
2286                fidl::encoding::DefaultFuchsiaResourceDialect,
2287            >,
2288            offset: usize,
2289            _depth: fidl::encoding::Depth,
2290        ) -> fidl::Result<()> {
2291            encoder.debug_check_bounds::<ViewArgs3>(offset);
2292            // Delegate to tuple encoding.
2293            fidl::encoding::Encode::<ViewArgs3, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2294                (
2295                    <fidl_fuchsia_ui_views::ViewToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
2296                    <fidl_fuchsia_ui_views::ViewRefControl as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.control_ref),
2297                    <fidl_fuchsia_ui_views::ViewRef as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.view_ref),
2298                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.debug_name),
2299                ),
2300                encoder, offset, _depth
2301            )
2302        }
2303    }
2304    unsafe impl<
2305            T0: fidl::encoding::Encode<
2306                fidl_fuchsia_ui_views::ViewToken,
2307                fidl::encoding::DefaultFuchsiaResourceDialect,
2308            >,
2309            T1: fidl::encoding::Encode<
2310                fidl_fuchsia_ui_views::ViewRefControl,
2311                fidl::encoding::DefaultFuchsiaResourceDialect,
2312            >,
2313            T2: fidl::encoding::Encode<
2314                fidl_fuchsia_ui_views::ViewRef,
2315                fidl::encoding::DefaultFuchsiaResourceDialect,
2316            >,
2317            T3: fidl::encoding::Encode<
2318                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
2319                fidl::encoding::DefaultFuchsiaResourceDialect,
2320            >,
2321        > fidl::encoding::Encode<ViewArgs3, fidl::encoding::DefaultFuchsiaResourceDialect>
2322        for (T0, T1, T2, T3)
2323    {
2324        #[inline]
2325        unsafe fn encode(
2326            self,
2327            encoder: &mut fidl::encoding::Encoder<
2328                '_,
2329                fidl::encoding::DefaultFuchsiaResourceDialect,
2330            >,
2331            offset: usize,
2332            depth: fidl::encoding::Depth,
2333        ) -> fidl::Result<()> {
2334            encoder.debug_check_bounds::<ViewArgs3>(offset);
2335            // Zero out padding regions. There's no need to apply masks
2336            // because the unmasked parts will be overwritten by fields.
2337            unsafe {
2338                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
2339                (ptr as *mut u64).write_unaligned(0);
2340            }
2341            // Write the fields.
2342            self.0.encode(encoder, offset + 0, depth)?;
2343            self.1.encode(encoder, offset + 4, depth)?;
2344            self.2.encode(encoder, offset + 8, depth)?;
2345            self.3.encode(encoder, offset + 16, depth)?;
2346            Ok(())
2347        }
2348    }
2349
2350    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for ViewArgs3 {
2351        #[inline(always)]
2352        fn new_empty() -> Self {
2353            Self {
2354                token: fidl::new_empty!(
2355                    fidl_fuchsia_ui_views::ViewToken,
2356                    fidl::encoding::DefaultFuchsiaResourceDialect
2357                ),
2358                control_ref: fidl::new_empty!(
2359                    fidl_fuchsia_ui_views::ViewRefControl,
2360                    fidl::encoding::DefaultFuchsiaResourceDialect
2361                ),
2362                view_ref: fidl::new_empty!(
2363                    fidl_fuchsia_ui_views::ViewRef,
2364                    fidl::encoding::DefaultFuchsiaResourceDialect
2365                ),
2366                debug_name: fidl::new_empty!(
2367                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
2368                    fidl::encoding::DefaultFuchsiaResourceDialect
2369                ),
2370            }
2371        }
2372
2373        #[inline]
2374        unsafe fn decode(
2375            &mut self,
2376            decoder: &mut fidl::encoding::Decoder<
2377                '_,
2378                fidl::encoding::DefaultFuchsiaResourceDialect,
2379            >,
2380            offset: usize,
2381            _depth: fidl::encoding::Depth,
2382        ) -> fidl::Result<()> {
2383            decoder.debug_check_bounds::<Self>(offset);
2384            // Verify that padding bytes are zero.
2385            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
2386            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2387            let mask = 0xffffffff00000000u64;
2388            let maskedval = padval & mask;
2389            if maskedval != 0 {
2390                return Err(fidl::Error::NonZeroPadding {
2391                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
2392                });
2393            }
2394            fidl::decode!(
2395                fidl_fuchsia_ui_views::ViewToken,
2396                fidl::encoding::DefaultFuchsiaResourceDialect,
2397                &mut self.token,
2398                decoder,
2399                offset + 0,
2400                _depth
2401            )?;
2402            fidl::decode!(
2403                fidl_fuchsia_ui_views::ViewRefControl,
2404                fidl::encoding::DefaultFuchsiaResourceDialect,
2405                &mut self.control_ref,
2406                decoder,
2407                offset + 4,
2408                _depth
2409            )?;
2410            fidl::decode!(
2411                fidl_fuchsia_ui_views::ViewRef,
2412                fidl::encoding::DefaultFuchsiaResourceDialect,
2413                &mut self.view_ref,
2414                decoder,
2415                offset + 8,
2416                _depth
2417            )?;
2418            fidl::decode!(
2419                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
2420                fidl::encoding::DefaultFuchsiaResourceDialect,
2421                &mut self.debug_name,
2422                decoder,
2423                offset + 16,
2424                _depth
2425            )?;
2426            Ok(())
2427        }
2428    }
2429
2430    impl fidl::encoding::ResourceTypeMarker for ViewHolderArgs {
2431        type Borrowed<'a> = &'a mut Self;
2432        fn take_or_borrow<'a>(
2433            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2434        ) -> Self::Borrowed<'a> {
2435            value
2436        }
2437    }
2438
2439    unsafe impl fidl::encoding::TypeMarker for ViewHolderArgs {
2440        type Owned = Self;
2441
2442        #[inline(always)]
2443        fn inline_align(_context: fidl::encoding::Context) -> usize {
2444            8
2445        }
2446
2447        #[inline(always)]
2448        fn inline_size(_context: fidl::encoding::Context) -> usize {
2449            24
2450        }
2451    }
2452
2453    unsafe impl
2454        fidl::encoding::Encode<ViewHolderArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
2455        for &mut ViewHolderArgs
2456    {
2457        #[inline]
2458        unsafe fn encode(
2459            self,
2460            encoder: &mut fidl::encoding::Encoder<
2461                '_,
2462                fidl::encoding::DefaultFuchsiaResourceDialect,
2463            >,
2464            offset: usize,
2465            _depth: fidl::encoding::Depth,
2466        ) -> fidl::Result<()> {
2467            encoder.debug_check_bounds::<ViewHolderArgs>(offset);
2468            // Delegate to tuple encoding.
2469            fidl::encoding::Encode::<ViewHolderArgs, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2470                (
2471                    <fidl_fuchsia_ui_views::ViewHolderToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
2472                    <fidl::encoding::Optional<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.debug_name),
2473                ),
2474                encoder, offset, _depth
2475            )
2476        }
2477    }
2478    unsafe impl<
2479            T0: fidl::encoding::Encode<
2480                fidl_fuchsia_ui_views::ViewHolderToken,
2481                fidl::encoding::DefaultFuchsiaResourceDialect,
2482            >,
2483            T1: fidl::encoding::Encode<
2484                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
2485                fidl::encoding::DefaultFuchsiaResourceDialect,
2486            >,
2487        > fidl::encoding::Encode<ViewHolderArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
2488        for (T0, T1)
2489    {
2490        #[inline]
2491        unsafe fn encode(
2492            self,
2493            encoder: &mut fidl::encoding::Encoder<
2494                '_,
2495                fidl::encoding::DefaultFuchsiaResourceDialect,
2496            >,
2497            offset: usize,
2498            depth: fidl::encoding::Depth,
2499        ) -> fidl::Result<()> {
2500            encoder.debug_check_bounds::<ViewHolderArgs>(offset);
2501            // Zero out padding regions. There's no need to apply masks
2502            // because the unmasked parts will be overwritten by fields.
2503            unsafe {
2504                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
2505                (ptr as *mut u64).write_unaligned(0);
2506            }
2507            // Write the fields.
2508            self.0.encode(encoder, offset + 0, depth)?;
2509            self.1.encode(encoder, offset + 8, depth)?;
2510            Ok(())
2511        }
2512    }
2513
2514    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2515        for ViewHolderArgs
2516    {
2517        #[inline(always)]
2518        fn new_empty() -> Self {
2519            Self {
2520                token: fidl::new_empty!(
2521                    fidl_fuchsia_ui_views::ViewHolderToken,
2522                    fidl::encoding::DefaultFuchsiaResourceDialect
2523                ),
2524                debug_name: fidl::new_empty!(
2525                    fidl::encoding::Optional<fidl::encoding::UnboundedString>,
2526                    fidl::encoding::DefaultFuchsiaResourceDialect
2527                ),
2528            }
2529        }
2530
2531        #[inline]
2532        unsafe fn decode(
2533            &mut self,
2534            decoder: &mut fidl::encoding::Decoder<
2535                '_,
2536                fidl::encoding::DefaultFuchsiaResourceDialect,
2537            >,
2538            offset: usize,
2539            _depth: fidl::encoding::Depth,
2540        ) -> fidl::Result<()> {
2541            decoder.debug_check_bounds::<Self>(offset);
2542            // Verify that padding bytes are zero.
2543            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
2544            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2545            let mask = 0xffffffff00000000u64;
2546            let maskedval = padval & mask;
2547            if maskedval != 0 {
2548                return Err(fidl::Error::NonZeroPadding {
2549                    padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
2550                });
2551            }
2552            fidl::decode!(
2553                fidl_fuchsia_ui_views::ViewHolderToken,
2554                fidl::encoding::DefaultFuchsiaResourceDialect,
2555                &mut self.token,
2556                decoder,
2557                offset + 0,
2558                _depth
2559            )?;
2560            fidl::decode!(
2561                fidl::encoding::Optional<fidl::encoding::UnboundedString>,
2562                fidl::encoding::DefaultFuchsiaResourceDialect,
2563                &mut self.debug_name,
2564                decoder,
2565                offset + 8,
2566                _depth
2567            )?;
2568            Ok(())
2569        }
2570    }
2571
2572    impl fidl::encoding::ResourceTypeMarker for Command {
2573        type Borrowed<'a> = &'a mut Self;
2574        fn take_or_borrow<'a>(
2575            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2576        ) -> Self::Borrowed<'a> {
2577            value
2578        }
2579    }
2580
2581    unsafe impl fidl::encoding::TypeMarker for Command {
2582        type Owned = Self;
2583
2584        #[inline(always)]
2585        fn inline_align(_context: fidl::encoding::Context) -> usize {
2586            8
2587        }
2588
2589        #[inline(always)]
2590        fn inline_size(_context: fidl::encoding::Context) -> usize {
2591            16
2592        }
2593    }
2594
2595    unsafe impl fidl::encoding::Encode<Command, fidl::encoding::DefaultFuchsiaResourceDialect>
2596        for &mut Command
2597    {
2598        #[inline]
2599        unsafe fn encode(
2600            self,
2601            encoder: &mut fidl::encoding::Encoder<
2602                '_,
2603                fidl::encoding::DefaultFuchsiaResourceDialect,
2604            >,
2605            offset: usize,
2606            _depth: fidl::encoding::Depth,
2607        ) -> fidl::Result<()> {
2608            encoder.debug_check_bounds::<Command>(offset);
2609            encoder.write_num::<u64>(self.ordinal(), offset);
2610            match self {
2611            Command::CreateResource(ref mut val) => {
2612                fidl::encoding::encode_in_envelope::<CreateResourceCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2613                    <CreateResourceCmd as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
2614                    encoder, offset + 8, _depth
2615                )
2616            }
2617            Command::ReleaseResource(ref val) => {
2618                fidl::encoding::encode_in_envelope::<ReleaseResourceCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2619                    <ReleaseResourceCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2620                    encoder, offset + 8, _depth
2621                )
2622            }
2623            Command::ExportResource(ref mut val) => {
2624                fidl::encoding::encode_in_envelope::<ExportResourceCmdDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>(
2625                    <ExportResourceCmdDeprecated as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
2626                    encoder, offset + 8, _depth
2627                )
2628            }
2629            Command::ImportResource(ref mut val) => {
2630                fidl::encoding::encode_in_envelope::<ImportResourceCmdDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>(
2631                    <ImportResourceCmdDeprecated as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
2632                    encoder, offset + 8, _depth
2633                )
2634            }
2635            Command::SetTag(ref val) => {
2636                fidl::encoding::encode_in_envelope::<SetTagCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2637                    <SetTagCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2638                    encoder, offset + 8, _depth
2639                )
2640            }
2641            Command::Detach(ref val) => {
2642                fidl::encoding::encode_in_envelope::<DetachCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2643                    <DetachCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2644                    encoder, offset + 8, _depth
2645                )
2646            }
2647            Command::SetTranslation(ref val) => {
2648                fidl::encoding::encode_in_envelope::<SetTranslationCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2649                    <SetTranslationCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2650                    encoder, offset + 8, _depth
2651                )
2652            }
2653            Command::SetScale(ref val) => {
2654                fidl::encoding::encode_in_envelope::<SetScaleCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2655                    <SetScaleCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2656                    encoder, offset + 8, _depth
2657                )
2658            }
2659            Command::SetRotation(ref val) => {
2660                fidl::encoding::encode_in_envelope::<SetRotationCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2661                    <SetRotationCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2662                    encoder, offset + 8, _depth
2663                )
2664            }
2665            Command::SetAnchor(ref val) => {
2666                fidl::encoding::encode_in_envelope::<SetAnchorCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2667                    <SetAnchorCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2668                    encoder, offset + 8, _depth
2669                )
2670            }
2671            Command::SetSize(ref val) => {
2672                fidl::encoding::encode_in_envelope::<SetSizeCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2673                    <SetSizeCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2674                    encoder, offset + 8, _depth
2675                )
2676            }
2677            Command::SetOpacity(ref val) => {
2678                fidl::encoding::encode_in_envelope::<SetOpacityCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2679                    <SetOpacityCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2680                    encoder, offset + 8, _depth
2681                )
2682            }
2683            Command::SendSizeChangeHintHack(ref val) => {
2684                fidl::encoding::encode_in_envelope::<SendSizeChangeHintCmdHack, fidl::encoding::DefaultFuchsiaResourceDialect>(
2685                    <SendSizeChangeHintCmdHack as fidl::encoding::ValueTypeMarker>::borrow(val),
2686                    encoder, offset + 8, _depth
2687                )
2688            }
2689            Command::AddChild(ref val) => {
2690                fidl::encoding::encode_in_envelope::<AddChildCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2691                    <AddChildCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2692                    encoder, offset + 8, _depth
2693                )
2694            }
2695            Command::AddPart(ref val) => {
2696                fidl::encoding::encode_in_envelope::<AddPartCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2697                    <AddPartCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2698                    encoder, offset + 8, _depth
2699                )
2700            }
2701            Command::DetachChildren(ref val) => {
2702                fidl::encoding::encode_in_envelope::<DetachChildrenCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2703                    <DetachChildrenCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2704                    encoder, offset + 8, _depth
2705                )
2706            }
2707            Command::SetShape(ref val) => {
2708                fidl::encoding::encode_in_envelope::<SetShapeCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2709                    <SetShapeCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2710                    encoder, offset + 8, _depth
2711                )
2712            }
2713            Command::SetMaterial(ref val) => {
2714                fidl::encoding::encode_in_envelope::<SetMaterialCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2715                    <SetMaterialCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2716                    encoder, offset + 8, _depth
2717                )
2718            }
2719            Command::SetClip(ref val) => {
2720                fidl::encoding::encode_in_envelope::<SetClipCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2721                    <SetClipCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2722                    encoder, offset + 8, _depth
2723                )
2724            }
2725            Command::SetHitTestBehavior(ref val) => {
2726                fidl::encoding::encode_in_envelope::<SetHitTestBehaviorCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2727                    <SetHitTestBehaviorCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2728                    encoder, offset + 8, _depth
2729                )
2730            }
2731            Command::SetViewProperties(ref val) => {
2732                fidl::encoding::encode_in_envelope::<SetViewPropertiesCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2733                    <SetViewPropertiesCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2734                    encoder, offset + 8, _depth
2735                )
2736            }
2737            Command::TakeSnapshotCmd(ref mut val) => {
2738                fidl::encoding::encode_in_envelope::<TakeSnapshotCmdDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>(
2739                    <TakeSnapshotCmdDeprecated as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
2740                    encoder, offset + 8, _depth
2741                )
2742            }
2743            Command::SetCamera(ref val) => {
2744                fidl::encoding::encode_in_envelope::<SetCameraCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2745                    <SetCameraCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2746                    encoder, offset + 8, _depth
2747                )
2748            }
2749            Command::SetCameraTransform(ref val) => {
2750                fidl::encoding::encode_in_envelope::<SetCameraTransformCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2751                    <SetCameraTransformCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2752                    encoder, offset + 8, _depth
2753                )
2754            }
2755            Command::SetCameraProjection(ref val) => {
2756                fidl::encoding::encode_in_envelope::<SetCameraProjectionCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2757                    <SetCameraProjectionCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2758                    encoder, offset + 8, _depth
2759                )
2760            }
2761            Command::SetStereoCameraProjection(ref val) => {
2762                fidl::encoding::encode_in_envelope::<SetStereoCameraProjectionCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2763                    <SetStereoCameraProjectionCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2764                    encoder, offset + 8, _depth
2765                )
2766            }
2767            Command::SetCameraPoseBuffer(ref val) => {
2768                fidl::encoding::encode_in_envelope::<SetCameraPoseBufferCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2769                    <SetCameraPoseBufferCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2770                    encoder, offset + 8, _depth
2771                )
2772            }
2773            Command::SetLightColor(ref val) => {
2774                fidl::encoding::encode_in_envelope::<SetLightColorCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2775                    <SetLightColorCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2776                    encoder, offset + 8, _depth
2777                )
2778            }
2779            Command::SetLightDirection(ref val) => {
2780                fidl::encoding::encode_in_envelope::<SetLightDirectionCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2781                    <SetLightDirectionCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2782                    encoder, offset + 8, _depth
2783                )
2784            }
2785            Command::AddLight(ref val) => {
2786                fidl::encoding::encode_in_envelope::<AddLightCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2787                    <AddLightCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2788                    encoder, offset + 8, _depth
2789                )
2790            }
2791            Command::DetachLight(ref val) => {
2792                fidl::encoding::encode_in_envelope::<DetachLightCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2793                    <DetachLightCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2794                    encoder, offset + 8, _depth
2795                )
2796            }
2797            Command::DetachLights(ref val) => {
2798                fidl::encoding::encode_in_envelope::<DetachLightsCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2799                    <DetachLightsCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2800                    encoder, offset + 8, _depth
2801                )
2802            }
2803            Command::SetTexture(ref val) => {
2804                fidl::encoding::encode_in_envelope::<SetTextureCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2805                    <SetTextureCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2806                    encoder, offset + 8, _depth
2807                )
2808            }
2809            Command::SetColor(ref val) => {
2810                fidl::encoding::encode_in_envelope::<SetColorCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2811                    <SetColorCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2812                    encoder, offset + 8, _depth
2813                )
2814            }
2815            Command::BindMeshBuffers(ref val) => {
2816                fidl::encoding::encode_in_envelope::<BindMeshBuffersCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2817                    <BindMeshBuffersCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2818                    encoder, offset + 8, _depth
2819                )
2820            }
2821            Command::AddLayer(ref val) => {
2822                fidl::encoding::encode_in_envelope::<AddLayerCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2823                    <AddLayerCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2824                    encoder, offset + 8, _depth
2825                )
2826            }
2827            Command::RemoveLayer(ref val) => {
2828                fidl::encoding::encode_in_envelope::<RemoveLayerCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2829                    <RemoveLayerCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2830                    encoder, offset + 8, _depth
2831                )
2832            }
2833            Command::RemoveAllLayers(ref val) => {
2834                fidl::encoding::encode_in_envelope::<RemoveAllLayersCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2835                    <RemoveAllLayersCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2836                    encoder, offset + 8, _depth
2837                )
2838            }
2839            Command::SetLayerStack(ref val) => {
2840                fidl::encoding::encode_in_envelope::<SetLayerStackCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2841                    <SetLayerStackCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2842                    encoder, offset + 8, _depth
2843                )
2844            }
2845            Command::SetRenderer(ref val) => {
2846                fidl::encoding::encode_in_envelope::<SetRendererCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2847                    <SetRendererCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2848                    encoder, offset + 8, _depth
2849                )
2850            }
2851            Command::SetRendererParam(ref val) => {
2852                fidl::encoding::encode_in_envelope::<SetRendererParamCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2853                    <SetRendererParamCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2854                    encoder, offset + 8, _depth
2855                )
2856            }
2857            Command::SetEventMask(ref val) => {
2858                fidl::encoding::encode_in_envelope::<SetEventMaskCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2859                    <SetEventMaskCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2860                    encoder, offset + 8, _depth
2861                )
2862            }
2863            Command::SetLabel(ref val) => {
2864                fidl::encoding::encode_in_envelope::<SetLabelCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2865                    <SetLabelCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2866                    encoder, offset + 8, _depth
2867                )
2868            }
2869            Command::SetDisableClipping(ref val) => {
2870                fidl::encoding::encode_in_envelope::<SetDisableClippingCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2871                    <SetDisableClippingCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2872                    encoder, offset + 8, _depth
2873                )
2874            }
2875            Command::SetImportFocus(ref val) => {
2876                fidl::encoding::encode_in_envelope::<SetImportFocusCmdDeprecated, fidl::encoding::DefaultFuchsiaResourceDialect>(
2877                    <SetImportFocusCmdDeprecated as fidl::encoding::ValueTypeMarker>::borrow(val),
2878                    encoder, offset + 8, _depth
2879                )
2880            }
2881            Command::SetClipPlanes(ref val) => {
2882                fidl::encoding::encode_in_envelope::<SetClipPlanesCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2883                    <SetClipPlanesCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2884                    encoder, offset + 8, _depth
2885                )
2886            }
2887            Command::SetPointLightPosition(ref val) => {
2888                fidl::encoding::encode_in_envelope::<SetPointLightPositionCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2889                    <SetPointLightPositionCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2890                    encoder, offset + 8, _depth
2891                )
2892            }
2893            Command::SetPointLightFalloff(ref val) => {
2894                fidl::encoding::encode_in_envelope::<SetPointLightFalloffCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2895                    <SetPointLightFalloffCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2896                    encoder, offset + 8, _depth
2897                )
2898            }
2899            Command::Scene_AddAmbientLight(ref val) => {
2900                fidl::encoding::encode_in_envelope::<SceneAddAmbientLightCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2901                    <SceneAddAmbientLightCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2902                    encoder, offset + 8, _depth
2903                )
2904            }
2905            Command::Scene_AddDirectionalLight(ref val) => {
2906                fidl::encoding::encode_in_envelope::<SceneAddDirectionalLightCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2907                    <SceneAddDirectionalLightCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2908                    encoder, offset + 8, _depth
2909                )
2910            }
2911            Command::Scene_AddPointLight(ref val) => {
2912                fidl::encoding::encode_in_envelope::<SceneAddPointLightCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2913                    <SceneAddPointLightCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2914                    encoder, offset + 8, _depth
2915                )
2916            }
2917            Command::SetDisplayColorConversion(ref val) => {
2918                fidl::encoding::encode_in_envelope::<SetDisplayColorConversionCmdHack, fidl::encoding::DefaultFuchsiaResourceDialect>(
2919                    <SetDisplayColorConversionCmdHack as fidl::encoding::ValueTypeMarker>::borrow(val),
2920                    encoder, offset + 8, _depth
2921                )
2922            }
2923            Command::SetDisplayRotation(ref val) => {
2924                fidl::encoding::encode_in_envelope::<SetDisplayRotationCmdHack, fidl::encoding::DefaultFuchsiaResourceDialect>(
2925                    <SetDisplayRotationCmdHack as fidl::encoding::ValueTypeMarker>::borrow(val),
2926                    encoder, offset + 8, _depth
2927                )
2928            }
2929            Command::SetEnableViewDebugBounds(ref val) => {
2930                fidl::encoding::encode_in_envelope::<SetEnableDebugViewBoundsCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2931                    <SetEnableDebugViewBoundsCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2932                    encoder, offset + 8, _depth
2933                )
2934            }
2935            Command::SetViewHolderBoundsColor(ref val) => {
2936                fidl::encoding::encode_in_envelope::<SetViewHolderBoundsColorCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2937                    <SetViewHolderBoundsColorCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2938                    encoder, offset + 8, _depth
2939                )
2940            }
2941            Command::SetCameraClipSpaceTransform(ref val) => {
2942                fidl::encoding::encode_in_envelope::<SetCameraClipSpaceTransformCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2943                    <SetCameraClipSpaceTransformCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2944                    encoder, offset + 8, _depth
2945                )
2946            }
2947            Command::SetDisplayMinimumRgb(ref val) => {
2948                fidl::encoding::encode_in_envelope::<SetDisplayMinimumRgbCmdHack, fidl::encoding::DefaultFuchsiaResourceDialect>(
2949                    <SetDisplayMinimumRgbCmdHack as fidl::encoding::ValueTypeMarker>::borrow(val),
2950                    encoder, offset + 8, _depth
2951                )
2952            }
2953            Command::SetSemanticVisibility(ref val) => {
2954                fidl::encoding::encode_in_envelope::<SetSemanticVisibilityCmd, fidl::encoding::DefaultFuchsiaResourceDialect>(
2955                    <SetSemanticVisibilityCmd as fidl::encoding::ValueTypeMarker>::borrow(val),
2956                    encoder, offset + 8, _depth
2957                )
2958            }
2959        }
2960        }
2961    }
2962
2963    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Command {
2964        #[inline(always)]
2965        fn new_empty() -> Self {
2966            Self::CreateResource(fidl::new_empty!(
2967                CreateResourceCmd,
2968                fidl::encoding::DefaultFuchsiaResourceDialect
2969            ))
2970        }
2971
2972        #[inline]
2973        unsafe fn decode(
2974            &mut self,
2975            decoder: &mut fidl::encoding::Decoder<
2976                '_,
2977                fidl::encoding::DefaultFuchsiaResourceDialect,
2978            >,
2979            offset: usize,
2980            mut depth: fidl::encoding::Depth,
2981        ) -> fidl::Result<()> {
2982            decoder.debug_check_bounds::<Self>(offset);
2983            #[allow(unused_variables)]
2984            let next_out_of_line = decoder.next_out_of_line();
2985            let handles_before = decoder.remaining_handles();
2986            let (ordinal, inlined, num_bytes, num_handles) =
2987                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
2988
2989            let member_inline_size = match ordinal {
2990                1 => {
2991                    <CreateResourceCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
2992                }
2993                2 => {
2994                    <ReleaseResourceCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
2995                }
2996                3 => <ExportResourceCmdDeprecated as fidl::encoding::TypeMarker>::inline_size(
2997                    decoder.context,
2998                ),
2999                4 => <ImportResourceCmdDeprecated as fidl::encoding::TypeMarker>::inline_size(
3000                    decoder.context,
3001                ),
3002                5 => <SetTagCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3003                6 => <DetachCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3004                7 => {
3005                    <SetTranslationCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3006                }
3007                8 => <SetScaleCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3008                9 => <SetRotationCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3009                10 => <SetAnchorCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3010                11 => <SetSizeCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3011                12 => <SetOpacityCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3012                13 => <SendSizeChangeHintCmdHack as fidl::encoding::TypeMarker>::inline_size(
3013                    decoder.context,
3014                ),
3015                14 => <AddChildCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3016                15 => <AddPartCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3017                16 => {
3018                    <DetachChildrenCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3019                }
3020                17 => <SetShapeCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3021                18 => <SetMaterialCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3022                19 => <SetClipCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3023                20 => <SetHitTestBehaviorCmd as fidl::encoding::TypeMarker>::inline_size(
3024                    decoder.context,
3025                ),
3026                21 => <SetViewPropertiesCmd as fidl::encoding::TypeMarker>::inline_size(
3027                    decoder.context,
3028                ),
3029                22 => <TakeSnapshotCmdDeprecated as fidl::encoding::TypeMarker>::inline_size(
3030                    decoder.context,
3031                ),
3032                23 => <SetCameraCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3033                24 => <SetCameraTransformCmd as fidl::encoding::TypeMarker>::inline_size(
3034                    decoder.context,
3035                ),
3036                25 => <SetCameraProjectionCmd as fidl::encoding::TypeMarker>::inline_size(
3037                    decoder.context,
3038                ),
3039                26 => <SetStereoCameraProjectionCmd as fidl::encoding::TypeMarker>::inline_size(
3040                    decoder.context,
3041                ),
3042                27 => <SetCameraPoseBufferCmd as fidl::encoding::TypeMarker>::inline_size(
3043                    decoder.context,
3044                ),
3045                28 => {
3046                    <SetLightColorCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3047                }
3048                29 => <SetLightDirectionCmd as fidl::encoding::TypeMarker>::inline_size(
3049                    decoder.context,
3050                ),
3051                30 => <AddLightCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3052                31 => <DetachLightCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3053                32 => <DetachLightsCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3054                33 => <SetTextureCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3055                34 => <SetColorCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3056                35 => {
3057                    <BindMeshBuffersCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3058                }
3059                36 => <AddLayerCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3060                37 => <RemoveLayerCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3061                38 => {
3062                    <RemoveAllLayersCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3063                }
3064                39 => {
3065                    <SetLayerStackCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3066                }
3067                40 => <SetRendererCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3068                41 => <SetRendererParamCmd as fidl::encoding::TypeMarker>::inline_size(
3069                    decoder.context,
3070                ),
3071                42 => <SetEventMaskCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3072                43 => <SetLabelCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3073                44 => <SetDisableClippingCmd as fidl::encoding::TypeMarker>::inline_size(
3074                    decoder.context,
3075                ),
3076                45 => <SetImportFocusCmdDeprecated as fidl::encoding::TypeMarker>::inline_size(
3077                    decoder.context,
3078                ),
3079                46 => {
3080                    <SetClipPlanesCmd as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3081                }
3082                47 => <SetPointLightPositionCmd as fidl::encoding::TypeMarker>::inline_size(
3083                    decoder.context,
3084                ),
3085                48 => <SetPointLightFalloffCmd as fidl::encoding::TypeMarker>::inline_size(
3086                    decoder.context,
3087                ),
3088                49 => <SceneAddAmbientLightCmd as fidl::encoding::TypeMarker>::inline_size(
3089                    decoder.context,
3090                ),
3091                50 => <SceneAddDirectionalLightCmd as fidl::encoding::TypeMarker>::inline_size(
3092                    decoder.context,
3093                ),
3094                51 => <SceneAddPointLightCmd as fidl::encoding::TypeMarker>::inline_size(
3095                    decoder.context,
3096                ),
3097                52 => {
3098                    <SetDisplayColorConversionCmdHack as fidl::encoding::TypeMarker>::inline_size(
3099                        decoder.context,
3100                    )
3101                }
3102                53 => <SetDisplayRotationCmdHack as fidl::encoding::TypeMarker>::inline_size(
3103                    decoder.context,
3104                ),
3105                54 => <SetEnableDebugViewBoundsCmd as fidl::encoding::TypeMarker>::inline_size(
3106                    decoder.context,
3107                ),
3108                55 => <SetViewHolderBoundsColorCmd as fidl::encoding::TypeMarker>::inline_size(
3109                    decoder.context,
3110                ),
3111                56 => <SetCameraClipSpaceTransformCmd as fidl::encoding::TypeMarker>::inline_size(
3112                    decoder.context,
3113                ),
3114                57 => <SetDisplayMinimumRgbCmdHack as fidl::encoding::TypeMarker>::inline_size(
3115                    decoder.context,
3116                ),
3117                58 => <SetSemanticVisibilityCmd as fidl::encoding::TypeMarker>::inline_size(
3118                    decoder.context,
3119                ),
3120                _ => return Err(fidl::Error::UnknownUnionTag),
3121            };
3122
3123            if inlined != (member_inline_size <= 4) {
3124                return Err(fidl::Error::InvalidInlineBitInEnvelope);
3125            }
3126            let _inner_offset;
3127            if inlined {
3128                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
3129                _inner_offset = offset + 8;
3130            } else {
3131                depth.increment()?;
3132                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3133            }
3134            match ordinal {
3135                1 => {
3136                    #[allow(irrefutable_let_patterns)]
3137                    if let Command::CreateResource(_) = self {
3138                        // Do nothing, read the value into the object
3139                    } else {
3140                        // Initialize `self` to the right variant
3141                        *self = Command::CreateResource(fidl::new_empty!(
3142                            CreateResourceCmd,
3143                            fidl::encoding::DefaultFuchsiaResourceDialect
3144                        ));
3145                    }
3146                    #[allow(irrefutable_let_patterns)]
3147                    if let Command::CreateResource(ref mut val) = self {
3148                        fidl::decode!(
3149                            CreateResourceCmd,
3150                            fidl::encoding::DefaultFuchsiaResourceDialect,
3151                            val,
3152                            decoder,
3153                            _inner_offset,
3154                            depth
3155                        )?;
3156                    } else {
3157                        unreachable!()
3158                    }
3159                }
3160                2 => {
3161                    #[allow(irrefutable_let_patterns)]
3162                    if let Command::ReleaseResource(_) = self {
3163                        // Do nothing, read the value into the object
3164                    } else {
3165                        // Initialize `self` to the right variant
3166                        *self = Command::ReleaseResource(fidl::new_empty!(
3167                            ReleaseResourceCmd,
3168                            fidl::encoding::DefaultFuchsiaResourceDialect
3169                        ));
3170                    }
3171                    #[allow(irrefutable_let_patterns)]
3172                    if let Command::ReleaseResource(ref mut val) = self {
3173                        fidl::decode!(
3174                            ReleaseResourceCmd,
3175                            fidl::encoding::DefaultFuchsiaResourceDialect,
3176                            val,
3177                            decoder,
3178                            _inner_offset,
3179                            depth
3180                        )?;
3181                    } else {
3182                        unreachable!()
3183                    }
3184                }
3185                3 => {
3186                    #[allow(irrefutable_let_patterns)]
3187                    if let Command::ExportResource(_) = self {
3188                        // Do nothing, read the value into the object
3189                    } else {
3190                        // Initialize `self` to the right variant
3191                        *self = Command::ExportResource(fidl::new_empty!(
3192                            ExportResourceCmdDeprecated,
3193                            fidl::encoding::DefaultFuchsiaResourceDialect
3194                        ));
3195                    }
3196                    #[allow(irrefutable_let_patterns)]
3197                    if let Command::ExportResource(ref mut val) = self {
3198                        fidl::decode!(
3199                            ExportResourceCmdDeprecated,
3200                            fidl::encoding::DefaultFuchsiaResourceDialect,
3201                            val,
3202                            decoder,
3203                            _inner_offset,
3204                            depth
3205                        )?;
3206                    } else {
3207                        unreachable!()
3208                    }
3209                }
3210                4 => {
3211                    #[allow(irrefutable_let_patterns)]
3212                    if let Command::ImportResource(_) = self {
3213                        // Do nothing, read the value into the object
3214                    } else {
3215                        // Initialize `self` to the right variant
3216                        *self = Command::ImportResource(fidl::new_empty!(
3217                            ImportResourceCmdDeprecated,
3218                            fidl::encoding::DefaultFuchsiaResourceDialect
3219                        ));
3220                    }
3221                    #[allow(irrefutable_let_patterns)]
3222                    if let Command::ImportResource(ref mut val) = self {
3223                        fidl::decode!(
3224                            ImportResourceCmdDeprecated,
3225                            fidl::encoding::DefaultFuchsiaResourceDialect,
3226                            val,
3227                            decoder,
3228                            _inner_offset,
3229                            depth
3230                        )?;
3231                    } else {
3232                        unreachable!()
3233                    }
3234                }
3235                5 => {
3236                    #[allow(irrefutable_let_patterns)]
3237                    if let Command::SetTag(_) = self {
3238                        // Do nothing, read the value into the object
3239                    } else {
3240                        // Initialize `self` to the right variant
3241                        *self = Command::SetTag(fidl::new_empty!(
3242                            SetTagCmd,
3243                            fidl::encoding::DefaultFuchsiaResourceDialect
3244                        ));
3245                    }
3246                    #[allow(irrefutable_let_patterns)]
3247                    if let Command::SetTag(ref mut val) = self {
3248                        fidl::decode!(
3249                            SetTagCmd,
3250                            fidl::encoding::DefaultFuchsiaResourceDialect,
3251                            val,
3252                            decoder,
3253                            _inner_offset,
3254                            depth
3255                        )?;
3256                    } else {
3257                        unreachable!()
3258                    }
3259                }
3260                6 => {
3261                    #[allow(irrefutable_let_patterns)]
3262                    if let Command::Detach(_) = self {
3263                        // Do nothing, read the value into the object
3264                    } else {
3265                        // Initialize `self` to the right variant
3266                        *self = Command::Detach(fidl::new_empty!(
3267                            DetachCmd,
3268                            fidl::encoding::DefaultFuchsiaResourceDialect
3269                        ));
3270                    }
3271                    #[allow(irrefutable_let_patterns)]
3272                    if let Command::Detach(ref mut val) = self {
3273                        fidl::decode!(
3274                            DetachCmd,
3275                            fidl::encoding::DefaultFuchsiaResourceDialect,
3276                            val,
3277                            decoder,
3278                            _inner_offset,
3279                            depth
3280                        )?;
3281                    } else {
3282                        unreachable!()
3283                    }
3284                }
3285                7 => {
3286                    #[allow(irrefutable_let_patterns)]
3287                    if let Command::SetTranslation(_) = self {
3288                        // Do nothing, read the value into the object
3289                    } else {
3290                        // Initialize `self` to the right variant
3291                        *self = Command::SetTranslation(fidl::new_empty!(
3292                            SetTranslationCmd,
3293                            fidl::encoding::DefaultFuchsiaResourceDialect
3294                        ));
3295                    }
3296                    #[allow(irrefutable_let_patterns)]
3297                    if let Command::SetTranslation(ref mut val) = self {
3298                        fidl::decode!(
3299                            SetTranslationCmd,
3300                            fidl::encoding::DefaultFuchsiaResourceDialect,
3301                            val,
3302                            decoder,
3303                            _inner_offset,
3304                            depth
3305                        )?;
3306                    } else {
3307                        unreachable!()
3308                    }
3309                }
3310                8 => {
3311                    #[allow(irrefutable_let_patterns)]
3312                    if let Command::SetScale(_) = self {
3313                        // Do nothing, read the value into the object
3314                    } else {
3315                        // Initialize `self` to the right variant
3316                        *self = Command::SetScale(fidl::new_empty!(
3317                            SetScaleCmd,
3318                            fidl::encoding::DefaultFuchsiaResourceDialect
3319                        ));
3320                    }
3321                    #[allow(irrefutable_let_patterns)]
3322                    if let Command::SetScale(ref mut val) = self {
3323                        fidl::decode!(
3324                            SetScaleCmd,
3325                            fidl::encoding::DefaultFuchsiaResourceDialect,
3326                            val,
3327                            decoder,
3328                            _inner_offset,
3329                            depth
3330                        )?;
3331                    } else {
3332                        unreachable!()
3333                    }
3334                }
3335                9 => {
3336                    #[allow(irrefutable_let_patterns)]
3337                    if let Command::SetRotation(_) = self {
3338                        // Do nothing, read the value into the object
3339                    } else {
3340                        // Initialize `self` to the right variant
3341                        *self = Command::SetRotation(fidl::new_empty!(
3342                            SetRotationCmd,
3343                            fidl::encoding::DefaultFuchsiaResourceDialect
3344                        ));
3345                    }
3346                    #[allow(irrefutable_let_patterns)]
3347                    if let Command::SetRotation(ref mut val) = self {
3348                        fidl::decode!(
3349                            SetRotationCmd,
3350                            fidl::encoding::DefaultFuchsiaResourceDialect,
3351                            val,
3352                            decoder,
3353                            _inner_offset,
3354                            depth
3355                        )?;
3356                    } else {
3357                        unreachable!()
3358                    }
3359                }
3360                10 => {
3361                    #[allow(irrefutable_let_patterns)]
3362                    if let Command::SetAnchor(_) = self {
3363                        // Do nothing, read the value into the object
3364                    } else {
3365                        // Initialize `self` to the right variant
3366                        *self = Command::SetAnchor(fidl::new_empty!(
3367                            SetAnchorCmd,
3368                            fidl::encoding::DefaultFuchsiaResourceDialect
3369                        ));
3370                    }
3371                    #[allow(irrefutable_let_patterns)]
3372                    if let Command::SetAnchor(ref mut val) = self {
3373                        fidl::decode!(
3374                            SetAnchorCmd,
3375                            fidl::encoding::DefaultFuchsiaResourceDialect,
3376                            val,
3377                            decoder,
3378                            _inner_offset,
3379                            depth
3380                        )?;
3381                    } else {
3382                        unreachable!()
3383                    }
3384                }
3385                11 => {
3386                    #[allow(irrefutable_let_patterns)]
3387                    if let Command::SetSize(_) = self {
3388                        // Do nothing, read the value into the object
3389                    } else {
3390                        // Initialize `self` to the right variant
3391                        *self = Command::SetSize(fidl::new_empty!(
3392                            SetSizeCmd,
3393                            fidl::encoding::DefaultFuchsiaResourceDialect
3394                        ));
3395                    }
3396                    #[allow(irrefutable_let_patterns)]
3397                    if let Command::SetSize(ref mut val) = self {
3398                        fidl::decode!(
3399                            SetSizeCmd,
3400                            fidl::encoding::DefaultFuchsiaResourceDialect,
3401                            val,
3402                            decoder,
3403                            _inner_offset,
3404                            depth
3405                        )?;
3406                    } else {
3407                        unreachable!()
3408                    }
3409                }
3410                12 => {
3411                    #[allow(irrefutable_let_patterns)]
3412                    if let Command::SetOpacity(_) = self {
3413                        // Do nothing, read the value into the object
3414                    } else {
3415                        // Initialize `self` to the right variant
3416                        *self = Command::SetOpacity(fidl::new_empty!(
3417                            SetOpacityCmd,
3418                            fidl::encoding::DefaultFuchsiaResourceDialect
3419                        ));
3420                    }
3421                    #[allow(irrefutable_let_patterns)]
3422                    if let Command::SetOpacity(ref mut val) = self {
3423                        fidl::decode!(
3424                            SetOpacityCmd,
3425                            fidl::encoding::DefaultFuchsiaResourceDialect,
3426                            val,
3427                            decoder,
3428                            _inner_offset,
3429                            depth
3430                        )?;
3431                    } else {
3432                        unreachable!()
3433                    }
3434                }
3435                13 => {
3436                    #[allow(irrefutable_let_patterns)]
3437                    if let Command::SendSizeChangeHintHack(_) = self {
3438                        // Do nothing, read the value into the object
3439                    } else {
3440                        // Initialize `self` to the right variant
3441                        *self = Command::SendSizeChangeHintHack(fidl::new_empty!(
3442                            SendSizeChangeHintCmdHack,
3443                            fidl::encoding::DefaultFuchsiaResourceDialect
3444                        ));
3445                    }
3446                    #[allow(irrefutable_let_patterns)]
3447                    if let Command::SendSizeChangeHintHack(ref mut val) = self {
3448                        fidl::decode!(
3449                            SendSizeChangeHintCmdHack,
3450                            fidl::encoding::DefaultFuchsiaResourceDialect,
3451                            val,
3452                            decoder,
3453                            _inner_offset,
3454                            depth
3455                        )?;
3456                    } else {
3457                        unreachable!()
3458                    }
3459                }
3460                14 => {
3461                    #[allow(irrefutable_let_patterns)]
3462                    if let Command::AddChild(_) = self {
3463                        // Do nothing, read the value into the object
3464                    } else {
3465                        // Initialize `self` to the right variant
3466                        *self = Command::AddChild(fidl::new_empty!(
3467                            AddChildCmd,
3468                            fidl::encoding::DefaultFuchsiaResourceDialect
3469                        ));
3470                    }
3471                    #[allow(irrefutable_let_patterns)]
3472                    if let Command::AddChild(ref mut val) = self {
3473                        fidl::decode!(
3474                            AddChildCmd,
3475                            fidl::encoding::DefaultFuchsiaResourceDialect,
3476                            val,
3477                            decoder,
3478                            _inner_offset,
3479                            depth
3480                        )?;
3481                    } else {
3482                        unreachable!()
3483                    }
3484                }
3485                15 => {
3486                    #[allow(irrefutable_let_patterns)]
3487                    if let Command::AddPart(_) = self {
3488                        // Do nothing, read the value into the object
3489                    } else {
3490                        // Initialize `self` to the right variant
3491                        *self = Command::AddPart(fidl::new_empty!(
3492                            AddPartCmd,
3493                            fidl::encoding::DefaultFuchsiaResourceDialect
3494                        ));
3495                    }
3496                    #[allow(irrefutable_let_patterns)]
3497                    if let Command::AddPart(ref mut val) = self {
3498                        fidl::decode!(
3499                            AddPartCmd,
3500                            fidl::encoding::DefaultFuchsiaResourceDialect,
3501                            val,
3502                            decoder,
3503                            _inner_offset,
3504                            depth
3505                        )?;
3506                    } else {
3507                        unreachable!()
3508                    }
3509                }
3510                16 => {
3511                    #[allow(irrefutable_let_patterns)]
3512                    if let Command::DetachChildren(_) = self {
3513                        // Do nothing, read the value into the object
3514                    } else {
3515                        // Initialize `self` to the right variant
3516                        *self = Command::DetachChildren(fidl::new_empty!(
3517                            DetachChildrenCmd,
3518                            fidl::encoding::DefaultFuchsiaResourceDialect
3519                        ));
3520                    }
3521                    #[allow(irrefutable_let_patterns)]
3522                    if let Command::DetachChildren(ref mut val) = self {
3523                        fidl::decode!(
3524                            DetachChildrenCmd,
3525                            fidl::encoding::DefaultFuchsiaResourceDialect,
3526                            val,
3527                            decoder,
3528                            _inner_offset,
3529                            depth
3530                        )?;
3531                    } else {
3532                        unreachable!()
3533                    }
3534                }
3535                17 => {
3536                    #[allow(irrefutable_let_patterns)]
3537                    if let Command::SetShape(_) = self {
3538                        // Do nothing, read the value into the object
3539                    } else {
3540                        // Initialize `self` to the right variant
3541                        *self = Command::SetShape(fidl::new_empty!(
3542                            SetShapeCmd,
3543                            fidl::encoding::DefaultFuchsiaResourceDialect
3544                        ));
3545                    }
3546                    #[allow(irrefutable_let_patterns)]
3547                    if let Command::SetShape(ref mut val) = self {
3548                        fidl::decode!(
3549                            SetShapeCmd,
3550                            fidl::encoding::DefaultFuchsiaResourceDialect,
3551                            val,
3552                            decoder,
3553                            _inner_offset,
3554                            depth
3555                        )?;
3556                    } else {
3557                        unreachable!()
3558                    }
3559                }
3560                18 => {
3561                    #[allow(irrefutable_let_patterns)]
3562                    if let Command::SetMaterial(_) = self {
3563                        // Do nothing, read the value into the object
3564                    } else {
3565                        // Initialize `self` to the right variant
3566                        *self = Command::SetMaterial(fidl::new_empty!(
3567                            SetMaterialCmd,
3568                            fidl::encoding::DefaultFuchsiaResourceDialect
3569                        ));
3570                    }
3571                    #[allow(irrefutable_let_patterns)]
3572                    if let Command::SetMaterial(ref mut val) = self {
3573                        fidl::decode!(
3574                            SetMaterialCmd,
3575                            fidl::encoding::DefaultFuchsiaResourceDialect,
3576                            val,
3577                            decoder,
3578                            _inner_offset,
3579                            depth
3580                        )?;
3581                    } else {
3582                        unreachable!()
3583                    }
3584                }
3585                19 => {
3586                    #[allow(irrefutable_let_patterns)]
3587                    if let Command::SetClip(_) = self {
3588                        // Do nothing, read the value into the object
3589                    } else {
3590                        // Initialize `self` to the right variant
3591                        *self = Command::SetClip(fidl::new_empty!(
3592                            SetClipCmd,
3593                            fidl::encoding::DefaultFuchsiaResourceDialect
3594                        ));
3595                    }
3596                    #[allow(irrefutable_let_patterns)]
3597                    if let Command::SetClip(ref mut val) = self {
3598                        fidl::decode!(
3599                            SetClipCmd,
3600                            fidl::encoding::DefaultFuchsiaResourceDialect,
3601                            val,
3602                            decoder,
3603                            _inner_offset,
3604                            depth
3605                        )?;
3606                    } else {
3607                        unreachable!()
3608                    }
3609                }
3610                20 => {
3611                    #[allow(irrefutable_let_patterns)]
3612                    if let Command::SetHitTestBehavior(_) = self {
3613                        // Do nothing, read the value into the object
3614                    } else {
3615                        // Initialize `self` to the right variant
3616                        *self = Command::SetHitTestBehavior(fidl::new_empty!(
3617                            SetHitTestBehaviorCmd,
3618                            fidl::encoding::DefaultFuchsiaResourceDialect
3619                        ));
3620                    }
3621                    #[allow(irrefutable_let_patterns)]
3622                    if let Command::SetHitTestBehavior(ref mut val) = self {
3623                        fidl::decode!(
3624                            SetHitTestBehaviorCmd,
3625                            fidl::encoding::DefaultFuchsiaResourceDialect,
3626                            val,
3627                            decoder,
3628                            _inner_offset,
3629                            depth
3630                        )?;
3631                    } else {
3632                        unreachable!()
3633                    }
3634                }
3635                21 => {
3636                    #[allow(irrefutable_let_patterns)]
3637                    if let Command::SetViewProperties(_) = self {
3638                        // Do nothing, read the value into the object
3639                    } else {
3640                        // Initialize `self` to the right variant
3641                        *self = Command::SetViewProperties(fidl::new_empty!(
3642                            SetViewPropertiesCmd,
3643                            fidl::encoding::DefaultFuchsiaResourceDialect
3644                        ));
3645                    }
3646                    #[allow(irrefutable_let_patterns)]
3647                    if let Command::SetViewProperties(ref mut val) = self {
3648                        fidl::decode!(
3649                            SetViewPropertiesCmd,
3650                            fidl::encoding::DefaultFuchsiaResourceDialect,
3651                            val,
3652                            decoder,
3653                            _inner_offset,
3654                            depth
3655                        )?;
3656                    } else {
3657                        unreachable!()
3658                    }
3659                }
3660                22 => {
3661                    #[allow(irrefutable_let_patterns)]
3662                    if let Command::TakeSnapshotCmd(_) = self {
3663                        // Do nothing, read the value into the object
3664                    } else {
3665                        // Initialize `self` to the right variant
3666                        *self = Command::TakeSnapshotCmd(fidl::new_empty!(
3667                            TakeSnapshotCmdDeprecated,
3668                            fidl::encoding::DefaultFuchsiaResourceDialect
3669                        ));
3670                    }
3671                    #[allow(irrefutable_let_patterns)]
3672                    if let Command::TakeSnapshotCmd(ref mut val) = self {
3673                        fidl::decode!(
3674                            TakeSnapshotCmdDeprecated,
3675                            fidl::encoding::DefaultFuchsiaResourceDialect,
3676                            val,
3677                            decoder,
3678                            _inner_offset,
3679                            depth
3680                        )?;
3681                    } else {
3682                        unreachable!()
3683                    }
3684                }
3685                23 => {
3686                    #[allow(irrefutable_let_patterns)]
3687                    if let Command::SetCamera(_) = self {
3688                        // Do nothing, read the value into the object
3689                    } else {
3690                        // Initialize `self` to the right variant
3691                        *self = Command::SetCamera(fidl::new_empty!(
3692                            SetCameraCmd,
3693                            fidl::encoding::DefaultFuchsiaResourceDialect
3694                        ));
3695                    }
3696                    #[allow(irrefutable_let_patterns)]
3697                    if let Command::SetCamera(ref mut val) = self {
3698                        fidl::decode!(
3699                            SetCameraCmd,
3700                            fidl::encoding::DefaultFuchsiaResourceDialect,
3701                            val,
3702                            decoder,
3703                            _inner_offset,
3704                            depth
3705                        )?;
3706                    } else {
3707                        unreachable!()
3708                    }
3709                }
3710                24 => {
3711                    #[allow(irrefutable_let_patterns)]
3712                    if let Command::SetCameraTransform(_) = self {
3713                        // Do nothing, read the value into the object
3714                    } else {
3715                        // Initialize `self` to the right variant
3716                        *self = Command::SetCameraTransform(fidl::new_empty!(
3717                            SetCameraTransformCmd,
3718                            fidl::encoding::DefaultFuchsiaResourceDialect
3719                        ));
3720                    }
3721                    #[allow(irrefutable_let_patterns)]
3722                    if let Command::SetCameraTransform(ref mut val) = self {
3723                        fidl::decode!(
3724                            SetCameraTransformCmd,
3725                            fidl::encoding::DefaultFuchsiaResourceDialect,
3726                            val,
3727                            decoder,
3728                            _inner_offset,
3729                            depth
3730                        )?;
3731                    } else {
3732                        unreachable!()
3733                    }
3734                }
3735                25 => {
3736                    #[allow(irrefutable_let_patterns)]
3737                    if let Command::SetCameraProjection(_) = self {
3738                        // Do nothing, read the value into the object
3739                    } else {
3740                        // Initialize `self` to the right variant
3741                        *self = Command::SetCameraProjection(fidl::new_empty!(
3742                            SetCameraProjectionCmd,
3743                            fidl::encoding::DefaultFuchsiaResourceDialect
3744                        ));
3745                    }
3746                    #[allow(irrefutable_let_patterns)]
3747                    if let Command::SetCameraProjection(ref mut val) = self {
3748                        fidl::decode!(
3749                            SetCameraProjectionCmd,
3750                            fidl::encoding::DefaultFuchsiaResourceDialect,
3751                            val,
3752                            decoder,
3753                            _inner_offset,
3754                            depth
3755                        )?;
3756                    } else {
3757                        unreachable!()
3758                    }
3759                }
3760                26 => {
3761                    #[allow(irrefutable_let_patterns)]
3762                    if let Command::SetStereoCameraProjection(_) = self {
3763                        // Do nothing, read the value into the object
3764                    } else {
3765                        // Initialize `self` to the right variant
3766                        *self = Command::SetStereoCameraProjection(fidl::new_empty!(
3767                            SetStereoCameraProjectionCmd,
3768                            fidl::encoding::DefaultFuchsiaResourceDialect
3769                        ));
3770                    }
3771                    #[allow(irrefutable_let_patterns)]
3772                    if let Command::SetStereoCameraProjection(ref mut val) = self {
3773                        fidl::decode!(
3774                            SetStereoCameraProjectionCmd,
3775                            fidl::encoding::DefaultFuchsiaResourceDialect,
3776                            val,
3777                            decoder,
3778                            _inner_offset,
3779                            depth
3780                        )?;
3781                    } else {
3782                        unreachable!()
3783                    }
3784                }
3785                27 => {
3786                    #[allow(irrefutable_let_patterns)]
3787                    if let Command::SetCameraPoseBuffer(_) = self {
3788                        // Do nothing, read the value into the object
3789                    } else {
3790                        // Initialize `self` to the right variant
3791                        *self = Command::SetCameraPoseBuffer(fidl::new_empty!(
3792                            SetCameraPoseBufferCmd,
3793                            fidl::encoding::DefaultFuchsiaResourceDialect
3794                        ));
3795                    }
3796                    #[allow(irrefutable_let_patterns)]
3797                    if let Command::SetCameraPoseBuffer(ref mut val) = self {
3798                        fidl::decode!(
3799                            SetCameraPoseBufferCmd,
3800                            fidl::encoding::DefaultFuchsiaResourceDialect,
3801                            val,
3802                            decoder,
3803                            _inner_offset,
3804                            depth
3805                        )?;
3806                    } else {
3807                        unreachable!()
3808                    }
3809                }
3810                28 => {
3811                    #[allow(irrefutable_let_patterns)]
3812                    if let Command::SetLightColor(_) = self {
3813                        // Do nothing, read the value into the object
3814                    } else {
3815                        // Initialize `self` to the right variant
3816                        *self = Command::SetLightColor(fidl::new_empty!(
3817                            SetLightColorCmd,
3818                            fidl::encoding::DefaultFuchsiaResourceDialect
3819                        ));
3820                    }
3821                    #[allow(irrefutable_let_patterns)]
3822                    if let Command::SetLightColor(ref mut val) = self {
3823                        fidl::decode!(
3824                            SetLightColorCmd,
3825                            fidl::encoding::DefaultFuchsiaResourceDialect,
3826                            val,
3827                            decoder,
3828                            _inner_offset,
3829                            depth
3830                        )?;
3831                    } else {
3832                        unreachable!()
3833                    }
3834                }
3835                29 => {
3836                    #[allow(irrefutable_let_patterns)]
3837                    if let Command::SetLightDirection(_) = self {
3838                        // Do nothing, read the value into the object
3839                    } else {
3840                        // Initialize `self` to the right variant
3841                        *self = Command::SetLightDirection(fidl::new_empty!(
3842                            SetLightDirectionCmd,
3843                            fidl::encoding::DefaultFuchsiaResourceDialect
3844                        ));
3845                    }
3846                    #[allow(irrefutable_let_patterns)]
3847                    if let Command::SetLightDirection(ref mut val) = self {
3848                        fidl::decode!(
3849                            SetLightDirectionCmd,
3850                            fidl::encoding::DefaultFuchsiaResourceDialect,
3851                            val,
3852                            decoder,
3853                            _inner_offset,
3854                            depth
3855                        )?;
3856                    } else {
3857                        unreachable!()
3858                    }
3859                }
3860                30 => {
3861                    #[allow(irrefutable_let_patterns)]
3862                    if let Command::AddLight(_) = self {
3863                        // Do nothing, read the value into the object
3864                    } else {
3865                        // Initialize `self` to the right variant
3866                        *self = Command::AddLight(fidl::new_empty!(
3867                            AddLightCmd,
3868                            fidl::encoding::DefaultFuchsiaResourceDialect
3869                        ));
3870                    }
3871                    #[allow(irrefutable_let_patterns)]
3872                    if let Command::AddLight(ref mut val) = self {
3873                        fidl::decode!(
3874                            AddLightCmd,
3875                            fidl::encoding::DefaultFuchsiaResourceDialect,
3876                            val,
3877                            decoder,
3878                            _inner_offset,
3879                            depth
3880                        )?;
3881                    } else {
3882                        unreachable!()
3883                    }
3884                }
3885                31 => {
3886                    #[allow(irrefutable_let_patterns)]
3887                    if let Command::DetachLight(_) = self {
3888                        // Do nothing, read the value into the object
3889                    } else {
3890                        // Initialize `self` to the right variant
3891                        *self = Command::DetachLight(fidl::new_empty!(
3892                            DetachLightCmd,
3893                            fidl::encoding::DefaultFuchsiaResourceDialect
3894                        ));
3895                    }
3896                    #[allow(irrefutable_let_patterns)]
3897                    if let Command::DetachLight(ref mut val) = self {
3898                        fidl::decode!(
3899                            DetachLightCmd,
3900                            fidl::encoding::DefaultFuchsiaResourceDialect,
3901                            val,
3902                            decoder,
3903                            _inner_offset,
3904                            depth
3905                        )?;
3906                    } else {
3907                        unreachable!()
3908                    }
3909                }
3910                32 => {
3911                    #[allow(irrefutable_let_patterns)]
3912                    if let Command::DetachLights(_) = self {
3913                        // Do nothing, read the value into the object
3914                    } else {
3915                        // Initialize `self` to the right variant
3916                        *self = Command::DetachLights(fidl::new_empty!(
3917                            DetachLightsCmd,
3918                            fidl::encoding::DefaultFuchsiaResourceDialect
3919                        ));
3920                    }
3921                    #[allow(irrefutable_let_patterns)]
3922                    if let Command::DetachLights(ref mut val) = self {
3923                        fidl::decode!(
3924                            DetachLightsCmd,
3925                            fidl::encoding::DefaultFuchsiaResourceDialect,
3926                            val,
3927                            decoder,
3928                            _inner_offset,
3929                            depth
3930                        )?;
3931                    } else {
3932                        unreachable!()
3933                    }
3934                }
3935                33 => {
3936                    #[allow(irrefutable_let_patterns)]
3937                    if let Command::SetTexture(_) = self {
3938                        // Do nothing, read the value into the object
3939                    } else {
3940                        // Initialize `self` to the right variant
3941                        *self = Command::SetTexture(fidl::new_empty!(
3942                            SetTextureCmd,
3943                            fidl::encoding::DefaultFuchsiaResourceDialect
3944                        ));
3945                    }
3946                    #[allow(irrefutable_let_patterns)]
3947                    if let Command::SetTexture(ref mut val) = self {
3948                        fidl::decode!(
3949                            SetTextureCmd,
3950                            fidl::encoding::DefaultFuchsiaResourceDialect,
3951                            val,
3952                            decoder,
3953                            _inner_offset,
3954                            depth
3955                        )?;
3956                    } else {
3957                        unreachable!()
3958                    }
3959                }
3960                34 => {
3961                    #[allow(irrefutable_let_patterns)]
3962                    if let Command::SetColor(_) = self {
3963                        // Do nothing, read the value into the object
3964                    } else {
3965                        // Initialize `self` to the right variant
3966                        *self = Command::SetColor(fidl::new_empty!(
3967                            SetColorCmd,
3968                            fidl::encoding::DefaultFuchsiaResourceDialect
3969                        ));
3970                    }
3971                    #[allow(irrefutable_let_patterns)]
3972                    if let Command::SetColor(ref mut val) = self {
3973                        fidl::decode!(
3974                            SetColorCmd,
3975                            fidl::encoding::DefaultFuchsiaResourceDialect,
3976                            val,
3977                            decoder,
3978                            _inner_offset,
3979                            depth
3980                        )?;
3981                    } else {
3982                        unreachable!()
3983                    }
3984                }
3985                35 => {
3986                    #[allow(irrefutable_let_patterns)]
3987                    if let Command::BindMeshBuffers(_) = self {
3988                        // Do nothing, read the value into the object
3989                    } else {
3990                        // Initialize `self` to the right variant
3991                        *self = Command::BindMeshBuffers(fidl::new_empty!(
3992                            BindMeshBuffersCmd,
3993                            fidl::encoding::DefaultFuchsiaResourceDialect
3994                        ));
3995                    }
3996                    #[allow(irrefutable_let_patterns)]
3997                    if let Command::BindMeshBuffers(ref mut val) = self {
3998                        fidl::decode!(
3999                            BindMeshBuffersCmd,
4000                            fidl::encoding::DefaultFuchsiaResourceDialect,
4001                            val,
4002                            decoder,
4003                            _inner_offset,
4004                            depth
4005                        )?;
4006                    } else {
4007                        unreachable!()
4008                    }
4009                }
4010                36 => {
4011                    #[allow(irrefutable_let_patterns)]
4012                    if let Command::AddLayer(_) = self {
4013                        // Do nothing, read the value into the object
4014                    } else {
4015                        // Initialize `self` to the right variant
4016                        *self = Command::AddLayer(fidl::new_empty!(
4017                            AddLayerCmd,
4018                            fidl::encoding::DefaultFuchsiaResourceDialect
4019                        ));
4020                    }
4021                    #[allow(irrefutable_let_patterns)]
4022                    if let Command::AddLayer(ref mut val) = self {
4023                        fidl::decode!(
4024                            AddLayerCmd,
4025                            fidl::encoding::DefaultFuchsiaResourceDialect,
4026                            val,
4027                            decoder,
4028                            _inner_offset,
4029                            depth
4030                        )?;
4031                    } else {
4032                        unreachable!()
4033                    }
4034                }
4035                37 => {
4036                    #[allow(irrefutable_let_patterns)]
4037                    if let Command::RemoveLayer(_) = self {
4038                        // Do nothing, read the value into the object
4039                    } else {
4040                        // Initialize `self` to the right variant
4041                        *self = Command::RemoveLayer(fidl::new_empty!(
4042                            RemoveLayerCmd,
4043                            fidl::encoding::DefaultFuchsiaResourceDialect
4044                        ));
4045                    }
4046                    #[allow(irrefutable_let_patterns)]
4047                    if let Command::RemoveLayer(ref mut val) = self {
4048                        fidl::decode!(
4049                            RemoveLayerCmd,
4050                            fidl::encoding::DefaultFuchsiaResourceDialect,
4051                            val,
4052                            decoder,
4053                            _inner_offset,
4054                            depth
4055                        )?;
4056                    } else {
4057                        unreachable!()
4058                    }
4059                }
4060                38 => {
4061                    #[allow(irrefutable_let_patterns)]
4062                    if let Command::RemoveAllLayers(_) = self {
4063                        // Do nothing, read the value into the object
4064                    } else {
4065                        // Initialize `self` to the right variant
4066                        *self = Command::RemoveAllLayers(fidl::new_empty!(
4067                            RemoveAllLayersCmd,
4068                            fidl::encoding::DefaultFuchsiaResourceDialect
4069                        ));
4070                    }
4071                    #[allow(irrefutable_let_patterns)]
4072                    if let Command::RemoveAllLayers(ref mut val) = self {
4073                        fidl::decode!(
4074                            RemoveAllLayersCmd,
4075                            fidl::encoding::DefaultFuchsiaResourceDialect,
4076                            val,
4077                            decoder,
4078                            _inner_offset,
4079                            depth
4080                        )?;
4081                    } else {
4082                        unreachable!()
4083                    }
4084                }
4085                39 => {
4086                    #[allow(irrefutable_let_patterns)]
4087                    if let Command::SetLayerStack(_) = self {
4088                        // Do nothing, read the value into the object
4089                    } else {
4090                        // Initialize `self` to the right variant
4091                        *self = Command::SetLayerStack(fidl::new_empty!(
4092                            SetLayerStackCmd,
4093                            fidl::encoding::DefaultFuchsiaResourceDialect
4094                        ));
4095                    }
4096                    #[allow(irrefutable_let_patterns)]
4097                    if let Command::SetLayerStack(ref mut val) = self {
4098                        fidl::decode!(
4099                            SetLayerStackCmd,
4100                            fidl::encoding::DefaultFuchsiaResourceDialect,
4101                            val,
4102                            decoder,
4103                            _inner_offset,
4104                            depth
4105                        )?;
4106                    } else {
4107                        unreachable!()
4108                    }
4109                }
4110                40 => {
4111                    #[allow(irrefutable_let_patterns)]
4112                    if let Command::SetRenderer(_) = self {
4113                        // Do nothing, read the value into the object
4114                    } else {
4115                        // Initialize `self` to the right variant
4116                        *self = Command::SetRenderer(fidl::new_empty!(
4117                            SetRendererCmd,
4118                            fidl::encoding::DefaultFuchsiaResourceDialect
4119                        ));
4120                    }
4121                    #[allow(irrefutable_let_patterns)]
4122                    if let Command::SetRenderer(ref mut val) = self {
4123                        fidl::decode!(
4124                            SetRendererCmd,
4125                            fidl::encoding::DefaultFuchsiaResourceDialect,
4126                            val,
4127                            decoder,
4128                            _inner_offset,
4129                            depth
4130                        )?;
4131                    } else {
4132                        unreachable!()
4133                    }
4134                }
4135                41 => {
4136                    #[allow(irrefutable_let_patterns)]
4137                    if let Command::SetRendererParam(_) = self {
4138                        // Do nothing, read the value into the object
4139                    } else {
4140                        // Initialize `self` to the right variant
4141                        *self = Command::SetRendererParam(fidl::new_empty!(
4142                            SetRendererParamCmd,
4143                            fidl::encoding::DefaultFuchsiaResourceDialect
4144                        ));
4145                    }
4146                    #[allow(irrefutable_let_patterns)]
4147                    if let Command::SetRendererParam(ref mut val) = self {
4148                        fidl::decode!(
4149                            SetRendererParamCmd,
4150                            fidl::encoding::DefaultFuchsiaResourceDialect,
4151                            val,
4152                            decoder,
4153                            _inner_offset,
4154                            depth
4155                        )?;
4156                    } else {
4157                        unreachable!()
4158                    }
4159                }
4160                42 => {
4161                    #[allow(irrefutable_let_patterns)]
4162                    if let Command::SetEventMask(_) = self {
4163                        // Do nothing, read the value into the object
4164                    } else {
4165                        // Initialize `self` to the right variant
4166                        *self = Command::SetEventMask(fidl::new_empty!(
4167                            SetEventMaskCmd,
4168                            fidl::encoding::DefaultFuchsiaResourceDialect
4169                        ));
4170                    }
4171                    #[allow(irrefutable_let_patterns)]
4172                    if let Command::SetEventMask(ref mut val) = self {
4173                        fidl::decode!(
4174                            SetEventMaskCmd,
4175                            fidl::encoding::DefaultFuchsiaResourceDialect,
4176                            val,
4177                            decoder,
4178                            _inner_offset,
4179                            depth
4180                        )?;
4181                    } else {
4182                        unreachable!()
4183                    }
4184                }
4185                43 => {
4186                    #[allow(irrefutable_let_patterns)]
4187                    if let Command::SetLabel(_) = self {
4188                        // Do nothing, read the value into the object
4189                    } else {
4190                        // Initialize `self` to the right variant
4191                        *self = Command::SetLabel(fidl::new_empty!(
4192                            SetLabelCmd,
4193                            fidl::encoding::DefaultFuchsiaResourceDialect
4194                        ));
4195                    }
4196                    #[allow(irrefutable_let_patterns)]
4197                    if let Command::SetLabel(ref mut val) = self {
4198                        fidl::decode!(
4199                            SetLabelCmd,
4200                            fidl::encoding::DefaultFuchsiaResourceDialect,
4201                            val,
4202                            decoder,
4203                            _inner_offset,
4204                            depth
4205                        )?;
4206                    } else {
4207                        unreachable!()
4208                    }
4209                }
4210                44 => {
4211                    #[allow(irrefutable_let_patterns)]
4212                    if let Command::SetDisableClipping(_) = self {
4213                        // Do nothing, read the value into the object
4214                    } else {
4215                        // Initialize `self` to the right variant
4216                        *self = Command::SetDisableClipping(fidl::new_empty!(
4217                            SetDisableClippingCmd,
4218                            fidl::encoding::DefaultFuchsiaResourceDialect
4219                        ));
4220                    }
4221                    #[allow(irrefutable_let_patterns)]
4222                    if let Command::SetDisableClipping(ref mut val) = self {
4223                        fidl::decode!(
4224                            SetDisableClippingCmd,
4225                            fidl::encoding::DefaultFuchsiaResourceDialect,
4226                            val,
4227                            decoder,
4228                            _inner_offset,
4229                            depth
4230                        )?;
4231                    } else {
4232                        unreachable!()
4233                    }
4234                }
4235                45 => {
4236                    #[allow(irrefutable_let_patterns)]
4237                    if let Command::SetImportFocus(_) = self {
4238                        // Do nothing, read the value into the object
4239                    } else {
4240                        // Initialize `self` to the right variant
4241                        *self = Command::SetImportFocus(fidl::new_empty!(
4242                            SetImportFocusCmdDeprecated,
4243                            fidl::encoding::DefaultFuchsiaResourceDialect
4244                        ));
4245                    }
4246                    #[allow(irrefutable_let_patterns)]
4247                    if let Command::SetImportFocus(ref mut val) = self {
4248                        fidl::decode!(
4249                            SetImportFocusCmdDeprecated,
4250                            fidl::encoding::DefaultFuchsiaResourceDialect,
4251                            val,
4252                            decoder,
4253                            _inner_offset,
4254                            depth
4255                        )?;
4256                    } else {
4257                        unreachable!()
4258                    }
4259                }
4260                46 => {
4261                    #[allow(irrefutable_let_patterns)]
4262                    if let Command::SetClipPlanes(_) = self {
4263                        // Do nothing, read the value into the object
4264                    } else {
4265                        // Initialize `self` to the right variant
4266                        *self = Command::SetClipPlanes(fidl::new_empty!(
4267                            SetClipPlanesCmd,
4268                            fidl::encoding::DefaultFuchsiaResourceDialect
4269                        ));
4270                    }
4271                    #[allow(irrefutable_let_patterns)]
4272                    if let Command::SetClipPlanes(ref mut val) = self {
4273                        fidl::decode!(
4274                            SetClipPlanesCmd,
4275                            fidl::encoding::DefaultFuchsiaResourceDialect,
4276                            val,
4277                            decoder,
4278                            _inner_offset,
4279                            depth
4280                        )?;
4281                    } else {
4282                        unreachable!()
4283                    }
4284                }
4285                47 => {
4286                    #[allow(irrefutable_let_patterns)]
4287                    if let Command::SetPointLightPosition(_) = self {
4288                        // Do nothing, read the value into the object
4289                    } else {
4290                        // Initialize `self` to the right variant
4291                        *self = Command::SetPointLightPosition(fidl::new_empty!(
4292                            SetPointLightPositionCmd,
4293                            fidl::encoding::DefaultFuchsiaResourceDialect
4294                        ));
4295                    }
4296                    #[allow(irrefutable_let_patterns)]
4297                    if let Command::SetPointLightPosition(ref mut val) = self {
4298                        fidl::decode!(
4299                            SetPointLightPositionCmd,
4300                            fidl::encoding::DefaultFuchsiaResourceDialect,
4301                            val,
4302                            decoder,
4303                            _inner_offset,
4304                            depth
4305                        )?;
4306                    } else {
4307                        unreachable!()
4308                    }
4309                }
4310                48 => {
4311                    #[allow(irrefutable_let_patterns)]
4312                    if let Command::SetPointLightFalloff(_) = self {
4313                        // Do nothing, read the value into the object
4314                    } else {
4315                        // Initialize `self` to the right variant
4316                        *self = Command::SetPointLightFalloff(fidl::new_empty!(
4317                            SetPointLightFalloffCmd,
4318                            fidl::encoding::DefaultFuchsiaResourceDialect
4319                        ));
4320                    }
4321                    #[allow(irrefutable_let_patterns)]
4322                    if let Command::SetPointLightFalloff(ref mut val) = self {
4323                        fidl::decode!(
4324                            SetPointLightFalloffCmd,
4325                            fidl::encoding::DefaultFuchsiaResourceDialect,
4326                            val,
4327                            decoder,
4328                            _inner_offset,
4329                            depth
4330                        )?;
4331                    } else {
4332                        unreachable!()
4333                    }
4334                }
4335                49 => {
4336                    #[allow(irrefutable_let_patterns)]
4337                    if let Command::Scene_AddAmbientLight(_) = self {
4338                        // Do nothing, read the value into the object
4339                    } else {
4340                        // Initialize `self` to the right variant
4341                        *self = Command::Scene_AddAmbientLight(fidl::new_empty!(
4342                            SceneAddAmbientLightCmd,
4343                            fidl::encoding::DefaultFuchsiaResourceDialect
4344                        ));
4345                    }
4346                    #[allow(irrefutable_let_patterns)]
4347                    if let Command::Scene_AddAmbientLight(ref mut val) = self {
4348                        fidl::decode!(
4349                            SceneAddAmbientLightCmd,
4350                            fidl::encoding::DefaultFuchsiaResourceDialect,
4351                            val,
4352                            decoder,
4353                            _inner_offset,
4354                            depth
4355                        )?;
4356                    } else {
4357                        unreachable!()
4358                    }
4359                }
4360                50 => {
4361                    #[allow(irrefutable_let_patterns)]
4362                    if let Command::Scene_AddDirectionalLight(_) = self {
4363                        // Do nothing, read the value into the object
4364                    } else {
4365                        // Initialize `self` to the right variant
4366                        *self = Command::Scene_AddDirectionalLight(fidl::new_empty!(
4367                            SceneAddDirectionalLightCmd,
4368                            fidl::encoding::DefaultFuchsiaResourceDialect
4369                        ));
4370                    }
4371                    #[allow(irrefutable_let_patterns)]
4372                    if let Command::Scene_AddDirectionalLight(ref mut val) = self {
4373                        fidl::decode!(
4374                            SceneAddDirectionalLightCmd,
4375                            fidl::encoding::DefaultFuchsiaResourceDialect,
4376                            val,
4377                            decoder,
4378                            _inner_offset,
4379                            depth
4380                        )?;
4381                    } else {
4382                        unreachable!()
4383                    }
4384                }
4385                51 => {
4386                    #[allow(irrefutable_let_patterns)]
4387                    if let Command::Scene_AddPointLight(_) = self {
4388                        // Do nothing, read the value into the object
4389                    } else {
4390                        // Initialize `self` to the right variant
4391                        *self = Command::Scene_AddPointLight(fidl::new_empty!(
4392                            SceneAddPointLightCmd,
4393                            fidl::encoding::DefaultFuchsiaResourceDialect
4394                        ));
4395                    }
4396                    #[allow(irrefutable_let_patterns)]
4397                    if let Command::Scene_AddPointLight(ref mut val) = self {
4398                        fidl::decode!(
4399                            SceneAddPointLightCmd,
4400                            fidl::encoding::DefaultFuchsiaResourceDialect,
4401                            val,
4402                            decoder,
4403                            _inner_offset,
4404                            depth
4405                        )?;
4406                    } else {
4407                        unreachable!()
4408                    }
4409                }
4410                52 => {
4411                    #[allow(irrefutable_let_patterns)]
4412                    if let Command::SetDisplayColorConversion(_) = self {
4413                        // Do nothing, read the value into the object
4414                    } else {
4415                        // Initialize `self` to the right variant
4416                        *self = Command::SetDisplayColorConversion(fidl::new_empty!(
4417                            SetDisplayColorConversionCmdHack,
4418                            fidl::encoding::DefaultFuchsiaResourceDialect
4419                        ));
4420                    }
4421                    #[allow(irrefutable_let_patterns)]
4422                    if let Command::SetDisplayColorConversion(ref mut val) = self {
4423                        fidl::decode!(
4424                            SetDisplayColorConversionCmdHack,
4425                            fidl::encoding::DefaultFuchsiaResourceDialect,
4426                            val,
4427                            decoder,
4428                            _inner_offset,
4429                            depth
4430                        )?;
4431                    } else {
4432                        unreachable!()
4433                    }
4434                }
4435                53 => {
4436                    #[allow(irrefutable_let_patterns)]
4437                    if let Command::SetDisplayRotation(_) = self {
4438                        // Do nothing, read the value into the object
4439                    } else {
4440                        // Initialize `self` to the right variant
4441                        *self = Command::SetDisplayRotation(fidl::new_empty!(
4442                            SetDisplayRotationCmdHack,
4443                            fidl::encoding::DefaultFuchsiaResourceDialect
4444                        ));
4445                    }
4446                    #[allow(irrefutable_let_patterns)]
4447                    if let Command::SetDisplayRotation(ref mut val) = self {
4448                        fidl::decode!(
4449                            SetDisplayRotationCmdHack,
4450                            fidl::encoding::DefaultFuchsiaResourceDialect,
4451                            val,
4452                            decoder,
4453                            _inner_offset,
4454                            depth
4455                        )?;
4456                    } else {
4457                        unreachable!()
4458                    }
4459                }
4460                54 => {
4461                    #[allow(irrefutable_let_patterns)]
4462                    if let Command::SetEnableViewDebugBounds(_) = self {
4463                        // Do nothing, read the value into the object
4464                    } else {
4465                        // Initialize `self` to the right variant
4466                        *self = Command::SetEnableViewDebugBounds(fidl::new_empty!(
4467                            SetEnableDebugViewBoundsCmd,
4468                            fidl::encoding::DefaultFuchsiaResourceDialect
4469                        ));
4470                    }
4471                    #[allow(irrefutable_let_patterns)]
4472                    if let Command::SetEnableViewDebugBounds(ref mut val) = self {
4473                        fidl::decode!(
4474                            SetEnableDebugViewBoundsCmd,
4475                            fidl::encoding::DefaultFuchsiaResourceDialect,
4476                            val,
4477                            decoder,
4478                            _inner_offset,
4479                            depth
4480                        )?;
4481                    } else {
4482                        unreachable!()
4483                    }
4484                }
4485                55 => {
4486                    #[allow(irrefutable_let_patterns)]
4487                    if let Command::SetViewHolderBoundsColor(_) = self {
4488                        // Do nothing, read the value into the object
4489                    } else {
4490                        // Initialize `self` to the right variant
4491                        *self = Command::SetViewHolderBoundsColor(fidl::new_empty!(
4492                            SetViewHolderBoundsColorCmd,
4493                            fidl::encoding::DefaultFuchsiaResourceDialect
4494                        ));
4495                    }
4496                    #[allow(irrefutable_let_patterns)]
4497                    if let Command::SetViewHolderBoundsColor(ref mut val) = self {
4498                        fidl::decode!(
4499                            SetViewHolderBoundsColorCmd,
4500                            fidl::encoding::DefaultFuchsiaResourceDialect,
4501                            val,
4502                            decoder,
4503                            _inner_offset,
4504                            depth
4505                        )?;
4506                    } else {
4507                        unreachable!()
4508                    }
4509                }
4510                56 => {
4511                    #[allow(irrefutable_let_patterns)]
4512                    if let Command::SetCameraClipSpaceTransform(_) = self {
4513                        // Do nothing, read the value into the object
4514                    } else {
4515                        // Initialize `self` to the right variant
4516                        *self = Command::SetCameraClipSpaceTransform(fidl::new_empty!(
4517                            SetCameraClipSpaceTransformCmd,
4518                            fidl::encoding::DefaultFuchsiaResourceDialect
4519                        ));
4520                    }
4521                    #[allow(irrefutable_let_patterns)]
4522                    if let Command::SetCameraClipSpaceTransform(ref mut val) = self {
4523                        fidl::decode!(
4524                            SetCameraClipSpaceTransformCmd,
4525                            fidl::encoding::DefaultFuchsiaResourceDialect,
4526                            val,
4527                            decoder,
4528                            _inner_offset,
4529                            depth
4530                        )?;
4531                    } else {
4532                        unreachable!()
4533                    }
4534                }
4535                57 => {
4536                    #[allow(irrefutable_let_patterns)]
4537                    if let Command::SetDisplayMinimumRgb(_) = self {
4538                        // Do nothing, read the value into the object
4539                    } else {
4540                        // Initialize `self` to the right variant
4541                        *self = Command::SetDisplayMinimumRgb(fidl::new_empty!(
4542                            SetDisplayMinimumRgbCmdHack,
4543                            fidl::encoding::DefaultFuchsiaResourceDialect
4544                        ));
4545                    }
4546                    #[allow(irrefutable_let_patterns)]
4547                    if let Command::SetDisplayMinimumRgb(ref mut val) = self {
4548                        fidl::decode!(
4549                            SetDisplayMinimumRgbCmdHack,
4550                            fidl::encoding::DefaultFuchsiaResourceDialect,
4551                            val,
4552                            decoder,
4553                            _inner_offset,
4554                            depth
4555                        )?;
4556                    } else {
4557                        unreachable!()
4558                    }
4559                }
4560                58 => {
4561                    #[allow(irrefutable_let_patterns)]
4562                    if let Command::SetSemanticVisibility(_) = self {
4563                        // Do nothing, read the value into the object
4564                    } else {
4565                        // Initialize `self` to the right variant
4566                        *self = Command::SetSemanticVisibility(fidl::new_empty!(
4567                            SetSemanticVisibilityCmd,
4568                            fidl::encoding::DefaultFuchsiaResourceDialect
4569                        ));
4570                    }
4571                    #[allow(irrefutable_let_patterns)]
4572                    if let Command::SetSemanticVisibility(ref mut val) = self {
4573                        fidl::decode!(
4574                            SetSemanticVisibilityCmd,
4575                            fidl::encoding::DefaultFuchsiaResourceDialect,
4576                            val,
4577                            decoder,
4578                            _inner_offset,
4579                            depth
4580                        )?;
4581                    } else {
4582                        unreachable!()
4583                    }
4584                }
4585                ordinal => panic!("unexpected ordinal {:?}", ordinal),
4586            }
4587            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4588                return Err(fidl::Error::InvalidNumBytesInEnvelope);
4589            }
4590            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4591                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4592            }
4593            Ok(())
4594        }
4595    }
4596
4597    impl fidl::encoding::ResourceTypeMarker for ResourceArgs {
4598        type Borrowed<'a> = &'a mut Self;
4599        fn take_or_borrow<'a>(
4600            value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4601        ) -> Self::Borrowed<'a> {
4602            value
4603        }
4604    }
4605
4606    unsafe impl fidl::encoding::TypeMarker for ResourceArgs {
4607        type Owned = Self;
4608
4609        #[inline(always)]
4610        fn inline_align(_context: fidl::encoding::Context) -> usize {
4611            8
4612        }
4613
4614        #[inline(always)]
4615        fn inline_size(_context: fidl::encoding::Context) -> usize {
4616            16
4617        }
4618    }
4619
4620    unsafe impl fidl::encoding::Encode<ResourceArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
4621        for &mut ResourceArgs
4622    {
4623        #[inline]
4624        unsafe fn encode(
4625            self,
4626            encoder: &mut fidl::encoding::Encoder<
4627                '_,
4628                fidl::encoding::DefaultFuchsiaResourceDialect,
4629            >,
4630            offset: usize,
4631            _depth: fidl::encoding::Depth,
4632        ) -> fidl::Result<()> {
4633            encoder.debug_check_bounds::<ResourceArgs>(offset);
4634            encoder.write_num::<u64>(self.ordinal(), offset);
4635            match self {
4636                ResourceArgs::Memory(ref mut val) => fidl::encoding::encode_in_envelope::<
4637                    MemoryArgs,
4638                    fidl::encoding::DefaultFuchsiaResourceDialect,
4639                >(
4640                    <MemoryArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
4641                    encoder,
4642                    offset + 8,
4643                    _depth,
4644                ),
4645                ResourceArgs::Image(ref val) => fidl::encoding::encode_in_envelope::<
4646                    ImageArgs,
4647                    fidl::encoding::DefaultFuchsiaResourceDialect,
4648                >(
4649                    <ImageArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4650                    encoder,
4651                    offset + 8,
4652                    _depth,
4653                ),
4654                ResourceArgs::Buffer(ref val) => fidl::encoding::encode_in_envelope::<
4655                    BufferArgs,
4656                    fidl::encoding::DefaultFuchsiaResourceDialect,
4657                >(
4658                    <BufferArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4659                    encoder,
4660                    offset + 8,
4661                    _depth,
4662                ),
4663                ResourceArgs::View(ref mut val) => fidl::encoding::encode_in_envelope::<
4664                    ViewArgs,
4665                    fidl::encoding::DefaultFuchsiaResourceDialect,
4666                >(
4667                    <ViewArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
4668                    encoder,
4669                    offset + 8,
4670                    _depth,
4671                ),
4672                ResourceArgs::ViewHolder(ref mut val) => fidl::encoding::encode_in_envelope::<
4673                    ViewHolderArgs,
4674                    fidl::encoding::DefaultFuchsiaResourceDialect,
4675                >(
4676                    <ViewHolderArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
4677                    encoder,
4678                    offset + 8,
4679                    _depth,
4680                ),
4681                ResourceArgs::Rectangle(ref val) => fidl::encoding::encode_in_envelope::<
4682                    RectangleArgs,
4683                    fidl::encoding::DefaultFuchsiaResourceDialect,
4684                >(
4685                    <RectangleArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4686                    encoder,
4687                    offset + 8,
4688                    _depth,
4689                ),
4690                ResourceArgs::RoundedRectangle(ref val) => fidl::encoding::encode_in_envelope::<
4691                    RoundedRectangleArgs,
4692                    fidl::encoding::DefaultFuchsiaResourceDialect,
4693                >(
4694                    <RoundedRectangleArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4695                    encoder,
4696                    offset + 8,
4697                    _depth,
4698                ),
4699                ResourceArgs::Circle(ref val) => fidl::encoding::encode_in_envelope::<
4700                    CircleArgs,
4701                    fidl::encoding::DefaultFuchsiaResourceDialect,
4702                >(
4703                    <CircleArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4704                    encoder,
4705                    offset + 8,
4706                    _depth,
4707                ),
4708                ResourceArgs::Mesh(ref val) => fidl::encoding::encode_in_envelope::<
4709                    MeshArgs,
4710                    fidl::encoding::DefaultFuchsiaResourceDialect,
4711                >(
4712                    <MeshArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4713                    encoder,
4714                    offset + 8,
4715                    _depth,
4716                ),
4717                ResourceArgs::ShapeNode(ref val) => fidl::encoding::encode_in_envelope::<
4718                    ShapeNodeArgs,
4719                    fidl::encoding::DefaultFuchsiaResourceDialect,
4720                >(
4721                    <ShapeNodeArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4722                    encoder,
4723                    offset + 8,
4724                    _depth,
4725                ),
4726                ResourceArgs::ClipNode(ref val) => fidl::encoding::encode_in_envelope::<
4727                    ClipNodeArgs,
4728                    fidl::encoding::DefaultFuchsiaResourceDialect,
4729                >(
4730                    <ClipNodeArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4731                    encoder,
4732                    offset + 8,
4733                    _depth,
4734                ),
4735                ResourceArgs::EntityNode(ref val) => fidl::encoding::encode_in_envelope::<
4736                    EntityNodeArgs,
4737                    fidl::encoding::DefaultFuchsiaResourceDialect,
4738                >(
4739                    <EntityNodeArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4740                    encoder,
4741                    offset + 8,
4742                    _depth,
4743                ),
4744                ResourceArgs::OpacityNode(ref val) => fidl::encoding::encode_in_envelope::<
4745                    OpacityNodeArgsHack,
4746                    fidl::encoding::DefaultFuchsiaResourceDialect,
4747                >(
4748                    <OpacityNodeArgsHack as fidl::encoding::ValueTypeMarker>::borrow(val),
4749                    encoder,
4750                    offset + 8,
4751                    _depth,
4752                ),
4753                ResourceArgs::Material(ref val) => fidl::encoding::encode_in_envelope::<
4754                    MaterialArgs,
4755                    fidl::encoding::DefaultFuchsiaResourceDialect,
4756                >(
4757                    <MaterialArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4758                    encoder,
4759                    offset + 8,
4760                    _depth,
4761                ),
4762                ResourceArgs::Compositor(ref val) => fidl::encoding::encode_in_envelope::<
4763                    CompositorArgs,
4764                    fidl::encoding::DefaultFuchsiaResourceDialect,
4765                >(
4766                    <CompositorArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4767                    encoder,
4768                    offset + 8,
4769                    _depth,
4770                ),
4771                ResourceArgs::DisplayCompositor(ref val) => fidl::encoding::encode_in_envelope::<
4772                    DisplayCompositorArgs,
4773                    fidl::encoding::DefaultFuchsiaResourceDialect,
4774                >(
4775                    <DisplayCompositorArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4776                    encoder,
4777                    offset + 8,
4778                    _depth,
4779                ),
4780                ResourceArgs::LayerStack(ref val) => fidl::encoding::encode_in_envelope::<
4781                    LayerStackArgs,
4782                    fidl::encoding::DefaultFuchsiaResourceDialect,
4783                >(
4784                    <LayerStackArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4785                    encoder,
4786                    offset + 8,
4787                    _depth,
4788                ),
4789                ResourceArgs::Layer(ref val) => fidl::encoding::encode_in_envelope::<
4790                    LayerArgs,
4791                    fidl::encoding::DefaultFuchsiaResourceDialect,
4792                >(
4793                    <LayerArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4794                    encoder,
4795                    offset + 8,
4796                    _depth,
4797                ),
4798                ResourceArgs::Scene(ref val) => fidl::encoding::encode_in_envelope::<
4799                    SceneArgs,
4800                    fidl::encoding::DefaultFuchsiaResourceDialect,
4801                >(
4802                    <SceneArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4803                    encoder,
4804                    offset + 8,
4805                    _depth,
4806                ),
4807                ResourceArgs::Camera(ref val) => fidl::encoding::encode_in_envelope::<
4808                    CameraArgs,
4809                    fidl::encoding::DefaultFuchsiaResourceDialect,
4810                >(
4811                    <CameraArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4812                    encoder,
4813                    offset + 8,
4814                    _depth,
4815                ),
4816                ResourceArgs::StereoCamera(ref val) => fidl::encoding::encode_in_envelope::<
4817                    StereoCameraArgs,
4818                    fidl::encoding::DefaultFuchsiaResourceDialect,
4819                >(
4820                    <StereoCameraArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4821                    encoder,
4822                    offset + 8,
4823                    _depth,
4824                ),
4825                ResourceArgs::Renderer(ref val) => fidl::encoding::encode_in_envelope::<
4826                    RendererArgs,
4827                    fidl::encoding::DefaultFuchsiaResourceDialect,
4828                >(
4829                    <RendererArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4830                    encoder,
4831                    offset + 8,
4832                    _depth,
4833                ),
4834                ResourceArgs::AmbientLight(ref val) => fidl::encoding::encode_in_envelope::<
4835                    AmbientLightArgs,
4836                    fidl::encoding::DefaultFuchsiaResourceDialect,
4837                >(
4838                    <AmbientLightArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4839                    encoder,
4840                    offset + 8,
4841                    _depth,
4842                ),
4843                ResourceArgs::DirectionalLight(ref val) => fidl::encoding::encode_in_envelope::<
4844                    DirectionalLightArgs,
4845                    fidl::encoding::DefaultFuchsiaResourceDialect,
4846                >(
4847                    <DirectionalLightArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4848                    encoder,
4849                    offset + 8,
4850                    _depth,
4851                ),
4852                ResourceArgs::Variable(ref val) => fidl::encoding::encode_in_envelope::<
4853                    VariableArgs,
4854                    fidl::encoding::DefaultFuchsiaResourceDialect,
4855                >(
4856                    <VariableArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4857                    encoder,
4858                    offset + 8,
4859                    _depth,
4860                ),
4861                ResourceArgs::PointLight(ref val) => fidl::encoding::encode_in_envelope::<
4862                    PointLightArgs,
4863                    fidl::encoding::DefaultFuchsiaResourceDialect,
4864                >(
4865                    <PointLightArgs as fidl::encoding::ValueTypeMarker>::borrow(val),
4866                    encoder,
4867                    offset + 8,
4868                    _depth,
4869                ),
4870                ResourceArgs::View3(ref mut val) => fidl::encoding::encode_in_envelope::<
4871                    ViewArgs3,
4872                    fidl::encoding::DefaultFuchsiaResourceDialect,
4873                >(
4874                    <ViewArgs3 as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
4875                    encoder,
4876                    offset + 8,
4877                    _depth,
4878                ),
4879                ResourceArgs::ImagePipe2(ref mut val) => fidl::encoding::encode_in_envelope::<
4880                    ImagePipe2Args,
4881                    fidl::encoding::DefaultFuchsiaResourceDialect,
4882                >(
4883                    <ImagePipe2Args as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
4884                    encoder,
4885                    offset + 8,
4886                    _depth,
4887                ),
4888                ResourceArgs::Image2(ref val) => fidl::encoding::encode_in_envelope::<
4889                    ImageArgs2,
4890                    fidl::encoding::DefaultFuchsiaResourceDialect,
4891                >(
4892                    <ImageArgs2 as fidl::encoding::ValueTypeMarker>::borrow(val),
4893                    encoder,
4894                    offset + 8,
4895                    _depth,
4896                ),
4897                ResourceArgs::Image3(ref mut val) => fidl::encoding::encode_in_envelope::<
4898                    ImageArgs3,
4899                    fidl::encoding::DefaultFuchsiaResourceDialect,
4900                >(
4901                    <ImageArgs3 as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
4902                    encoder,
4903                    offset + 8,
4904                    _depth,
4905                ),
4906            }
4907        }
4908    }
4909
4910    impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for ResourceArgs {
4911        #[inline(always)]
4912        fn new_empty() -> Self {
4913            Self::Memory(fidl::new_empty!(
4914                MemoryArgs,
4915                fidl::encoding::DefaultFuchsiaResourceDialect
4916            ))
4917        }
4918
4919        #[inline]
4920        unsafe fn decode(
4921            &mut self,
4922            decoder: &mut fidl::encoding::Decoder<
4923                '_,
4924                fidl::encoding::DefaultFuchsiaResourceDialect,
4925            >,
4926            offset: usize,
4927            mut depth: fidl::encoding::Depth,
4928        ) -> fidl::Result<()> {
4929            decoder.debug_check_bounds::<Self>(offset);
4930            #[allow(unused_variables)]
4931            let next_out_of_line = decoder.next_out_of_line();
4932            let handles_before = decoder.remaining_handles();
4933            let (ordinal, inlined, num_bytes, num_handles) =
4934                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4935
4936            let member_inline_size = match ordinal {
4937                1 => <MemoryArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4938                2 => <ImageArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4939                4 => <BufferArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4940                5 => <ViewArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4941                6 => <ViewHolderArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4942                7 => <RectangleArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4943                8 => <RoundedRectangleArgs as fidl::encoding::TypeMarker>::inline_size(
4944                    decoder.context,
4945                ),
4946                9 => <CircleArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4947                10 => <MeshArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4948                11 => <ShapeNodeArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4949                12 => <ClipNodeArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4950                13 => <EntityNodeArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4951                14 => <OpacityNodeArgsHack as fidl::encoding::TypeMarker>::inline_size(
4952                    decoder.context,
4953                ),
4954                15 => <MaterialArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4955                16 => <CompositorArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4956                17 => <DisplayCompositorArgs as fidl::encoding::TypeMarker>::inline_size(
4957                    decoder.context,
4958                ),
4959                19 => <LayerStackArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4960                20 => <LayerArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4961                21 => <SceneArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4962                22 => <CameraArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4963                23 => {
4964                    <StereoCameraArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context)
4965                }
4966                24 => <RendererArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4967                25 => {
4968                    <AmbientLightArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context)
4969                }
4970                26 => <DirectionalLightArgs as fidl::encoding::TypeMarker>::inline_size(
4971                    decoder.context,
4972                ),
4973                27 => <VariableArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4974                28 => <PointLightArgs as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4975                31 => <ViewArgs3 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4976                32 => <ImagePipe2Args as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4977                33 => <ImageArgs2 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4978                34 => <ImageArgs3 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4979                _ => return Err(fidl::Error::UnknownUnionTag),
4980            };
4981
4982            if inlined != (member_inline_size <= 4) {
4983                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4984            }
4985            let _inner_offset;
4986            if inlined {
4987                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4988                _inner_offset = offset + 8;
4989            } else {
4990                depth.increment()?;
4991                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4992            }
4993            match ordinal {
4994                1 => {
4995                    #[allow(irrefutable_let_patterns)]
4996                    if let ResourceArgs::Memory(_) = self {
4997                        // Do nothing, read the value into the object
4998                    } else {
4999                        // Initialize `self` to the right variant
5000                        *self = ResourceArgs::Memory(fidl::new_empty!(
5001                            MemoryArgs,
5002                            fidl::encoding::DefaultFuchsiaResourceDialect
5003                        ));
5004                    }
5005                    #[allow(irrefutable_let_patterns)]
5006                    if let ResourceArgs::Memory(ref mut val) = self {
5007                        fidl::decode!(
5008                            MemoryArgs,
5009                            fidl::encoding::DefaultFuchsiaResourceDialect,
5010                            val,
5011                            decoder,
5012                            _inner_offset,
5013                            depth
5014                        )?;
5015                    } else {
5016                        unreachable!()
5017                    }
5018                }
5019                2 => {
5020                    #[allow(irrefutable_let_patterns)]
5021                    if let ResourceArgs::Image(_) = self {
5022                        // Do nothing, read the value into the object
5023                    } else {
5024                        // Initialize `self` to the right variant
5025                        *self = ResourceArgs::Image(fidl::new_empty!(
5026                            ImageArgs,
5027                            fidl::encoding::DefaultFuchsiaResourceDialect
5028                        ));
5029                    }
5030                    #[allow(irrefutable_let_patterns)]
5031                    if let ResourceArgs::Image(ref mut val) = self {
5032                        fidl::decode!(
5033                            ImageArgs,
5034                            fidl::encoding::DefaultFuchsiaResourceDialect,
5035                            val,
5036                            decoder,
5037                            _inner_offset,
5038                            depth
5039                        )?;
5040                    } else {
5041                        unreachable!()
5042                    }
5043                }
5044                4 => {
5045                    #[allow(irrefutable_let_patterns)]
5046                    if let ResourceArgs::Buffer(_) = self {
5047                        // Do nothing, read the value into the object
5048                    } else {
5049                        // Initialize `self` to the right variant
5050                        *self = ResourceArgs::Buffer(fidl::new_empty!(
5051                            BufferArgs,
5052                            fidl::encoding::DefaultFuchsiaResourceDialect
5053                        ));
5054                    }
5055                    #[allow(irrefutable_let_patterns)]
5056                    if let ResourceArgs::Buffer(ref mut val) = self {
5057                        fidl::decode!(
5058                            BufferArgs,
5059                            fidl::encoding::DefaultFuchsiaResourceDialect,
5060                            val,
5061                            decoder,
5062                            _inner_offset,
5063                            depth
5064                        )?;
5065                    } else {
5066                        unreachable!()
5067                    }
5068                }
5069                5 => {
5070                    #[allow(irrefutable_let_patterns)]
5071                    if let ResourceArgs::View(_) = self {
5072                        // Do nothing, read the value into the object
5073                    } else {
5074                        // Initialize `self` to the right variant
5075                        *self = ResourceArgs::View(fidl::new_empty!(
5076                            ViewArgs,
5077                            fidl::encoding::DefaultFuchsiaResourceDialect
5078                        ));
5079                    }
5080                    #[allow(irrefutable_let_patterns)]
5081                    if let ResourceArgs::View(ref mut val) = self {
5082                        fidl::decode!(
5083                            ViewArgs,
5084                            fidl::encoding::DefaultFuchsiaResourceDialect,
5085                            val,
5086                            decoder,
5087                            _inner_offset,
5088                            depth
5089                        )?;
5090                    } else {
5091                        unreachable!()
5092                    }
5093                }
5094                6 => {
5095                    #[allow(irrefutable_let_patterns)]
5096                    if let ResourceArgs::ViewHolder(_) = self {
5097                        // Do nothing, read the value into the object
5098                    } else {
5099                        // Initialize `self` to the right variant
5100                        *self = ResourceArgs::ViewHolder(fidl::new_empty!(
5101                            ViewHolderArgs,
5102                            fidl::encoding::DefaultFuchsiaResourceDialect
5103                        ));
5104                    }
5105                    #[allow(irrefutable_let_patterns)]
5106                    if let ResourceArgs::ViewHolder(ref mut val) = self {
5107                        fidl::decode!(
5108                            ViewHolderArgs,
5109                            fidl::encoding::DefaultFuchsiaResourceDialect,
5110                            val,
5111                            decoder,
5112                            _inner_offset,
5113                            depth
5114                        )?;
5115                    } else {
5116                        unreachable!()
5117                    }
5118                }
5119                7 => {
5120                    #[allow(irrefutable_let_patterns)]
5121                    if let ResourceArgs::Rectangle(_) = self {
5122                        // Do nothing, read the value into the object
5123                    } else {
5124                        // Initialize `self` to the right variant
5125                        *self = ResourceArgs::Rectangle(fidl::new_empty!(
5126                            RectangleArgs,
5127                            fidl::encoding::DefaultFuchsiaResourceDialect
5128                        ));
5129                    }
5130                    #[allow(irrefutable_let_patterns)]
5131                    if let ResourceArgs::Rectangle(ref mut val) = self {
5132                        fidl::decode!(
5133                            RectangleArgs,
5134                            fidl::encoding::DefaultFuchsiaResourceDialect,
5135                            val,
5136                            decoder,
5137                            _inner_offset,
5138                            depth
5139                        )?;
5140                    } else {
5141                        unreachable!()
5142                    }
5143                }
5144                8 => {
5145                    #[allow(irrefutable_let_patterns)]
5146                    if let ResourceArgs::RoundedRectangle(_) = self {
5147                        // Do nothing, read the value into the object
5148                    } else {
5149                        // Initialize `self` to the right variant
5150                        *self = ResourceArgs::RoundedRectangle(fidl::new_empty!(
5151                            RoundedRectangleArgs,
5152                            fidl::encoding::DefaultFuchsiaResourceDialect
5153                        ));
5154                    }
5155                    #[allow(irrefutable_let_patterns)]
5156                    if let ResourceArgs::RoundedRectangle(ref mut val) = self {
5157                        fidl::decode!(
5158                            RoundedRectangleArgs,
5159                            fidl::encoding::DefaultFuchsiaResourceDialect,
5160                            val,
5161                            decoder,
5162                            _inner_offset,
5163                            depth
5164                        )?;
5165                    } else {
5166                        unreachable!()
5167                    }
5168                }
5169                9 => {
5170                    #[allow(irrefutable_let_patterns)]
5171                    if let ResourceArgs::Circle(_) = self {
5172                        // Do nothing, read the value into the object
5173                    } else {
5174                        // Initialize `self` to the right variant
5175                        *self = ResourceArgs::Circle(fidl::new_empty!(
5176                            CircleArgs,
5177                            fidl::encoding::DefaultFuchsiaResourceDialect
5178                        ));
5179                    }
5180                    #[allow(irrefutable_let_patterns)]
5181                    if let ResourceArgs::Circle(ref mut val) = self {
5182                        fidl::decode!(
5183                            CircleArgs,
5184                            fidl::encoding::DefaultFuchsiaResourceDialect,
5185                            val,
5186                            decoder,
5187                            _inner_offset,
5188                            depth
5189                        )?;
5190                    } else {
5191                        unreachable!()
5192                    }
5193                }
5194                10 => {
5195                    #[allow(irrefutable_let_patterns)]
5196                    if let ResourceArgs::Mesh(_) = self {
5197                        // Do nothing, read the value into the object
5198                    } else {
5199                        // Initialize `self` to the right variant
5200                        *self = ResourceArgs::Mesh(fidl::new_empty!(
5201                            MeshArgs,
5202                            fidl::encoding::DefaultFuchsiaResourceDialect
5203                        ));
5204                    }
5205                    #[allow(irrefutable_let_patterns)]
5206                    if let ResourceArgs::Mesh(ref mut val) = self {
5207                        fidl::decode!(
5208                            MeshArgs,
5209                            fidl::encoding::DefaultFuchsiaResourceDialect,
5210                            val,
5211                            decoder,
5212                            _inner_offset,
5213                            depth
5214                        )?;
5215                    } else {
5216                        unreachable!()
5217                    }
5218                }
5219                11 => {
5220                    #[allow(irrefutable_let_patterns)]
5221                    if let ResourceArgs::ShapeNode(_) = self {
5222                        // Do nothing, read the value into the object
5223                    } else {
5224                        // Initialize `self` to the right variant
5225                        *self = ResourceArgs::ShapeNode(fidl::new_empty!(
5226                            ShapeNodeArgs,
5227                            fidl::encoding::DefaultFuchsiaResourceDialect
5228                        ));
5229                    }
5230                    #[allow(irrefutable_let_patterns)]
5231                    if let ResourceArgs::ShapeNode(ref mut val) = self {
5232                        fidl::decode!(
5233                            ShapeNodeArgs,
5234                            fidl::encoding::DefaultFuchsiaResourceDialect,
5235                            val,
5236                            decoder,
5237                            _inner_offset,
5238                            depth
5239                        )?;
5240                    } else {
5241                        unreachable!()
5242                    }
5243                }
5244                12 => {
5245                    #[allow(irrefutable_let_patterns)]
5246                    if let ResourceArgs::ClipNode(_) = self {
5247                        // Do nothing, read the value into the object
5248                    } else {
5249                        // Initialize `self` to the right variant
5250                        *self = ResourceArgs::ClipNode(fidl::new_empty!(
5251                            ClipNodeArgs,
5252                            fidl::encoding::DefaultFuchsiaResourceDialect
5253                        ));
5254                    }
5255                    #[allow(irrefutable_let_patterns)]
5256                    if let ResourceArgs::ClipNode(ref mut val) = self {
5257                        fidl::decode!(
5258                            ClipNodeArgs,
5259                            fidl::encoding::DefaultFuchsiaResourceDialect,
5260                            val,
5261                            decoder,
5262                            _inner_offset,
5263                            depth
5264                        )?;
5265                    } else {
5266                        unreachable!()
5267                    }
5268                }
5269                13 => {
5270                    #[allow(irrefutable_let_patterns)]
5271                    if let ResourceArgs::EntityNode(_) = self {
5272                        // Do nothing, read the value into the object
5273                    } else {
5274                        // Initialize `self` to the right variant
5275                        *self = ResourceArgs::EntityNode(fidl::new_empty!(
5276                            EntityNodeArgs,
5277                            fidl::encoding::DefaultFuchsiaResourceDialect
5278                        ));
5279                    }
5280                    #[allow(irrefutable_let_patterns)]
5281                    if let ResourceArgs::EntityNode(ref mut val) = self {
5282                        fidl::decode!(
5283                            EntityNodeArgs,
5284                            fidl::encoding::DefaultFuchsiaResourceDialect,
5285                            val,
5286                            decoder,
5287                            _inner_offset,
5288                            depth
5289                        )?;
5290                    } else {
5291                        unreachable!()
5292                    }
5293                }
5294                14 => {
5295                    #[allow(irrefutable_let_patterns)]
5296                    if let ResourceArgs::OpacityNode(_) = self {
5297                        // Do nothing, read the value into the object
5298                    } else {
5299                        // Initialize `self` to the right variant
5300                        *self = ResourceArgs::OpacityNode(fidl::new_empty!(
5301                            OpacityNodeArgsHack,
5302                            fidl::encoding::DefaultFuchsiaResourceDialect
5303                        ));
5304                    }
5305                    #[allow(irrefutable_let_patterns)]
5306                    if let ResourceArgs::OpacityNode(ref mut val) = self {
5307                        fidl::decode!(
5308                            OpacityNodeArgsHack,
5309                            fidl::encoding::DefaultFuchsiaResourceDialect,
5310                            val,
5311                            decoder,
5312                            _inner_offset,
5313                            depth
5314                        )?;
5315                    } else {
5316                        unreachable!()
5317                    }
5318                }
5319                15 => {
5320                    #[allow(irrefutable_let_patterns)]
5321                    if let ResourceArgs::Material(_) = self {
5322                        // Do nothing, read the value into the object
5323                    } else {
5324                        // Initialize `self` to the right variant
5325                        *self = ResourceArgs::Material(fidl::new_empty!(
5326                            MaterialArgs,
5327                            fidl::encoding::DefaultFuchsiaResourceDialect
5328                        ));
5329                    }
5330                    #[allow(irrefutable_let_patterns)]
5331                    if let ResourceArgs::Material(ref mut val) = self {
5332                        fidl::decode!(
5333                            MaterialArgs,
5334                            fidl::encoding::DefaultFuchsiaResourceDialect,
5335                            val,
5336                            decoder,
5337                            _inner_offset,
5338                            depth
5339                        )?;
5340                    } else {
5341                        unreachable!()
5342                    }
5343                }
5344                16 => {
5345                    #[allow(irrefutable_let_patterns)]
5346                    if let ResourceArgs::Compositor(_) = self {
5347                        // Do nothing, read the value into the object
5348                    } else {
5349                        // Initialize `self` to the right variant
5350                        *self = ResourceArgs::Compositor(fidl::new_empty!(
5351                            CompositorArgs,
5352                            fidl::encoding::DefaultFuchsiaResourceDialect
5353                        ));
5354                    }
5355                    #[allow(irrefutable_let_patterns)]
5356                    if let ResourceArgs::Compositor(ref mut val) = self {
5357                        fidl::decode!(
5358                            CompositorArgs,
5359                            fidl::encoding::DefaultFuchsiaResourceDialect,
5360                            val,
5361                            decoder,
5362                            _inner_offset,
5363                            depth
5364                        )?;
5365                    } else {
5366                        unreachable!()
5367                    }
5368                }
5369                17 => {
5370                    #[allow(irrefutable_let_patterns)]
5371                    if let ResourceArgs::DisplayCompositor(_) = self {
5372                        // Do nothing, read the value into the object
5373                    } else {
5374                        // Initialize `self` to the right variant
5375                        *self = ResourceArgs::DisplayCompositor(fidl::new_empty!(
5376                            DisplayCompositorArgs,
5377                            fidl::encoding::DefaultFuchsiaResourceDialect
5378                        ));
5379                    }
5380                    #[allow(irrefutable_let_patterns)]
5381                    if let ResourceArgs::DisplayCompositor(ref mut val) = self {
5382                        fidl::decode!(
5383                            DisplayCompositorArgs,
5384                            fidl::encoding::DefaultFuchsiaResourceDialect,
5385                            val,
5386                            decoder,
5387                            _inner_offset,
5388                            depth
5389                        )?;
5390                    } else {
5391                        unreachable!()
5392                    }
5393                }
5394                19 => {
5395                    #[allow(irrefutable_let_patterns)]
5396                    if let ResourceArgs::LayerStack(_) = self {
5397                        // Do nothing, read the value into the object
5398                    } else {
5399                        // Initialize `self` to the right variant
5400                        *self = ResourceArgs::LayerStack(fidl::new_empty!(
5401                            LayerStackArgs,
5402                            fidl::encoding::DefaultFuchsiaResourceDialect
5403                        ));
5404                    }
5405                    #[allow(irrefutable_let_patterns)]
5406                    if let ResourceArgs::LayerStack(ref mut val) = self {
5407                        fidl::decode!(
5408                            LayerStackArgs,
5409                            fidl::encoding::DefaultFuchsiaResourceDialect,
5410                            val,
5411                            decoder,
5412                            _inner_offset,
5413                            depth
5414                        )?;
5415                    } else {
5416                        unreachable!()
5417                    }
5418                }
5419                20 => {
5420                    #[allow(irrefutable_let_patterns)]
5421                    if let ResourceArgs::Layer(_) = self {
5422                        // Do nothing, read the value into the object
5423                    } else {
5424                        // Initialize `self` to the right variant
5425                        *self = ResourceArgs::Layer(fidl::new_empty!(
5426                            LayerArgs,
5427                            fidl::encoding::DefaultFuchsiaResourceDialect
5428                        ));
5429                    }
5430                    #[allow(irrefutable_let_patterns)]
5431                    if let ResourceArgs::Layer(ref mut val) = self {
5432                        fidl::decode!(
5433                            LayerArgs,
5434                            fidl::encoding::DefaultFuchsiaResourceDialect,
5435                            val,
5436                            decoder,
5437                            _inner_offset,
5438                            depth
5439                        )?;
5440                    } else {
5441                        unreachable!()
5442                    }
5443                }
5444                21 => {
5445                    #[allow(irrefutable_let_patterns)]
5446                    if let ResourceArgs::Scene(_) = self {
5447                        // Do nothing, read the value into the object
5448                    } else {
5449                        // Initialize `self` to the right variant
5450                        *self = ResourceArgs::Scene(fidl::new_empty!(
5451                            SceneArgs,
5452                            fidl::encoding::DefaultFuchsiaResourceDialect
5453                        ));
5454                    }
5455                    #[allow(irrefutable_let_patterns)]
5456                    if let ResourceArgs::Scene(ref mut val) = self {
5457                        fidl::decode!(
5458                            SceneArgs,
5459                            fidl::encoding::DefaultFuchsiaResourceDialect,
5460                            val,
5461                            decoder,
5462                            _inner_offset,
5463                            depth
5464                        )?;
5465                    } else {
5466                        unreachable!()
5467                    }
5468                }
5469                22 => {
5470                    #[allow(irrefutable_let_patterns)]
5471                    if let ResourceArgs::Camera(_) = self {
5472                        // Do nothing, read the value into the object
5473                    } else {
5474                        // Initialize `self` to the right variant
5475                        *self = ResourceArgs::Camera(fidl::new_empty!(
5476                            CameraArgs,
5477                            fidl::encoding::DefaultFuchsiaResourceDialect
5478                        ));
5479                    }
5480                    #[allow(irrefutable_let_patterns)]
5481                    if let ResourceArgs::Camera(ref mut val) = self {
5482                        fidl::decode!(
5483                            CameraArgs,
5484                            fidl::encoding::DefaultFuchsiaResourceDialect,
5485                            val,
5486                            decoder,
5487                            _inner_offset,
5488                            depth
5489                        )?;
5490                    } else {
5491                        unreachable!()
5492                    }
5493                }
5494                23 => {
5495                    #[allow(irrefutable_let_patterns)]
5496                    if let ResourceArgs::StereoCamera(_) = self {
5497                        // Do nothing, read the value into the object
5498                    } else {
5499                        // Initialize `self` to the right variant
5500                        *self = ResourceArgs::StereoCamera(fidl::new_empty!(
5501                            StereoCameraArgs,
5502                            fidl::encoding::DefaultFuchsiaResourceDialect
5503                        ));
5504                    }
5505                    #[allow(irrefutable_let_patterns)]
5506                    if let ResourceArgs::StereoCamera(ref mut val) = self {
5507                        fidl::decode!(
5508                            StereoCameraArgs,
5509                            fidl::encoding::DefaultFuchsiaResourceDialect,
5510                            val,
5511                            decoder,
5512                            _inner_offset,
5513                            depth
5514                        )?;
5515                    } else {
5516                        unreachable!()
5517                    }
5518                }
5519                24 => {
5520                    #[allow(irrefutable_let_patterns)]
5521                    if let ResourceArgs::Renderer(_) = self {
5522                        // Do nothing, read the value into the object
5523                    } else {
5524                        // Initialize `self` to the right variant
5525                        *self = ResourceArgs::Renderer(fidl::new_empty!(
5526                            RendererArgs,
5527                            fidl::encoding::DefaultFuchsiaResourceDialect
5528                        ));
5529                    }
5530                    #[allow(irrefutable_let_patterns)]
5531                    if let ResourceArgs::Renderer(ref mut val) = self {
5532                        fidl::decode!(
5533                            RendererArgs,
5534                            fidl::encoding::DefaultFuchsiaResourceDialect,
5535                            val,
5536                            decoder,
5537                            _inner_offset,
5538                            depth
5539                        )?;
5540                    } else {
5541                        unreachable!()
5542                    }
5543                }
5544                25 => {
5545                    #[allow(irrefutable_let_patterns)]
5546                    if let ResourceArgs::AmbientLight(_) = self {
5547                        // Do nothing, read the value into the object
5548                    } else {
5549                        // Initialize `self` to the right variant
5550                        *self = ResourceArgs::AmbientLight(fidl::new_empty!(
5551                            AmbientLightArgs,
5552                            fidl::encoding::DefaultFuchsiaResourceDialect
5553                        ));
5554                    }
5555                    #[allow(irrefutable_let_patterns)]
5556                    if let ResourceArgs::AmbientLight(ref mut val) = self {
5557                        fidl::decode!(
5558                            AmbientLightArgs,
5559                            fidl::encoding::DefaultFuchsiaResourceDialect,
5560                            val,
5561                            decoder,
5562                            _inner_offset,
5563                            depth
5564                        )?;
5565                    } else {
5566                        unreachable!()
5567                    }
5568                }
5569                26 => {
5570                    #[allow(irrefutable_let_patterns)]
5571                    if let ResourceArgs::DirectionalLight(_) = self {
5572                        // Do nothing, read the value into the object
5573                    } else {
5574                        // Initialize `self` to the right variant
5575                        *self = ResourceArgs::DirectionalLight(fidl::new_empty!(
5576                            DirectionalLightArgs,
5577                            fidl::encoding::DefaultFuchsiaResourceDialect
5578                        ));
5579                    }
5580                    #[allow(irrefutable_let_patterns)]
5581                    if let ResourceArgs::DirectionalLight(ref mut val) = self {
5582                        fidl::decode!(
5583                            DirectionalLightArgs,
5584                            fidl::encoding::DefaultFuchsiaResourceDialect,
5585                            val,
5586                            decoder,
5587                            _inner_offset,
5588                            depth
5589                        )?;
5590                    } else {
5591                        unreachable!()
5592                    }
5593                }
5594                27 => {
5595                    #[allow(irrefutable_let_patterns)]
5596                    if let ResourceArgs::Variable(_) = self {
5597                        // Do nothing, read the value into the object
5598                    } else {
5599                        // Initialize `self` to the right variant
5600                        *self = ResourceArgs::Variable(fidl::new_empty!(
5601                            VariableArgs,
5602                            fidl::encoding::DefaultFuchsiaResourceDialect
5603                        ));
5604                    }
5605                    #[allow(irrefutable_let_patterns)]
5606                    if let ResourceArgs::Variable(ref mut val) = self {
5607                        fidl::decode!(
5608                            VariableArgs,
5609                            fidl::encoding::DefaultFuchsiaResourceDialect,
5610                            val,
5611                            decoder,
5612                            _inner_offset,
5613                            depth
5614                        )?;
5615                    } else {
5616                        unreachable!()
5617                    }
5618                }
5619                28 => {
5620                    #[allow(irrefutable_let_patterns)]
5621                    if let ResourceArgs::PointLight(_) = self {
5622                        // Do nothing, read the value into the object
5623                    } else {
5624                        // Initialize `self` to the right variant
5625                        *self = ResourceArgs::PointLight(fidl::new_empty!(
5626                            PointLightArgs,
5627                            fidl::encoding::DefaultFuchsiaResourceDialect
5628                        ));
5629                    }
5630                    #[allow(irrefutable_let_patterns)]
5631                    if let ResourceArgs::PointLight(ref mut val) = self {
5632                        fidl::decode!(
5633                            PointLightArgs,
5634                            fidl::encoding::DefaultFuchsiaResourceDialect,
5635                            val,
5636                            decoder,
5637                            _inner_offset,
5638                            depth
5639                        )?;
5640                    } else {
5641                        unreachable!()
5642                    }
5643                }
5644                31 => {
5645                    #[allow(irrefutable_let_patterns)]
5646                    if let ResourceArgs::View3(_) = self {
5647                        // Do nothing, read the value into the object
5648                    } else {
5649                        // Initialize `self` to the right variant
5650                        *self = ResourceArgs::View3(fidl::new_empty!(
5651                            ViewArgs3,
5652                            fidl::encoding::DefaultFuchsiaResourceDialect
5653                        ));
5654                    }
5655                    #[allow(irrefutable_let_patterns)]
5656                    if let ResourceArgs::View3(ref mut val) = self {
5657                        fidl::decode!(
5658                            ViewArgs3,
5659                            fidl::encoding::DefaultFuchsiaResourceDialect,
5660                            val,
5661                            decoder,
5662                            _inner_offset,
5663                            depth
5664                        )?;
5665                    } else {
5666                        unreachable!()
5667                    }
5668                }
5669                32 => {
5670                    #[allow(irrefutable_let_patterns)]
5671                    if let ResourceArgs::ImagePipe2(_) = self {
5672                        // Do nothing, read the value into the object
5673                    } else {
5674                        // Initialize `self` to the right variant
5675                        *self = ResourceArgs::ImagePipe2(fidl::new_empty!(
5676                            ImagePipe2Args,
5677                            fidl::encoding::DefaultFuchsiaResourceDialect
5678                        ));
5679                    }
5680                    #[allow(irrefutable_let_patterns)]
5681                    if let ResourceArgs::ImagePipe2(ref mut val) = self {
5682                        fidl::decode!(
5683                            ImagePipe2Args,
5684                            fidl::encoding::DefaultFuchsiaResourceDialect,
5685                            val,
5686                            decoder,
5687                            _inner_offset,
5688                            depth
5689                        )?;
5690                    } else {
5691                        unreachable!()
5692                    }
5693                }
5694                33 => {
5695                    #[allow(irrefutable_let_patterns)]
5696                    if let ResourceArgs::Image2(_) = self {
5697                        // Do nothing, read the value into the object
5698                    } else {
5699                        // Initialize `self` to the right variant
5700                        *self = ResourceArgs::Image2(fidl::new_empty!(
5701                            ImageArgs2,
5702                            fidl::encoding::DefaultFuchsiaResourceDialect
5703                        ));
5704                    }
5705                    #[allow(irrefutable_let_patterns)]
5706                    if let ResourceArgs::Image2(ref mut val) = self {
5707                        fidl::decode!(
5708                            ImageArgs2,
5709                            fidl::encoding::DefaultFuchsiaResourceDialect,
5710                            val,
5711                            decoder,
5712                            _inner_offset,
5713                            depth
5714                        )?;
5715                    } else {
5716                        unreachable!()
5717                    }
5718                }
5719                34 => {
5720                    #[allow(irrefutable_let_patterns)]
5721                    if let ResourceArgs::Image3(_) = self {
5722                        // Do nothing, read the value into the object
5723                    } else {
5724                        // Initialize `self` to the right variant
5725                        *self = ResourceArgs::Image3(fidl::new_empty!(
5726                            ImageArgs3,
5727                            fidl::encoding::DefaultFuchsiaResourceDialect
5728                        ));
5729                    }
5730                    #[allow(irrefutable_let_patterns)]
5731                    if let ResourceArgs::Image3(ref mut val) = self {
5732                        fidl::decode!(
5733                            ImageArgs3,
5734                            fidl::encoding::DefaultFuchsiaResourceDialect,
5735                            val,
5736                            decoder,
5737                            _inner_offset,
5738                            depth
5739                        )?;
5740                    } else {
5741                        unreachable!()
5742                    }
5743                }
5744                ordinal => panic!("unexpected ordinal {:?}", ordinal),
5745            }
5746            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5747                return Err(fidl::Error::InvalidNumBytesInEnvelope);
5748            }
5749            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5750                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5751            }
5752            Ok(())
5753        }
5754    }
5755}