fidl_fuchsia_hardware_display__common/
fidl_fuchsia_hardware_display__common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11/// Type of the internal value in [`fuchsia.hardware.display/BufferCollectionId`].
12pub type BufferCollectionIdValue = u64;
13
14/// See [`fuchsia.hardware.display.types/ConfigStamp`].
15pub type ConfigStampValue = u64;
16
17/// Type of the internal value in [`fuchsia.hardware.display/EventId`].
18pub type EventIdValue = u64;
19
20/// Type of the internal value in [`ImageId`].
21pub type ImageIdValue = u64;
22
23/// Type of the internal value in [`LayerId`].
24pub type LayerIdValue = u64;
25
26/// Type of the internal value in [`VsyncAckCookie`].
27pub type VsyncAckCookieValue = u64;
28
29pub const IDENTIFIER_MAX_LEN: u32 = 128;
30
31pub const INVALID_CONFIG_STAMP_VALUE: u64 = 0;
32
33/// Constrains the use of `Coordinator.SetLayerImage2`; see documentation there.
34pub const MAX_WAITING_IMAGES_PER_LAYER: u32 = 10;
35
36#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
37#[repr(u8)]
38pub enum VirtconMode {
39    /// The Virtcon client owns the displays when there is no Primary client.
40    Fallback = 0,
41    /// The Virtcon client owns the displays even when a Primary client is
42    /// connected.
43    Forced = 1,
44}
45
46impl VirtconMode {
47    #[inline]
48    pub fn from_primitive(prim: u8) -> Option<Self> {
49        match prim {
50            0 => Some(Self::Fallback),
51            1 => Some(Self::Forced),
52            _ => None,
53        }
54    }
55
56    #[inline]
57    pub const fn into_primitive(self) -> u8 {
58        self as u8
59    }
60}
61
62/// Identifies a sysmem BufferCollection owned by a Display Coordinator client.
63///
64/// Values are managed by [`fuchsia.hardware.display/Coordinator`] clients, to
65/// facilitate feed-forward dataflow.
66///
67/// Each value uniquely identifies a [`fuchsia.sysmem/BufferCollection`] (as
68/// well as its token [`fuchsia.sysmem/BufferCollectionToken`]) imported to the
69/// Display Coordinator device within a Coordinator connection. The identifier
70/// of a BufferCollection destroyed via
71/// [`fuchsia.hardware.display/Coordinator.ReleaseBufferCollection`] can be
72/// reused in a subsequent
73/// [`fuchsia.hardware.display/Coordinator.ImportBufferCollection`] call.
74#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
75#[repr(C)]
76pub struct BufferCollectionId {
77    pub value: u64,
78}
79
80impl fidl::Persistable for BufferCollectionId {}
81
82/// Identifies a single buffer within a sysmem BufferCollection owned by a
83/// Display Coordinator client.
84///
85/// A [`fuchsia.sysmem/BufferCollection`] may allocate multiple buffers at a
86/// time. This identifies the specific buffer at `buffer_index` within the
87/// shared BufferCollection identified by `buffer_collection_id`.
88#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
89#[repr(C)]
90pub struct BufferId {
91    pub buffer_collection_id: BufferCollectionId,
92    pub buffer_index: u32,
93}
94
95impl fidl::Persistable for BufferId {}
96
97/// Identifies a display configuration submitted to the Coordinator.
98///
99/// This is a type-safe wrapper for a
100/// [`fuchsia.hardware.display/ConfigStampValue`], which is a raw numeric value.
101///
102/// Values are unique within a Display Coordinator client connection.
103///
104/// Clients create new values when they call
105/// [`fuchsia.hardware.display/Coordinator.ApplyConfig3`].  The values are used
106/// by the Display Coordinator to identify configurations in
107/// [`fuchsia.hardware.display/CoordinatorListener.OnVsync`] calls.
108///
109/// Clients must create strictly increasing (unique, strictly monotonic) values
110/// within the lifetime of a [`fuchsia.display/Coordinator`] connection.
111///
112/// [`fuchsia.hardware.display/INVALID_CONFIG_STAMP_VALUE`] represents an
113/// invalid value.
114#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
115#[repr(C)]
116pub struct ConfigStamp {
117    pub value: u64,
118}
119
120impl fidl::Persistable for ConfigStamp {}
121
122#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
123#[repr(C)]
124pub struct CoordinatorAcknowledgeVsyncRequest {
125    /// The cookie received in the most recent `OnVsync` message.
126    ///
127    /// Must not be zero. Zero cookies do not require acknowledgement.
128    ///
129    /// Each cookie must be acknowledged exactly once. Cookies must
130    /// be acknowledged in the order of their receipt.
131    pub cookie: u64,
132}
133
134impl fidl::Persistable for CoordinatorAcknowledgeVsyncRequest {}
135
136#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
137pub struct CoordinatorCheckConfigResponse {
138    pub res: fidl_fuchsia_hardware_display_types__common::ConfigResult,
139}
140
141impl fidl::Persistable for CoordinatorCheckConfigResponse {}
142
143#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
144#[repr(C)]
145pub struct CoordinatorDestroyLayerRequest {
146    pub layer_id: LayerId,
147}
148
149impl fidl::Persistable for CoordinatorDestroyLayerRequest {}
150
151#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
152#[repr(C)]
153pub struct CoordinatorGetLatestAppliedConfigStampResponse {
154    pub stamp: ConfigStamp,
155}
156
157impl fidl::Persistable for CoordinatorGetLatestAppliedConfigStampResponse {}
158
159#[derive(Clone, Debug, PartialEq)]
160pub struct CoordinatorImportImageRequest {
161    pub image_metadata: fidl_fuchsia_hardware_display_types__common::ImageMetadata,
162    pub buffer_id: BufferId,
163    pub image_id: ImageId,
164}
165
166impl fidl::Persistable for CoordinatorImportImageRequest {}
167
168#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
169pub struct CoordinatorListenerOnClientOwnershipChangeRequest {
170    pub has_ownership: bool,
171}
172
173impl fidl::Persistable for CoordinatorListenerOnClientOwnershipChangeRequest {}
174
175#[derive(Clone, Debug, PartialEq)]
176pub struct CoordinatorListenerOnDisplaysChangedRequest {
177    pub added: Vec<Info>,
178    pub removed: Vec<fidl_fuchsia_hardware_display_types__common::DisplayId>,
179}
180
181impl fidl::Persistable for CoordinatorListenerOnDisplaysChangedRequest {}
182
183#[derive(Clone, Debug, PartialEq)]
184pub struct CoordinatorListenerOnVsyncRequest {
185    /// The display associated with the VSync event.
186    pub display_id: fidl_fuchsia_hardware_display_types__common::DisplayId,
187    /// The time when the VSync occurred.
188    ///
189    /// The accurrancy of this timestamp depends on the display hardware.
190    pub timestamp: i64,
191    /// Identifies the lastest configuration fully applied to the display.
192    ///
193    /// Guaranteed to be a valid value.
194    ///
195    /// If a configuration contains images that are still waiting to be
196    /// ready, that configuration will be only partially applied (without
197    /// the waiting image). That configuration's stamp will not be reported
198    /// here.
199    pub applied_config_stamp: ConfigStamp,
200    /// Used to acknowledge the receipt of VSync events.
201    ///
202    /// A value of zero means no acknowledgement is required by the
203    /// client.
204    ///
205    /// Each non-zero cookie must be acknowledged immediately, via a call to
206    /// [`Coordinator.AcknowledgeVsync`]. Cookies must be acknowledged even
207    /// if the client does not change the display's configuration.
208    pub cookie: VsyncAckCookie,
209}
210
211impl fidl::Persistable for CoordinatorListenerOnVsyncRequest {}
212
213#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
214#[repr(C)]
215pub struct CoordinatorReleaseBufferCollectionRequest {
216    pub buffer_collection_id: BufferCollectionId,
217}
218
219impl fidl::Persistable for CoordinatorReleaseBufferCollectionRequest {}
220
221#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
222#[repr(C)]
223pub struct CoordinatorReleaseEventRequest {
224    pub id: EventId,
225}
226
227impl fidl::Persistable for CoordinatorReleaseEventRequest {}
228
229#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
230#[repr(C)]
231pub struct CoordinatorReleaseImageRequest {
232    pub image_id: ImageId,
233}
234
235impl fidl::Persistable for CoordinatorReleaseImageRequest {}
236
237#[derive(Clone, Debug, PartialEq)]
238pub struct CoordinatorSetBufferCollectionConstraintsRequest {
239    pub buffer_collection_id: BufferCollectionId,
240    pub buffer_usage: fidl_fuchsia_hardware_display_types__common::ImageBufferUsage,
241}
242
243impl fidl::Persistable for CoordinatorSetBufferCollectionConstraintsRequest {}
244
245#[derive(Clone, Debug, PartialEq)]
246pub struct CoordinatorSetDisplayColorConversionRequest {
247    /// The display whose color coefficients are set.
248    ///
249    /// The call is ignored if the display ID does not belong to a display
250    /// known by the Coordinator. This can happen if a client issues a call
251    /// to [`Coordinator.SetDisplayColorConversion`] before it receives a
252    /// notification that the display was removed.
253    pub display_id: fidl_fuchsia_hardware_display_types__common::DisplayId,
254    pub preoffsets: [f32; 3],
255    pub coefficients: [f32; 9],
256    pub postoffsets: [f32; 3],
257}
258
259impl fidl::Persistable for CoordinatorSetDisplayColorConversionRequest {}
260
261#[derive(Clone, Debug, PartialEq)]
262pub struct CoordinatorSetDisplayLayersRequest {
263    /// The display that will show the result of compositing the layers.
264    ///
265    /// The call is ignored if the display ID does not belong to a display
266    /// known by the Coordinator. This can happen if a client issues a call
267    /// to [`Coordinator.SetDisplayLayers`] before it receives a
268    /// notification that the display was removed.
269    pub display_id: fidl_fuchsia_hardware_display_types__common::DisplayId,
270    pub layer_ids: Vec<LayerId>,
271}
272
273impl fidl::Persistable for CoordinatorSetDisplayLayersRequest {}
274
275#[derive(Clone, Debug, PartialEq)]
276pub struct CoordinatorSetDisplayModeRequest {
277    /// The display whose mode is changed.
278    ///
279    /// The call is ignored if the display ID does not belong to a display
280    /// known by the Coordinator. This can happen if a client issues a call
281    /// to [`Coordinator.SetDisplayMode`] before it receives a notification
282    /// that the display was removed.
283    pub display_id: fidl_fuchsia_hardware_display_types__common::DisplayId,
284    /// The new mode for the display.
285    ///
286    /// Must be one of the [`Info.modes`] entries for the display.
287    pub mode: fidl_fuchsia_hardware_display_types__common::Mode,
288}
289
290impl fidl::Persistable for CoordinatorSetDisplayModeRequest {}
291
292#[derive(Clone, Debug, PartialEq)]
293pub struct CoordinatorSetDisplayPowerRequest {
294    pub display_id: fidl_fuchsia_hardware_display_types__common::DisplayId,
295    /// True powers on the display, false powers it off.
296    ///
297    /// Once a display is turned off, the hardware will not generate new
298    /// VSync events. However, the client should be prepared to handle VSync
299    /// events generated before the [`Coordinator.SetDisplayPower`] call
300    /// reaches the hardware.
301    ///
302    /// Calls that impact draft configurations, such as
303    /// [`Coordinator.SetDisplayLayers`], still work while the display is
304    /// powered off.
305    ///
306    /// [`Coordinator.ApplyConfig`] also works while the display is powered
307    /// off.  When the display is powered back on on, it will show the
308    /// latest applied configuration.
309    ///
310    /// Newly added displays are powered on.
311    pub power_on: bool,
312}
313
314impl fidl::Persistable for CoordinatorSetDisplayPowerRequest {}
315
316#[derive(Clone, Debug, PartialEq)]
317pub struct CoordinatorSetLayerColorConfigRequest {
318    pub layer_id: LayerId,
319    pub color: fidl_fuchsia_hardware_display_types__common::Color,
320}
321
322impl fidl::Persistable for CoordinatorSetLayerColorConfigRequest {}
323
324#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
325#[repr(C)]
326pub struct CoordinatorSetLayerImage2Request {
327    pub layer_id: LayerId,
328    pub image_id: ImageId,
329    pub wait_event_id: EventId,
330}
331
332impl fidl::Persistable for CoordinatorSetLayerImage2Request {}
333
334#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)]
335pub struct CoordinatorSetLayerPrimaryAlphaRequest {
336    pub layer_id: LayerId,
337    pub mode: fidl_fuchsia_hardware_display_types__common::AlphaMode,
338    pub val: f32,
339}
340
341impl fidl::Persistable for CoordinatorSetLayerPrimaryAlphaRequest {}
342
343#[derive(Clone, Debug, PartialEq)]
344pub struct CoordinatorSetLayerPrimaryConfigRequest {
345    pub layer_id: LayerId,
346    pub image_metadata: fidl_fuchsia_hardware_display_types__common::ImageMetadata,
347}
348
349impl fidl::Persistable for CoordinatorSetLayerPrimaryConfigRequest {}
350
351#[derive(Clone, Debug, PartialEq)]
352pub struct CoordinatorSetLayerPrimaryPositionRequest {
353    pub layer_id: LayerId,
354    /// Applied to the input image pixels specified by `image_source`.
355    ///
356    /// `display_destination` must account for image dimensions changes
357    /// caused by rotations. For example, rotating a 600x300 pixel image by
358    /// 90 degrees would specify 300x600 pixel dimensions in
359    /// `display_destination`.
360    pub image_source_transformation:
361        fidl_fuchsia_hardware_display_types__common::CoordinateTransformation,
362    /// The associated image region whose pixels are drawn by the layer.
363    ///
364    /// The rectangle uses the Vulkan coordinate space. The origin is at the
365    /// image's top-left corner. The X axis points to the right, and the Y
366    /// axis points downwards.
367    ///
368    /// A valid layer definition requires a valid non-empty image source
369    /// rectangle that is entirely contained within the image.
370    ///
371    /// Hardware image cropping is requested implicitly, when the source
372    /// region's dimensions differ from the image's dimensions. Some display
373    /// hardware may not support cropping.
374    pub image_source: fidl_fuchsia_math__common::RectU,
375    /// The display image (composited output) region occupied by the layer.
376    ///
377    /// The rectangle uses the Vulkan coordinate space. The origin is at the
378    /// display's top-left corner. The X axis points to the right, and the Y
379    /// axis points downwards.
380    ///
381    /// A valid layer definition requires a valid non-empty display
382    /// destination rectangle that is entirely contained within the display.
383    ///
384    /// Hardware image scaling is requested implicitly, when the output
385    /// region's dimensions differ from the dimensions of `image_source`.
386    /// Some display hardware may not support scaling. All display hardware
387    /// has limitations in scaling support.
388    pub display_destination: fidl_fuchsia_math__common::RectU,
389}
390
391impl fidl::Persistable for CoordinatorSetLayerPrimaryPositionRequest {}
392
393#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
394#[repr(C)]
395pub struct CoordinatorSetMinimumRgbRequest {
396    pub minimum_rgb: u8,
397}
398
399impl fidl::Persistable for CoordinatorSetMinimumRgbRequest {}
400
401#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
402pub struct CoordinatorSetVirtconModeRequest {
403    pub mode: VirtconMode,
404}
405
406impl fidl::Persistable for CoordinatorSetVirtconModeRequest {}
407
408#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
409pub struct CoordinatorSetVsyncEventDeliveryRequest {
410    /// If false, the client will not receive `OnVsync` messages.
411    pub vsync_delivery_enabled: bool,
412}
413
414impl fidl::Persistable for CoordinatorSetVsyncEventDeliveryRequest {}
415
416#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
417#[repr(C)]
418pub struct CoordinatorStartCaptureRequest {
419    pub signal_event_id: EventId,
420    pub image_id: ImageId,
421}
422
423impl fidl::Persistable for CoordinatorStartCaptureRequest {}
424
425#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
426#[repr(C)]
427pub struct CoordinatorCreateLayerResponse {
428    pub layer_id: LayerId,
429}
430
431impl fidl::Persistable for CoordinatorCreateLayerResponse {}
432
433#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
434pub struct CoordinatorIsCaptureSupportedResponse {
435    pub supported: bool,
436}
437
438impl fidl::Persistable for CoordinatorIsCaptureSupportedResponse {}
439
440/// Identifies a Zircon event shared between the Display Coordinator and a
441/// client.
442///
443/// [`fuchsia.hardware.display.types/INVALID_DISP_ID`] represents an invalid
444/// value.
445///
446/// Values are managed by [`fuchsia.hardware.display/Coordinator`] clients, to
447/// facilitate feed-forward dataflow.
448///
449/// Valid values uniquely identify Zircon events imported to the Coordinator
450/// within a display Coordinator connection.
451#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
452#[repr(C)]
453pub struct EventId {
454    pub value: u64,
455}
456
457impl fidl::Persistable for EventId {}
458
459/// Unique identifier for an image registered with the display coordinator.
460///
461/// [`fuchsia.hardware.display.types/INVALID_DISP_ID`] represents an invalid
462/// value.
463///
464/// Values are managed by [`fuchsia.hardware.display/Coordinator`] clients, to
465/// facilitate feed-forward dataflow.
466///
467/// Valid values uniquely identify "live" images within a Display Coordinator
468/// connection. The identifier of an image destroyed via
469/// [`fuchsia.hardware.display/Coordinator.ReleaseImage`] can be reused in a
470/// subsequent [`fuchsia.hardware.display/Coordinator.ImportImage`] call.
471///
472/// An image is a memory buffer whose bytes have a fixed interpretation as an
473/// array of pixels. Memory buffers are managed by sysmem, and are accessed by
474/// the display stack using a [`fuchsia.sysmem/BufferCollection`]. The buffer's
475/// interpretation is described by an
476/// [`fuchsia.hardware.display.types/ImageConfig`].
477#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
478#[repr(C)]
479pub struct ImageId {
480    pub value: u64,
481}
482
483impl fidl::Persistable for ImageId {}
484
485/// Description for a display device attached to the system.
486///
487/// Display devices include external monitors and internal panels.
488#[derive(Clone, Debug, PartialEq)]
489pub struct Info {
490    /// Uniquely identifies the display in a Controller connection.
491    ///
492    /// See [`fuchsia.hardware.display.types/DisplayId`].
493    pub id: fidl_fuchsia_hardware_display_types__common::DisplayId,
494    /// Operational modes supported by the described display device.
495    ///
496    /// The first entry is the device's preferred mode.
497    pub modes: Vec<fidl_fuchsia_hardware_display_types__common::Mode>,
498    /// Pixel formats that can be directly displayed on the attached display.
499    ///
500    /// This field will be revised to better reflect the subtleties around
501    /// modern display hardware, such as multiple layer types, and around
502    /// pixel format modifiers, such as tiling and framebuffer compression
503    /// formats. See https://fxbug.dev/42072347 and https://fxbug.dev/42076907.
504    ///
505    /// The formats listed here reflect support from both the display engine
506    /// hardware and the display device. This means some of the formats may be
507    /// subject to conversion inside the display engine hardware.
508    ///
509    /// The first entry in the list is the display's preferred format. This
510    /// format is likely to be supported for transferring data between the
511    /// display engine and the display hardware, and not require any conversion
512    /// inside the display engine.
513    ///
514    /// Format conversion inside the display engine is likely to be
515    /// significantly more power-efficient than a GPU render stage or software
516    /// conversion. So, using any format in this list is better than using the
517    /// GPU to convert to the preferred format.
518    pub pixel_format: Vec<fidl_fuchsia_images2__common::PixelFormat>,
519    /// Part of a display device identifier that persists across boot cycles.
520    ///
521    /// If the `manufacturer_name`, `monitor_name` and `monitor_serial` fields
522    /// are all non-empty, they  make up an identifier that is likely to be
523    /// unique to the attached device, and is highly unlikely to change across
524    /// boot cycles. Software that needs to identify displays (for example, to
525    /// honor display-specific preferences) should use this triplet.
526    pub manufacturer_name: String,
527    /// Part of a display device identifier that persists across boot cycles.
528    ///
529    /// See `manufacturer_name` for details.
530    pub monitor_name: String,
531    /// Part of a display device identifier that persists across boot cycles.
532    ///
533    /// See `manufacturer_name` for details.
534    pub monitor_serial: String,
535    /// Physical horizontal size of the displayed image area, in millimeters.
536    ///
537    /// If `using_fallback_size` is true, the value is a best guess from the
538    /// driver. Otherwise, the value here is reported by the display device.
539    pub horizontal_size_mm: u32,
540    /// Physical vertical size of the displayed image area, in millimeters.
541    ///
542    /// See `horizontal_size_mm` for more details.
543    pub vertical_size_mm: u32,
544    /// True if the driver does not have the display's physical sizing info.
545    pub using_fallback_size: bool,
546}
547
548impl fidl::Persistable for Info {}
549
550/// Identifies a layer resource owned by a Display Coordinator client.
551///
552/// [`fuchsia.hardware.display.types/INVALID_DISP_ID`] represents an invalid
553/// value.
554///
555/// Values are managed by [`fuchsia.hardware.display/Coordinator`] clients, to
556/// facilitate feed-forward dataflow.
557///
558/// Valid values uniquely identify "live" layers within a Display Coordinator
559/// connection. The identifier of a layer destroyed via
560/// [`fuchsia.hardware.display/Coordinator.DestroyLayer`] can be reused in a
561/// subsequent [`fuchsia.hardware.display/Coordinator.CreateLayer`] call.
562#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
563#[repr(C)]
564pub struct LayerId {
565    pub value: u64,
566}
567
568impl fidl::Persistable for LayerId {}
569
570/// Identifies a unique identifier ("cookie") of a Vertical Synchronization
571/// (Vsync) signal.
572///
573/// [`fuchsia.hardware.display.types/INVALID_DISP_ID`] represents an invalid
574/// value.
575#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
576#[repr(C)]
577pub struct VsyncAckCookie {
578    pub value: u64,
579}
580
581impl fidl::Persistable for VsyncAckCookie {}
582
583pub mod coordinator_ordinals {
584    pub const IMPORT_IMAGE: u64 = 0x3a8636eb9656b4f4;
585    pub const RELEASE_IMAGE: u64 = 0x477192230517504;
586    pub const IMPORT_EVENT: u64 = 0x2864e5dc59390543;
587    pub const RELEASE_EVENT: u64 = 0x32508c2101606b87;
588    pub const CREATE_LAYER: u64 = 0x2137cfd788a3496b;
589    pub const DESTROY_LAYER: u64 = 0x386e12d092bea2f8;
590    pub const SET_DISPLAY_MODE: u64 = 0xbde3c59ee9c1777;
591    pub const SET_DISPLAY_COLOR_CONVERSION: u64 = 0x2f18186a987d51aa;
592    pub const SET_DISPLAY_LAYERS: u64 = 0x190e0f6f93be1d89;
593    pub const SET_LAYER_PRIMARY_CONFIG: u64 = 0x68d89ebd518b45b9;
594    pub const SET_LAYER_PRIMARY_POSITION: u64 = 0x27b192b5a43851e2;
595    pub const SET_LAYER_PRIMARY_ALPHA: u64 = 0x104cf2b18b27296d;
596    pub const SET_LAYER_COLOR_CONFIG: u64 = 0x2fa91e9a2a01875f;
597    pub const SET_LAYER_IMAGE2: u64 = 0x53c6376dfc13a971;
598    pub const CHECK_CONFIG: u64 = 0x2bcfb4eb16878158;
599    pub const DISCARD_CONFIG: u64 = 0x1673399e9231dedf;
600    pub const GET_LATEST_APPLIED_CONFIG_STAMP: u64 = 0x76a50c0537265f65;
601    pub const APPLY_CONFIG3: u64 = 0x7f0fe0e4f062a67e;
602    pub const SET_VSYNC_EVENT_DELIVERY: u64 = 0x740b91a9ab2ef440;
603    pub const ACKNOWLEDGE_VSYNC: u64 = 0x25e921d26107d6ef;
604    pub const SET_VIRTCON_MODE: u64 = 0x4fe0721526068f00;
605    pub const IMPORT_BUFFER_COLLECTION: u64 = 0x30d06f510e7f4601;
606    pub const RELEASE_BUFFER_COLLECTION: u64 = 0x1c7dd5f8b0690be0;
607    pub const SET_BUFFER_COLLECTION_CONSTRAINTS: u64 = 0x509a4ee9af6035df;
608    pub const IS_CAPTURE_SUPPORTED: u64 = 0x4ca407277277971b;
609    pub const START_CAPTURE: u64 = 0x35cb38f19d96a8db;
610    pub const SET_MINIMUM_RGB: u64 = 0x1b49251437038b0b;
611    pub const SET_DISPLAY_POWER: u64 = 0x10feb62d11d9e92b;
612}
613
614pub mod coordinator_listener_ordinals {
615    pub const ON_DISPLAYS_CHANGED: u64 = 0x248fbe90c338a94f;
616    pub const ON_VSYNC: u64 = 0x249e9b8da7a7ac47;
617    pub const ON_CLIENT_OWNERSHIP_CHANGE: u64 = 0x1acd2ae683153d5e;
618}
619
620pub mod provider_ordinals {
621    pub const OPEN_COORDINATOR_WITH_LISTENER_FOR_VIRTCON: u64 = 0x154ac672633d9ec7;
622    pub const OPEN_COORDINATOR_WITH_LISTENER_FOR_PRIMARY: u64 = 0x635b6087ce4f6bfa;
623}
624
625mod internal {
626    use super::*;
627    unsafe impl fidl::encoding::TypeMarker for VirtconMode {
628        type Owned = Self;
629
630        #[inline(always)]
631        fn inline_align(_context: fidl::encoding::Context) -> usize {
632            std::mem::align_of::<u8>()
633        }
634
635        #[inline(always)]
636        fn inline_size(_context: fidl::encoding::Context) -> usize {
637            std::mem::size_of::<u8>()
638        }
639
640        #[inline(always)]
641        fn encode_is_copy() -> bool {
642            true
643        }
644
645        #[inline(always)]
646        fn decode_is_copy() -> bool {
647            false
648        }
649    }
650
651    impl fidl::encoding::ValueTypeMarker for VirtconMode {
652        type Borrowed<'a> = Self;
653        #[inline(always)]
654        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
655            *value
656        }
657    }
658
659    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for VirtconMode {
660        #[inline]
661        unsafe fn encode(
662            self,
663            encoder: &mut fidl::encoding::Encoder<'_, D>,
664            offset: usize,
665            _depth: fidl::encoding::Depth,
666        ) -> fidl::Result<()> {
667            encoder.debug_check_bounds::<Self>(offset);
668            encoder.write_num(self.into_primitive(), offset);
669            Ok(())
670        }
671    }
672
673    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VirtconMode {
674        #[inline(always)]
675        fn new_empty() -> Self {
676            Self::Fallback
677        }
678
679        #[inline]
680        unsafe fn decode(
681            &mut self,
682            decoder: &mut fidl::encoding::Decoder<'_, D>,
683            offset: usize,
684            _depth: fidl::encoding::Depth,
685        ) -> fidl::Result<()> {
686            decoder.debug_check_bounds::<Self>(offset);
687            let prim = decoder.read_num::<u8>(offset);
688
689            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
690            Ok(())
691        }
692    }
693
694    impl fidl::encoding::ValueTypeMarker for BufferCollectionId {
695        type Borrowed<'a> = &'a Self;
696        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
697            value
698        }
699    }
700
701    unsafe impl fidl::encoding::TypeMarker for BufferCollectionId {
702        type Owned = Self;
703
704        #[inline(always)]
705        fn inline_align(_context: fidl::encoding::Context) -> usize {
706            8
707        }
708
709        #[inline(always)]
710        fn inline_size(_context: fidl::encoding::Context) -> usize {
711            8
712        }
713        #[inline(always)]
714        fn encode_is_copy() -> bool {
715            true
716        }
717
718        #[inline(always)]
719        fn decode_is_copy() -> bool {
720            true
721        }
722    }
723
724    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BufferCollectionId, D>
725        for &BufferCollectionId
726    {
727        #[inline]
728        unsafe fn encode(
729            self,
730            encoder: &mut fidl::encoding::Encoder<'_, D>,
731            offset: usize,
732            _depth: fidl::encoding::Depth,
733        ) -> fidl::Result<()> {
734            encoder.debug_check_bounds::<BufferCollectionId>(offset);
735            unsafe {
736                // Copy the object into the buffer.
737                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
738                (buf_ptr as *mut BufferCollectionId)
739                    .write_unaligned((self as *const BufferCollectionId).read());
740                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
741                // done second because the memcpy will write garbage to these bytes.
742            }
743            Ok(())
744        }
745    }
746    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
747        fidl::encoding::Encode<BufferCollectionId, D> for (T0,)
748    {
749        #[inline]
750        unsafe fn encode(
751            self,
752            encoder: &mut fidl::encoding::Encoder<'_, D>,
753            offset: usize,
754            depth: fidl::encoding::Depth,
755        ) -> fidl::Result<()> {
756            encoder.debug_check_bounds::<BufferCollectionId>(offset);
757            // Zero out padding regions. There's no need to apply masks
758            // because the unmasked parts will be overwritten by fields.
759            // Write the fields.
760            self.0.encode(encoder, offset + 0, depth)?;
761            Ok(())
762        }
763    }
764
765    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BufferCollectionId {
766        #[inline(always)]
767        fn new_empty() -> Self {
768            Self { value: fidl::new_empty!(u64, D) }
769        }
770
771        #[inline]
772        unsafe fn decode(
773            &mut self,
774            decoder: &mut fidl::encoding::Decoder<'_, D>,
775            offset: usize,
776            _depth: fidl::encoding::Depth,
777        ) -> fidl::Result<()> {
778            decoder.debug_check_bounds::<Self>(offset);
779            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
780            // Verify that padding bytes are zero.
781            // Copy from the buffer into the object.
782            unsafe {
783                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
784            }
785            Ok(())
786        }
787    }
788
789    impl fidl::encoding::ValueTypeMarker for BufferId {
790        type Borrowed<'a> = &'a Self;
791        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
792            value
793        }
794    }
795
796    unsafe impl fidl::encoding::TypeMarker for BufferId {
797        type Owned = Self;
798
799        #[inline(always)]
800        fn inline_align(_context: fidl::encoding::Context) -> usize {
801            8
802        }
803
804        #[inline(always)]
805        fn inline_size(_context: fidl::encoding::Context) -> usize {
806            16
807        }
808    }
809
810    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BufferId, D> for &BufferId {
811        #[inline]
812        unsafe fn encode(
813            self,
814            encoder: &mut fidl::encoding::Encoder<'_, D>,
815            offset: usize,
816            _depth: fidl::encoding::Depth,
817        ) -> fidl::Result<()> {
818            encoder.debug_check_bounds::<BufferId>(offset);
819            unsafe {
820                // Copy the object into the buffer.
821                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
822                (buf_ptr as *mut BufferId).write_unaligned((self as *const BufferId).read());
823                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
824                // done second because the memcpy will write garbage to these bytes.
825                let padding_ptr = buf_ptr.offset(8) as *mut u64;
826                let padding_mask = 0xffffffff00000000u64;
827                padding_ptr.write_unaligned(padding_ptr.read_unaligned() & !padding_mask);
828            }
829            Ok(())
830        }
831    }
832    unsafe impl<
833            D: fidl::encoding::ResourceDialect,
834            T0: fidl::encoding::Encode<BufferCollectionId, D>,
835            T1: fidl::encoding::Encode<u32, D>,
836        > fidl::encoding::Encode<BufferId, D> for (T0, T1)
837    {
838        #[inline]
839        unsafe fn encode(
840            self,
841            encoder: &mut fidl::encoding::Encoder<'_, D>,
842            offset: usize,
843            depth: fidl::encoding::Depth,
844        ) -> fidl::Result<()> {
845            encoder.debug_check_bounds::<BufferId>(offset);
846            // Zero out padding regions. There's no need to apply masks
847            // because the unmasked parts will be overwritten by fields.
848            unsafe {
849                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
850                (ptr as *mut u64).write_unaligned(0);
851            }
852            // Write the fields.
853            self.0.encode(encoder, offset + 0, depth)?;
854            self.1.encode(encoder, offset + 8, depth)?;
855            Ok(())
856        }
857    }
858
859    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BufferId {
860        #[inline(always)]
861        fn new_empty() -> Self {
862            Self {
863                buffer_collection_id: fidl::new_empty!(BufferCollectionId, D),
864                buffer_index: fidl::new_empty!(u32, D),
865            }
866        }
867
868        #[inline]
869        unsafe fn decode(
870            &mut self,
871            decoder: &mut fidl::encoding::Decoder<'_, D>,
872            offset: usize,
873            _depth: fidl::encoding::Depth,
874        ) -> fidl::Result<()> {
875            decoder.debug_check_bounds::<Self>(offset);
876            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
877            // Verify that padding bytes are zero.
878            let ptr = unsafe { buf_ptr.offset(8) };
879            let padval = unsafe { (ptr as *const u64).read_unaligned() };
880            let mask = 0xffffffff00000000u64;
881            let maskedval = padval & mask;
882            if maskedval != 0 {
883                return Err(fidl::Error::NonZeroPadding {
884                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
885                });
886            }
887            // Copy from the buffer into the object.
888            unsafe {
889                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
890            }
891            Ok(())
892        }
893    }
894
895    impl fidl::encoding::ValueTypeMarker for ConfigStamp {
896        type Borrowed<'a> = &'a Self;
897        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
898            value
899        }
900    }
901
902    unsafe impl fidl::encoding::TypeMarker for ConfigStamp {
903        type Owned = Self;
904
905        #[inline(always)]
906        fn inline_align(_context: fidl::encoding::Context) -> usize {
907            8
908        }
909
910        #[inline(always)]
911        fn inline_size(_context: fidl::encoding::Context) -> usize {
912            8
913        }
914        #[inline(always)]
915        fn encode_is_copy() -> bool {
916            true
917        }
918
919        #[inline(always)]
920        fn decode_is_copy() -> bool {
921            true
922        }
923    }
924
925    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ConfigStamp, D>
926        for &ConfigStamp
927    {
928        #[inline]
929        unsafe fn encode(
930            self,
931            encoder: &mut fidl::encoding::Encoder<'_, D>,
932            offset: usize,
933            _depth: fidl::encoding::Depth,
934        ) -> fidl::Result<()> {
935            encoder.debug_check_bounds::<ConfigStamp>(offset);
936            unsafe {
937                // Copy the object into the buffer.
938                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
939                (buf_ptr as *mut ConfigStamp).write_unaligned((self as *const ConfigStamp).read());
940                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
941                // done second because the memcpy will write garbage to these bytes.
942            }
943            Ok(())
944        }
945    }
946    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
947        fidl::encoding::Encode<ConfigStamp, D> for (T0,)
948    {
949        #[inline]
950        unsafe fn encode(
951            self,
952            encoder: &mut fidl::encoding::Encoder<'_, D>,
953            offset: usize,
954            depth: fidl::encoding::Depth,
955        ) -> fidl::Result<()> {
956            encoder.debug_check_bounds::<ConfigStamp>(offset);
957            // Zero out padding regions. There's no need to apply masks
958            // because the unmasked parts will be overwritten by fields.
959            // Write the fields.
960            self.0.encode(encoder, offset + 0, depth)?;
961            Ok(())
962        }
963    }
964
965    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConfigStamp {
966        #[inline(always)]
967        fn new_empty() -> Self {
968            Self { value: fidl::new_empty!(u64, D) }
969        }
970
971        #[inline]
972        unsafe fn decode(
973            &mut self,
974            decoder: &mut fidl::encoding::Decoder<'_, D>,
975            offset: usize,
976            _depth: fidl::encoding::Depth,
977        ) -> fidl::Result<()> {
978            decoder.debug_check_bounds::<Self>(offset);
979            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
980            // Verify that padding bytes are zero.
981            // Copy from the buffer into the object.
982            unsafe {
983                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
984            }
985            Ok(())
986        }
987    }
988
989    impl fidl::encoding::ValueTypeMarker for CoordinatorAcknowledgeVsyncRequest {
990        type Borrowed<'a> = &'a Self;
991        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
992            value
993        }
994    }
995
996    unsafe impl fidl::encoding::TypeMarker for CoordinatorAcknowledgeVsyncRequest {
997        type Owned = Self;
998
999        #[inline(always)]
1000        fn inline_align(_context: fidl::encoding::Context) -> usize {
1001            8
1002        }
1003
1004        #[inline(always)]
1005        fn inline_size(_context: fidl::encoding::Context) -> usize {
1006            8
1007        }
1008        #[inline(always)]
1009        fn encode_is_copy() -> bool {
1010            true
1011        }
1012
1013        #[inline(always)]
1014        fn decode_is_copy() -> bool {
1015            true
1016        }
1017    }
1018
1019    unsafe impl<D: fidl::encoding::ResourceDialect>
1020        fidl::encoding::Encode<CoordinatorAcknowledgeVsyncRequest, D>
1021        for &CoordinatorAcknowledgeVsyncRequest
1022    {
1023        #[inline]
1024        unsafe fn encode(
1025            self,
1026            encoder: &mut fidl::encoding::Encoder<'_, D>,
1027            offset: usize,
1028            _depth: fidl::encoding::Depth,
1029        ) -> fidl::Result<()> {
1030            encoder.debug_check_bounds::<CoordinatorAcknowledgeVsyncRequest>(offset);
1031            unsafe {
1032                // Copy the object into the buffer.
1033                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1034                (buf_ptr as *mut CoordinatorAcknowledgeVsyncRequest)
1035                    .write_unaligned((self as *const CoordinatorAcknowledgeVsyncRequest).read());
1036                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1037                // done second because the memcpy will write garbage to these bytes.
1038            }
1039            Ok(())
1040        }
1041    }
1042    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1043        fidl::encoding::Encode<CoordinatorAcknowledgeVsyncRequest, D> for (T0,)
1044    {
1045        #[inline]
1046        unsafe fn encode(
1047            self,
1048            encoder: &mut fidl::encoding::Encoder<'_, D>,
1049            offset: usize,
1050            depth: fidl::encoding::Depth,
1051        ) -> fidl::Result<()> {
1052            encoder.debug_check_bounds::<CoordinatorAcknowledgeVsyncRequest>(offset);
1053            // Zero out padding regions. There's no need to apply masks
1054            // because the unmasked parts will be overwritten by fields.
1055            // Write the fields.
1056            self.0.encode(encoder, offset + 0, depth)?;
1057            Ok(())
1058        }
1059    }
1060
1061    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1062        for CoordinatorAcknowledgeVsyncRequest
1063    {
1064        #[inline(always)]
1065        fn new_empty() -> Self {
1066            Self { cookie: fidl::new_empty!(u64, D) }
1067        }
1068
1069        #[inline]
1070        unsafe fn decode(
1071            &mut self,
1072            decoder: &mut fidl::encoding::Decoder<'_, D>,
1073            offset: usize,
1074            _depth: fidl::encoding::Depth,
1075        ) -> fidl::Result<()> {
1076            decoder.debug_check_bounds::<Self>(offset);
1077            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1078            // Verify that padding bytes are zero.
1079            // Copy from the buffer into the object.
1080            unsafe {
1081                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1082            }
1083            Ok(())
1084        }
1085    }
1086
1087    impl fidl::encoding::ValueTypeMarker for CoordinatorCheckConfigResponse {
1088        type Borrowed<'a> = &'a Self;
1089        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1090            value
1091        }
1092    }
1093
1094    unsafe impl fidl::encoding::TypeMarker for CoordinatorCheckConfigResponse {
1095        type Owned = Self;
1096
1097        #[inline(always)]
1098        fn inline_align(_context: fidl::encoding::Context) -> usize {
1099            4
1100        }
1101
1102        #[inline(always)]
1103        fn inline_size(_context: fidl::encoding::Context) -> usize {
1104            4
1105        }
1106    }
1107
1108    unsafe impl<D: fidl::encoding::ResourceDialect>
1109        fidl::encoding::Encode<CoordinatorCheckConfigResponse, D>
1110        for &CoordinatorCheckConfigResponse
1111    {
1112        #[inline]
1113        unsafe fn encode(
1114            self,
1115            encoder: &mut fidl::encoding::Encoder<'_, D>,
1116            offset: usize,
1117            _depth: fidl::encoding::Depth,
1118        ) -> fidl::Result<()> {
1119            encoder.debug_check_bounds::<CoordinatorCheckConfigResponse>(offset);
1120            // Delegate to tuple encoding.
1121            fidl::encoding::Encode::<CoordinatorCheckConfigResponse, D>::encode(
1122                (
1123                    <fidl_fuchsia_hardware_display_types__common::ConfigResult as fidl::encoding::ValueTypeMarker>::borrow(&self.res),
1124                ),
1125                encoder, offset, _depth
1126            )
1127        }
1128    }
1129    unsafe impl<
1130            D: fidl::encoding::ResourceDialect,
1131            T0: fidl::encoding::Encode<fidl_fuchsia_hardware_display_types__common::ConfigResult, D>,
1132        > fidl::encoding::Encode<CoordinatorCheckConfigResponse, D> for (T0,)
1133    {
1134        #[inline]
1135        unsafe fn encode(
1136            self,
1137            encoder: &mut fidl::encoding::Encoder<'_, D>,
1138            offset: usize,
1139            depth: fidl::encoding::Depth,
1140        ) -> fidl::Result<()> {
1141            encoder.debug_check_bounds::<CoordinatorCheckConfigResponse>(offset);
1142            // Zero out padding regions. There's no need to apply masks
1143            // because the unmasked parts will be overwritten by fields.
1144            // Write the fields.
1145            self.0.encode(encoder, offset + 0, depth)?;
1146            Ok(())
1147        }
1148    }
1149
1150    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1151        for CoordinatorCheckConfigResponse
1152    {
1153        #[inline(always)]
1154        fn new_empty() -> Self {
1155            Self {
1156                res: fidl::new_empty!(fidl_fuchsia_hardware_display_types__common::ConfigResult, D),
1157            }
1158        }
1159
1160        #[inline]
1161        unsafe fn decode(
1162            &mut self,
1163            decoder: &mut fidl::encoding::Decoder<'_, D>,
1164            offset: usize,
1165            _depth: fidl::encoding::Depth,
1166        ) -> fidl::Result<()> {
1167            decoder.debug_check_bounds::<Self>(offset);
1168            // Verify that padding bytes are zero.
1169            fidl::decode!(
1170                fidl_fuchsia_hardware_display_types__common::ConfigResult,
1171                D,
1172                &mut self.res,
1173                decoder,
1174                offset + 0,
1175                _depth
1176            )?;
1177            Ok(())
1178        }
1179    }
1180
1181    impl fidl::encoding::ValueTypeMarker for CoordinatorDestroyLayerRequest {
1182        type Borrowed<'a> = &'a Self;
1183        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1184            value
1185        }
1186    }
1187
1188    unsafe impl fidl::encoding::TypeMarker for CoordinatorDestroyLayerRequest {
1189        type Owned = Self;
1190
1191        #[inline(always)]
1192        fn inline_align(_context: fidl::encoding::Context) -> usize {
1193            8
1194        }
1195
1196        #[inline(always)]
1197        fn inline_size(_context: fidl::encoding::Context) -> usize {
1198            8
1199        }
1200        #[inline(always)]
1201        fn encode_is_copy() -> bool {
1202            true
1203        }
1204
1205        #[inline(always)]
1206        fn decode_is_copy() -> bool {
1207            true
1208        }
1209    }
1210
1211    unsafe impl<D: fidl::encoding::ResourceDialect>
1212        fidl::encoding::Encode<CoordinatorDestroyLayerRequest, D>
1213        for &CoordinatorDestroyLayerRequest
1214    {
1215        #[inline]
1216        unsafe fn encode(
1217            self,
1218            encoder: &mut fidl::encoding::Encoder<'_, D>,
1219            offset: usize,
1220            _depth: fidl::encoding::Depth,
1221        ) -> fidl::Result<()> {
1222            encoder.debug_check_bounds::<CoordinatorDestroyLayerRequest>(offset);
1223            unsafe {
1224                // Copy the object into the buffer.
1225                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1226                (buf_ptr as *mut CoordinatorDestroyLayerRequest)
1227                    .write_unaligned((self as *const CoordinatorDestroyLayerRequest).read());
1228                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1229                // done second because the memcpy will write garbage to these bytes.
1230            }
1231            Ok(())
1232        }
1233    }
1234    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<LayerId, D>>
1235        fidl::encoding::Encode<CoordinatorDestroyLayerRequest, D> for (T0,)
1236    {
1237        #[inline]
1238        unsafe fn encode(
1239            self,
1240            encoder: &mut fidl::encoding::Encoder<'_, D>,
1241            offset: usize,
1242            depth: fidl::encoding::Depth,
1243        ) -> fidl::Result<()> {
1244            encoder.debug_check_bounds::<CoordinatorDestroyLayerRequest>(offset);
1245            // Zero out padding regions. There's no need to apply masks
1246            // because the unmasked parts will be overwritten by fields.
1247            // Write the fields.
1248            self.0.encode(encoder, offset + 0, depth)?;
1249            Ok(())
1250        }
1251    }
1252
1253    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1254        for CoordinatorDestroyLayerRequest
1255    {
1256        #[inline(always)]
1257        fn new_empty() -> Self {
1258            Self { layer_id: fidl::new_empty!(LayerId, D) }
1259        }
1260
1261        #[inline]
1262        unsafe fn decode(
1263            &mut self,
1264            decoder: &mut fidl::encoding::Decoder<'_, D>,
1265            offset: usize,
1266            _depth: fidl::encoding::Depth,
1267        ) -> fidl::Result<()> {
1268            decoder.debug_check_bounds::<Self>(offset);
1269            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1270            // Verify that padding bytes are zero.
1271            // Copy from the buffer into the object.
1272            unsafe {
1273                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1274            }
1275            Ok(())
1276        }
1277    }
1278
1279    impl fidl::encoding::ValueTypeMarker for CoordinatorGetLatestAppliedConfigStampResponse {
1280        type Borrowed<'a> = &'a Self;
1281        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1282            value
1283        }
1284    }
1285
1286    unsafe impl fidl::encoding::TypeMarker for CoordinatorGetLatestAppliedConfigStampResponse {
1287        type Owned = Self;
1288
1289        #[inline(always)]
1290        fn inline_align(_context: fidl::encoding::Context) -> usize {
1291            8
1292        }
1293
1294        #[inline(always)]
1295        fn inline_size(_context: fidl::encoding::Context) -> usize {
1296            8
1297        }
1298        #[inline(always)]
1299        fn encode_is_copy() -> bool {
1300            true
1301        }
1302
1303        #[inline(always)]
1304        fn decode_is_copy() -> bool {
1305            true
1306        }
1307    }
1308
1309    unsafe impl<D: fidl::encoding::ResourceDialect>
1310        fidl::encoding::Encode<CoordinatorGetLatestAppliedConfigStampResponse, D>
1311        for &CoordinatorGetLatestAppliedConfigStampResponse
1312    {
1313        #[inline]
1314        unsafe fn encode(
1315            self,
1316            encoder: &mut fidl::encoding::Encoder<'_, D>,
1317            offset: usize,
1318            _depth: fidl::encoding::Depth,
1319        ) -> fidl::Result<()> {
1320            encoder.debug_check_bounds::<CoordinatorGetLatestAppliedConfigStampResponse>(offset);
1321            unsafe {
1322                // Copy the object into the buffer.
1323                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1324                (buf_ptr as *mut CoordinatorGetLatestAppliedConfigStampResponse).write_unaligned(
1325                    (self as *const CoordinatorGetLatestAppliedConfigStampResponse).read(),
1326                );
1327                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1328                // done second because the memcpy will write garbage to these bytes.
1329            }
1330            Ok(())
1331        }
1332    }
1333    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ConfigStamp, D>>
1334        fidl::encoding::Encode<CoordinatorGetLatestAppliedConfigStampResponse, D> for (T0,)
1335    {
1336        #[inline]
1337        unsafe fn encode(
1338            self,
1339            encoder: &mut fidl::encoding::Encoder<'_, D>,
1340            offset: usize,
1341            depth: fidl::encoding::Depth,
1342        ) -> fidl::Result<()> {
1343            encoder.debug_check_bounds::<CoordinatorGetLatestAppliedConfigStampResponse>(offset);
1344            // Zero out padding regions. There's no need to apply masks
1345            // because the unmasked parts will be overwritten by fields.
1346            // Write the fields.
1347            self.0.encode(encoder, offset + 0, depth)?;
1348            Ok(())
1349        }
1350    }
1351
1352    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1353        for CoordinatorGetLatestAppliedConfigStampResponse
1354    {
1355        #[inline(always)]
1356        fn new_empty() -> Self {
1357            Self { stamp: fidl::new_empty!(ConfigStamp, D) }
1358        }
1359
1360        #[inline]
1361        unsafe fn decode(
1362            &mut self,
1363            decoder: &mut fidl::encoding::Decoder<'_, D>,
1364            offset: usize,
1365            _depth: fidl::encoding::Depth,
1366        ) -> fidl::Result<()> {
1367            decoder.debug_check_bounds::<Self>(offset);
1368            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1369            // Verify that padding bytes are zero.
1370            // Copy from the buffer into the object.
1371            unsafe {
1372                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1373            }
1374            Ok(())
1375        }
1376    }
1377
1378    impl fidl::encoding::ValueTypeMarker for CoordinatorImportImageRequest {
1379        type Borrowed<'a> = &'a Self;
1380        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1381            value
1382        }
1383    }
1384
1385    unsafe impl fidl::encoding::TypeMarker for CoordinatorImportImageRequest {
1386        type Owned = Self;
1387
1388        #[inline(always)]
1389        fn inline_align(_context: fidl::encoding::Context) -> usize {
1390            8
1391        }
1392
1393        #[inline(always)]
1394        fn inline_size(_context: fidl::encoding::Context) -> usize {
1395            40
1396        }
1397    }
1398
1399    unsafe impl<D: fidl::encoding::ResourceDialect>
1400        fidl::encoding::Encode<CoordinatorImportImageRequest, D>
1401        for &CoordinatorImportImageRequest
1402    {
1403        #[inline]
1404        unsafe fn encode(
1405            self,
1406            encoder: &mut fidl::encoding::Encoder<'_, D>,
1407            offset: usize,
1408            _depth: fidl::encoding::Depth,
1409        ) -> fidl::Result<()> {
1410            encoder.debug_check_bounds::<CoordinatorImportImageRequest>(offset);
1411            // Delegate to tuple encoding.
1412            fidl::encoding::Encode::<CoordinatorImportImageRequest, D>::encode(
1413                (
1414                    <fidl_fuchsia_hardware_display_types__common::ImageMetadata as fidl::encoding::ValueTypeMarker>::borrow(&self.image_metadata),
1415                    <BufferId as fidl::encoding::ValueTypeMarker>::borrow(&self.buffer_id),
1416                    <ImageId as fidl::encoding::ValueTypeMarker>::borrow(&self.image_id),
1417                ),
1418                encoder, offset, _depth
1419            )
1420        }
1421    }
1422    unsafe impl<
1423            D: fidl::encoding::ResourceDialect,
1424            T0: fidl::encoding::Encode<fidl_fuchsia_hardware_display_types__common::ImageMetadata, D>,
1425            T1: fidl::encoding::Encode<BufferId, D>,
1426            T2: fidl::encoding::Encode<ImageId, D>,
1427        > fidl::encoding::Encode<CoordinatorImportImageRequest, D> for (T0, T1, T2)
1428    {
1429        #[inline]
1430        unsafe fn encode(
1431            self,
1432            encoder: &mut fidl::encoding::Encoder<'_, D>,
1433            offset: usize,
1434            depth: fidl::encoding::Depth,
1435        ) -> fidl::Result<()> {
1436            encoder.debug_check_bounds::<CoordinatorImportImageRequest>(offset);
1437            // Zero out padding regions. There's no need to apply masks
1438            // because the unmasked parts will be overwritten by fields.
1439            unsafe {
1440                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
1441                (ptr as *mut u64).write_unaligned(0);
1442            }
1443            // Write the fields.
1444            self.0.encode(encoder, offset + 0, depth)?;
1445            self.1.encode(encoder, offset + 16, depth)?;
1446            self.2.encode(encoder, offset + 32, depth)?;
1447            Ok(())
1448        }
1449    }
1450
1451    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1452        for CoordinatorImportImageRequest
1453    {
1454        #[inline(always)]
1455        fn new_empty() -> Self {
1456            Self {
1457                image_metadata: fidl::new_empty!(
1458                    fidl_fuchsia_hardware_display_types__common::ImageMetadata,
1459                    D
1460                ),
1461                buffer_id: fidl::new_empty!(BufferId, D),
1462                image_id: fidl::new_empty!(ImageId, D),
1463            }
1464        }
1465
1466        #[inline]
1467        unsafe fn decode(
1468            &mut self,
1469            decoder: &mut fidl::encoding::Decoder<'_, D>,
1470            offset: usize,
1471            _depth: fidl::encoding::Depth,
1472        ) -> fidl::Result<()> {
1473            decoder.debug_check_bounds::<Self>(offset);
1474            // Verify that padding bytes are zero.
1475            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
1476            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1477            let mask = 0xffffffff00000000u64;
1478            let maskedval = padval & mask;
1479            if maskedval != 0 {
1480                return Err(fidl::Error::NonZeroPadding {
1481                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
1482                });
1483            }
1484            fidl::decode!(
1485                fidl_fuchsia_hardware_display_types__common::ImageMetadata,
1486                D,
1487                &mut self.image_metadata,
1488                decoder,
1489                offset + 0,
1490                _depth
1491            )?;
1492            fidl::decode!(BufferId, D, &mut self.buffer_id, decoder, offset + 16, _depth)?;
1493            fidl::decode!(ImageId, D, &mut self.image_id, decoder, offset + 32, _depth)?;
1494            Ok(())
1495        }
1496    }
1497
1498    impl fidl::encoding::ValueTypeMarker for CoordinatorListenerOnClientOwnershipChangeRequest {
1499        type Borrowed<'a> = &'a Self;
1500        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1501            value
1502        }
1503    }
1504
1505    unsafe impl fidl::encoding::TypeMarker for CoordinatorListenerOnClientOwnershipChangeRequest {
1506        type Owned = Self;
1507
1508        #[inline(always)]
1509        fn inline_align(_context: fidl::encoding::Context) -> usize {
1510            1
1511        }
1512
1513        #[inline(always)]
1514        fn inline_size(_context: fidl::encoding::Context) -> usize {
1515            1
1516        }
1517    }
1518
1519    unsafe impl<D: fidl::encoding::ResourceDialect>
1520        fidl::encoding::Encode<CoordinatorListenerOnClientOwnershipChangeRequest, D>
1521        for &CoordinatorListenerOnClientOwnershipChangeRequest
1522    {
1523        #[inline]
1524        unsafe fn encode(
1525            self,
1526            encoder: &mut fidl::encoding::Encoder<'_, D>,
1527            offset: usize,
1528            _depth: fidl::encoding::Depth,
1529        ) -> fidl::Result<()> {
1530            encoder.debug_check_bounds::<CoordinatorListenerOnClientOwnershipChangeRequest>(offset);
1531            // Delegate to tuple encoding.
1532            fidl::encoding::Encode::<CoordinatorListenerOnClientOwnershipChangeRequest, D>::encode(
1533                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.has_ownership),),
1534                encoder,
1535                offset,
1536                _depth,
1537            )
1538        }
1539    }
1540    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
1541        fidl::encoding::Encode<CoordinatorListenerOnClientOwnershipChangeRequest, D> for (T0,)
1542    {
1543        #[inline]
1544        unsafe fn encode(
1545            self,
1546            encoder: &mut fidl::encoding::Encoder<'_, D>,
1547            offset: usize,
1548            depth: fidl::encoding::Depth,
1549        ) -> fidl::Result<()> {
1550            encoder.debug_check_bounds::<CoordinatorListenerOnClientOwnershipChangeRequest>(offset);
1551            // Zero out padding regions. There's no need to apply masks
1552            // because the unmasked parts will be overwritten by fields.
1553            // Write the fields.
1554            self.0.encode(encoder, offset + 0, depth)?;
1555            Ok(())
1556        }
1557    }
1558
1559    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1560        for CoordinatorListenerOnClientOwnershipChangeRequest
1561    {
1562        #[inline(always)]
1563        fn new_empty() -> Self {
1564            Self { has_ownership: fidl::new_empty!(bool, D) }
1565        }
1566
1567        #[inline]
1568        unsafe fn decode(
1569            &mut self,
1570            decoder: &mut fidl::encoding::Decoder<'_, D>,
1571            offset: usize,
1572            _depth: fidl::encoding::Depth,
1573        ) -> fidl::Result<()> {
1574            decoder.debug_check_bounds::<Self>(offset);
1575            // Verify that padding bytes are zero.
1576            fidl::decode!(bool, D, &mut self.has_ownership, decoder, offset + 0, _depth)?;
1577            Ok(())
1578        }
1579    }
1580
1581    impl fidl::encoding::ValueTypeMarker for CoordinatorListenerOnDisplaysChangedRequest {
1582        type Borrowed<'a> = &'a Self;
1583        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1584            value
1585        }
1586    }
1587
1588    unsafe impl fidl::encoding::TypeMarker for CoordinatorListenerOnDisplaysChangedRequest {
1589        type Owned = Self;
1590
1591        #[inline(always)]
1592        fn inline_align(_context: fidl::encoding::Context) -> usize {
1593            8
1594        }
1595
1596        #[inline(always)]
1597        fn inline_size(_context: fidl::encoding::Context) -> usize {
1598            32
1599        }
1600    }
1601
1602    unsafe impl<D: fidl::encoding::ResourceDialect>
1603        fidl::encoding::Encode<CoordinatorListenerOnDisplaysChangedRequest, D>
1604        for &CoordinatorListenerOnDisplaysChangedRequest
1605    {
1606        #[inline]
1607        unsafe fn encode(
1608            self,
1609            encoder: &mut fidl::encoding::Encoder<'_, D>,
1610            offset: usize,
1611            _depth: fidl::encoding::Depth,
1612        ) -> fidl::Result<()> {
1613            encoder.debug_check_bounds::<CoordinatorListenerOnDisplaysChangedRequest>(offset);
1614            // Delegate to tuple encoding.
1615            fidl::encoding::Encode::<CoordinatorListenerOnDisplaysChangedRequest, D>::encode(
1616                (
1617                    <fidl::encoding::UnboundedVector<Info> as fidl::encoding::ValueTypeMarker>::borrow(&self.added),
1618                    <fidl::encoding::UnboundedVector<fidl_fuchsia_hardware_display_types__common::DisplayId> as fidl::encoding::ValueTypeMarker>::borrow(&self.removed),
1619                ),
1620                encoder, offset, _depth
1621            )
1622        }
1623    }
1624    unsafe impl<
1625            D: fidl::encoding::ResourceDialect,
1626            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Info>, D>,
1627            T1: fidl::encoding::Encode<
1628                fidl::encoding::UnboundedVector<
1629                    fidl_fuchsia_hardware_display_types__common::DisplayId,
1630                >,
1631                D,
1632            >,
1633        > fidl::encoding::Encode<CoordinatorListenerOnDisplaysChangedRequest, D> for (T0, T1)
1634    {
1635        #[inline]
1636        unsafe fn encode(
1637            self,
1638            encoder: &mut fidl::encoding::Encoder<'_, D>,
1639            offset: usize,
1640            depth: fidl::encoding::Depth,
1641        ) -> fidl::Result<()> {
1642            encoder.debug_check_bounds::<CoordinatorListenerOnDisplaysChangedRequest>(offset);
1643            // Zero out padding regions. There's no need to apply masks
1644            // because the unmasked parts will be overwritten by fields.
1645            // Write the fields.
1646            self.0.encode(encoder, offset + 0, depth)?;
1647            self.1.encode(encoder, offset + 16, depth)?;
1648            Ok(())
1649        }
1650    }
1651
1652    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1653        for CoordinatorListenerOnDisplaysChangedRequest
1654    {
1655        #[inline(always)]
1656        fn new_empty() -> Self {
1657            Self {
1658                added: fidl::new_empty!(fidl::encoding::UnboundedVector<Info>, D),
1659                removed: fidl::new_empty!(
1660                    fidl::encoding::UnboundedVector<
1661                        fidl_fuchsia_hardware_display_types__common::DisplayId,
1662                    >,
1663                    D
1664                ),
1665            }
1666        }
1667
1668        #[inline]
1669        unsafe fn decode(
1670            &mut self,
1671            decoder: &mut fidl::encoding::Decoder<'_, D>,
1672            offset: usize,
1673            _depth: fidl::encoding::Depth,
1674        ) -> fidl::Result<()> {
1675            decoder.debug_check_bounds::<Self>(offset);
1676            // Verify that padding bytes are zero.
1677            fidl::decode!(
1678                fidl::encoding::UnboundedVector<Info>,
1679                D,
1680                &mut self.added,
1681                decoder,
1682                offset + 0,
1683                _depth
1684            )?;
1685            fidl::decode!(
1686                fidl::encoding::UnboundedVector<
1687                    fidl_fuchsia_hardware_display_types__common::DisplayId,
1688                >,
1689                D,
1690                &mut self.removed,
1691                decoder,
1692                offset + 16,
1693                _depth
1694            )?;
1695            Ok(())
1696        }
1697    }
1698
1699    impl fidl::encoding::ValueTypeMarker for CoordinatorListenerOnVsyncRequest {
1700        type Borrowed<'a> = &'a Self;
1701        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1702            value
1703        }
1704    }
1705
1706    unsafe impl fidl::encoding::TypeMarker for CoordinatorListenerOnVsyncRequest {
1707        type Owned = Self;
1708
1709        #[inline(always)]
1710        fn inline_align(_context: fidl::encoding::Context) -> usize {
1711            8
1712        }
1713
1714        #[inline(always)]
1715        fn inline_size(_context: fidl::encoding::Context) -> usize {
1716            32
1717        }
1718    }
1719
1720    unsafe impl<D: fidl::encoding::ResourceDialect>
1721        fidl::encoding::Encode<CoordinatorListenerOnVsyncRequest, D>
1722        for &CoordinatorListenerOnVsyncRequest
1723    {
1724        #[inline]
1725        unsafe fn encode(
1726            self,
1727            encoder: &mut fidl::encoding::Encoder<'_, D>,
1728            offset: usize,
1729            _depth: fidl::encoding::Depth,
1730        ) -> fidl::Result<()> {
1731            encoder.debug_check_bounds::<CoordinatorListenerOnVsyncRequest>(offset);
1732            // Delegate to tuple encoding.
1733            fidl::encoding::Encode::<CoordinatorListenerOnVsyncRequest, D>::encode(
1734                (
1735                    <fidl_fuchsia_hardware_display_types__common::DisplayId as fidl::encoding::ValueTypeMarker>::borrow(&self.display_id),
1736                    <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timestamp),
1737                    <ConfigStamp as fidl::encoding::ValueTypeMarker>::borrow(&self.applied_config_stamp),
1738                    <VsyncAckCookie as fidl::encoding::ValueTypeMarker>::borrow(&self.cookie),
1739                ),
1740                encoder, offset, _depth
1741            )
1742        }
1743    }
1744    unsafe impl<
1745            D: fidl::encoding::ResourceDialect,
1746            T0: fidl::encoding::Encode<fidl_fuchsia_hardware_display_types__common::DisplayId, D>,
1747            T1: fidl::encoding::Encode<i64, D>,
1748            T2: fidl::encoding::Encode<ConfigStamp, D>,
1749            T3: fidl::encoding::Encode<VsyncAckCookie, D>,
1750        > fidl::encoding::Encode<CoordinatorListenerOnVsyncRequest, D> for (T0, T1, T2, T3)
1751    {
1752        #[inline]
1753        unsafe fn encode(
1754            self,
1755            encoder: &mut fidl::encoding::Encoder<'_, D>,
1756            offset: usize,
1757            depth: fidl::encoding::Depth,
1758        ) -> fidl::Result<()> {
1759            encoder.debug_check_bounds::<CoordinatorListenerOnVsyncRequest>(offset);
1760            // Zero out padding regions. There's no need to apply masks
1761            // because the unmasked parts will be overwritten by fields.
1762            // Write the fields.
1763            self.0.encode(encoder, offset + 0, depth)?;
1764            self.1.encode(encoder, offset + 8, depth)?;
1765            self.2.encode(encoder, offset + 16, depth)?;
1766            self.3.encode(encoder, offset + 24, depth)?;
1767            Ok(())
1768        }
1769    }
1770
1771    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1772        for CoordinatorListenerOnVsyncRequest
1773    {
1774        #[inline(always)]
1775        fn new_empty() -> Self {
1776            Self {
1777                display_id: fidl::new_empty!(
1778                    fidl_fuchsia_hardware_display_types__common::DisplayId,
1779                    D
1780                ),
1781                timestamp: fidl::new_empty!(i64, D),
1782                applied_config_stamp: fidl::new_empty!(ConfigStamp, D),
1783                cookie: fidl::new_empty!(VsyncAckCookie, D),
1784            }
1785        }
1786
1787        #[inline]
1788        unsafe fn decode(
1789            &mut self,
1790            decoder: &mut fidl::encoding::Decoder<'_, D>,
1791            offset: usize,
1792            _depth: fidl::encoding::Depth,
1793        ) -> fidl::Result<()> {
1794            decoder.debug_check_bounds::<Self>(offset);
1795            // Verify that padding bytes are zero.
1796            fidl::decode!(
1797                fidl_fuchsia_hardware_display_types__common::DisplayId,
1798                D,
1799                &mut self.display_id,
1800                decoder,
1801                offset + 0,
1802                _depth
1803            )?;
1804            fidl::decode!(i64, D, &mut self.timestamp, decoder, offset + 8, _depth)?;
1805            fidl::decode!(
1806                ConfigStamp,
1807                D,
1808                &mut self.applied_config_stamp,
1809                decoder,
1810                offset + 16,
1811                _depth
1812            )?;
1813            fidl::decode!(VsyncAckCookie, D, &mut self.cookie, decoder, offset + 24, _depth)?;
1814            Ok(())
1815        }
1816    }
1817
1818    impl fidl::encoding::ValueTypeMarker for CoordinatorReleaseBufferCollectionRequest {
1819        type Borrowed<'a> = &'a Self;
1820        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1821            value
1822        }
1823    }
1824
1825    unsafe impl fidl::encoding::TypeMarker for CoordinatorReleaseBufferCollectionRequest {
1826        type Owned = Self;
1827
1828        #[inline(always)]
1829        fn inline_align(_context: fidl::encoding::Context) -> usize {
1830            8
1831        }
1832
1833        #[inline(always)]
1834        fn inline_size(_context: fidl::encoding::Context) -> usize {
1835            8
1836        }
1837        #[inline(always)]
1838        fn encode_is_copy() -> bool {
1839            true
1840        }
1841
1842        #[inline(always)]
1843        fn decode_is_copy() -> bool {
1844            true
1845        }
1846    }
1847
1848    unsafe impl<D: fidl::encoding::ResourceDialect>
1849        fidl::encoding::Encode<CoordinatorReleaseBufferCollectionRequest, D>
1850        for &CoordinatorReleaseBufferCollectionRequest
1851    {
1852        #[inline]
1853        unsafe fn encode(
1854            self,
1855            encoder: &mut fidl::encoding::Encoder<'_, D>,
1856            offset: usize,
1857            _depth: fidl::encoding::Depth,
1858        ) -> fidl::Result<()> {
1859            encoder.debug_check_bounds::<CoordinatorReleaseBufferCollectionRequest>(offset);
1860            unsafe {
1861                // Copy the object into the buffer.
1862                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1863                (buf_ptr as *mut CoordinatorReleaseBufferCollectionRequest).write_unaligned(
1864                    (self as *const CoordinatorReleaseBufferCollectionRequest).read(),
1865                );
1866                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1867                // done second because the memcpy will write garbage to these bytes.
1868            }
1869            Ok(())
1870        }
1871    }
1872    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<BufferCollectionId, D>>
1873        fidl::encoding::Encode<CoordinatorReleaseBufferCollectionRequest, D> for (T0,)
1874    {
1875        #[inline]
1876        unsafe fn encode(
1877            self,
1878            encoder: &mut fidl::encoding::Encoder<'_, D>,
1879            offset: usize,
1880            depth: fidl::encoding::Depth,
1881        ) -> fidl::Result<()> {
1882            encoder.debug_check_bounds::<CoordinatorReleaseBufferCollectionRequest>(offset);
1883            // Zero out padding regions. There's no need to apply masks
1884            // because the unmasked parts will be overwritten by fields.
1885            // Write the fields.
1886            self.0.encode(encoder, offset + 0, depth)?;
1887            Ok(())
1888        }
1889    }
1890
1891    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1892        for CoordinatorReleaseBufferCollectionRequest
1893    {
1894        #[inline(always)]
1895        fn new_empty() -> Self {
1896            Self { buffer_collection_id: fidl::new_empty!(BufferCollectionId, D) }
1897        }
1898
1899        #[inline]
1900        unsafe fn decode(
1901            &mut self,
1902            decoder: &mut fidl::encoding::Decoder<'_, D>,
1903            offset: usize,
1904            _depth: fidl::encoding::Depth,
1905        ) -> fidl::Result<()> {
1906            decoder.debug_check_bounds::<Self>(offset);
1907            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1908            // Verify that padding bytes are zero.
1909            // Copy from the buffer into the object.
1910            unsafe {
1911                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1912            }
1913            Ok(())
1914        }
1915    }
1916
1917    impl fidl::encoding::ValueTypeMarker for CoordinatorReleaseEventRequest {
1918        type Borrowed<'a> = &'a Self;
1919        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1920            value
1921        }
1922    }
1923
1924    unsafe impl fidl::encoding::TypeMarker for CoordinatorReleaseEventRequest {
1925        type Owned = Self;
1926
1927        #[inline(always)]
1928        fn inline_align(_context: fidl::encoding::Context) -> usize {
1929            8
1930        }
1931
1932        #[inline(always)]
1933        fn inline_size(_context: fidl::encoding::Context) -> usize {
1934            8
1935        }
1936        #[inline(always)]
1937        fn encode_is_copy() -> bool {
1938            true
1939        }
1940
1941        #[inline(always)]
1942        fn decode_is_copy() -> bool {
1943            true
1944        }
1945    }
1946
1947    unsafe impl<D: fidl::encoding::ResourceDialect>
1948        fidl::encoding::Encode<CoordinatorReleaseEventRequest, D>
1949        for &CoordinatorReleaseEventRequest
1950    {
1951        #[inline]
1952        unsafe fn encode(
1953            self,
1954            encoder: &mut fidl::encoding::Encoder<'_, D>,
1955            offset: usize,
1956            _depth: fidl::encoding::Depth,
1957        ) -> fidl::Result<()> {
1958            encoder.debug_check_bounds::<CoordinatorReleaseEventRequest>(offset);
1959            unsafe {
1960                // Copy the object into the buffer.
1961                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1962                (buf_ptr as *mut CoordinatorReleaseEventRequest)
1963                    .write_unaligned((self as *const CoordinatorReleaseEventRequest).read());
1964                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1965                // done second because the memcpy will write garbage to these bytes.
1966            }
1967            Ok(())
1968        }
1969    }
1970    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<EventId, D>>
1971        fidl::encoding::Encode<CoordinatorReleaseEventRequest, D> for (T0,)
1972    {
1973        #[inline]
1974        unsafe fn encode(
1975            self,
1976            encoder: &mut fidl::encoding::Encoder<'_, D>,
1977            offset: usize,
1978            depth: fidl::encoding::Depth,
1979        ) -> fidl::Result<()> {
1980            encoder.debug_check_bounds::<CoordinatorReleaseEventRequest>(offset);
1981            // Zero out padding regions. There's no need to apply masks
1982            // because the unmasked parts will be overwritten by fields.
1983            // Write the fields.
1984            self.0.encode(encoder, offset + 0, depth)?;
1985            Ok(())
1986        }
1987    }
1988
1989    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1990        for CoordinatorReleaseEventRequest
1991    {
1992        #[inline(always)]
1993        fn new_empty() -> Self {
1994            Self { id: fidl::new_empty!(EventId, D) }
1995        }
1996
1997        #[inline]
1998        unsafe fn decode(
1999            &mut self,
2000            decoder: &mut fidl::encoding::Decoder<'_, D>,
2001            offset: usize,
2002            _depth: fidl::encoding::Depth,
2003        ) -> fidl::Result<()> {
2004            decoder.debug_check_bounds::<Self>(offset);
2005            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2006            // Verify that padding bytes are zero.
2007            // Copy from the buffer into the object.
2008            unsafe {
2009                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2010            }
2011            Ok(())
2012        }
2013    }
2014
2015    impl fidl::encoding::ValueTypeMarker for CoordinatorReleaseImageRequest {
2016        type Borrowed<'a> = &'a Self;
2017        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2018            value
2019        }
2020    }
2021
2022    unsafe impl fidl::encoding::TypeMarker for CoordinatorReleaseImageRequest {
2023        type Owned = Self;
2024
2025        #[inline(always)]
2026        fn inline_align(_context: fidl::encoding::Context) -> usize {
2027            8
2028        }
2029
2030        #[inline(always)]
2031        fn inline_size(_context: fidl::encoding::Context) -> usize {
2032            8
2033        }
2034        #[inline(always)]
2035        fn encode_is_copy() -> bool {
2036            true
2037        }
2038
2039        #[inline(always)]
2040        fn decode_is_copy() -> bool {
2041            true
2042        }
2043    }
2044
2045    unsafe impl<D: fidl::encoding::ResourceDialect>
2046        fidl::encoding::Encode<CoordinatorReleaseImageRequest, D>
2047        for &CoordinatorReleaseImageRequest
2048    {
2049        #[inline]
2050        unsafe fn encode(
2051            self,
2052            encoder: &mut fidl::encoding::Encoder<'_, D>,
2053            offset: usize,
2054            _depth: fidl::encoding::Depth,
2055        ) -> fidl::Result<()> {
2056            encoder.debug_check_bounds::<CoordinatorReleaseImageRequest>(offset);
2057            unsafe {
2058                // Copy the object into the buffer.
2059                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2060                (buf_ptr as *mut CoordinatorReleaseImageRequest)
2061                    .write_unaligned((self as *const CoordinatorReleaseImageRequest).read());
2062                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2063                // done second because the memcpy will write garbage to these bytes.
2064            }
2065            Ok(())
2066        }
2067    }
2068    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ImageId, D>>
2069        fidl::encoding::Encode<CoordinatorReleaseImageRequest, D> for (T0,)
2070    {
2071        #[inline]
2072        unsafe fn encode(
2073            self,
2074            encoder: &mut fidl::encoding::Encoder<'_, D>,
2075            offset: usize,
2076            depth: fidl::encoding::Depth,
2077        ) -> fidl::Result<()> {
2078            encoder.debug_check_bounds::<CoordinatorReleaseImageRequest>(offset);
2079            // Zero out padding regions. There's no need to apply masks
2080            // because the unmasked parts will be overwritten by fields.
2081            // Write the fields.
2082            self.0.encode(encoder, offset + 0, depth)?;
2083            Ok(())
2084        }
2085    }
2086
2087    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2088        for CoordinatorReleaseImageRequest
2089    {
2090        #[inline(always)]
2091        fn new_empty() -> Self {
2092            Self { image_id: fidl::new_empty!(ImageId, D) }
2093        }
2094
2095        #[inline]
2096        unsafe fn decode(
2097            &mut self,
2098            decoder: &mut fidl::encoding::Decoder<'_, D>,
2099            offset: usize,
2100            _depth: fidl::encoding::Depth,
2101        ) -> fidl::Result<()> {
2102            decoder.debug_check_bounds::<Self>(offset);
2103            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2104            // Verify that padding bytes are zero.
2105            // Copy from the buffer into the object.
2106            unsafe {
2107                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2108            }
2109            Ok(())
2110        }
2111    }
2112
2113    impl fidl::encoding::ValueTypeMarker for CoordinatorSetBufferCollectionConstraintsRequest {
2114        type Borrowed<'a> = &'a Self;
2115        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2116            value
2117        }
2118    }
2119
2120    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetBufferCollectionConstraintsRequest {
2121        type Owned = Self;
2122
2123        #[inline(always)]
2124        fn inline_align(_context: fidl::encoding::Context) -> usize {
2125            8
2126        }
2127
2128        #[inline(always)]
2129        fn inline_size(_context: fidl::encoding::Context) -> usize {
2130            16
2131        }
2132    }
2133
2134    unsafe impl<D: fidl::encoding::ResourceDialect>
2135        fidl::encoding::Encode<CoordinatorSetBufferCollectionConstraintsRequest, D>
2136        for &CoordinatorSetBufferCollectionConstraintsRequest
2137    {
2138        #[inline]
2139        unsafe fn encode(
2140            self,
2141            encoder: &mut fidl::encoding::Encoder<'_, D>,
2142            offset: usize,
2143            _depth: fidl::encoding::Depth,
2144        ) -> fidl::Result<()> {
2145            encoder.debug_check_bounds::<CoordinatorSetBufferCollectionConstraintsRequest>(offset);
2146            // Delegate to tuple encoding.
2147            fidl::encoding::Encode::<CoordinatorSetBufferCollectionConstraintsRequest, D>::encode(
2148                (
2149                    <BufferCollectionId as fidl::encoding::ValueTypeMarker>::borrow(&self.buffer_collection_id),
2150                    <fidl_fuchsia_hardware_display_types__common::ImageBufferUsage as fidl::encoding::ValueTypeMarker>::borrow(&self.buffer_usage),
2151                ),
2152                encoder, offset, _depth
2153            )
2154        }
2155    }
2156    unsafe impl<
2157            D: fidl::encoding::ResourceDialect,
2158            T0: fidl::encoding::Encode<BufferCollectionId, D>,
2159            T1: fidl::encoding::Encode<
2160                fidl_fuchsia_hardware_display_types__common::ImageBufferUsage,
2161                D,
2162            >,
2163        > fidl::encoding::Encode<CoordinatorSetBufferCollectionConstraintsRequest, D> for (T0, T1)
2164    {
2165        #[inline]
2166        unsafe fn encode(
2167            self,
2168            encoder: &mut fidl::encoding::Encoder<'_, D>,
2169            offset: usize,
2170            depth: fidl::encoding::Depth,
2171        ) -> fidl::Result<()> {
2172            encoder.debug_check_bounds::<CoordinatorSetBufferCollectionConstraintsRequest>(offset);
2173            // Zero out padding regions. There's no need to apply masks
2174            // because the unmasked parts will be overwritten by fields.
2175            unsafe {
2176                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
2177                (ptr as *mut u64).write_unaligned(0);
2178            }
2179            // Write the fields.
2180            self.0.encode(encoder, offset + 0, depth)?;
2181            self.1.encode(encoder, offset + 8, depth)?;
2182            Ok(())
2183        }
2184    }
2185
2186    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2187        for CoordinatorSetBufferCollectionConstraintsRequest
2188    {
2189        #[inline(always)]
2190        fn new_empty() -> Self {
2191            Self {
2192                buffer_collection_id: fidl::new_empty!(BufferCollectionId, D),
2193                buffer_usage: fidl::new_empty!(
2194                    fidl_fuchsia_hardware_display_types__common::ImageBufferUsage,
2195                    D
2196                ),
2197            }
2198        }
2199
2200        #[inline]
2201        unsafe fn decode(
2202            &mut self,
2203            decoder: &mut fidl::encoding::Decoder<'_, D>,
2204            offset: usize,
2205            _depth: fidl::encoding::Depth,
2206        ) -> fidl::Result<()> {
2207            decoder.debug_check_bounds::<Self>(offset);
2208            // Verify that padding bytes are zero.
2209            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
2210            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2211            let mask = 0xffffffff00000000u64;
2212            let maskedval = padval & mask;
2213            if maskedval != 0 {
2214                return Err(fidl::Error::NonZeroPadding {
2215                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
2216                });
2217            }
2218            fidl::decode!(
2219                BufferCollectionId,
2220                D,
2221                &mut self.buffer_collection_id,
2222                decoder,
2223                offset + 0,
2224                _depth
2225            )?;
2226            fidl::decode!(
2227                fidl_fuchsia_hardware_display_types__common::ImageBufferUsage,
2228                D,
2229                &mut self.buffer_usage,
2230                decoder,
2231                offset + 8,
2232                _depth
2233            )?;
2234            Ok(())
2235        }
2236    }
2237
2238    impl fidl::encoding::ValueTypeMarker for CoordinatorSetDisplayColorConversionRequest {
2239        type Borrowed<'a> = &'a Self;
2240        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2241            value
2242        }
2243    }
2244
2245    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetDisplayColorConversionRequest {
2246        type Owned = Self;
2247
2248        #[inline(always)]
2249        fn inline_align(_context: fidl::encoding::Context) -> usize {
2250            8
2251        }
2252
2253        #[inline(always)]
2254        fn inline_size(_context: fidl::encoding::Context) -> usize {
2255            72
2256        }
2257    }
2258
2259    unsafe impl<D: fidl::encoding::ResourceDialect>
2260        fidl::encoding::Encode<CoordinatorSetDisplayColorConversionRequest, D>
2261        for &CoordinatorSetDisplayColorConversionRequest
2262    {
2263        #[inline]
2264        unsafe fn encode(
2265            self,
2266            encoder: &mut fidl::encoding::Encoder<'_, D>,
2267            offset: usize,
2268            _depth: fidl::encoding::Depth,
2269        ) -> fidl::Result<()> {
2270            encoder.debug_check_bounds::<CoordinatorSetDisplayColorConversionRequest>(offset);
2271            // Delegate to tuple encoding.
2272            fidl::encoding::Encode::<CoordinatorSetDisplayColorConversionRequest, D>::encode(
2273                (
2274                    <fidl_fuchsia_hardware_display_types__common::DisplayId as fidl::encoding::ValueTypeMarker>::borrow(&self.display_id),
2275                    <fidl::encoding::Array<f32, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.preoffsets),
2276                    <fidl::encoding::Array<f32, 9> as fidl::encoding::ValueTypeMarker>::borrow(&self.coefficients),
2277                    <fidl::encoding::Array<f32, 3> as fidl::encoding::ValueTypeMarker>::borrow(&self.postoffsets),
2278                ),
2279                encoder, offset, _depth
2280            )
2281        }
2282    }
2283    unsafe impl<
2284            D: fidl::encoding::ResourceDialect,
2285            T0: fidl::encoding::Encode<fidl_fuchsia_hardware_display_types__common::DisplayId, D>,
2286            T1: fidl::encoding::Encode<fidl::encoding::Array<f32, 3>, D>,
2287            T2: fidl::encoding::Encode<fidl::encoding::Array<f32, 9>, D>,
2288            T3: fidl::encoding::Encode<fidl::encoding::Array<f32, 3>, D>,
2289        > fidl::encoding::Encode<CoordinatorSetDisplayColorConversionRequest, D>
2290        for (T0, T1, T2, T3)
2291    {
2292        #[inline]
2293        unsafe fn encode(
2294            self,
2295            encoder: &mut fidl::encoding::Encoder<'_, D>,
2296            offset: usize,
2297            depth: fidl::encoding::Depth,
2298        ) -> fidl::Result<()> {
2299            encoder.debug_check_bounds::<CoordinatorSetDisplayColorConversionRequest>(offset);
2300            // Zero out padding regions. There's no need to apply masks
2301            // because the unmasked parts will be overwritten by fields.
2302            unsafe {
2303                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(64);
2304                (ptr as *mut u64).write_unaligned(0);
2305            }
2306            // Write the fields.
2307            self.0.encode(encoder, offset + 0, depth)?;
2308            self.1.encode(encoder, offset + 8, depth)?;
2309            self.2.encode(encoder, offset + 20, depth)?;
2310            self.3.encode(encoder, offset + 56, depth)?;
2311            Ok(())
2312        }
2313    }
2314
2315    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2316        for CoordinatorSetDisplayColorConversionRequest
2317    {
2318        #[inline(always)]
2319        fn new_empty() -> Self {
2320            Self {
2321                display_id: fidl::new_empty!(
2322                    fidl_fuchsia_hardware_display_types__common::DisplayId,
2323                    D
2324                ),
2325                preoffsets: fidl::new_empty!(fidl::encoding::Array<f32, 3>, D),
2326                coefficients: fidl::new_empty!(fidl::encoding::Array<f32, 9>, D),
2327                postoffsets: fidl::new_empty!(fidl::encoding::Array<f32, 3>, D),
2328            }
2329        }
2330
2331        #[inline]
2332        unsafe fn decode(
2333            &mut self,
2334            decoder: &mut fidl::encoding::Decoder<'_, D>,
2335            offset: usize,
2336            _depth: fidl::encoding::Depth,
2337        ) -> fidl::Result<()> {
2338            decoder.debug_check_bounds::<Self>(offset);
2339            // Verify that padding bytes are zero.
2340            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(64) };
2341            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2342            let mask = 0xffffffff00000000u64;
2343            let maskedval = padval & mask;
2344            if maskedval != 0 {
2345                return Err(fidl::Error::NonZeroPadding {
2346                    padding_start: offset + 64 + ((mask as u64).trailing_zeros() / 8) as usize,
2347                });
2348            }
2349            fidl::decode!(
2350                fidl_fuchsia_hardware_display_types__common::DisplayId,
2351                D,
2352                &mut self.display_id,
2353                decoder,
2354                offset + 0,
2355                _depth
2356            )?;
2357            fidl::decode!(fidl::encoding::Array<f32, 3>, D, &mut self.preoffsets, decoder, offset + 8, _depth)?;
2358            fidl::decode!(fidl::encoding::Array<f32, 9>, D, &mut self.coefficients, decoder, offset + 20, _depth)?;
2359            fidl::decode!(fidl::encoding::Array<f32, 3>, D, &mut self.postoffsets, decoder, offset + 56, _depth)?;
2360            Ok(())
2361        }
2362    }
2363
2364    impl fidl::encoding::ValueTypeMarker for CoordinatorSetDisplayLayersRequest {
2365        type Borrowed<'a> = &'a Self;
2366        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2367            value
2368        }
2369    }
2370
2371    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetDisplayLayersRequest {
2372        type Owned = Self;
2373
2374        #[inline(always)]
2375        fn inline_align(_context: fidl::encoding::Context) -> usize {
2376            8
2377        }
2378
2379        #[inline(always)]
2380        fn inline_size(_context: fidl::encoding::Context) -> usize {
2381            24
2382        }
2383    }
2384
2385    unsafe impl<D: fidl::encoding::ResourceDialect>
2386        fidl::encoding::Encode<CoordinatorSetDisplayLayersRequest, D>
2387        for &CoordinatorSetDisplayLayersRequest
2388    {
2389        #[inline]
2390        unsafe fn encode(
2391            self,
2392            encoder: &mut fidl::encoding::Encoder<'_, D>,
2393            offset: usize,
2394            _depth: fidl::encoding::Depth,
2395        ) -> fidl::Result<()> {
2396            encoder.debug_check_bounds::<CoordinatorSetDisplayLayersRequest>(offset);
2397            // Delegate to tuple encoding.
2398            fidl::encoding::Encode::<CoordinatorSetDisplayLayersRequest, D>::encode(
2399                (
2400                    <fidl_fuchsia_hardware_display_types__common::DisplayId as fidl::encoding::ValueTypeMarker>::borrow(&self.display_id),
2401                    <fidl::encoding::UnboundedVector<LayerId> as fidl::encoding::ValueTypeMarker>::borrow(&self.layer_ids),
2402                ),
2403                encoder, offset, _depth
2404            )
2405        }
2406    }
2407    unsafe impl<
2408            D: fidl::encoding::ResourceDialect,
2409            T0: fidl::encoding::Encode<fidl_fuchsia_hardware_display_types__common::DisplayId, D>,
2410            T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<LayerId>, D>,
2411        > fidl::encoding::Encode<CoordinatorSetDisplayLayersRequest, D> for (T0, T1)
2412    {
2413        #[inline]
2414        unsafe fn encode(
2415            self,
2416            encoder: &mut fidl::encoding::Encoder<'_, D>,
2417            offset: usize,
2418            depth: fidl::encoding::Depth,
2419        ) -> fidl::Result<()> {
2420            encoder.debug_check_bounds::<CoordinatorSetDisplayLayersRequest>(offset);
2421            // Zero out padding regions. There's no need to apply masks
2422            // because the unmasked parts will be overwritten by fields.
2423            // Write the fields.
2424            self.0.encode(encoder, offset + 0, depth)?;
2425            self.1.encode(encoder, offset + 8, depth)?;
2426            Ok(())
2427        }
2428    }
2429
2430    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2431        for CoordinatorSetDisplayLayersRequest
2432    {
2433        #[inline(always)]
2434        fn new_empty() -> Self {
2435            Self {
2436                display_id: fidl::new_empty!(
2437                    fidl_fuchsia_hardware_display_types__common::DisplayId,
2438                    D
2439                ),
2440                layer_ids: fidl::new_empty!(fidl::encoding::UnboundedVector<LayerId>, D),
2441            }
2442        }
2443
2444        #[inline]
2445        unsafe fn decode(
2446            &mut self,
2447            decoder: &mut fidl::encoding::Decoder<'_, D>,
2448            offset: usize,
2449            _depth: fidl::encoding::Depth,
2450        ) -> fidl::Result<()> {
2451            decoder.debug_check_bounds::<Self>(offset);
2452            // Verify that padding bytes are zero.
2453            fidl::decode!(
2454                fidl_fuchsia_hardware_display_types__common::DisplayId,
2455                D,
2456                &mut self.display_id,
2457                decoder,
2458                offset + 0,
2459                _depth
2460            )?;
2461            fidl::decode!(
2462                fidl::encoding::UnboundedVector<LayerId>,
2463                D,
2464                &mut self.layer_ids,
2465                decoder,
2466                offset + 8,
2467                _depth
2468            )?;
2469            Ok(())
2470        }
2471    }
2472
2473    impl fidl::encoding::ValueTypeMarker for CoordinatorSetDisplayModeRequest {
2474        type Borrowed<'a> = &'a Self;
2475        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2476            value
2477        }
2478    }
2479
2480    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetDisplayModeRequest {
2481        type Owned = Self;
2482
2483        #[inline(always)]
2484        fn inline_align(_context: fidl::encoding::Context) -> usize {
2485            8
2486        }
2487
2488        #[inline(always)]
2489        fn inline_size(_context: fidl::encoding::Context) -> usize {
2490            24
2491        }
2492    }
2493
2494    unsafe impl<D: fidl::encoding::ResourceDialect>
2495        fidl::encoding::Encode<CoordinatorSetDisplayModeRequest, D>
2496        for &CoordinatorSetDisplayModeRequest
2497    {
2498        #[inline]
2499        unsafe fn encode(
2500            self,
2501            encoder: &mut fidl::encoding::Encoder<'_, D>,
2502            offset: usize,
2503            _depth: fidl::encoding::Depth,
2504        ) -> fidl::Result<()> {
2505            encoder.debug_check_bounds::<CoordinatorSetDisplayModeRequest>(offset);
2506            // Delegate to tuple encoding.
2507            fidl::encoding::Encode::<CoordinatorSetDisplayModeRequest, D>::encode(
2508                (
2509                    <fidl_fuchsia_hardware_display_types__common::DisplayId as fidl::encoding::ValueTypeMarker>::borrow(&self.display_id),
2510                    <fidl_fuchsia_hardware_display_types__common::Mode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
2511                ),
2512                encoder, offset, _depth
2513            )
2514        }
2515    }
2516    unsafe impl<
2517            D: fidl::encoding::ResourceDialect,
2518            T0: fidl::encoding::Encode<fidl_fuchsia_hardware_display_types__common::DisplayId, D>,
2519            T1: fidl::encoding::Encode<fidl_fuchsia_hardware_display_types__common::Mode, D>,
2520        > fidl::encoding::Encode<CoordinatorSetDisplayModeRequest, D> for (T0, T1)
2521    {
2522        #[inline]
2523        unsafe fn encode(
2524            self,
2525            encoder: &mut fidl::encoding::Encoder<'_, D>,
2526            offset: usize,
2527            depth: fidl::encoding::Depth,
2528        ) -> fidl::Result<()> {
2529            encoder.debug_check_bounds::<CoordinatorSetDisplayModeRequest>(offset);
2530            // Zero out padding regions. There's no need to apply masks
2531            // because the unmasked parts will be overwritten by fields.
2532            // Write the fields.
2533            self.0.encode(encoder, offset + 0, depth)?;
2534            self.1.encode(encoder, offset + 8, depth)?;
2535            Ok(())
2536        }
2537    }
2538
2539    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2540        for CoordinatorSetDisplayModeRequest
2541    {
2542        #[inline(always)]
2543        fn new_empty() -> Self {
2544            Self {
2545                display_id: fidl::new_empty!(
2546                    fidl_fuchsia_hardware_display_types__common::DisplayId,
2547                    D
2548                ),
2549                mode: fidl::new_empty!(fidl_fuchsia_hardware_display_types__common::Mode, D),
2550            }
2551        }
2552
2553        #[inline]
2554        unsafe fn decode(
2555            &mut self,
2556            decoder: &mut fidl::encoding::Decoder<'_, D>,
2557            offset: usize,
2558            _depth: fidl::encoding::Depth,
2559        ) -> fidl::Result<()> {
2560            decoder.debug_check_bounds::<Self>(offset);
2561            // Verify that padding bytes are zero.
2562            fidl::decode!(
2563                fidl_fuchsia_hardware_display_types__common::DisplayId,
2564                D,
2565                &mut self.display_id,
2566                decoder,
2567                offset + 0,
2568                _depth
2569            )?;
2570            fidl::decode!(
2571                fidl_fuchsia_hardware_display_types__common::Mode,
2572                D,
2573                &mut self.mode,
2574                decoder,
2575                offset + 8,
2576                _depth
2577            )?;
2578            Ok(())
2579        }
2580    }
2581
2582    impl fidl::encoding::ValueTypeMarker for CoordinatorSetDisplayPowerRequest {
2583        type Borrowed<'a> = &'a Self;
2584        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2585            value
2586        }
2587    }
2588
2589    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetDisplayPowerRequest {
2590        type Owned = Self;
2591
2592        #[inline(always)]
2593        fn inline_align(_context: fidl::encoding::Context) -> usize {
2594            8
2595        }
2596
2597        #[inline(always)]
2598        fn inline_size(_context: fidl::encoding::Context) -> usize {
2599            16
2600        }
2601    }
2602
2603    unsafe impl<D: fidl::encoding::ResourceDialect>
2604        fidl::encoding::Encode<CoordinatorSetDisplayPowerRequest, D>
2605        for &CoordinatorSetDisplayPowerRequest
2606    {
2607        #[inline]
2608        unsafe fn encode(
2609            self,
2610            encoder: &mut fidl::encoding::Encoder<'_, D>,
2611            offset: usize,
2612            _depth: fidl::encoding::Depth,
2613        ) -> fidl::Result<()> {
2614            encoder.debug_check_bounds::<CoordinatorSetDisplayPowerRequest>(offset);
2615            // Delegate to tuple encoding.
2616            fidl::encoding::Encode::<CoordinatorSetDisplayPowerRequest, D>::encode(
2617                (
2618                    <fidl_fuchsia_hardware_display_types__common::DisplayId as fidl::encoding::ValueTypeMarker>::borrow(&self.display_id),
2619                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.power_on),
2620                ),
2621                encoder, offset, _depth
2622            )
2623        }
2624    }
2625    unsafe impl<
2626            D: fidl::encoding::ResourceDialect,
2627            T0: fidl::encoding::Encode<fidl_fuchsia_hardware_display_types__common::DisplayId, D>,
2628            T1: fidl::encoding::Encode<bool, D>,
2629        > fidl::encoding::Encode<CoordinatorSetDisplayPowerRequest, D> for (T0, T1)
2630    {
2631        #[inline]
2632        unsafe fn encode(
2633            self,
2634            encoder: &mut fidl::encoding::Encoder<'_, D>,
2635            offset: usize,
2636            depth: fidl::encoding::Depth,
2637        ) -> fidl::Result<()> {
2638            encoder.debug_check_bounds::<CoordinatorSetDisplayPowerRequest>(offset);
2639            // Zero out padding regions. There's no need to apply masks
2640            // because the unmasked parts will be overwritten by fields.
2641            unsafe {
2642                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
2643                (ptr as *mut u64).write_unaligned(0);
2644            }
2645            // Write the fields.
2646            self.0.encode(encoder, offset + 0, depth)?;
2647            self.1.encode(encoder, offset + 8, depth)?;
2648            Ok(())
2649        }
2650    }
2651
2652    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2653        for CoordinatorSetDisplayPowerRequest
2654    {
2655        #[inline(always)]
2656        fn new_empty() -> Self {
2657            Self {
2658                display_id: fidl::new_empty!(
2659                    fidl_fuchsia_hardware_display_types__common::DisplayId,
2660                    D
2661                ),
2662                power_on: fidl::new_empty!(bool, D),
2663            }
2664        }
2665
2666        #[inline]
2667        unsafe fn decode(
2668            &mut self,
2669            decoder: &mut fidl::encoding::Decoder<'_, D>,
2670            offset: usize,
2671            _depth: fidl::encoding::Depth,
2672        ) -> fidl::Result<()> {
2673            decoder.debug_check_bounds::<Self>(offset);
2674            // Verify that padding bytes are zero.
2675            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
2676            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2677            let mask = 0xffffffffffffff00u64;
2678            let maskedval = padval & mask;
2679            if maskedval != 0 {
2680                return Err(fidl::Error::NonZeroPadding {
2681                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
2682                });
2683            }
2684            fidl::decode!(
2685                fidl_fuchsia_hardware_display_types__common::DisplayId,
2686                D,
2687                &mut self.display_id,
2688                decoder,
2689                offset + 0,
2690                _depth
2691            )?;
2692            fidl::decode!(bool, D, &mut self.power_on, decoder, offset + 8, _depth)?;
2693            Ok(())
2694        }
2695    }
2696
2697    impl fidl::encoding::ValueTypeMarker for CoordinatorSetLayerColorConfigRequest {
2698        type Borrowed<'a> = &'a Self;
2699        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2700            value
2701        }
2702    }
2703
2704    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetLayerColorConfigRequest {
2705        type Owned = Self;
2706
2707        #[inline(always)]
2708        fn inline_align(_context: fidl::encoding::Context) -> usize {
2709            8
2710        }
2711
2712        #[inline(always)]
2713        fn inline_size(_context: fidl::encoding::Context) -> usize {
2714            24
2715        }
2716    }
2717
2718    unsafe impl<D: fidl::encoding::ResourceDialect>
2719        fidl::encoding::Encode<CoordinatorSetLayerColorConfigRequest, D>
2720        for &CoordinatorSetLayerColorConfigRequest
2721    {
2722        #[inline]
2723        unsafe fn encode(
2724            self,
2725            encoder: &mut fidl::encoding::Encoder<'_, D>,
2726            offset: usize,
2727            _depth: fidl::encoding::Depth,
2728        ) -> fidl::Result<()> {
2729            encoder.debug_check_bounds::<CoordinatorSetLayerColorConfigRequest>(offset);
2730            // Delegate to tuple encoding.
2731            fidl::encoding::Encode::<CoordinatorSetLayerColorConfigRequest, D>::encode(
2732                (
2733                    <LayerId as fidl::encoding::ValueTypeMarker>::borrow(&self.layer_id),
2734                    <fidl_fuchsia_hardware_display_types__common::Color as fidl::encoding::ValueTypeMarker>::borrow(&self.color),
2735                ),
2736                encoder, offset, _depth
2737            )
2738        }
2739    }
2740    unsafe impl<
2741            D: fidl::encoding::ResourceDialect,
2742            T0: fidl::encoding::Encode<LayerId, D>,
2743            T1: fidl::encoding::Encode<fidl_fuchsia_hardware_display_types__common::Color, D>,
2744        > fidl::encoding::Encode<CoordinatorSetLayerColorConfigRequest, D> for (T0, T1)
2745    {
2746        #[inline]
2747        unsafe fn encode(
2748            self,
2749            encoder: &mut fidl::encoding::Encoder<'_, D>,
2750            offset: usize,
2751            depth: fidl::encoding::Depth,
2752        ) -> fidl::Result<()> {
2753            encoder.debug_check_bounds::<CoordinatorSetLayerColorConfigRequest>(offset);
2754            // Zero out padding regions. There's no need to apply masks
2755            // because the unmasked parts will be overwritten by fields.
2756            unsafe {
2757                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
2758                (ptr as *mut u64).write_unaligned(0);
2759            }
2760            // Write the fields.
2761            self.0.encode(encoder, offset + 0, depth)?;
2762            self.1.encode(encoder, offset + 8, depth)?;
2763            Ok(())
2764        }
2765    }
2766
2767    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2768        for CoordinatorSetLayerColorConfigRequest
2769    {
2770        #[inline(always)]
2771        fn new_empty() -> Self {
2772            Self {
2773                layer_id: fidl::new_empty!(LayerId, D),
2774                color: fidl::new_empty!(fidl_fuchsia_hardware_display_types__common::Color, D),
2775            }
2776        }
2777
2778        #[inline]
2779        unsafe fn decode(
2780            &mut self,
2781            decoder: &mut fidl::encoding::Decoder<'_, D>,
2782            offset: usize,
2783            _depth: fidl::encoding::Depth,
2784        ) -> fidl::Result<()> {
2785            decoder.debug_check_bounds::<Self>(offset);
2786            // Verify that padding bytes are zero.
2787            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
2788            let padval = unsafe { (ptr as *const u64).read_unaligned() };
2789            let mask = 0xffffffff00000000u64;
2790            let maskedval = padval & mask;
2791            if maskedval != 0 {
2792                return Err(fidl::Error::NonZeroPadding {
2793                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
2794                });
2795            }
2796            fidl::decode!(LayerId, D, &mut self.layer_id, decoder, offset + 0, _depth)?;
2797            fidl::decode!(
2798                fidl_fuchsia_hardware_display_types__common::Color,
2799                D,
2800                &mut self.color,
2801                decoder,
2802                offset + 8,
2803                _depth
2804            )?;
2805            Ok(())
2806        }
2807    }
2808
2809    impl fidl::encoding::ValueTypeMarker for CoordinatorSetLayerImage2Request {
2810        type Borrowed<'a> = &'a Self;
2811        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2812            value
2813        }
2814    }
2815
2816    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetLayerImage2Request {
2817        type Owned = Self;
2818
2819        #[inline(always)]
2820        fn inline_align(_context: fidl::encoding::Context) -> usize {
2821            8
2822        }
2823
2824        #[inline(always)]
2825        fn inline_size(_context: fidl::encoding::Context) -> usize {
2826            24
2827        }
2828        #[inline(always)]
2829        fn encode_is_copy() -> bool {
2830            true
2831        }
2832
2833        #[inline(always)]
2834        fn decode_is_copy() -> bool {
2835            true
2836        }
2837    }
2838
2839    unsafe impl<D: fidl::encoding::ResourceDialect>
2840        fidl::encoding::Encode<CoordinatorSetLayerImage2Request, D>
2841        for &CoordinatorSetLayerImage2Request
2842    {
2843        #[inline]
2844        unsafe fn encode(
2845            self,
2846            encoder: &mut fidl::encoding::Encoder<'_, D>,
2847            offset: usize,
2848            _depth: fidl::encoding::Depth,
2849        ) -> fidl::Result<()> {
2850            encoder.debug_check_bounds::<CoordinatorSetLayerImage2Request>(offset);
2851            unsafe {
2852                // Copy the object into the buffer.
2853                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2854                (buf_ptr as *mut CoordinatorSetLayerImage2Request)
2855                    .write_unaligned((self as *const CoordinatorSetLayerImage2Request).read());
2856                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2857                // done second because the memcpy will write garbage to these bytes.
2858            }
2859            Ok(())
2860        }
2861    }
2862    unsafe impl<
2863            D: fidl::encoding::ResourceDialect,
2864            T0: fidl::encoding::Encode<LayerId, D>,
2865            T1: fidl::encoding::Encode<ImageId, D>,
2866            T2: fidl::encoding::Encode<EventId, D>,
2867        > fidl::encoding::Encode<CoordinatorSetLayerImage2Request, D> for (T0, T1, T2)
2868    {
2869        #[inline]
2870        unsafe fn encode(
2871            self,
2872            encoder: &mut fidl::encoding::Encoder<'_, D>,
2873            offset: usize,
2874            depth: fidl::encoding::Depth,
2875        ) -> fidl::Result<()> {
2876            encoder.debug_check_bounds::<CoordinatorSetLayerImage2Request>(offset);
2877            // Zero out padding regions. There's no need to apply masks
2878            // because the unmasked parts will be overwritten by fields.
2879            // Write the fields.
2880            self.0.encode(encoder, offset + 0, depth)?;
2881            self.1.encode(encoder, offset + 8, depth)?;
2882            self.2.encode(encoder, offset + 16, depth)?;
2883            Ok(())
2884        }
2885    }
2886
2887    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2888        for CoordinatorSetLayerImage2Request
2889    {
2890        #[inline(always)]
2891        fn new_empty() -> Self {
2892            Self {
2893                layer_id: fidl::new_empty!(LayerId, D),
2894                image_id: fidl::new_empty!(ImageId, D),
2895                wait_event_id: fidl::new_empty!(EventId, D),
2896            }
2897        }
2898
2899        #[inline]
2900        unsafe fn decode(
2901            &mut self,
2902            decoder: &mut fidl::encoding::Decoder<'_, D>,
2903            offset: usize,
2904            _depth: fidl::encoding::Depth,
2905        ) -> fidl::Result<()> {
2906            decoder.debug_check_bounds::<Self>(offset);
2907            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2908            // Verify that padding bytes are zero.
2909            // Copy from the buffer into the object.
2910            unsafe {
2911                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
2912            }
2913            Ok(())
2914        }
2915    }
2916
2917    impl fidl::encoding::ValueTypeMarker for CoordinatorSetLayerPrimaryAlphaRequest {
2918        type Borrowed<'a> = &'a Self;
2919        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2920            value
2921        }
2922    }
2923
2924    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetLayerPrimaryAlphaRequest {
2925        type Owned = Self;
2926
2927        #[inline(always)]
2928        fn inline_align(_context: fidl::encoding::Context) -> usize {
2929            8
2930        }
2931
2932        #[inline(always)]
2933        fn inline_size(_context: fidl::encoding::Context) -> usize {
2934            16
2935        }
2936    }
2937
2938    unsafe impl<D: fidl::encoding::ResourceDialect>
2939        fidl::encoding::Encode<CoordinatorSetLayerPrimaryAlphaRequest, D>
2940        for &CoordinatorSetLayerPrimaryAlphaRequest
2941    {
2942        #[inline]
2943        unsafe fn encode(
2944            self,
2945            encoder: &mut fidl::encoding::Encoder<'_, D>,
2946            offset: usize,
2947            _depth: fidl::encoding::Depth,
2948        ) -> fidl::Result<()> {
2949            encoder.debug_check_bounds::<CoordinatorSetLayerPrimaryAlphaRequest>(offset);
2950            // Delegate to tuple encoding.
2951            fidl::encoding::Encode::<CoordinatorSetLayerPrimaryAlphaRequest, D>::encode(
2952                (
2953                    <LayerId as fidl::encoding::ValueTypeMarker>::borrow(&self.layer_id),
2954                    <fidl_fuchsia_hardware_display_types__common::AlphaMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),
2955                    <f32 as fidl::encoding::ValueTypeMarker>::borrow(&self.val),
2956                ),
2957                encoder, offset, _depth
2958            )
2959        }
2960    }
2961    unsafe impl<
2962            D: fidl::encoding::ResourceDialect,
2963            T0: fidl::encoding::Encode<LayerId, D>,
2964            T1: fidl::encoding::Encode<fidl_fuchsia_hardware_display_types__common::AlphaMode, D>,
2965            T2: fidl::encoding::Encode<f32, D>,
2966        > fidl::encoding::Encode<CoordinatorSetLayerPrimaryAlphaRequest, D> for (T0, T1, T2)
2967    {
2968        #[inline]
2969        unsafe fn encode(
2970            self,
2971            encoder: &mut fidl::encoding::Encoder<'_, D>,
2972            offset: usize,
2973            depth: fidl::encoding::Depth,
2974        ) -> fidl::Result<()> {
2975            encoder.debug_check_bounds::<CoordinatorSetLayerPrimaryAlphaRequest>(offset);
2976            // Zero out padding regions. There's no need to apply masks
2977            // because the unmasked parts will be overwritten by fields.
2978            unsafe {
2979                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
2980                (ptr as *mut u64).write_unaligned(0);
2981            }
2982            // Write the fields.
2983            self.0.encode(encoder, offset + 0, depth)?;
2984            self.1.encode(encoder, offset + 8, depth)?;
2985            self.2.encode(encoder, offset + 12, depth)?;
2986            Ok(())
2987        }
2988    }
2989
2990    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2991        for CoordinatorSetLayerPrimaryAlphaRequest
2992    {
2993        #[inline(always)]
2994        fn new_empty() -> Self {
2995            Self {
2996                layer_id: fidl::new_empty!(LayerId, D),
2997                mode: fidl::new_empty!(fidl_fuchsia_hardware_display_types__common::AlphaMode, D),
2998                val: fidl::new_empty!(f32, D),
2999            }
3000        }
3001
3002        #[inline]
3003        unsafe fn decode(
3004            &mut self,
3005            decoder: &mut fidl::encoding::Decoder<'_, D>,
3006            offset: usize,
3007            _depth: fidl::encoding::Depth,
3008        ) -> fidl::Result<()> {
3009            decoder.debug_check_bounds::<Self>(offset);
3010            // Verify that padding bytes are zero.
3011            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3012            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3013            let mask = 0xffffff00u64;
3014            let maskedval = padval & mask;
3015            if maskedval != 0 {
3016                return Err(fidl::Error::NonZeroPadding {
3017                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3018                });
3019            }
3020            fidl::decode!(LayerId, D, &mut self.layer_id, decoder, offset + 0, _depth)?;
3021            fidl::decode!(
3022                fidl_fuchsia_hardware_display_types__common::AlphaMode,
3023                D,
3024                &mut self.mode,
3025                decoder,
3026                offset + 8,
3027                _depth
3028            )?;
3029            fidl::decode!(f32, D, &mut self.val, decoder, offset + 12, _depth)?;
3030            Ok(())
3031        }
3032    }
3033
3034    impl fidl::encoding::ValueTypeMarker for CoordinatorSetLayerPrimaryConfigRequest {
3035        type Borrowed<'a> = &'a Self;
3036        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3037            value
3038        }
3039    }
3040
3041    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetLayerPrimaryConfigRequest {
3042        type Owned = Self;
3043
3044        #[inline(always)]
3045        fn inline_align(_context: fidl::encoding::Context) -> usize {
3046            8
3047        }
3048
3049        #[inline(always)]
3050        fn inline_size(_context: fidl::encoding::Context) -> usize {
3051            24
3052        }
3053    }
3054
3055    unsafe impl<D: fidl::encoding::ResourceDialect>
3056        fidl::encoding::Encode<CoordinatorSetLayerPrimaryConfigRequest, D>
3057        for &CoordinatorSetLayerPrimaryConfigRequest
3058    {
3059        #[inline]
3060        unsafe fn encode(
3061            self,
3062            encoder: &mut fidl::encoding::Encoder<'_, D>,
3063            offset: usize,
3064            _depth: fidl::encoding::Depth,
3065        ) -> fidl::Result<()> {
3066            encoder.debug_check_bounds::<CoordinatorSetLayerPrimaryConfigRequest>(offset);
3067            // Delegate to tuple encoding.
3068            fidl::encoding::Encode::<CoordinatorSetLayerPrimaryConfigRequest, D>::encode(
3069                (
3070                    <LayerId as fidl::encoding::ValueTypeMarker>::borrow(&self.layer_id),
3071                    <fidl_fuchsia_hardware_display_types__common::ImageMetadata as fidl::encoding::ValueTypeMarker>::borrow(&self.image_metadata),
3072                ),
3073                encoder, offset, _depth
3074            )
3075        }
3076    }
3077    unsafe impl<
3078            D: fidl::encoding::ResourceDialect,
3079            T0: fidl::encoding::Encode<LayerId, D>,
3080            T1: fidl::encoding::Encode<fidl_fuchsia_hardware_display_types__common::ImageMetadata, D>,
3081        > fidl::encoding::Encode<CoordinatorSetLayerPrimaryConfigRequest, D> for (T0, T1)
3082    {
3083        #[inline]
3084        unsafe fn encode(
3085            self,
3086            encoder: &mut fidl::encoding::Encoder<'_, D>,
3087            offset: usize,
3088            depth: fidl::encoding::Depth,
3089        ) -> fidl::Result<()> {
3090            encoder.debug_check_bounds::<CoordinatorSetLayerPrimaryConfigRequest>(offset);
3091            // Zero out padding regions. There's no need to apply masks
3092            // because the unmasked parts will be overwritten by fields.
3093            unsafe {
3094                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
3095                (ptr as *mut u64).write_unaligned(0);
3096            }
3097            // Write the fields.
3098            self.0.encode(encoder, offset + 0, depth)?;
3099            self.1.encode(encoder, offset + 8, depth)?;
3100            Ok(())
3101        }
3102    }
3103
3104    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3105        for CoordinatorSetLayerPrimaryConfigRequest
3106    {
3107        #[inline(always)]
3108        fn new_empty() -> Self {
3109            Self {
3110                layer_id: fidl::new_empty!(LayerId, D),
3111                image_metadata: fidl::new_empty!(
3112                    fidl_fuchsia_hardware_display_types__common::ImageMetadata,
3113                    D
3114                ),
3115            }
3116        }
3117
3118        #[inline]
3119        unsafe fn decode(
3120            &mut self,
3121            decoder: &mut fidl::encoding::Decoder<'_, D>,
3122            offset: usize,
3123            _depth: fidl::encoding::Depth,
3124        ) -> fidl::Result<()> {
3125            decoder.debug_check_bounds::<Self>(offset);
3126            // Verify that padding bytes are zero.
3127            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
3128            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3129            let mask = 0xffffffff00000000u64;
3130            let maskedval = padval & mask;
3131            if maskedval != 0 {
3132                return Err(fidl::Error::NonZeroPadding {
3133                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
3134                });
3135            }
3136            fidl::decode!(LayerId, D, &mut self.layer_id, decoder, offset + 0, _depth)?;
3137            fidl::decode!(
3138                fidl_fuchsia_hardware_display_types__common::ImageMetadata,
3139                D,
3140                &mut self.image_metadata,
3141                decoder,
3142                offset + 8,
3143                _depth
3144            )?;
3145            Ok(())
3146        }
3147    }
3148
3149    impl fidl::encoding::ValueTypeMarker for CoordinatorSetLayerPrimaryPositionRequest {
3150        type Borrowed<'a> = &'a Self;
3151        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3152            value
3153        }
3154    }
3155
3156    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetLayerPrimaryPositionRequest {
3157        type Owned = Self;
3158
3159        #[inline(always)]
3160        fn inline_align(_context: fidl::encoding::Context) -> usize {
3161            8
3162        }
3163
3164        #[inline(always)]
3165        fn inline_size(_context: fidl::encoding::Context) -> usize {
3166            48
3167        }
3168    }
3169
3170    unsafe impl<D: fidl::encoding::ResourceDialect>
3171        fidl::encoding::Encode<CoordinatorSetLayerPrimaryPositionRequest, D>
3172        for &CoordinatorSetLayerPrimaryPositionRequest
3173    {
3174        #[inline]
3175        unsafe fn encode(
3176            self,
3177            encoder: &mut fidl::encoding::Encoder<'_, D>,
3178            offset: usize,
3179            _depth: fidl::encoding::Depth,
3180        ) -> fidl::Result<()> {
3181            encoder.debug_check_bounds::<CoordinatorSetLayerPrimaryPositionRequest>(offset);
3182            // Delegate to tuple encoding.
3183            fidl::encoding::Encode::<CoordinatorSetLayerPrimaryPositionRequest, D>::encode(
3184                (
3185                    <LayerId as fidl::encoding::ValueTypeMarker>::borrow(&self.layer_id),
3186                    <fidl_fuchsia_hardware_display_types__common::CoordinateTransformation as fidl::encoding::ValueTypeMarker>::borrow(&self.image_source_transformation),
3187                    <fidl_fuchsia_math__common::RectU as fidl::encoding::ValueTypeMarker>::borrow(&self.image_source),
3188                    <fidl_fuchsia_math__common::RectU as fidl::encoding::ValueTypeMarker>::borrow(&self.display_destination),
3189                ),
3190                encoder, offset, _depth
3191            )
3192        }
3193    }
3194    unsafe impl<
3195            D: fidl::encoding::ResourceDialect,
3196            T0: fidl::encoding::Encode<LayerId, D>,
3197            T1: fidl::encoding::Encode<
3198                fidl_fuchsia_hardware_display_types__common::CoordinateTransformation,
3199                D,
3200            >,
3201            T2: fidl::encoding::Encode<fidl_fuchsia_math__common::RectU, D>,
3202            T3: fidl::encoding::Encode<fidl_fuchsia_math__common::RectU, D>,
3203        > fidl::encoding::Encode<CoordinatorSetLayerPrimaryPositionRequest, D>
3204        for (T0, T1, T2, T3)
3205    {
3206        #[inline]
3207        unsafe fn encode(
3208            self,
3209            encoder: &mut fidl::encoding::Encoder<'_, D>,
3210            offset: usize,
3211            depth: fidl::encoding::Depth,
3212        ) -> fidl::Result<()> {
3213            encoder.debug_check_bounds::<CoordinatorSetLayerPrimaryPositionRequest>(offset);
3214            // Zero out padding regions. There's no need to apply masks
3215            // because the unmasked parts will be overwritten by fields.
3216            unsafe {
3217                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
3218                (ptr as *mut u64).write_unaligned(0);
3219            }
3220            unsafe {
3221                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(40);
3222                (ptr as *mut u64).write_unaligned(0);
3223            }
3224            // Write the fields.
3225            self.0.encode(encoder, offset + 0, depth)?;
3226            self.1.encode(encoder, offset + 8, depth)?;
3227            self.2.encode(encoder, offset + 12, depth)?;
3228            self.3.encode(encoder, offset + 28, depth)?;
3229            Ok(())
3230        }
3231    }
3232
3233    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3234        for CoordinatorSetLayerPrimaryPositionRequest
3235    {
3236        #[inline(always)]
3237        fn new_empty() -> Self {
3238            Self {
3239                layer_id: fidl::new_empty!(LayerId, D),
3240                image_source_transformation: fidl::new_empty!(
3241                    fidl_fuchsia_hardware_display_types__common::CoordinateTransformation,
3242                    D
3243                ),
3244                image_source: fidl::new_empty!(fidl_fuchsia_math__common::RectU, D),
3245                display_destination: fidl::new_empty!(fidl_fuchsia_math__common::RectU, D),
3246            }
3247        }
3248
3249        #[inline]
3250        unsafe fn decode(
3251            &mut self,
3252            decoder: &mut fidl::encoding::Decoder<'_, D>,
3253            offset: usize,
3254            _depth: fidl::encoding::Depth,
3255        ) -> fidl::Result<()> {
3256            decoder.debug_check_bounds::<Self>(offset);
3257            // Verify that padding bytes are zero.
3258            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
3259            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3260            let mask = 0xffffff00u64;
3261            let maskedval = padval & mask;
3262            if maskedval != 0 {
3263                return Err(fidl::Error::NonZeroPadding {
3264                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
3265                });
3266            }
3267            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(40) };
3268            let padval = unsafe { (ptr as *const u64).read_unaligned() };
3269            let mask = 0xffffffff00000000u64;
3270            let maskedval = padval & mask;
3271            if maskedval != 0 {
3272                return Err(fidl::Error::NonZeroPadding {
3273                    padding_start: offset + 40 + ((mask as u64).trailing_zeros() / 8) as usize,
3274                });
3275            }
3276            fidl::decode!(LayerId, D, &mut self.layer_id, decoder, offset + 0, _depth)?;
3277            fidl::decode!(
3278                fidl_fuchsia_hardware_display_types__common::CoordinateTransformation,
3279                D,
3280                &mut self.image_source_transformation,
3281                decoder,
3282                offset + 8,
3283                _depth
3284            )?;
3285            fidl::decode!(
3286                fidl_fuchsia_math__common::RectU,
3287                D,
3288                &mut self.image_source,
3289                decoder,
3290                offset + 12,
3291                _depth
3292            )?;
3293            fidl::decode!(
3294                fidl_fuchsia_math__common::RectU,
3295                D,
3296                &mut self.display_destination,
3297                decoder,
3298                offset + 28,
3299                _depth
3300            )?;
3301            Ok(())
3302        }
3303    }
3304
3305    impl fidl::encoding::ValueTypeMarker for CoordinatorSetMinimumRgbRequest {
3306        type Borrowed<'a> = &'a Self;
3307        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3308            value
3309        }
3310    }
3311
3312    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetMinimumRgbRequest {
3313        type Owned = Self;
3314
3315        #[inline(always)]
3316        fn inline_align(_context: fidl::encoding::Context) -> usize {
3317            1
3318        }
3319
3320        #[inline(always)]
3321        fn inline_size(_context: fidl::encoding::Context) -> usize {
3322            1
3323        }
3324        #[inline(always)]
3325        fn encode_is_copy() -> bool {
3326            true
3327        }
3328
3329        #[inline(always)]
3330        fn decode_is_copy() -> bool {
3331            true
3332        }
3333    }
3334
3335    unsafe impl<D: fidl::encoding::ResourceDialect>
3336        fidl::encoding::Encode<CoordinatorSetMinimumRgbRequest, D>
3337        for &CoordinatorSetMinimumRgbRequest
3338    {
3339        #[inline]
3340        unsafe fn encode(
3341            self,
3342            encoder: &mut fidl::encoding::Encoder<'_, D>,
3343            offset: usize,
3344            _depth: fidl::encoding::Depth,
3345        ) -> fidl::Result<()> {
3346            encoder.debug_check_bounds::<CoordinatorSetMinimumRgbRequest>(offset);
3347            unsafe {
3348                // Copy the object into the buffer.
3349                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3350                (buf_ptr as *mut CoordinatorSetMinimumRgbRequest)
3351                    .write_unaligned((self as *const CoordinatorSetMinimumRgbRequest).read());
3352                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3353                // done second because the memcpy will write garbage to these bytes.
3354            }
3355            Ok(())
3356        }
3357    }
3358    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
3359        fidl::encoding::Encode<CoordinatorSetMinimumRgbRequest, D> for (T0,)
3360    {
3361        #[inline]
3362        unsafe fn encode(
3363            self,
3364            encoder: &mut fidl::encoding::Encoder<'_, D>,
3365            offset: usize,
3366            depth: fidl::encoding::Depth,
3367        ) -> fidl::Result<()> {
3368            encoder.debug_check_bounds::<CoordinatorSetMinimumRgbRequest>(offset);
3369            // Zero out padding regions. There's no need to apply masks
3370            // because the unmasked parts will be overwritten by fields.
3371            // Write the fields.
3372            self.0.encode(encoder, offset + 0, depth)?;
3373            Ok(())
3374        }
3375    }
3376
3377    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3378        for CoordinatorSetMinimumRgbRequest
3379    {
3380        #[inline(always)]
3381        fn new_empty() -> Self {
3382            Self { minimum_rgb: fidl::new_empty!(u8, D) }
3383        }
3384
3385        #[inline]
3386        unsafe fn decode(
3387            &mut self,
3388            decoder: &mut fidl::encoding::Decoder<'_, D>,
3389            offset: usize,
3390            _depth: fidl::encoding::Depth,
3391        ) -> fidl::Result<()> {
3392            decoder.debug_check_bounds::<Self>(offset);
3393            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3394            // Verify that padding bytes are zero.
3395            // Copy from the buffer into the object.
3396            unsafe {
3397                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
3398            }
3399            Ok(())
3400        }
3401    }
3402
3403    impl fidl::encoding::ValueTypeMarker for CoordinatorSetVirtconModeRequest {
3404        type Borrowed<'a> = &'a Self;
3405        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3406            value
3407        }
3408    }
3409
3410    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetVirtconModeRequest {
3411        type Owned = Self;
3412
3413        #[inline(always)]
3414        fn inline_align(_context: fidl::encoding::Context) -> usize {
3415            1
3416        }
3417
3418        #[inline(always)]
3419        fn inline_size(_context: fidl::encoding::Context) -> usize {
3420            1
3421        }
3422    }
3423
3424    unsafe impl<D: fidl::encoding::ResourceDialect>
3425        fidl::encoding::Encode<CoordinatorSetVirtconModeRequest, D>
3426        for &CoordinatorSetVirtconModeRequest
3427    {
3428        #[inline]
3429        unsafe fn encode(
3430            self,
3431            encoder: &mut fidl::encoding::Encoder<'_, D>,
3432            offset: usize,
3433            _depth: fidl::encoding::Depth,
3434        ) -> fidl::Result<()> {
3435            encoder.debug_check_bounds::<CoordinatorSetVirtconModeRequest>(offset);
3436            // Delegate to tuple encoding.
3437            fidl::encoding::Encode::<CoordinatorSetVirtconModeRequest, D>::encode(
3438                (<VirtconMode as fidl::encoding::ValueTypeMarker>::borrow(&self.mode),),
3439                encoder,
3440                offset,
3441                _depth,
3442            )
3443        }
3444    }
3445    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<VirtconMode, D>>
3446        fidl::encoding::Encode<CoordinatorSetVirtconModeRequest, D> for (T0,)
3447    {
3448        #[inline]
3449        unsafe fn encode(
3450            self,
3451            encoder: &mut fidl::encoding::Encoder<'_, D>,
3452            offset: usize,
3453            depth: fidl::encoding::Depth,
3454        ) -> fidl::Result<()> {
3455            encoder.debug_check_bounds::<CoordinatorSetVirtconModeRequest>(offset);
3456            // Zero out padding regions. There's no need to apply masks
3457            // because the unmasked parts will be overwritten by fields.
3458            // Write the fields.
3459            self.0.encode(encoder, offset + 0, depth)?;
3460            Ok(())
3461        }
3462    }
3463
3464    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3465        for CoordinatorSetVirtconModeRequest
3466    {
3467        #[inline(always)]
3468        fn new_empty() -> Self {
3469            Self { mode: fidl::new_empty!(VirtconMode, D) }
3470        }
3471
3472        #[inline]
3473        unsafe fn decode(
3474            &mut self,
3475            decoder: &mut fidl::encoding::Decoder<'_, D>,
3476            offset: usize,
3477            _depth: fidl::encoding::Depth,
3478        ) -> fidl::Result<()> {
3479            decoder.debug_check_bounds::<Self>(offset);
3480            // Verify that padding bytes are zero.
3481            fidl::decode!(VirtconMode, D, &mut self.mode, decoder, offset + 0, _depth)?;
3482            Ok(())
3483        }
3484    }
3485
3486    impl fidl::encoding::ValueTypeMarker for CoordinatorSetVsyncEventDeliveryRequest {
3487        type Borrowed<'a> = &'a Self;
3488        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3489            value
3490        }
3491    }
3492
3493    unsafe impl fidl::encoding::TypeMarker for CoordinatorSetVsyncEventDeliveryRequest {
3494        type Owned = Self;
3495
3496        #[inline(always)]
3497        fn inline_align(_context: fidl::encoding::Context) -> usize {
3498            1
3499        }
3500
3501        #[inline(always)]
3502        fn inline_size(_context: fidl::encoding::Context) -> usize {
3503            1
3504        }
3505    }
3506
3507    unsafe impl<D: fidl::encoding::ResourceDialect>
3508        fidl::encoding::Encode<CoordinatorSetVsyncEventDeliveryRequest, D>
3509        for &CoordinatorSetVsyncEventDeliveryRequest
3510    {
3511        #[inline]
3512        unsafe fn encode(
3513            self,
3514            encoder: &mut fidl::encoding::Encoder<'_, D>,
3515            offset: usize,
3516            _depth: fidl::encoding::Depth,
3517        ) -> fidl::Result<()> {
3518            encoder.debug_check_bounds::<CoordinatorSetVsyncEventDeliveryRequest>(offset);
3519            // Delegate to tuple encoding.
3520            fidl::encoding::Encode::<CoordinatorSetVsyncEventDeliveryRequest, D>::encode(
3521                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.vsync_delivery_enabled),),
3522                encoder,
3523                offset,
3524                _depth,
3525            )
3526        }
3527    }
3528    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3529        fidl::encoding::Encode<CoordinatorSetVsyncEventDeliveryRequest, D> for (T0,)
3530    {
3531        #[inline]
3532        unsafe fn encode(
3533            self,
3534            encoder: &mut fidl::encoding::Encoder<'_, D>,
3535            offset: usize,
3536            depth: fidl::encoding::Depth,
3537        ) -> fidl::Result<()> {
3538            encoder.debug_check_bounds::<CoordinatorSetVsyncEventDeliveryRequest>(offset);
3539            // Zero out padding regions. There's no need to apply masks
3540            // because the unmasked parts will be overwritten by fields.
3541            // Write the fields.
3542            self.0.encode(encoder, offset + 0, depth)?;
3543            Ok(())
3544        }
3545    }
3546
3547    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3548        for CoordinatorSetVsyncEventDeliveryRequest
3549    {
3550        #[inline(always)]
3551        fn new_empty() -> Self {
3552            Self { vsync_delivery_enabled: fidl::new_empty!(bool, D) }
3553        }
3554
3555        #[inline]
3556        unsafe fn decode(
3557            &mut self,
3558            decoder: &mut fidl::encoding::Decoder<'_, D>,
3559            offset: usize,
3560            _depth: fidl::encoding::Depth,
3561        ) -> fidl::Result<()> {
3562            decoder.debug_check_bounds::<Self>(offset);
3563            // Verify that padding bytes are zero.
3564            fidl::decode!(bool, D, &mut self.vsync_delivery_enabled, decoder, offset + 0, _depth)?;
3565            Ok(())
3566        }
3567    }
3568
3569    impl fidl::encoding::ValueTypeMarker for CoordinatorStartCaptureRequest {
3570        type Borrowed<'a> = &'a Self;
3571        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3572            value
3573        }
3574    }
3575
3576    unsafe impl fidl::encoding::TypeMarker for CoordinatorStartCaptureRequest {
3577        type Owned = Self;
3578
3579        #[inline(always)]
3580        fn inline_align(_context: fidl::encoding::Context) -> usize {
3581            8
3582        }
3583
3584        #[inline(always)]
3585        fn inline_size(_context: fidl::encoding::Context) -> usize {
3586            16
3587        }
3588        #[inline(always)]
3589        fn encode_is_copy() -> bool {
3590            true
3591        }
3592
3593        #[inline(always)]
3594        fn decode_is_copy() -> bool {
3595            true
3596        }
3597    }
3598
3599    unsafe impl<D: fidl::encoding::ResourceDialect>
3600        fidl::encoding::Encode<CoordinatorStartCaptureRequest, D>
3601        for &CoordinatorStartCaptureRequest
3602    {
3603        #[inline]
3604        unsafe fn encode(
3605            self,
3606            encoder: &mut fidl::encoding::Encoder<'_, D>,
3607            offset: usize,
3608            _depth: fidl::encoding::Depth,
3609        ) -> fidl::Result<()> {
3610            encoder.debug_check_bounds::<CoordinatorStartCaptureRequest>(offset);
3611            unsafe {
3612                // Copy the object into the buffer.
3613                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3614                (buf_ptr as *mut CoordinatorStartCaptureRequest)
3615                    .write_unaligned((self as *const CoordinatorStartCaptureRequest).read());
3616                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3617                // done second because the memcpy will write garbage to these bytes.
3618            }
3619            Ok(())
3620        }
3621    }
3622    unsafe impl<
3623            D: fidl::encoding::ResourceDialect,
3624            T0: fidl::encoding::Encode<EventId, D>,
3625            T1: fidl::encoding::Encode<ImageId, D>,
3626        > fidl::encoding::Encode<CoordinatorStartCaptureRequest, D> for (T0, T1)
3627    {
3628        #[inline]
3629        unsafe fn encode(
3630            self,
3631            encoder: &mut fidl::encoding::Encoder<'_, D>,
3632            offset: usize,
3633            depth: fidl::encoding::Depth,
3634        ) -> fidl::Result<()> {
3635            encoder.debug_check_bounds::<CoordinatorStartCaptureRequest>(offset);
3636            // Zero out padding regions. There's no need to apply masks
3637            // because the unmasked parts will be overwritten by fields.
3638            // Write the fields.
3639            self.0.encode(encoder, offset + 0, depth)?;
3640            self.1.encode(encoder, offset + 8, depth)?;
3641            Ok(())
3642        }
3643    }
3644
3645    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3646        for CoordinatorStartCaptureRequest
3647    {
3648        #[inline(always)]
3649        fn new_empty() -> Self {
3650            Self {
3651                signal_event_id: fidl::new_empty!(EventId, D),
3652                image_id: fidl::new_empty!(ImageId, D),
3653            }
3654        }
3655
3656        #[inline]
3657        unsafe fn decode(
3658            &mut self,
3659            decoder: &mut fidl::encoding::Decoder<'_, D>,
3660            offset: usize,
3661            _depth: fidl::encoding::Depth,
3662        ) -> fidl::Result<()> {
3663            decoder.debug_check_bounds::<Self>(offset);
3664            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3665            // Verify that padding bytes are zero.
3666            // Copy from the buffer into the object.
3667            unsafe {
3668                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
3669            }
3670            Ok(())
3671        }
3672    }
3673
3674    impl fidl::encoding::ValueTypeMarker for CoordinatorCreateLayerResponse {
3675        type Borrowed<'a> = &'a Self;
3676        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3677            value
3678        }
3679    }
3680
3681    unsafe impl fidl::encoding::TypeMarker for CoordinatorCreateLayerResponse {
3682        type Owned = Self;
3683
3684        #[inline(always)]
3685        fn inline_align(_context: fidl::encoding::Context) -> usize {
3686            8
3687        }
3688
3689        #[inline(always)]
3690        fn inline_size(_context: fidl::encoding::Context) -> usize {
3691            8
3692        }
3693        #[inline(always)]
3694        fn encode_is_copy() -> bool {
3695            true
3696        }
3697
3698        #[inline(always)]
3699        fn decode_is_copy() -> bool {
3700            true
3701        }
3702    }
3703
3704    unsafe impl<D: fidl::encoding::ResourceDialect>
3705        fidl::encoding::Encode<CoordinatorCreateLayerResponse, D>
3706        for &CoordinatorCreateLayerResponse
3707    {
3708        #[inline]
3709        unsafe fn encode(
3710            self,
3711            encoder: &mut fidl::encoding::Encoder<'_, D>,
3712            offset: usize,
3713            _depth: fidl::encoding::Depth,
3714        ) -> fidl::Result<()> {
3715            encoder.debug_check_bounds::<CoordinatorCreateLayerResponse>(offset);
3716            unsafe {
3717                // Copy the object into the buffer.
3718                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3719                (buf_ptr as *mut CoordinatorCreateLayerResponse)
3720                    .write_unaligned((self as *const CoordinatorCreateLayerResponse).read());
3721                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3722                // done second because the memcpy will write garbage to these bytes.
3723            }
3724            Ok(())
3725        }
3726    }
3727    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<LayerId, D>>
3728        fidl::encoding::Encode<CoordinatorCreateLayerResponse, D> for (T0,)
3729    {
3730        #[inline]
3731        unsafe fn encode(
3732            self,
3733            encoder: &mut fidl::encoding::Encoder<'_, D>,
3734            offset: usize,
3735            depth: fidl::encoding::Depth,
3736        ) -> fidl::Result<()> {
3737            encoder.debug_check_bounds::<CoordinatorCreateLayerResponse>(offset);
3738            // Zero out padding regions. There's no need to apply masks
3739            // because the unmasked parts will be overwritten by fields.
3740            // Write the fields.
3741            self.0.encode(encoder, offset + 0, depth)?;
3742            Ok(())
3743        }
3744    }
3745
3746    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3747        for CoordinatorCreateLayerResponse
3748    {
3749        #[inline(always)]
3750        fn new_empty() -> Self {
3751            Self { layer_id: fidl::new_empty!(LayerId, D) }
3752        }
3753
3754        #[inline]
3755        unsafe fn decode(
3756            &mut self,
3757            decoder: &mut fidl::encoding::Decoder<'_, D>,
3758            offset: usize,
3759            _depth: fidl::encoding::Depth,
3760        ) -> fidl::Result<()> {
3761            decoder.debug_check_bounds::<Self>(offset);
3762            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3763            // Verify that padding bytes are zero.
3764            // Copy from the buffer into the object.
3765            unsafe {
3766                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3767            }
3768            Ok(())
3769        }
3770    }
3771
3772    impl fidl::encoding::ValueTypeMarker for CoordinatorIsCaptureSupportedResponse {
3773        type Borrowed<'a> = &'a Self;
3774        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3775            value
3776        }
3777    }
3778
3779    unsafe impl fidl::encoding::TypeMarker for CoordinatorIsCaptureSupportedResponse {
3780        type Owned = Self;
3781
3782        #[inline(always)]
3783        fn inline_align(_context: fidl::encoding::Context) -> usize {
3784            1
3785        }
3786
3787        #[inline(always)]
3788        fn inline_size(_context: fidl::encoding::Context) -> usize {
3789            1
3790        }
3791    }
3792
3793    unsafe impl<D: fidl::encoding::ResourceDialect>
3794        fidl::encoding::Encode<CoordinatorIsCaptureSupportedResponse, D>
3795        for &CoordinatorIsCaptureSupportedResponse
3796    {
3797        #[inline]
3798        unsafe fn encode(
3799            self,
3800            encoder: &mut fidl::encoding::Encoder<'_, D>,
3801            offset: usize,
3802            _depth: fidl::encoding::Depth,
3803        ) -> fidl::Result<()> {
3804            encoder.debug_check_bounds::<CoordinatorIsCaptureSupportedResponse>(offset);
3805            // Delegate to tuple encoding.
3806            fidl::encoding::Encode::<CoordinatorIsCaptureSupportedResponse, D>::encode(
3807                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.supported),),
3808                encoder,
3809                offset,
3810                _depth,
3811            )
3812        }
3813    }
3814    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
3815        fidl::encoding::Encode<CoordinatorIsCaptureSupportedResponse, D> for (T0,)
3816    {
3817        #[inline]
3818        unsafe fn encode(
3819            self,
3820            encoder: &mut fidl::encoding::Encoder<'_, D>,
3821            offset: usize,
3822            depth: fidl::encoding::Depth,
3823        ) -> fidl::Result<()> {
3824            encoder.debug_check_bounds::<CoordinatorIsCaptureSupportedResponse>(offset);
3825            // Zero out padding regions. There's no need to apply masks
3826            // because the unmasked parts will be overwritten by fields.
3827            // Write the fields.
3828            self.0.encode(encoder, offset + 0, depth)?;
3829            Ok(())
3830        }
3831    }
3832
3833    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3834        for CoordinatorIsCaptureSupportedResponse
3835    {
3836        #[inline(always)]
3837        fn new_empty() -> Self {
3838            Self { supported: fidl::new_empty!(bool, D) }
3839        }
3840
3841        #[inline]
3842        unsafe fn decode(
3843            &mut self,
3844            decoder: &mut fidl::encoding::Decoder<'_, D>,
3845            offset: usize,
3846            _depth: fidl::encoding::Depth,
3847        ) -> fidl::Result<()> {
3848            decoder.debug_check_bounds::<Self>(offset);
3849            // Verify that padding bytes are zero.
3850            fidl::decode!(bool, D, &mut self.supported, decoder, offset + 0, _depth)?;
3851            Ok(())
3852        }
3853    }
3854
3855    impl fidl::encoding::ValueTypeMarker for EventId {
3856        type Borrowed<'a> = &'a Self;
3857        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3858            value
3859        }
3860    }
3861
3862    unsafe impl fidl::encoding::TypeMarker for EventId {
3863        type Owned = Self;
3864
3865        #[inline(always)]
3866        fn inline_align(_context: fidl::encoding::Context) -> usize {
3867            8
3868        }
3869
3870        #[inline(always)]
3871        fn inline_size(_context: fidl::encoding::Context) -> usize {
3872            8
3873        }
3874        #[inline(always)]
3875        fn encode_is_copy() -> bool {
3876            true
3877        }
3878
3879        #[inline(always)]
3880        fn decode_is_copy() -> bool {
3881            true
3882        }
3883    }
3884
3885    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EventId, D> for &EventId {
3886        #[inline]
3887        unsafe fn encode(
3888            self,
3889            encoder: &mut fidl::encoding::Encoder<'_, D>,
3890            offset: usize,
3891            _depth: fidl::encoding::Depth,
3892        ) -> fidl::Result<()> {
3893            encoder.debug_check_bounds::<EventId>(offset);
3894            unsafe {
3895                // Copy the object into the buffer.
3896                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3897                (buf_ptr as *mut EventId).write_unaligned((self as *const EventId).read());
3898                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3899                // done second because the memcpy will write garbage to these bytes.
3900            }
3901            Ok(())
3902        }
3903    }
3904    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3905        fidl::encoding::Encode<EventId, D> for (T0,)
3906    {
3907        #[inline]
3908        unsafe fn encode(
3909            self,
3910            encoder: &mut fidl::encoding::Encoder<'_, D>,
3911            offset: usize,
3912            depth: fidl::encoding::Depth,
3913        ) -> fidl::Result<()> {
3914            encoder.debug_check_bounds::<EventId>(offset);
3915            // Zero out padding regions. There's no need to apply masks
3916            // because the unmasked parts will be overwritten by fields.
3917            // Write the fields.
3918            self.0.encode(encoder, offset + 0, depth)?;
3919            Ok(())
3920        }
3921    }
3922
3923    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EventId {
3924        #[inline(always)]
3925        fn new_empty() -> Self {
3926            Self { value: fidl::new_empty!(u64, D) }
3927        }
3928
3929        #[inline]
3930        unsafe fn decode(
3931            &mut self,
3932            decoder: &mut fidl::encoding::Decoder<'_, D>,
3933            offset: usize,
3934            _depth: fidl::encoding::Depth,
3935        ) -> fidl::Result<()> {
3936            decoder.debug_check_bounds::<Self>(offset);
3937            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3938            // Verify that padding bytes are zero.
3939            // Copy from the buffer into the object.
3940            unsafe {
3941                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3942            }
3943            Ok(())
3944        }
3945    }
3946
3947    impl fidl::encoding::ValueTypeMarker for ImageId {
3948        type Borrowed<'a> = &'a Self;
3949        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3950            value
3951        }
3952    }
3953
3954    unsafe impl fidl::encoding::TypeMarker for ImageId {
3955        type Owned = Self;
3956
3957        #[inline(always)]
3958        fn inline_align(_context: fidl::encoding::Context) -> usize {
3959            8
3960        }
3961
3962        #[inline(always)]
3963        fn inline_size(_context: fidl::encoding::Context) -> usize {
3964            8
3965        }
3966        #[inline(always)]
3967        fn encode_is_copy() -> bool {
3968            true
3969        }
3970
3971        #[inline(always)]
3972        fn decode_is_copy() -> bool {
3973            true
3974        }
3975    }
3976
3977    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ImageId, D> for &ImageId {
3978        #[inline]
3979        unsafe fn encode(
3980            self,
3981            encoder: &mut fidl::encoding::Encoder<'_, D>,
3982            offset: usize,
3983            _depth: fidl::encoding::Depth,
3984        ) -> fidl::Result<()> {
3985            encoder.debug_check_bounds::<ImageId>(offset);
3986            unsafe {
3987                // Copy the object into the buffer.
3988                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3989                (buf_ptr as *mut ImageId).write_unaligned((self as *const ImageId).read());
3990                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3991                // done second because the memcpy will write garbage to these bytes.
3992            }
3993            Ok(())
3994        }
3995    }
3996    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3997        fidl::encoding::Encode<ImageId, D> for (T0,)
3998    {
3999        #[inline]
4000        unsafe fn encode(
4001            self,
4002            encoder: &mut fidl::encoding::Encoder<'_, D>,
4003            offset: usize,
4004            depth: fidl::encoding::Depth,
4005        ) -> fidl::Result<()> {
4006            encoder.debug_check_bounds::<ImageId>(offset);
4007            // Zero out padding regions. There's no need to apply masks
4008            // because the unmasked parts will be overwritten by fields.
4009            // Write the fields.
4010            self.0.encode(encoder, offset + 0, depth)?;
4011            Ok(())
4012        }
4013    }
4014
4015    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ImageId {
4016        #[inline(always)]
4017        fn new_empty() -> Self {
4018            Self { value: fidl::new_empty!(u64, D) }
4019        }
4020
4021        #[inline]
4022        unsafe fn decode(
4023            &mut self,
4024            decoder: &mut fidl::encoding::Decoder<'_, D>,
4025            offset: usize,
4026            _depth: fidl::encoding::Depth,
4027        ) -> fidl::Result<()> {
4028            decoder.debug_check_bounds::<Self>(offset);
4029            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4030            // Verify that padding bytes are zero.
4031            // Copy from the buffer into the object.
4032            unsafe {
4033                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
4034            }
4035            Ok(())
4036        }
4037    }
4038
4039    impl fidl::encoding::ValueTypeMarker for Info {
4040        type Borrowed<'a> = &'a Self;
4041        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4042            value
4043        }
4044    }
4045
4046    unsafe impl fidl::encoding::TypeMarker for Info {
4047        type Owned = Self;
4048
4049        #[inline(always)]
4050        fn inline_align(_context: fidl::encoding::Context) -> usize {
4051            8
4052        }
4053
4054        #[inline(always)]
4055        fn inline_size(_context: fidl::encoding::Context) -> usize {
4056            104
4057        }
4058    }
4059
4060    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Info, D> for &Info {
4061        #[inline]
4062        unsafe fn encode(
4063            self,
4064            encoder: &mut fidl::encoding::Encoder<'_, D>,
4065            offset: usize,
4066            _depth: fidl::encoding::Depth,
4067        ) -> fidl::Result<()> {
4068            encoder.debug_check_bounds::<Info>(offset);
4069            // Delegate to tuple encoding.
4070            fidl::encoding::Encode::<Info, D>::encode(
4071                (
4072                    <fidl_fuchsia_hardware_display_types__common::DisplayId as fidl::encoding::ValueTypeMarker>::borrow(&self.id),
4073                    <fidl::encoding::UnboundedVector<fidl_fuchsia_hardware_display_types__common::Mode> as fidl::encoding::ValueTypeMarker>::borrow(&self.modes),
4074                    <fidl::encoding::UnboundedVector<fidl_fuchsia_images2__common::PixelFormat> as fidl::encoding::ValueTypeMarker>::borrow(&self.pixel_format),
4075                    <fidl::encoding::BoundedString<128> as fidl::encoding::ValueTypeMarker>::borrow(&self.manufacturer_name),
4076                    <fidl::encoding::BoundedString<128> as fidl::encoding::ValueTypeMarker>::borrow(&self.monitor_name),
4077                    <fidl::encoding::BoundedString<128> as fidl::encoding::ValueTypeMarker>::borrow(&self.monitor_serial),
4078                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.horizontal_size_mm),
4079                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.vertical_size_mm),
4080                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.using_fallback_size),
4081                ),
4082                encoder, offset, _depth
4083            )
4084        }
4085    }
4086    unsafe impl<
4087            D: fidl::encoding::ResourceDialect,
4088            T0: fidl::encoding::Encode<fidl_fuchsia_hardware_display_types__common::DisplayId, D>,
4089            T1: fidl::encoding::Encode<
4090                fidl::encoding::UnboundedVector<fidl_fuchsia_hardware_display_types__common::Mode>,
4091                D,
4092            >,
4093            T2: fidl::encoding::Encode<
4094                fidl::encoding::UnboundedVector<fidl_fuchsia_images2__common::PixelFormat>,
4095                D,
4096            >,
4097            T3: fidl::encoding::Encode<fidl::encoding::BoundedString<128>, D>,
4098            T4: fidl::encoding::Encode<fidl::encoding::BoundedString<128>, D>,
4099            T5: fidl::encoding::Encode<fidl::encoding::BoundedString<128>, D>,
4100            T6: fidl::encoding::Encode<u32, D>,
4101            T7: fidl::encoding::Encode<u32, D>,
4102            T8: fidl::encoding::Encode<bool, D>,
4103        > fidl::encoding::Encode<Info, D> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)
4104    {
4105        #[inline]
4106        unsafe fn encode(
4107            self,
4108            encoder: &mut fidl::encoding::Encoder<'_, D>,
4109            offset: usize,
4110            depth: fidl::encoding::Depth,
4111        ) -> fidl::Result<()> {
4112            encoder.debug_check_bounds::<Info>(offset);
4113            // Zero out padding regions. There's no need to apply masks
4114            // because the unmasked parts will be overwritten by fields.
4115            unsafe {
4116                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(96);
4117                (ptr as *mut u64).write_unaligned(0);
4118            }
4119            // Write the fields.
4120            self.0.encode(encoder, offset + 0, depth)?;
4121            self.1.encode(encoder, offset + 8, depth)?;
4122            self.2.encode(encoder, offset + 24, depth)?;
4123            self.3.encode(encoder, offset + 40, depth)?;
4124            self.4.encode(encoder, offset + 56, depth)?;
4125            self.5.encode(encoder, offset + 72, depth)?;
4126            self.6.encode(encoder, offset + 88, depth)?;
4127            self.7.encode(encoder, offset + 92, depth)?;
4128            self.8.encode(encoder, offset + 96, depth)?;
4129            Ok(())
4130        }
4131    }
4132
4133    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Info {
4134        #[inline(always)]
4135        fn new_empty() -> Self {
4136            Self {
4137                id: fidl::new_empty!(fidl_fuchsia_hardware_display_types__common::DisplayId, D),
4138                modes: fidl::new_empty!(
4139                    fidl::encoding::UnboundedVector<
4140                        fidl_fuchsia_hardware_display_types__common::Mode,
4141                    >,
4142                    D
4143                ),
4144                pixel_format: fidl::new_empty!(
4145                    fidl::encoding::UnboundedVector<fidl_fuchsia_images2__common::PixelFormat>,
4146                    D
4147                ),
4148                manufacturer_name: fidl::new_empty!(fidl::encoding::BoundedString<128>, D),
4149                monitor_name: fidl::new_empty!(fidl::encoding::BoundedString<128>, D),
4150                monitor_serial: fidl::new_empty!(fidl::encoding::BoundedString<128>, D),
4151                horizontal_size_mm: fidl::new_empty!(u32, D),
4152                vertical_size_mm: fidl::new_empty!(u32, D),
4153                using_fallback_size: fidl::new_empty!(bool, D),
4154            }
4155        }
4156
4157        #[inline]
4158        unsafe fn decode(
4159            &mut self,
4160            decoder: &mut fidl::encoding::Decoder<'_, D>,
4161            offset: usize,
4162            _depth: fidl::encoding::Depth,
4163        ) -> fidl::Result<()> {
4164            decoder.debug_check_bounds::<Self>(offset);
4165            // Verify that padding bytes are zero.
4166            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(96) };
4167            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4168            let mask = 0xffffffffffffff00u64;
4169            let maskedval = padval & mask;
4170            if maskedval != 0 {
4171                return Err(fidl::Error::NonZeroPadding {
4172                    padding_start: offset + 96 + ((mask as u64).trailing_zeros() / 8) as usize,
4173                });
4174            }
4175            fidl::decode!(
4176                fidl_fuchsia_hardware_display_types__common::DisplayId,
4177                D,
4178                &mut self.id,
4179                decoder,
4180                offset + 0,
4181                _depth
4182            )?;
4183            fidl::decode!(
4184                fidl::encoding::UnboundedVector<fidl_fuchsia_hardware_display_types__common::Mode>,
4185                D,
4186                &mut self.modes,
4187                decoder,
4188                offset + 8,
4189                _depth
4190            )?;
4191            fidl::decode!(
4192                fidl::encoding::UnboundedVector<fidl_fuchsia_images2__common::PixelFormat>,
4193                D,
4194                &mut self.pixel_format,
4195                decoder,
4196                offset + 24,
4197                _depth
4198            )?;
4199            fidl::decode!(
4200                fidl::encoding::BoundedString<128>,
4201                D,
4202                &mut self.manufacturer_name,
4203                decoder,
4204                offset + 40,
4205                _depth
4206            )?;
4207            fidl::decode!(
4208                fidl::encoding::BoundedString<128>,
4209                D,
4210                &mut self.monitor_name,
4211                decoder,
4212                offset + 56,
4213                _depth
4214            )?;
4215            fidl::decode!(
4216                fidl::encoding::BoundedString<128>,
4217                D,
4218                &mut self.monitor_serial,
4219                decoder,
4220                offset + 72,
4221                _depth
4222            )?;
4223            fidl::decode!(u32, D, &mut self.horizontal_size_mm, decoder, offset + 88, _depth)?;
4224            fidl::decode!(u32, D, &mut self.vertical_size_mm, decoder, offset + 92, _depth)?;
4225            fidl::decode!(bool, D, &mut self.using_fallback_size, decoder, offset + 96, _depth)?;
4226            Ok(())
4227        }
4228    }
4229
4230    impl fidl::encoding::ValueTypeMarker for LayerId {
4231        type Borrowed<'a> = &'a Self;
4232        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4233            value
4234        }
4235    }
4236
4237    unsafe impl fidl::encoding::TypeMarker for LayerId {
4238        type Owned = Self;
4239
4240        #[inline(always)]
4241        fn inline_align(_context: fidl::encoding::Context) -> usize {
4242            8
4243        }
4244
4245        #[inline(always)]
4246        fn inline_size(_context: fidl::encoding::Context) -> usize {
4247            8
4248        }
4249        #[inline(always)]
4250        fn encode_is_copy() -> bool {
4251            true
4252        }
4253
4254        #[inline(always)]
4255        fn decode_is_copy() -> bool {
4256            true
4257        }
4258    }
4259
4260    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<LayerId, D> for &LayerId {
4261        #[inline]
4262        unsafe fn encode(
4263            self,
4264            encoder: &mut fidl::encoding::Encoder<'_, D>,
4265            offset: usize,
4266            _depth: fidl::encoding::Depth,
4267        ) -> fidl::Result<()> {
4268            encoder.debug_check_bounds::<LayerId>(offset);
4269            unsafe {
4270                // Copy the object into the buffer.
4271                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4272                (buf_ptr as *mut LayerId).write_unaligned((self as *const LayerId).read());
4273                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4274                // done second because the memcpy will write garbage to these bytes.
4275            }
4276            Ok(())
4277        }
4278    }
4279    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
4280        fidl::encoding::Encode<LayerId, D> for (T0,)
4281    {
4282        #[inline]
4283        unsafe fn encode(
4284            self,
4285            encoder: &mut fidl::encoding::Encoder<'_, D>,
4286            offset: usize,
4287            depth: fidl::encoding::Depth,
4288        ) -> fidl::Result<()> {
4289            encoder.debug_check_bounds::<LayerId>(offset);
4290            // Zero out padding regions. There's no need to apply masks
4291            // because the unmasked parts will be overwritten by fields.
4292            // Write the fields.
4293            self.0.encode(encoder, offset + 0, depth)?;
4294            Ok(())
4295        }
4296    }
4297
4298    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LayerId {
4299        #[inline(always)]
4300        fn new_empty() -> Self {
4301            Self { value: fidl::new_empty!(u64, D) }
4302        }
4303
4304        #[inline]
4305        unsafe fn decode(
4306            &mut self,
4307            decoder: &mut fidl::encoding::Decoder<'_, D>,
4308            offset: usize,
4309            _depth: fidl::encoding::Depth,
4310        ) -> fidl::Result<()> {
4311            decoder.debug_check_bounds::<Self>(offset);
4312            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4313            // Verify that padding bytes are zero.
4314            // Copy from the buffer into the object.
4315            unsafe {
4316                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
4317            }
4318            Ok(())
4319        }
4320    }
4321
4322    impl fidl::encoding::ValueTypeMarker for VsyncAckCookie {
4323        type Borrowed<'a> = &'a Self;
4324        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4325            value
4326        }
4327    }
4328
4329    unsafe impl fidl::encoding::TypeMarker for VsyncAckCookie {
4330        type Owned = Self;
4331
4332        #[inline(always)]
4333        fn inline_align(_context: fidl::encoding::Context) -> usize {
4334            8
4335        }
4336
4337        #[inline(always)]
4338        fn inline_size(_context: fidl::encoding::Context) -> usize {
4339            8
4340        }
4341        #[inline(always)]
4342        fn encode_is_copy() -> bool {
4343            true
4344        }
4345
4346        #[inline(always)]
4347        fn decode_is_copy() -> bool {
4348            true
4349        }
4350    }
4351
4352    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VsyncAckCookie, D>
4353        for &VsyncAckCookie
4354    {
4355        #[inline]
4356        unsafe fn encode(
4357            self,
4358            encoder: &mut fidl::encoding::Encoder<'_, D>,
4359            offset: usize,
4360            _depth: fidl::encoding::Depth,
4361        ) -> fidl::Result<()> {
4362            encoder.debug_check_bounds::<VsyncAckCookie>(offset);
4363            unsafe {
4364                // Copy the object into the buffer.
4365                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
4366                (buf_ptr as *mut VsyncAckCookie)
4367                    .write_unaligned((self as *const VsyncAckCookie).read());
4368                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
4369                // done second because the memcpy will write garbage to these bytes.
4370            }
4371            Ok(())
4372        }
4373    }
4374    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
4375        fidl::encoding::Encode<VsyncAckCookie, D> for (T0,)
4376    {
4377        #[inline]
4378        unsafe fn encode(
4379            self,
4380            encoder: &mut fidl::encoding::Encoder<'_, D>,
4381            offset: usize,
4382            depth: fidl::encoding::Depth,
4383        ) -> fidl::Result<()> {
4384            encoder.debug_check_bounds::<VsyncAckCookie>(offset);
4385            // Zero out padding regions. There's no need to apply masks
4386            // because the unmasked parts will be overwritten by fields.
4387            // Write the fields.
4388            self.0.encode(encoder, offset + 0, depth)?;
4389            Ok(())
4390        }
4391    }
4392
4393    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VsyncAckCookie {
4394        #[inline(always)]
4395        fn new_empty() -> Self {
4396            Self { value: fidl::new_empty!(u64, D) }
4397        }
4398
4399        #[inline]
4400        unsafe fn decode(
4401            &mut self,
4402            decoder: &mut fidl::encoding::Decoder<'_, D>,
4403            offset: usize,
4404            _depth: fidl::encoding::Depth,
4405        ) -> fidl::Result<()> {
4406            decoder.debug_check_bounds::<Self>(offset);
4407            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4408            // Verify that padding bytes are zero.
4409            // Copy from the buffer into the object.
4410            unsafe {
4411                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
4412            }
4413            Ok(())
4414        }
4415    }
4416}