1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10pub use fidl_fuchsia_ui_test_scene_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct ControllerRegisterViewTreeWatcherRequest {
16 pub watcher:
17 fidl::endpoints::ServerEnd<fidl_fuchsia_ui_observation_geometry::ViewTreeWatcherMarker>,
18}
19
20impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
21 for ControllerRegisterViewTreeWatcherRequest
22{
23}
24
25#[derive(Debug, Default, PartialEq)]
26pub struct ControllerAttachClientViewRequest {
27 pub view_provider: Option<fidl::endpoints::ClientEnd<fidl_fuchsia_ui_app::ViewProviderMarker>>,
28 #[doc(hidden)]
29 pub __source_breaking: fidl::marker::SourceBreaking,
30}
31
32impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
33 for ControllerAttachClientViewRequest
34{
35}
36
37#[derive(Debug, Default, PartialEq)]
38pub struct ControllerPresentClientViewRequest {
39 pub viewport_creation_token: Option<fidl_fuchsia_ui_views::ViewportCreationToken>,
40 #[doc(hidden)]
41 pub __source_breaking: fidl::marker::SourceBreaking,
42}
43
44impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
45 for ControllerPresentClientViewRequest
46{
47}
48
49#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
50pub struct ControllerMarker;
51
52impl fidl::endpoints::ProtocolMarker for ControllerMarker {
53 type Proxy = ControllerProxy;
54 type RequestStream = ControllerRequestStream;
55 #[cfg(target_os = "fuchsia")]
56 type SynchronousProxy = ControllerSynchronousProxy;
57
58 const DEBUG_NAME: &'static str = "fuchsia.ui.test.scene.Controller";
59}
60impl fidl::endpoints::DiscoverableProtocolMarker for ControllerMarker {}
61
62pub trait ControllerProxyInterface: Send + Sync {
63 type AttachClientViewResponseFut: std::future::Future<Output = Result<u64, fidl::Error>> + Send;
64 fn r#attach_client_view(
65 &self,
66 payload: ControllerAttachClientViewRequest,
67 ) -> Self::AttachClientViewResponseFut;
68 fn r#present_client_view(
69 &self,
70 payload: ControllerPresentClientViewRequest,
71 ) -> Result<(), fidl::Error>;
72 type RegisterViewTreeWatcherResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
73 + Send;
74 fn r#register_view_tree_watcher(
75 &self,
76 watcher: fidl::endpoints::ServerEnd<
77 fidl_fuchsia_ui_observation_geometry::ViewTreeWatcherMarker,
78 >,
79 ) -> Self::RegisterViewTreeWatcherResponseFut;
80 type WatchViewPresentationResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
81 + Send;
82 fn r#watch_view_presentation(&self) -> Self::WatchViewPresentationResponseFut;
83}
84#[derive(Debug)]
85#[cfg(target_os = "fuchsia")]
86pub struct ControllerSynchronousProxy {
87 client: fidl::client::sync::Client,
88}
89
90#[cfg(target_os = "fuchsia")]
91impl fidl::endpoints::SynchronousProxy for ControllerSynchronousProxy {
92 type Proxy = ControllerProxy;
93 type Protocol = ControllerMarker;
94
95 fn from_channel(inner: fidl::Channel) -> Self {
96 Self::new(inner)
97 }
98
99 fn into_channel(self) -> fidl::Channel {
100 self.client.into_channel()
101 }
102
103 fn as_channel(&self) -> &fidl::Channel {
104 self.client.as_channel()
105 }
106}
107
108#[cfg(target_os = "fuchsia")]
109impl ControllerSynchronousProxy {
110 pub fn new(channel: fidl::Channel) -> Self {
111 let protocol_name = <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
112 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
113 }
114
115 pub fn into_channel(self) -> fidl::Channel {
116 self.client.into_channel()
117 }
118
119 pub fn wait_for_event(
122 &self,
123 deadline: zx::MonotonicInstant,
124 ) -> Result<ControllerEvent, fidl::Error> {
125 ControllerEvent::decode(self.client.wait_for_event(deadline)?)
126 }
127
128 pub fn r#attach_client_view(
152 &self,
153 mut payload: ControllerAttachClientViewRequest,
154 ___deadline: zx::MonotonicInstant,
155 ) -> Result<u64, fidl::Error> {
156 let _response = self
157 .client
158 .send_query::<ControllerAttachClientViewRequest, ControllerAttachClientViewResponse>(
159 &mut payload,
160 0x271d621cc0687761,
161 fidl::encoding::DynamicFlags::empty(),
162 ___deadline,
163 )?;
164 Ok(_response.view_ref_koid)
165 }
166
167 pub fn r#present_client_view(
174 &self,
175 mut payload: ControllerPresentClientViewRequest,
176 ) -> Result<(), fidl::Error> {
177 self.client.send::<ControllerPresentClientViewRequest>(
178 &mut payload,
179 0x50b3378ecc810ca9,
180 fidl::encoding::DynamicFlags::empty(),
181 )
182 }
183
184 pub fn r#register_view_tree_watcher(
193 &self,
194 mut watcher: fidl::endpoints::ServerEnd<
195 fidl_fuchsia_ui_observation_geometry::ViewTreeWatcherMarker,
196 >,
197 ___deadline: zx::MonotonicInstant,
198 ) -> Result<(), fidl::Error> {
199 let _response = self
200 .client
201 .send_query::<ControllerRegisterViewTreeWatcherRequest, fidl::encoding::EmptyPayload>(
202 (watcher,),
203 0x1370345f4914064,
204 fidl::encoding::DynamicFlags::empty(),
205 ___deadline,
206 )?;
207 Ok(_response)
208 }
209
210 pub fn r#watch_view_presentation(
230 &self,
231 ___deadline: zx::MonotonicInstant,
232 ) -> Result<(), fidl::Error> {
233 let _response =
234 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::EmptyPayload>(
235 (),
236 0x15439375bfe6d21d,
237 fidl::encoding::DynamicFlags::empty(),
238 ___deadline,
239 )?;
240 Ok(_response)
241 }
242}
243
244#[cfg(target_os = "fuchsia")]
245impl From<ControllerSynchronousProxy> for zx::Handle {
246 fn from(value: ControllerSynchronousProxy) -> Self {
247 value.into_channel().into()
248 }
249}
250
251#[cfg(target_os = "fuchsia")]
252impl From<fidl::Channel> for ControllerSynchronousProxy {
253 fn from(value: fidl::Channel) -> Self {
254 Self::new(value)
255 }
256}
257
258#[derive(Debug, Clone)]
259pub struct ControllerProxy {
260 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
261}
262
263impl fidl::endpoints::Proxy for ControllerProxy {
264 type Protocol = ControllerMarker;
265
266 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
267 Self::new(inner)
268 }
269
270 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
271 self.client.into_channel().map_err(|client| Self { client })
272 }
273
274 fn as_channel(&self) -> &::fidl::AsyncChannel {
275 self.client.as_channel()
276 }
277}
278
279impl ControllerProxy {
280 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
282 let protocol_name = <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
283 Self { client: fidl::client::Client::new(channel, protocol_name) }
284 }
285
286 pub fn take_event_stream(&self) -> ControllerEventStream {
292 ControllerEventStream { event_receiver: self.client.take_event_receiver() }
293 }
294
295 pub fn r#attach_client_view(
319 &self,
320 mut payload: ControllerAttachClientViewRequest,
321 ) -> fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect> {
322 ControllerProxyInterface::r#attach_client_view(self, payload)
323 }
324
325 pub fn r#present_client_view(
332 &self,
333 mut payload: ControllerPresentClientViewRequest,
334 ) -> Result<(), fidl::Error> {
335 ControllerProxyInterface::r#present_client_view(self, payload)
336 }
337
338 pub fn r#register_view_tree_watcher(
347 &self,
348 mut watcher: fidl::endpoints::ServerEnd<
349 fidl_fuchsia_ui_observation_geometry::ViewTreeWatcherMarker,
350 >,
351 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
352 ControllerProxyInterface::r#register_view_tree_watcher(self, watcher)
353 }
354
355 pub fn r#watch_view_presentation(
375 &self,
376 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
377 ControllerProxyInterface::r#watch_view_presentation(self)
378 }
379}
380
381impl ControllerProxyInterface for ControllerProxy {
382 type AttachClientViewResponseFut =
383 fidl::client::QueryResponseFut<u64, fidl::encoding::DefaultFuchsiaResourceDialect>;
384 fn r#attach_client_view(
385 &self,
386 mut payload: ControllerAttachClientViewRequest,
387 ) -> Self::AttachClientViewResponseFut {
388 fn _decode(
389 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
390 ) -> Result<u64, fidl::Error> {
391 let _response = fidl::client::decode_transaction_body::<
392 ControllerAttachClientViewResponse,
393 fidl::encoding::DefaultFuchsiaResourceDialect,
394 0x271d621cc0687761,
395 >(_buf?)?;
396 Ok(_response.view_ref_koid)
397 }
398 self.client.send_query_and_decode::<ControllerAttachClientViewRequest, u64>(
399 &mut payload,
400 0x271d621cc0687761,
401 fidl::encoding::DynamicFlags::empty(),
402 _decode,
403 )
404 }
405
406 fn r#present_client_view(
407 &self,
408 mut payload: ControllerPresentClientViewRequest,
409 ) -> Result<(), fidl::Error> {
410 self.client.send::<ControllerPresentClientViewRequest>(
411 &mut payload,
412 0x50b3378ecc810ca9,
413 fidl::encoding::DynamicFlags::empty(),
414 )
415 }
416
417 type RegisterViewTreeWatcherResponseFut =
418 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
419 fn r#register_view_tree_watcher(
420 &self,
421 mut watcher: fidl::endpoints::ServerEnd<
422 fidl_fuchsia_ui_observation_geometry::ViewTreeWatcherMarker,
423 >,
424 ) -> Self::RegisterViewTreeWatcherResponseFut {
425 fn _decode(
426 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
427 ) -> Result<(), fidl::Error> {
428 let _response = fidl::client::decode_transaction_body::<
429 fidl::encoding::EmptyPayload,
430 fidl::encoding::DefaultFuchsiaResourceDialect,
431 0x1370345f4914064,
432 >(_buf?)?;
433 Ok(_response)
434 }
435 self.client.send_query_and_decode::<ControllerRegisterViewTreeWatcherRequest, ()>(
436 (watcher,),
437 0x1370345f4914064,
438 fidl::encoding::DynamicFlags::empty(),
439 _decode,
440 )
441 }
442
443 type WatchViewPresentationResponseFut =
444 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
445 fn r#watch_view_presentation(&self) -> Self::WatchViewPresentationResponseFut {
446 fn _decode(
447 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
448 ) -> Result<(), fidl::Error> {
449 let _response = fidl::client::decode_transaction_body::<
450 fidl::encoding::EmptyPayload,
451 fidl::encoding::DefaultFuchsiaResourceDialect,
452 0x15439375bfe6d21d,
453 >(_buf?)?;
454 Ok(_response)
455 }
456 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ()>(
457 (),
458 0x15439375bfe6d21d,
459 fidl::encoding::DynamicFlags::empty(),
460 _decode,
461 )
462 }
463}
464
465pub struct ControllerEventStream {
466 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
467}
468
469impl std::marker::Unpin for ControllerEventStream {}
470
471impl futures::stream::FusedStream for ControllerEventStream {
472 fn is_terminated(&self) -> bool {
473 self.event_receiver.is_terminated()
474 }
475}
476
477impl futures::Stream for ControllerEventStream {
478 type Item = Result<ControllerEvent, fidl::Error>;
479
480 fn poll_next(
481 mut self: std::pin::Pin<&mut Self>,
482 cx: &mut std::task::Context<'_>,
483 ) -> std::task::Poll<Option<Self::Item>> {
484 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
485 &mut self.event_receiver,
486 cx
487 )?) {
488 Some(buf) => std::task::Poll::Ready(Some(ControllerEvent::decode(buf))),
489 None => std::task::Poll::Ready(None),
490 }
491 }
492}
493
494#[derive(Debug)]
495pub enum ControllerEvent {}
496
497impl ControllerEvent {
498 fn decode(
500 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
501 ) -> Result<ControllerEvent, fidl::Error> {
502 let (bytes, _handles) = buf.split_mut();
503 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
504 debug_assert_eq!(tx_header.tx_id, 0);
505 match tx_header.ordinal {
506 _ => Err(fidl::Error::UnknownOrdinal {
507 ordinal: tx_header.ordinal,
508 protocol_name: <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
509 }),
510 }
511 }
512}
513
514pub struct ControllerRequestStream {
516 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
517 is_terminated: bool,
518}
519
520impl std::marker::Unpin for ControllerRequestStream {}
521
522impl futures::stream::FusedStream for ControllerRequestStream {
523 fn is_terminated(&self) -> bool {
524 self.is_terminated
525 }
526}
527
528impl fidl::endpoints::RequestStream for ControllerRequestStream {
529 type Protocol = ControllerMarker;
530 type ControlHandle = ControllerControlHandle;
531
532 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
533 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
534 }
535
536 fn control_handle(&self) -> Self::ControlHandle {
537 ControllerControlHandle { inner: self.inner.clone() }
538 }
539
540 fn into_inner(
541 self,
542 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
543 {
544 (self.inner, self.is_terminated)
545 }
546
547 fn from_inner(
548 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
549 is_terminated: bool,
550 ) -> Self {
551 Self { inner, is_terminated }
552 }
553}
554
555impl futures::Stream for ControllerRequestStream {
556 type Item = Result<ControllerRequest, fidl::Error>;
557
558 fn poll_next(
559 mut self: std::pin::Pin<&mut Self>,
560 cx: &mut std::task::Context<'_>,
561 ) -> std::task::Poll<Option<Self::Item>> {
562 let this = &mut *self;
563 if this.inner.check_shutdown(cx) {
564 this.is_terminated = true;
565 return std::task::Poll::Ready(None);
566 }
567 if this.is_terminated {
568 panic!("polled ControllerRequestStream after completion");
569 }
570 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
571 |bytes, handles| {
572 match this.inner.channel().read_etc(cx, bytes, handles) {
573 std::task::Poll::Ready(Ok(())) => {}
574 std::task::Poll::Pending => return std::task::Poll::Pending,
575 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
576 this.is_terminated = true;
577 return std::task::Poll::Ready(None);
578 }
579 std::task::Poll::Ready(Err(e)) => {
580 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
581 e.into(),
582 ))))
583 }
584 }
585
586 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
588
589 std::task::Poll::Ready(Some(match header.ordinal {
590 0x271d621cc0687761 => {
591 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
592 let mut req = fidl::new_empty!(
593 ControllerAttachClientViewRequest,
594 fidl::encoding::DefaultFuchsiaResourceDialect
595 );
596 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerAttachClientViewRequest>(&header, _body_bytes, handles, &mut req)?;
597 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
598 Ok(ControllerRequest::AttachClientView {
599 payload: req,
600 responder: ControllerAttachClientViewResponder {
601 control_handle: std::mem::ManuallyDrop::new(control_handle),
602 tx_id: header.tx_id,
603 },
604 })
605 }
606 0x50b3378ecc810ca9 => {
607 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
608 let mut req = fidl::new_empty!(
609 ControllerPresentClientViewRequest,
610 fidl::encoding::DefaultFuchsiaResourceDialect
611 );
612 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerPresentClientViewRequest>(&header, _body_bytes, handles, &mut req)?;
613 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
614 Ok(ControllerRequest::PresentClientView { payload: req, control_handle })
615 }
616 0x1370345f4914064 => {
617 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
618 let mut req = fidl::new_empty!(
619 ControllerRegisterViewTreeWatcherRequest,
620 fidl::encoding::DefaultFuchsiaResourceDialect
621 );
622 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerRegisterViewTreeWatcherRequest>(&header, _body_bytes, handles, &mut req)?;
623 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
624 Ok(ControllerRequest::RegisterViewTreeWatcher {
625 watcher: req.watcher,
626
627 responder: ControllerRegisterViewTreeWatcherResponder {
628 control_handle: std::mem::ManuallyDrop::new(control_handle),
629 tx_id: header.tx_id,
630 },
631 })
632 }
633 0x15439375bfe6d21d => {
634 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
635 let mut req = fidl::new_empty!(
636 fidl::encoding::EmptyPayload,
637 fidl::encoding::DefaultFuchsiaResourceDialect
638 );
639 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
640 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
641 Ok(ControllerRequest::WatchViewPresentation {
642 responder: ControllerWatchViewPresentationResponder {
643 control_handle: std::mem::ManuallyDrop::new(control_handle),
644 tx_id: header.tx_id,
645 },
646 })
647 }
648 _ => Err(fidl::Error::UnknownOrdinal {
649 ordinal: header.ordinal,
650 protocol_name:
651 <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
652 }),
653 }))
654 },
655 )
656 }
657}
658
659#[derive(Debug)]
662pub enum ControllerRequest {
663 AttachClientView {
687 payload: ControllerAttachClientViewRequest,
688 responder: ControllerAttachClientViewResponder,
689 },
690 PresentClientView {
697 payload: ControllerPresentClientViewRequest,
698 control_handle: ControllerControlHandle,
699 },
700 RegisterViewTreeWatcher {
709 watcher:
710 fidl::endpoints::ServerEnd<fidl_fuchsia_ui_observation_geometry::ViewTreeWatcherMarker>,
711 responder: ControllerRegisterViewTreeWatcherResponder,
712 },
713 WatchViewPresentation { responder: ControllerWatchViewPresentationResponder },
733}
734
735impl ControllerRequest {
736 #[allow(irrefutable_let_patterns)]
737 pub fn into_attach_client_view(
738 self,
739 ) -> Option<(ControllerAttachClientViewRequest, ControllerAttachClientViewResponder)> {
740 if let ControllerRequest::AttachClientView { payload, responder } = self {
741 Some((payload, responder))
742 } else {
743 None
744 }
745 }
746
747 #[allow(irrefutable_let_patterns)]
748 pub fn into_present_client_view(
749 self,
750 ) -> Option<(ControllerPresentClientViewRequest, ControllerControlHandle)> {
751 if let ControllerRequest::PresentClientView { payload, control_handle } = self {
752 Some((payload, control_handle))
753 } else {
754 None
755 }
756 }
757
758 #[allow(irrefutable_let_patterns)]
759 pub fn into_register_view_tree_watcher(
760 self,
761 ) -> Option<(
762 fidl::endpoints::ServerEnd<fidl_fuchsia_ui_observation_geometry::ViewTreeWatcherMarker>,
763 ControllerRegisterViewTreeWatcherResponder,
764 )> {
765 if let ControllerRequest::RegisterViewTreeWatcher { watcher, responder } = self {
766 Some((watcher, responder))
767 } else {
768 None
769 }
770 }
771
772 #[allow(irrefutable_let_patterns)]
773 pub fn into_watch_view_presentation(
774 self,
775 ) -> Option<(ControllerWatchViewPresentationResponder)> {
776 if let ControllerRequest::WatchViewPresentation { responder } = self {
777 Some((responder))
778 } else {
779 None
780 }
781 }
782
783 pub fn method_name(&self) -> &'static str {
785 match *self {
786 ControllerRequest::AttachClientView { .. } => "attach_client_view",
787 ControllerRequest::PresentClientView { .. } => "present_client_view",
788 ControllerRequest::RegisterViewTreeWatcher { .. } => "register_view_tree_watcher",
789 ControllerRequest::WatchViewPresentation { .. } => "watch_view_presentation",
790 }
791 }
792}
793
794#[derive(Debug, Clone)]
795pub struct ControllerControlHandle {
796 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
797}
798
799impl fidl::endpoints::ControlHandle for ControllerControlHandle {
800 fn shutdown(&self) {
801 self.inner.shutdown()
802 }
803 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
804 self.inner.shutdown_with_epitaph(status)
805 }
806
807 fn is_closed(&self) -> bool {
808 self.inner.channel().is_closed()
809 }
810 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
811 self.inner.channel().on_closed()
812 }
813
814 #[cfg(target_os = "fuchsia")]
815 fn signal_peer(
816 &self,
817 clear_mask: zx::Signals,
818 set_mask: zx::Signals,
819 ) -> Result<(), zx_status::Status> {
820 use fidl::Peered;
821 self.inner.channel().signal_peer(clear_mask, set_mask)
822 }
823}
824
825impl ControllerControlHandle {}
826
827#[must_use = "FIDL methods require a response to be sent"]
828#[derive(Debug)]
829pub struct ControllerAttachClientViewResponder {
830 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
831 tx_id: u32,
832}
833
834impl std::ops::Drop for ControllerAttachClientViewResponder {
838 fn drop(&mut self) {
839 self.control_handle.shutdown();
840 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
842 }
843}
844
845impl fidl::endpoints::Responder for ControllerAttachClientViewResponder {
846 type ControlHandle = ControllerControlHandle;
847
848 fn control_handle(&self) -> &ControllerControlHandle {
849 &self.control_handle
850 }
851
852 fn drop_without_shutdown(mut self) {
853 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
855 std::mem::forget(self);
857 }
858}
859
860impl ControllerAttachClientViewResponder {
861 pub fn send(self, mut view_ref_koid: u64) -> Result<(), fidl::Error> {
865 let _result = self.send_raw(view_ref_koid);
866 if _result.is_err() {
867 self.control_handle.shutdown();
868 }
869 self.drop_without_shutdown();
870 _result
871 }
872
873 pub fn send_no_shutdown_on_err(self, mut view_ref_koid: u64) -> Result<(), fidl::Error> {
875 let _result = self.send_raw(view_ref_koid);
876 self.drop_without_shutdown();
877 _result
878 }
879
880 fn send_raw(&self, mut view_ref_koid: u64) -> Result<(), fidl::Error> {
881 self.control_handle.inner.send::<ControllerAttachClientViewResponse>(
882 (view_ref_koid,),
883 self.tx_id,
884 0x271d621cc0687761,
885 fidl::encoding::DynamicFlags::empty(),
886 )
887 }
888}
889
890#[must_use = "FIDL methods require a response to be sent"]
891#[derive(Debug)]
892pub struct ControllerRegisterViewTreeWatcherResponder {
893 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
894 tx_id: u32,
895}
896
897impl std::ops::Drop for ControllerRegisterViewTreeWatcherResponder {
901 fn drop(&mut self) {
902 self.control_handle.shutdown();
903 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
905 }
906}
907
908impl fidl::endpoints::Responder for ControllerRegisterViewTreeWatcherResponder {
909 type ControlHandle = ControllerControlHandle;
910
911 fn control_handle(&self) -> &ControllerControlHandle {
912 &self.control_handle
913 }
914
915 fn drop_without_shutdown(mut self) {
916 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
918 std::mem::forget(self);
920 }
921}
922
923impl ControllerRegisterViewTreeWatcherResponder {
924 pub fn send(self) -> Result<(), fidl::Error> {
928 let _result = self.send_raw();
929 if _result.is_err() {
930 self.control_handle.shutdown();
931 }
932 self.drop_without_shutdown();
933 _result
934 }
935
936 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
938 let _result = self.send_raw();
939 self.drop_without_shutdown();
940 _result
941 }
942
943 fn send_raw(&self) -> Result<(), fidl::Error> {
944 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
945 (),
946 self.tx_id,
947 0x1370345f4914064,
948 fidl::encoding::DynamicFlags::empty(),
949 )
950 }
951}
952
953#[must_use = "FIDL methods require a response to be sent"]
954#[derive(Debug)]
955pub struct ControllerWatchViewPresentationResponder {
956 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
957 tx_id: u32,
958}
959
960impl std::ops::Drop for ControllerWatchViewPresentationResponder {
964 fn drop(&mut self) {
965 self.control_handle.shutdown();
966 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
968 }
969}
970
971impl fidl::endpoints::Responder for ControllerWatchViewPresentationResponder {
972 type ControlHandle = ControllerControlHandle;
973
974 fn control_handle(&self) -> &ControllerControlHandle {
975 &self.control_handle
976 }
977
978 fn drop_without_shutdown(mut self) {
979 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
981 std::mem::forget(self);
983 }
984}
985
986impl ControllerWatchViewPresentationResponder {
987 pub fn send(self) -> Result<(), fidl::Error> {
991 let _result = self.send_raw();
992 if _result.is_err() {
993 self.control_handle.shutdown();
994 }
995 self.drop_without_shutdown();
996 _result
997 }
998
999 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
1001 let _result = self.send_raw();
1002 self.drop_without_shutdown();
1003 _result
1004 }
1005
1006 fn send_raw(&self) -> Result<(), fidl::Error> {
1007 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
1008 (),
1009 self.tx_id,
1010 0x15439375bfe6d21d,
1011 fidl::encoding::DynamicFlags::empty(),
1012 )
1013 }
1014}
1015
1016mod internal {
1017 use super::*;
1018
1019 impl fidl::encoding::ResourceTypeMarker for ControllerRegisterViewTreeWatcherRequest {
1020 type Borrowed<'a> = &'a mut Self;
1021 fn take_or_borrow<'a>(
1022 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1023 ) -> Self::Borrowed<'a> {
1024 value
1025 }
1026 }
1027
1028 unsafe impl fidl::encoding::TypeMarker for ControllerRegisterViewTreeWatcherRequest {
1029 type Owned = Self;
1030
1031 #[inline(always)]
1032 fn inline_align(_context: fidl::encoding::Context) -> usize {
1033 4
1034 }
1035
1036 #[inline(always)]
1037 fn inline_size(_context: fidl::encoding::Context) -> usize {
1038 4
1039 }
1040 }
1041
1042 unsafe impl
1043 fidl::encoding::Encode<
1044 ControllerRegisterViewTreeWatcherRequest,
1045 fidl::encoding::DefaultFuchsiaResourceDialect,
1046 > for &mut ControllerRegisterViewTreeWatcherRequest
1047 {
1048 #[inline]
1049 unsafe fn encode(
1050 self,
1051 encoder: &mut fidl::encoding::Encoder<
1052 '_,
1053 fidl::encoding::DefaultFuchsiaResourceDialect,
1054 >,
1055 offset: usize,
1056 _depth: fidl::encoding::Depth,
1057 ) -> fidl::Result<()> {
1058 encoder.debug_check_bounds::<ControllerRegisterViewTreeWatcherRequest>(offset);
1059 fidl::encoding::Encode::<
1061 ControllerRegisterViewTreeWatcherRequest,
1062 fidl::encoding::DefaultFuchsiaResourceDialect,
1063 >::encode(
1064 (<fidl::encoding::Endpoint<
1065 fidl::endpoints::ServerEnd<
1066 fidl_fuchsia_ui_observation_geometry::ViewTreeWatcherMarker,
1067 >,
1068 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
1069 &mut self.watcher
1070 ),),
1071 encoder,
1072 offset,
1073 _depth,
1074 )
1075 }
1076 }
1077 unsafe impl<
1078 T0: fidl::encoding::Encode<
1079 fidl::encoding::Endpoint<
1080 fidl::endpoints::ServerEnd<
1081 fidl_fuchsia_ui_observation_geometry::ViewTreeWatcherMarker,
1082 >,
1083 >,
1084 fidl::encoding::DefaultFuchsiaResourceDialect,
1085 >,
1086 >
1087 fidl::encoding::Encode<
1088 ControllerRegisterViewTreeWatcherRequest,
1089 fidl::encoding::DefaultFuchsiaResourceDialect,
1090 > for (T0,)
1091 {
1092 #[inline]
1093 unsafe fn encode(
1094 self,
1095 encoder: &mut fidl::encoding::Encoder<
1096 '_,
1097 fidl::encoding::DefaultFuchsiaResourceDialect,
1098 >,
1099 offset: usize,
1100 depth: fidl::encoding::Depth,
1101 ) -> fidl::Result<()> {
1102 encoder.debug_check_bounds::<ControllerRegisterViewTreeWatcherRequest>(offset);
1103 self.0.encode(encoder, offset + 0, depth)?;
1107 Ok(())
1108 }
1109 }
1110
1111 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1112 for ControllerRegisterViewTreeWatcherRequest
1113 {
1114 #[inline(always)]
1115 fn new_empty() -> Self {
1116 Self {
1117 watcher: fidl::new_empty!(
1118 fidl::encoding::Endpoint<
1119 fidl::endpoints::ServerEnd<
1120 fidl_fuchsia_ui_observation_geometry::ViewTreeWatcherMarker,
1121 >,
1122 >,
1123 fidl::encoding::DefaultFuchsiaResourceDialect
1124 ),
1125 }
1126 }
1127
1128 #[inline]
1129 unsafe fn decode(
1130 &mut self,
1131 decoder: &mut fidl::encoding::Decoder<
1132 '_,
1133 fidl::encoding::DefaultFuchsiaResourceDialect,
1134 >,
1135 offset: usize,
1136 _depth: fidl::encoding::Depth,
1137 ) -> fidl::Result<()> {
1138 decoder.debug_check_bounds::<Self>(offset);
1139 fidl::decode!(
1141 fidl::encoding::Endpoint<
1142 fidl::endpoints::ServerEnd<
1143 fidl_fuchsia_ui_observation_geometry::ViewTreeWatcherMarker,
1144 >,
1145 >,
1146 fidl::encoding::DefaultFuchsiaResourceDialect,
1147 &mut self.watcher,
1148 decoder,
1149 offset + 0,
1150 _depth
1151 )?;
1152 Ok(())
1153 }
1154 }
1155
1156 impl ControllerAttachClientViewRequest {
1157 #[inline(always)]
1158 fn max_ordinal_present(&self) -> u64 {
1159 if let Some(_) = self.view_provider {
1160 return 1;
1161 }
1162 0
1163 }
1164 }
1165
1166 impl fidl::encoding::ResourceTypeMarker for ControllerAttachClientViewRequest {
1167 type Borrowed<'a> = &'a mut Self;
1168 fn take_or_borrow<'a>(
1169 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1170 ) -> Self::Borrowed<'a> {
1171 value
1172 }
1173 }
1174
1175 unsafe impl fidl::encoding::TypeMarker for ControllerAttachClientViewRequest {
1176 type Owned = Self;
1177
1178 #[inline(always)]
1179 fn inline_align(_context: fidl::encoding::Context) -> usize {
1180 8
1181 }
1182
1183 #[inline(always)]
1184 fn inline_size(_context: fidl::encoding::Context) -> usize {
1185 16
1186 }
1187 }
1188
1189 unsafe impl
1190 fidl::encoding::Encode<
1191 ControllerAttachClientViewRequest,
1192 fidl::encoding::DefaultFuchsiaResourceDialect,
1193 > for &mut ControllerAttachClientViewRequest
1194 {
1195 unsafe fn encode(
1196 self,
1197 encoder: &mut fidl::encoding::Encoder<
1198 '_,
1199 fidl::encoding::DefaultFuchsiaResourceDialect,
1200 >,
1201 offset: usize,
1202 mut depth: fidl::encoding::Depth,
1203 ) -> fidl::Result<()> {
1204 encoder.debug_check_bounds::<ControllerAttachClientViewRequest>(offset);
1205 let max_ordinal: u64 = self.max_ordinal_present();
1207 encoder.write_num(max_ordinal, offset);
1208 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
1209 if max_ordinal == 0 {
1211 return Ok(());
1212 }
1213 depth.increment()?;
1214 let envelope_size = 8;
1215 let bytes_len = max_ordinal as usize * envelope_size;
1216 #[allow(unused_variables)]
1217 let offset = encoder.out_of_line_offset(bytes_len);
1218 let mut _prev_end_offset: usize = 0;
1219 if 1 > max_ordinal {
1220 return Ok(());
1221 }
1222
1223 let cur_offset: usize = (1 - 1) * envelope_size;
1226
1227 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1229
1230 fidl::encoding::encode_in_envelope_optional::<
1235 fidl::encoding::Endpoint<
1236 fidl::endpoints::ClientEnd<fidl_fuchsia_ui_app::ViewProviderMarker>,
1237 >,
1238 fidl::encoding::DefaultFuchsiaResourceDialect,
1239 >(
1240 self.view_provider.as_mut().map(
1241 <fidl::encoding::Endpoint<
1242 fidl::endpoints::ClientEnd<fidl_fuchsia_ui_app::ViewProviderMarker>,
1243 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
1244 ),
1245 encoder,
1246 offset + cur_offset,
1247 depth,
1248 )?;
1249
1250 _prev_end_offset = cur_offset + envelope_size;
1251
1252 Ok(())
1253 }
1254 }
1255
1256 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1257 for ControllerAttachClientViewRequest
1258 {
1259 #[inline(always)]
1260 fn new_empty() -> Self {
1261 Self::default()
1262 }
1263
1264 unsafe fn decode(
1265 &mut self,
1266 decoder: &mut fidl::encoding::Decoder<
1267 '_,
1268 fidl::encoding::DefaultFuchsiaResourceDialect,
1269 >,
1270 offset: usize,
1271 mut depth: fidl::encoding::Depth,
1272 ) -> fidl::Result<()> {
1273 decoder.debug_check_bounds::<Self>(offset);
1274 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
1275 None => return Err(fidl::Error::NotNullable),
1276 Some(len) => len,
1277 };
1278 if len == 0 {
1280 return Ok(());
1281 };
1282 depth.increment()?;
1283 let envelope_size = 8;
1284 let bytes_len = len * envelope_size;
1285 let offset = decoder.out_of_line_offset(bytes_len)?;
1286 let mut _next_ordinal_to_read = 0;
1288 let mut next_offset = offset;
1289 let end_offset = offset + bytes_len;
1290 _next_ordinal_to_read += 1;
1291 if next_offset >= end_offset {
1292 return Ok(());
1293 }
1294
1295 while _next_ordinal_to_read < 1 {
1297 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1298 _next_ordinal_to_read += 1;
1299 next_offset += envelope_size;
1300 }
1301
1302 let next_out_of_line = decoder.next_out_of_line();
1303 let handles_before = decoder.remaining_handles();
1304 if let Some((inlined, num_bytes, num_handles)) =
1305 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1306 {
1307 let member_inline_size = <fidl::encoding::Endpoint<
1308 fidl::endpoints::ClientEnd<fidl_fuchsia_ui_app::ViewProviderMarker>,
1309 > as fidl::encoding::TypeMarker>::inline_size(
1310 decoder.context
1311 );
1312 if inlined != (member_inline_size <= 4) {
1313 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1314 }
1315 let inner_offset;
1316 let mut inner_depth = depth.clone();
1317 if inlined {
1318 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1319 inner_offset = next_offset;
1320 } else {
1321 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1322 inner_depth.increment()?;
1323 }
1324 let val_ref = self.view_provider.get_or_insert_with(|| {
1325 fidl::new_empty!(
1326 fidl::encoding::Endpoint<
1327 fidl::endpoints::ClientEnd<fidl_fuchsia_ui_app::ViewProviderMarker>,
1328 >,
1329 fidl::encoding::DefaultFuchsiaResourceDialect
1330 )
1331 });
1332 fidl::decode!(
1333 fidl::encoding::Endpoint<
1334 fidl::endpoints::ClientEnd<fidl_fuchsia_ui_app::ViewProviderMarker>,
1335 >,
1336 fidl::encoding::DefaultFuchsiaResourceDialect,
1337 val_ref,
1338 decoder,
1339 inner_offset,
1340 inner_depth
1341 )?;
1342 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1343 {
1344 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1345 }
1346 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1347 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1348 }
1349 }
1350
1351 next_offset += envelope_size;
1352
1353 while next_offset < end_offset {
1355 _next_ordinal_to_read += 1;
1356 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1357 next_offset += envelope_size;
1358 }
1359
1360 Ok(())
1361 }
1362 }
1363
1364 impl ControllerPresentClientViewRequest {
1365 #[inline(always)]
1366 fn max_ordinal_present(&self) -> u64 {
1367 if let Some(_) = self.viewport_creation_token {
1368 return 1;
1369 }
1370 0
1371 }
1372 }
1373
1374 impl fidl::encoding::ResourceTypeMarker for ControllerPresentClientViewRequest {
1375 type Borrowed<'a> = &'a mut Self;
1376 fn take_or_borrow<'a>(
1377 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
1378 ) -> Self::Borrowed<'a> {
1379 value
1380 }
1381 }
1382
1383 unsafe impl fidl::encoding::TypeMarker for ControllerPresentClientViewRequest {
1384 type Owned = Self;
1385
1386 #[inline(always)]
1387 fn inline_align(_context: fidl::encoding::Context) -> usize {
1388 8
1389 }
1390
1391 #[inline(always)]
1392 fn inline_size(_context: fidl::encoding::Context) -> usize {
1393 16
1394 }
1395 }
1396
1397 unsafe impl
1398 fidl::encoding::Encode<
1399 ControllerPresentClientViewRequest,
1400 fidl::encoding::DefaultFuchsiaResourceDialect,
1401 > for &mut ControllerPresentClientViewRequest
1402 {
1403 unsafe fn encode(
1404 self,
1405 encoder: &mut fidl::encoding::Encoder<
1406 '_,
1407 fidl::encoding::DefaultFuchsiaResourceDialect,
1408 >,
1409 offset: usize,
1410 mut depth: fidl::encoding::Depth,
1411 ) -> fidl::Result<()> {
1412 encoder.debug_check_bounds::<ControllerPresentClientViewRequest>(offset);
1413 let max_ordinal: u64 = self.max_ordinal_present();
1415 encoder.write_num(max_ordinal, offset);
1416 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
1417 if max_ordinal == 0 {
1419 return Ok(());
1420 }
1421 depth.increment()?;
1422 let envelope_size = 8;
1423 let bytes_len = max_ordinal as usize * envelope_size;
1424 #[allow(unused_variables)]
1425 let offset = encoder.out_of_line_offset(bytes_len);
1426 let mut _prev_end_offset: usize = 0;
1427 if 1 > max_ordinal {
1428 return Ok(());
1429 }
1430
1431 let cur_offset: usize = (1 - 1) * envelope_size;
1434
1435 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1437
1438 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_ui_views::ViewportCreationToken, fidl::encoding::DefaultFuchsiaResourceDialect>(
1443 self.viewport_creation_token.as_mut().map(<fidl_fuchsia_ui_views::ViewportCreationToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
1444 encoder, offset + cur_offset, depth
1445 )?;
1446
1447 _prev_end_offset = cur_offset + envelope_size;
1448
1449 Ok(())
1450 }
1451 }
1452
1453 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
1454 for ControllerPresentClientViewRequest
1455 {
1456 #[inline(always)]
1457 fn new_empty() -> Self {
1458 Self::default()
1459 }
1460
1461 unsafe fn decode(
1462 &mut self,
1463 decoder: &mut fidl::encoding::Decoder<
1464 '_,
1465 fidl::encoding::DefaultFuchsiaResourceDialect,
1466 >,
1467 offset: usize,
1468 mut depth: fidl::encoding::Depth,
1469 ) -> fidl::Result<()> {
1470 decoder.debug_check_bounds::<Self>(offset);
1471 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
1472 None => return Err(fidl::Error::NotNullable),
1473 Some(len) => len,
1474 };
1475 if len == 0 {
1477 return Ok(());
1478 };
1479 depth.increment()?;
1480 let envelope_size = 8;
1481 let bytes_len = len * envelope_size;
1482 let offset = decoder.out_of_line_offset(bytes_len)?;
1483 let mut _next_ordinal_to_read = 0;
1485 let mut next_offset = offset;
1486 let end_offset = offset + bytes_len;
1487 _next_ordinal_to_read += 1;
1488 if next_offset >= end_offset {
1489 return Ok(());
1490 }
1491
1492 while _next_ordinal_to_read < 1 {
1494 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1495 _next_ordinal_to_read += 1;
1496 next_offset += envelope_size;
1497 }
1498
1499 let next_out_of_line = decoder.next_out_of_line();
1500 let handles_before = decoder.remaining_handles();
1501 if let Some((inlined, num_bytes, num_handles)) =
1502 fidl::encoding::decode_envelope_header(decoder, next_offset)?
1503 {
1504 let member_inline_size = <fidl_fuchsia_ui_views::ViewportCreationToken as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1505 if inlined != (member_inline_size <= 4) {
1506 return Err(fidl::Error::InvalidInlineBitInEnvelope);
1507 }
1508 let inner_offset;
1509 let mut inner_depth = depth.clone();
1510 if inlined {
1511 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1512 inner_offset = next_offset;
1513 } else {
1514 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1515 inner_depth.increment()?;
1516 }
1517 let val_ref = self.viewport_creation_token.get_or_insert_with(|| {
1518 fidl::new_empty!(
1519 fidl_fuchsia_ui_views::ViewportCreationToken,
1520 fidl::encoding::DefaultFuchsiaResourceDialect
1521 )
1522 });
1523 fidl::decode!(
1524 fidl_fuchsia_ui_views::ViewportCreationToken,
1525 fidl::encoding::DefaultFuchsiaResourceDialect,
1526 val_ref,
1527 decoder,
1528 inner_offset,
1529 inner_depth
1530 )?;
1531 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1532 {
1533 return Err(fidl::Error::InvalidNumBytesInEnvelope);
1534 }
1535 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1536 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1537 }
1538 }
1539
1540 next_offset += envelope_size;
1541
1542 while next_offset < end_offset {
1544 _next_ordinal_to_read += 1;
1545 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1546 next_offset += envelope_size;
1547 }
1548
1549 Ok(())
1550 }
1551 }
1552}