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