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