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 const DISPLAY_NOT_OWNED_SIGNAL: u32 = 16777216;
12
13pub const DISPLAY_OWNED_SIGNAL: u32 = 33554432;
14
15#[derive(Clone, Debug, PartialEq)]
16pub struct ScenicGetDisplayInfoResponse {
17 pub info: fidl_fuchsia_ui_gfx::DisplayInfo,
18}
19
20impl fidl::Persistable for ScenicGetDisplayInfoResponse {}
21
22#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
23pub struct ScenicUsesFlatlandResponse {
24 pub flatland_enabled: bool,
25}
26
27impl fidl::Persistable for ScenicUsesFlatlandResponse {}
28
29#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
30#[repr(C)]
31pub struct SessionDeregisterBufferCollectionRequest {
32 pub buffer_id: u32,
33}
34
35impl fidl::Persistable for SessionDeregisterBufferCollectionRequest {}
36
37#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
38pub struct SessionListenerOnScenicErrorRequest {
39 pub error: String,
40}
41
42impl fidl::Persistable for SessionListenerOnScenicErrorRequest {}
43
44#[derive(Clone, Debug, PartialEq)]
45pub struct SessionOnFramePresentedRequest {
46 pub frame_presented_info: fidl_fuchsia_scenic_scheduling::FramePresentedInfo,
47}
48
49impl fidl::Persistable for SessionOnFramePresentedRequest {}
50
51#[derive(Clone, Debug, PartialEq)]
52pub struct SessionPresent2Response {
53 pub request_presentation_times_info: fidl_fuchsia_scenic_scheduling::FuturePresentationTimes,
54}
55
56impl fidl::Persistable for SessionPresent2Response {}
57
58#[derive(Clone, Debug, PartialEq)]
59pub struct SessionPresentResponse {
60 pub presentation_info: fidl_fuchsia_images::PresentationInfo,
61}
62
63impl fidl::Persistable for SessionPresentResponse {}
64
65#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
66#[repr(C)]
67pub struct SessionRequestPresentationTimesRequest {
68 pub requested_prediction_span: i64,
69}
70
71impl fidl::Persistable for SessionRequestPresentationTimesRequest {}
72
73#[derive(Clone, Debug, PartialEq)]
74pub struct SessionRequestPresentationTimesResponse {
75 pub request_presentation_times_info: fidl_fuchsia_scenic_scheduling::FuturePresentationTimes,
76}
77
78impl fidl::Persistable for SessionRequestPresentationTimesResponse {}
79
80#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
81pub struct SessionSetDebugNameRequest {
82 pub debug_name: String,
83}
84
85impl fidl::Persistable for SessionSetDebugNameRequest {}
86
87mod internal {
88 use super::*;
89
90 impl fidl::encoding::ValueTypeMarker for ScenicGetDisplayInfoResponse {
91 type Borrowed<'a> = &'a Self;
92 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
93 value
94 }
95 }
96
97 unsafe impl fidl::encoding::TypeMarker for ScenicGetDisplayInfoResponse {
98 type Owned = Self;
99
100 #[inline(always)]
101 fn inline_align(_context: fidl::encoding::Context) -> usize {
102 4
103 }
104
105 #[inline(always)]
106 fn inline_size(_context: fidl::encoding::Context) -> usize {
107 8
108 }
109 }
110
111 unsafe impl<D: fidl::encoding::ResourceDialect>
112 fidl::encoding::Encode<ScenicGetDisplayInfoResponse, D> for &ScenicGetDisplayInfoResponse
113 {
114 #[inline]
115 unsafe fn encode(
116 self,
117 encoder: &mut fidl::encoding::Encoder<'_, D>,
118 offset: usize,
119 _depth: fidl::encoding::Depth,
120 ) -> fidl::Result<()> {
121 encoder.debug_check_bounds::<ScenicGetDisplayInfoResponse>(offset);
122 fidl::encoding::Encode::<ScenicGetDisplayInfoResponse, D>::encode(
124 (<fidl_fuchsia_ui_gfx::DisplayInfo as fidl::encoding::ValueTypeMarker>::borrow(
125 &self.info,
126 ),),
127 encoder,
128 offset,
129 _depth,
130 )
131 }
132 }
133 unsafe impl<
134 D: fidl::encoding::ResourceDialect,
135 T0: fidl::encoding::Encode<fidl_fuchsia_ui_gfx::DisplayInfo, D>,
136 > fidl::encoding::Encode<ScenicGetDisplayInfoResponse, D> for (T0,)
137 {
138 #[inline]
139 unsafe fn encode(
140 self,
141 encoder: &mut fidl::encoding::Encoder<'_, D>,
142 offset: usize,
143 depth: fidl::encoding::Depth,
144 ) -> fidl::Result<()> {
145 encoder.debug_check_bounds::<ScenicGetDisplayInfoResponse>(offset);
146 self.0.encode(encoder, offset + 0, depth)?;
150 Ok(())
151 }
152 }
153
154 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
155 for ScenicGetDisplayInfoResponse
156 {
157 #[inline(always)]
158 fn new_empty() -> Self {
159 Self { info: fidl::new_empty!(fidl_fuchsia_ui_gfx::DisplayInfo, D) }
160 }
161
162 #[inline]
163 unsafe fn decode(
164 &mut self,
165 decoder: &mut fidl::encoding::Decoder<'_, D>,
166 offset: usize,
167 _depth: fidl::encoding::Depth,
168 ) -> fidl::Result<()> {
169 decoder.debug_check_bounds::<Self>(offset);
170 fidl::decode!(
172 fidl_fuchsia_ui_gfx::DisplayInfo,
173 D,
174 &mut self.info,
175 decoder,
176 offset + 0,
177 _depth
178 )?;
179 Ok(())
180 }
181 }
182
183 impl fidl::encoding::ValueTypeMarker for ScenicUsesFlatlandResponse {
184 type Borrowed<'a> = &'a Self;
185 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
186 value
187 }
188 }
189
190 unsafe impl fidl::encoding::TypeMarker for ScenicUsesFlatlandResponse {
191 type Owned = Self;
192
193 #[inline(always)]
194 fn inline_align(_context: fidl::encoding::Context) -> usize {
195 1
196 }
197
198 #[inline(always)]
199 fn inline_size(_context: fidl::encoding::Context) -> usize {
200 1
201 }
202 }
203
204 unsafe impl<D: fidl::encoding::ResourceDialect>
205 fidl::encoding::Encode<ScenicUsesFlatlandResponse, D> for &ScenicUsesFlatlandResponse
206 {
207 #[inline]
208 unsafe fn encode(
209 self,
210 encoder: &mut fidl::encoding::Encoder<'_, D>,
211 offset: usize,
212 _depth: fidl::encoding::Depth,
213 ) -> fidl::Result<()> {
214 encoder.debug_check_bounds::<ScenicUsesFlatlandResponse>(offset);
215 fidl::encoding::Encode::<ScenicUsesFlatlandResponse, D>::encode(
217 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.flatland_enabled),),
218 encoder,
219 offset,
220 _depth,
221 )
222 }
223 }
224 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
225 fidl::encoding::Encode<ScenicUsesFlatlandResponse, D> for (T0,)
226 {
227 #[inline]
228 unsafe fn encode(
229 self,
230 encoder: &mut fidl::encoding::Encoder<'_, D>,
231 offset: usize,
232 depth: fidl::encoding::Depth,
233 ) -> fidl::Result<()> {
234 encoder.debug_check_bounds::<ScenicUsesFlatlandResponse>(offset);
235 self.0.encode(encoder, offset + 0, depth)?;
239 Ok(())
240 }
241 }
242
243 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
244 for ScenicUsesFlatlandResponse
245 {
246 #[inline(always)]
247 fn new_empty() -> Self {
248 Self { flatland_enabled: fidl::new_empty!(bool, D) }
249 }
250
251 #[inline]
252 unsafe fn decode(
253 &mut self,
254 decoder: &mut fidl::encoding::Decoder<'_, D>,
255 offset: usize,
256 _depth: fidl::encoding::Depth,
257 ) -> fidl::Result<()> {
258 decoder.debug_check_bounds::<Self>(offset);
259 fidl::decode!(bool, D, &mut self.flatland_enabled, decoder, offset + 0, _depth)?;
261 Ok(())
262 }
263 }
264
265 impl fidl::encoding::ValueTypeMarker for SessionDeregisterBufferCollectionRequest {
266 type Borrowed<'a> = &'a Self;
267 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
268 value
269 }
270 }
271
272 unsafe impl fidl::encoding::TypeMarker for SessionDeregisterBufferCollectionRequest {
273 type Owned = Self;
274
275 #[inline(always)]
276 fn inline_align(_context: fidl::encoding::Context) -> usize {
277 4
278 }
279
280 #[inline(always)]
281 fn inline_size(_context: fidl::encoding::Context) -> usize {
282 4
283 }
284 #[inline(always)]
285 fn encode_is_copy() -> bool {
286 true
287 }
288
289 #[inline(always)]
290 fn decode_is_copy() -> bool {
291 true
292 }
293 }
294
295 unsafe impl<D: fidl::encoding::ResourceDialect>
296 fidl::encoding::Encode<SessionDeregisterBufferCollectionRequest, D>
297 for &SessionDeregisterBufferCollectionRequest
298 {
299 #[inline]
300 unsafe fn encode(
301 self,
302 encoder: &mut fidl::encoding::Encoder<'_, D>,
303 offset: usize,
304 _depth: fidl::encoding::Depth,
305 ) -> fidl::Result<()> {
306 encoder.debug_check_bounds::<SessionDeregisterBufferCollectionRequest>(offset);
307 unsafe {
308 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
310 (buf_ptr as *mut SessionDeregisterBufferCollectionRequest).write_unaligned(
311 (self as *const SessionDeregisterBufferCollectionRequest).read(),
312 );
313 }
316 Ok(())
317 }
318 }
319 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
320 fidl::encoding::Encode<SessionDeregisterBufferCollectionRequest, D> for (T0,)
321 {
322 #[inline]
323 unsafe fn encode(
324 self,
325 encoder: &mut fidl::encoding::Encoder<'_, D>,
326 offset: usize,
327 depth: fidl::encoding::Depth,
328 ) -> fidl::Result<()> {
329 encoder.debug_check_bounds::<SessionDeregisterBufferCollectionRequest>(offset);
330 self.0.encode(encoder, offset + 0, depth)?;
334 Ok(())
335 }
336 }
337
338 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
339 for SessionDeregisterBufferCollectionRequest
340 {
341 #[inline(always)]
342 fn new_empty() -> Self {
343 Self { buffer_id: fidl::new_empty!(u32, D) }
344 }
345
346 #[inline]
347 unsafe fn decode(
348 &mut self,
349 decoder: &mut fidl::encoding::Decoder<'_, D>,
350 offset: usize,
351 _depth: fidl::encoding::Depth,
352 ) -> fidl::Result<()> {
353 decoder.debug_check_bounds::<Self>(offset);
354 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
355 unsafe {
358 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
359 }
360 Ok(())
361 }
362 }
363
364 impl fidl::encoding::ValueTypeMarker for SessionListenerOnScenicErrorRequest {
365 type Borrowed<'a> = &'a Self;
366 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
367 value
368 }
369 }
370
371 unsafe impl fidl::encoding::TypeMarker for SessionListenerOnScenicErrorRequest {
372 type Owned = Self;
373
374 #[inline(always)]
375 fn inline_align(_context: fidl::encoding::Context) -> usize {
376 8
377 }
378
379 #[inline(always)]
380 fn inline_size(_context: fidl::encoding::Context) -> usize {
381 16
382 }
383 }
384
385 unsafe impl<D: fidl::encoding::ResourceDialect>
386 fidl::encoding::Encode<SessionListenerOnScenicErrorRequest, D>
387 for &SessionListenerOnScenicErrorRequest
388 {
389 #[inline]
390 unsafe fn encode(
391 self,
392 encoder: &mut fidl::encoding::Encoder<'_, D>,
393 offset: usize,
394 _depth: fidl::encoding::Depth,
395 ) -> fidl::Result<()> {
396 encoder.debug_check_bounds::<SessionListenerOnScenicErrorRequest>(offset);
397 fidl::encoding::Encode::<SessionListenerOnScenicErrorRequest, D>::encode(
399 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
400 &self.error,
401 ),),
402 encoder,
403 offset,
404 _depth,
405 )
406 }
407 }
408 unsafe impl<
409 D: fidl::encoding::ResourceDialect,
410 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
411 > fidl::encoding::Encode<SessionListenerOnScenicErrorRequest, D> for (T0,)
412 {
413 #[inline]
414 unsafe fn encode(
415 self,
416 encoder: &mut fidl::encoding::Encoder<'_, D>,
417 offset: usize,
418 depth: fidl::encoding::Depth,
419 ) -> fidl::Result<()> {
420 encoder.debug_check_bounds::<SessionListenerOnScenicErrorRequest>(offset);
421 self.0.encode(encoder, offset + 0, depth)?;
425 Ok(())
426 }
427 }
428
429 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
430 for SessionListenerOnScenicErrorRequest
431 {
432 #[inline(always)]
433 fn new_empty() -> Self {
434 Self { error: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
435 }
436
437 #[inline]
438 unsafe fn decode(
439 &mut self,
440 decoder: &mut fidl::encoding::Decoder<'_, D>,
441 offset: usize,
442 _depth: fidl::encoding::Depth,
443 ) -> fidl::Result<()> {
444 decoder.debug_check_bounds::<Self>(offset);
445 fidl::decode!(
447 fidl::encoding::UnboundedString,
448 D,
449 &mut self.error,
450 decoder,
451 offset + 0,
452 _depth
453 )?;
454 Ok(())
455 }
456 }
457
458 impl fidl::encoding::ValueTypeMarker for SessionOnFramePresentedRequest {
459 type Borrowed<'a> = &'a Self;
460 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
461 value
462 }
463 }
464
465 unsafe impl fidl::encoding::TypeMarker for SessionOnFramePresentedRequest {
466 type Owned = Self;
467
468 #[inline(always)]
469 fn inline_align(_context: fidl::encoding::Context) -> usize {
470 8
471 }
472
473 #[inline(always)]
474 fn inline_size(_context: fidl::encoding::Context) -> usize {
475 32
476 }
477 }
478
479 unsafe impl<D: fidl::encoding::ResourceDialect>
480 fidl::encoding::Encode<SessionOnFramePresentedRequest, D>
481 for &SessionOnFramePresentedRequest
482 {
483 #[inline]
484 unsafe fn encode(
485 self,
486 encoder: &mut fidl::encoding::Encoder<'_, D>,
487 offset: usize,
488 _depth: fidl::encoding::Depth,
489 ) -> fidl::Result<()> {
490 encoder.debug_check_bounds::<SessionOnFramePresentedRequest>(offset);
491 fidl::encoding::Encode::<SessionOnFramePresentedRequest, D>::encode(
493 (
494 <fidl_fuchsia_scenic_scheduling::FramePresentedInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.frame_presented_info),
495 ),
496 encoder, offset, _depth
497 )
498 }
499 }
500 unsafe impl<
501 D: fidl::encoding::ResourceDialect,
502 T0: fidl::encoding::Encode<fidl_fuchsia_scenic_scheduling::FramePresentedInfo, D>,
503 > fidl::encoding::Encode<SessionOnFramePresentedRequest, D> for (T0,)
504 {
505 #[inline]
506 unsafe fn encode(
507 self,
508 encoder: &mut fidl::encoding::Encoder<'_, D>,
509 offset: usize,
510 depth: fidl::encoding::Depth,
511 ) -> fidl::Result<()> {
512 encoder.debug_check_bounds::<SessionOnFramePresentedRequest>(offset);
513 self.0.encode(encoder, offset + 0, depth)?;
517 Ok(())
518 }
519 }
520
521 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
522 for SessionOnFramePresentedRequest
523 {
524 #[inline(always)]
525 fn new_empty() -> Self {
526 Self {
527 frame_presented_info: fidl::new_empty!(
528 fidl_fuchsia_scenic_scheduling::FramePresentedInfo,
529 D
530 ),
531 }
532 }
533
534 #[inline]
535 unsafe fn decode(
536 &mut self,
537 decoder: &mut fidl::encoding::Decoder<'_, D>,
538 offset: usize,
539 _depth: fidl::encoding::Depth,
540 ) -> fidl::Result<()> {
541 decoder.debug_check_bounds::<Self>(offset);
542 fidl::decode!(
544 fidl_fuchsia_scenic_scheduling::FramePresentedInfo,
545 D,
546 &mut self.frame_presented_info,
547 decoder,
548 offset + 0,
549 _depth
550 )?;
551 Ok(())
552 }
553 }
554
555 impl fidl::encoding::ValueTypeMarker for SessionPresent2Response {
556 type Borrowed<'a> = &'a Self;
557 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
558 value
559 }
560 }
561
562 unsafe impl fidl::encoding::TypeMarker for SessionPresent2Response {
563 type Owned = Self;
564
565 #[inline(always)]
566 fn inline_align(_context: fidl::encoding::Context) -> usize {
567 8
568 }
569
570 #[inline(always)]
571 fn inline_size(_context: fidl::encoding::Context) -> usize {
572 24
573 }
574 }
575
576 unsafe impl<D: fidl::encoding::ResourceDialect>
577 fidl::encoding::Encode<SessionPresent2Response, D> for &SessionPresent2Response
578 {
579 #[inline]
580 unsafe fn encode(
581 self,
582 encoder: &mut fidl::encoding::Encoder<'_, D>,
583 offset: usize,
584 _depth: fidl::encoding::Depth,
585 ) -> fidl::Result<()> {
586 encoder.debug_check_bounds::<SessionPresent2Response>(offset);
587 fidl::encoding::Encode::<SessionPresent2Response, D>::encode(
589 (
590 <fidl_fuchsia_scenic_scheduling::FuturePresentationTimes as fidl::encoding::ValueTypeMarker>::borrow(&self.request_presentation_times_info),
591 ),
592 encoder, offset, _depth
593 )
594 }
595 }
596 unsafe impl<
597 D: fidl::encoding::ResourceDialect,
598 T0: fidl::encoding::Encode<fidl_fuchsia_scenic_scheduling::FuturePresentationTimes, D>,
599 > fidl::encoding::Encode<SessionPresent2Response, D> for (T0,)
600 {
601 #[inline]
602 unsafe fn encode(
603 self,
604 encoder: &mut fidl::encoding::Encoder<'_, D>,
605 offset: usize,
606 depth: fidl::encoding::Depth,
607 ) -> fidl::Result<()> {
608 encoder.debug_check_bounds::<SessionPresent2Response>(offset);
609 self.0.encode(encoder, offset + 0, depth)?;
613 Ok(())
614 }
615 }
616
617 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
618 for SessionPresent2Response
619 {
620 #[inline(always)]
621 fn new_empty() -> Self {
622 Self {
623 request_presentation_times_info: fidl::new_empty!(
624 fidl_fuchsia_scenic_scheduling::FuturePresentationTimes,
625 D
626 ),
627 }
628 }
629
630 #[inline]
631 unsafe fn decode(
632 &mut self,
633 decoder: &mut fidl::encoding::Decoder<'_, D>,
634 offset: usize,
635 _depth: fidl::encoding::Depth,
636 ) -> fidl::Result<()> {
637 decoder.debug_check_bounds::<Self>(offset);
638 fidl::decode!(
640 fidl_fuchsia_scenic_scheduling::FuturePresentationTimes,
641 D,
642 &mut self.request_presentation_times_info,
643 decoder,
644 offset + 0,
645 _depth
646 )?;
647 Ok(())
648 }
649 }
650
651 impl fidl::encoding::ValueTypeMarker for SessionPresentResponse {
652 type Borrowed<'a> = &'a Self;
653 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
654 value
655 }
656 }
657
658 unsafe impl fidl::encoding::TypeMarker for SessionPresentResponse {
659 type Owned = Self;
660
661 #[inline(always)]
662 fn inline_align(_context: fidl::encoding::Context) -> usize {
663 8
664 }
665
666 #[inline(always)]
667 fn inline_size(_context: fidl::encoding::Context) -> usize {
668 16
669 }
670 }
671
672 unsafe impl<D: fidl::encoding::ResourceDialect>
673 fidl::encoding::Encode<SessionPresentResponse, D> for &SessionPresentResponse
674 {
675 #[inline]
676 unsafe fn encode(
677 self,
678 encoder: &mut fidl::encoding::Encoder<'_, D>,
679 offset: usize,
680 _depth: fidl::encoding::Depth,
681 ) -> fidl::Result<()> {
682 encoder.debug_check_bounds::<SessionPresentResponse>(offset);
683 fidl::encoding::Encode::<SessionPresentResponse, D>::encode(
685 (
686 <fidl_fuchsia_images::PresentationInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.presentation_info),
687 ),
688 encoder, offset, _depth
689 )
690 }
691 }
692 unsafe impl<
693 D: fidl::encoding::ResourceDialect,
694 T0: fidl::encoding::Encode<fidl_fuchsia_images::PresentationInfo, D>,
695 > fidl::encoding::Encode<SessionPresentResponse, D> for (T0,)
696 {
697 #[inline]
698 unsafe fn encode(
699 self,
700 encoder: &mut fidl::encoding::Encoder<'_, D>,
701 offset: usize,
702 depth: fidl::encoding::Depth,
703 ) -> fidl::Result<()> {
704 encoder.debug_check_bounds::<SessionPresentResponse>(offset);
705 self.0.encode(encoder, offset + 0, depth)?;
709 Ok(())
710 }
711 }
712
713 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
714 for SessionPresentResponse
715 {
716 #[inline(always)]
717 fn new_empty() -> Self {
718 Self { presentation_info: fidl::new_empty!(fidl_fuchsia_images::PresentationInfo, D) }
719 }
720
721 #[inline]
722 unsafe fn decode(
723 &mut self,
724 decoder: &mut fidl::encoding::Decoder<'_, D>,
725 offset: usize,
726 _depth: fidl::encoding::Depth,
727 ) -> fidl::Result<()> {
728 decoder.debug_check_bounds::<Self>(offset);
729 fidl::decode!(
731 fidl_fuchsia_images::PresentationInfo,
732 D,
733 &mut self.presentation_info,
734 decoder,
735 offset + 0,
736 _depth
737 )?;
738 Ok(())
739 }
740 }
741
742 impl fidl::encoding::ValueTypeMarker for SessionRequestPresentationTimesRequest {
743 type Borrowed<'a> = &'a Self;
744 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
745 value
746 }
747 }
748
749 unsafe impl fidl::encoding::TypeMarker for SessionRequestPresentationTimesRequest {
750 type Owned = Self;
751
752 #[inline(always)]
753 fn inline_align(_context: fidl::encoding::Context) -> usize {
754 8
755 }
756
757 #[inline(always)]
758 fn inline_size(_context: fidl::encoding::Context) -> usize {
759 8
760 }
761 #[inline(always)]
762 fn encode_is_copy() -> bool {
763 true
764 }
765
766 #[inline(always)]
767 fn decode_is_copy() -> bool {
768 true
769 }
770 }
771
772 unsafe impl<D: fidl::encoding::ResourceDialect>
773 fidl::encoding::Encode<SessionRequestPresentationTimesRequest, D>
774 for &SessionRequestPresentationTimesRequest
775 {
776 #[inline]
777 unsafe fn encode(
778 self,
779 encoder: &mut fidl::encoding::Encoder<'_, D>,
780 offset: usize,
781 _depth: fidl::encoding::Depth,
782 ) -> fidl::Result<()> {
783 encoder.debug_check_bounds::<SessionRequestPresentationTimesRequest>(offset);
784 unsafe {
785 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
787 (buf_ptr as *mut SessionRequestPresentationTimesRequest).write_unaligned(
788 (self as *const SessionRequestPresentationTimesRequest).read(),
789 );
790 }
793 Ok(())
794 }
795 }
796 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<i64, D>>
797 fidl::encoding::Encode<SessionRequestPresentationTimesRequest, D> for (T0,)
798 {
799 #[inline]
800 unsafe fn encode(
801 self,
802 encoder: &mut fidl::encoding::Encoder<'_, D>,
803 offset: usize,
804 depth: fidl::encoding::Depth,
805 ) -> fidl::Result<()> {
806 encoder.debug_check_bounds::<SessionRequestPresentationTimesRequest>(offset);
807 self.0.encode(encoder, offset + 0, depth)?;
811 Ok(())
812 }
813 }
814
815 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
816 for SessionRequestPresentationTimesRequest
817 {
818 #[inline(always)]
819 fn new_empty() -> Self {
820 Self { requested_prediction_span: fidl::new_empty!(i64, D) }
821 }
822
823 #[inline]
824 unsafe fn decode(
825 &mut self,
826 decoder: &mut fidl::encoding::Decoder<'_, D>,
827 offset: usize,
828 _depth: fidl::encoding::Depth,
829 ) -> fidl::Result<()> {
830 decoder.debug_check_bounds::<Self>(offset);
831 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
832 unsafe {
835 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
836 }
837 Ok(())
838 }
839 }
840
841 impl fidl::encoding::ValueTypeMarker for SessionRequestPresentationTimesResponse {
842 type Borrowed<'a> = &'a Self;
843 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
844 value
845 }
846 }
847
848 unsafe impl fidl::encoding::TypeMarker for SessionRequestPresentationTimesResponse {
849 type Owned = Self;
850
851 #[inline(always)]
852 fn inline_align(_context: fidl::encoding::Context) -> usize {
853 8
854 }
855
856 #[inline(always)]
857 fn inline_size(_context: fidl::encoding::Context) -> usize {
858 24
859 }
860 }
861
862 unsafe impl<D: fidl::encoding::ResourceDialect>
863 fidl::encoding::Encode<SessionRequestPresentationTimesResponse, D>
864 for &SessionRequestPresentationTimesResponse
865 {
866 #[inline]
867 unsafe fn encode(
868 self,
869 encoder: &mut fidl::encoding::Encoder<'_, D>,
870 offset: usize,
871 _depth: fidl::encoding::Depth,
872 ) -> fidl::Result<()> {
873 encoder.debug_check_bounds::<SessionRequestPresentationTimesResponse>(offset);
874 fidl::encoding::Encode::<SessionRequestPresentationTimesResponse, D>::encode(
876 (
877 <fidl_fuchsia_scenic_scheduling::FuturePresentationTimes as fidl::encoding::ValueTypeMarker>::borrow(&self.request_presentation_times_info),
878 ),
879 encoder, offset, _depth
880 )
881 }
882 }
883 unsafe impl<
884 D: fidl::encoding::ResourceDialect,
885 T0: fidl::encoding::Encode<fidl_fuchsia_scenic_scheduling::FuturePresentationTimes, D>,
886 > fidl::encoding::Encode<SessionRequestPresentationTimesResponse, D> for (T0,)
887 {
888 #[inline]
889 unsafe fn encode(
890 self,
891 encoder: &mut fidl::encoding::Encoder<'_, D>,
892 offset: usize,
893 depth: fidl::encoding::Depth,
894 ) -> fidl::Result<()> {
895 encoder.debug_check_bounds::<SessionRequestPresentationTimesResponse>(offset);
896 self.0.encode(encoder, offset + 0, depth)?;
900 Ok(())
901 }
902 }
903
904 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
905 for SessionRequestPresentationTimesResponse
906 {
907 #[inline(always)]
908 fn new_empty() -> Self {
909 Self {
910 request_presentation_times_info: fidl::new_empty!(
911 fidl_fuchsia_scenic_scheduling::FuturePresentationTimes,
912 D
913 ),
914 }
915 }
916
917 #[inline]
918 unsafe fn decode(
919 &mut self,
920 decoder: &mut fidl::encoding::Decoder<'_, D>,
921 offset: usize,
922 _depth: fidl::encoding::Depth,
923 ) -> fidl::Result<()> {
924 decoder.debug_check_bounds::<Self>(offset);
925 fidl::decode!(
927 fidl_fuchsia_scenic_scheduling::FuturePresentationTimes,
928 D,
929 &mut self.request_presentation_times_info,
930 decoder,
931 offset + 0,
932 _depth
933 )?;
934 Ok(())
935 }
936 }
937
938 impl fidl::encoding::ValueTypeMarker for SessionSetDebugNameRequest {
939 type Borrowed<'a> = &'a Self;
940 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
941 value
942 }
943 }
944
945 unsafe impl fidl::encoding::TypeMarker for SessionSetDebugNameRequest {
946 type Owned = Self;
947
948 #[inline(always)]
949 fn inline_align(_context: fidl::encoding::Context) -> usize {
950 8
951 }
952
953 #[inline(always)]
954 fn inline_size(_context: fidl::encoding::Context) -> usize {
955 16
956 }
957 }
958
959 unsafe impl<D: fidl::encoding::ResourceDialect>
960 fidl::encoding::Encode<SessionSetDebugNameRequest, D> for &SessionSetDebugNameRequest
961 {
962 #[inline]
963 unsafe fn encode(
964 self,
965 encoder: &mut fidl::encoding::Encoder<'_, D>,
966 offset: usize,
967 _depth: fidl::encoding::Depth,
968 ) -> fidl::Result<()> {
969 encoder.debug_check_bounds::<SessionSetDebugNameRequest>(offset);
970 fidl::encoding::Encode::<SessionSetDebugNameRequest, D>::encode(
972 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
973 &self.debug_name,
974 ),),
975 encoder,
976 offset,
977 _depth,
978 )
979 }
980 }
981 unsafe impl<
982 D: fidl::encoding::ResourceDialect,
983 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
984 > fidl::encoding::Encode<SessionSetDebugNameRequest, D> for (T0,)
985 {
986 #[inline]
987 unsafe fn encode(
988 self,
989 encoder: &mut fidl::encoding::Encoder<'_, D>,
990 offset: usize,
991 depth: fidl::encoding::Depth,
992 ) -> fidl::Result<()> {
993 encoder.debug_check_bounds::<SessionSetDebugNameRequest>(offset);
994 self.0.encode(encoder, offset + 0, depth)?;
998 Ok(())
999 }
1000 }
1001
1002 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1003 for SessionSetDebugNameRequest
1004 {
1005 #[inline(always)]
1006 fn new_empty() -> Self {
1007 Self { debug_name: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
1008 }
1009
1010 #[inline]
1011 unsafe fn decode(
1012 &mut self,
1013 decoder: &mut fidl::encoding::Decoder<'_, D>,
1014 offset: usize,
1015 _depth: fidl::encoding::Depth,
1016 ) -> fidl::Result<()> {
1017 decoder.debug_check_bounds::<Self>(offset);
1018 fidl::decode!(
1020 fidl::encoding::UnboundedString,
1021 D,
1022 &mut self.debug_name,
1023 decoder,
1024 offset + 0,
1025 _depth
1026 )?;
1027 Ok(())
1028 }
1029 }
1030}