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