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_driver_test_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct InternalGetBootDirectoryResponse {
16 pub boot_dir: Option<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>,
17}
18
19impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
20 for InternalGetBootDirectoryResponse
21{
22}
23
24#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25pub struct InternalGetTestPackageResponse {
26 pub test_pkg_dir: Option<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>,
27}
28
29impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
30 for InternalGetTestPackageResponse
31{
32}
33
34#[derive(Debug, PartialEq)]
35pub struct RealmStartRequest {
36 pub args: RealmArgs,
37}
38
39impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RealmStartRequest {}
40
41#[derive(Debug, Default, PartialEq)]
43pub struct RealmArgs {
44 pub boot: Option<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>,
47 pub root_driver: Option<String>,
52 pub use_driver_framework_v2: Option<bool>,
55 pub driver_tests_enable_all: Option<bool>,
59 pub driver_tests_enable: Option<Vec<String>>,
63 pub driver_tests_disable: Option<Vec<String>>,
69 pub driver_log_level: Option<Vec<DriverLog>>,
72 pub driver_disable: Option<Vec<String>>,
75 pub driver_bind_eager: Option<Vec<String>>,
79 pub board_name: Option<String>,
82 pub offers: Option<Vec<Offer>>,
86 pub exposes: Option<Vec<Expose>>,
90 pub pkg: Option<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>,
105 pub dtr_offers: Option<Vec<fidl_fuchsia_component_test::Capability>>,
109 pub dtr_exposes: Option<Vec<fidl_fuchsia_component_test::Capability>>,
113 pub test_component: Option<fidl_fuchsia_component_resolution::Component>,
123 pub driver_index_stop_timeout_millis: Option<i64>,
127 pub software_devices: Option<Vec<SoftwareDevice>>,
132 pub boot_driver_components: Option<Vec<String>>,
138 pub devicetree: Option<fidl::Vmo>,
140 pub platform_vid: Option<u32>,
142 pub platform_pid: Option<u32>,
144 #[doc(hidden)]
145 pub __source_breaking: fidl::marker::SourceBreaking,
146}
147
148impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RealmArgs {}
149
150#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
151pub struct DriverListsMarker;
152
153impl fidl::endpoints::ProtocolMarker for DriverListsMarker {
154 type Proxy = DriverListsProxy;
155 type RequestStream = DriverListsRequestStream;
156 #[cfg(target_os = "fuchsia")]
157 type SynchronousProxy = DriverListsSynchronousProxy;
158
159 const DEBUG_NAME: &'static str = "fuchsia.driver.test.DriverLists";
160}
161impl fidl::endpoints::DiscoverableProtocolMarker for DriverListsMarker {}
162pub type DriverListsGetDriverListsResult = Result<(Vec<String>, Vec<String>), i32>;
163
164pub trait DriverListsProxyInterface: Send + Sync {
165 type GetDriverListsResponseFut: std::future::Future<Output = Result<DriverListsGetDriverListsResult, fidl::Error>>
166 + Send;
167 fn r#get_driver_lists(&self) -> Self::GetDriverListsResponseFut;
168}
169#[derive(Debug)]
170#[cfg(target_os = "fuchsia")]
171pub struct DriverListsSynchronousProxy {
172 client: fidl::client::sync::Client,
173}
174
175#[cfg(target_os = "fuchsia")]
176impl fidl::endpoints::SynchronousProxy for DriverListsSynchronousProxy {
177 type Proxy = DriverListsProxy;
178 type Protocol = DriverListsMarker;
179
180 fn from_channel(inner: fidl::Channel) -> Self {
181 Self::new(inner)
182 }
183
184 fn into_channel(self) -> fidl::Channel {
185 self.client.into_channel()
186 }
187
188 fn as_channel(&self) -> &fidl::Channel {
189 self.client.as_channel()
190 }
191}
192
193#[cfg(target_os = "fuchsia")]
194impl DriverListsSynchronousProxy {
195 pub fn new(channel: fidl::Channel) -> Self {
196 let protocol_name = <DriverListsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
197 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
198 }
199
200 pub fn into_channel(self) -> fidl::Channel {
201 self.client.into_channel()
202 }
203
204 pub fn wait_for_event(
207 &self,
208 deadline: zx::MonotonicInstant,
209 ) -> Result<DriverListsEvent, fidl::Error> {
210 DriverListsEvent::decode(self.client.wait_for_event(deadline)?)
211 }
212
213 pub fn r#get_driver_lists(
214 &self,
215 ___deadline: zx::MonotonicInstant,
216 ) -> Result<DriverListsGetDriverListsResult, fidl::Error> {
217 let _response = self.client.send_query::<
218 fidl::encoding::EmptyPayload,
219 fidl::encoding::ResultType<DriverListsGetDriverListsResponse, i32>,
220 >(
221 (),
222 0x63c3de40e768357,
223 fidl::encoding::DynamicFlags::empty(),
224 ___deadline,
225 )?;
226 Ok(_response.map(|x| (x.boot_drivers, x.base_drivers)))
227 }
228}
229
230#[cfg(target_os = "fuchsia")]
231impl From<DriverListsSynchronousProxy> for zx::Handle {
232 fn from(value: DriverListsSynchronousProxy) -> Self {
233 value.into_channel().into()
234 }
235}
236
237#[cfg(target_os = "fuchsia")]
238impl From<fidl::Channel> for DriverListsSynchronousProxy {
239 fn from(value: fidl::Channel) -> Self {
240 Self::new(value)
241 }
242}
243
244#[derive(Debug, Clone)]
245pub struct DriverListsProxy {
246 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
247}
248
249impl fidl::endpoints::Proxy for DriverListsProxy {
250 type Protocol = DriverListsMarker;
251
252 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
253 Self::new(inner)
254 }
255
256 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
257 self.client.into_channel().map_err(|client| Self { client })
258 }
259
260 fn as_channel(&self) -> &::fidl::AsyncChannel {
261 self.client.as_channel()
262 }
263}
264
265impl DriverListsProxy {
266 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
268 let protocol_name = <DriverListsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
269 Self { client: fidl::client::Client::new(channel, protocol_name) }
270 }
271
272 pub fn take_event_stream(&self) -> DriverListsEventStream {
278 DriverListsEventStream { event_receiver: self.client.take_event_receiver() }
279 }
280
281 pub fn r#get_driver_lists(
282 &self,
283 ) -> fidl::client::QueryResponseFut<
284 DriverListsGetDriverListsResult,
285 fidl::encoding::DefaultFuchsiaResourceDialect,
286 > {
287 DriverListsProxyInterface::r#get_driver_lists(self)
288 }
289}
290
291impl DriverListsProxyInterface for DriverListsProxy {
292 type GetDriverListsResponseFut = fidl::client::QueryResponseFut<
293 DriverListsGetDriverListsResult,
294 fidl::encoding::DefaultFuchsiaResourceDialect,
295 >;
296 fn r#get_driver_lists(&self) -> Self::GetDriverListsResponseFut {
297 fn _decode(
298 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
299 ) -> Result<DriverListsGetDriverListsResult, fidl::Error> {
300 let _response = fidl::client::decode_transaction_body::<
301 fidl::encoding::ResultType<DriverListsGetDriverListsResponse, i32>,
302 fidl::encoding::DefaultFuchsiaResourceDialect,
303 0x63c3de40e768357,
304 >(_buf?)?;
305 Ok(_response.map(|x| (x.boot_drivers, x.base_drivers)))
306 }
307 self.client
308 .send_query_and_decode::<fidl::encoding::EmptyPayload, DriverListsGetDriverListsResult>(
309 (),
310 0x63c3de40e768357,
311 fidl::encoding::DynamicFlags::empty(),
312 _decode,
313 )
314 }
315}
316
317pub struct DriverListsEventStream {
318 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
319}
320
321impl std::marker::Unpin for DriverListsEventStream {}
322
323impl futures::stream::FusedStream for DriverListsEventStream {
324 fn is_terminated(&self) -> bool {
325 self.event_receiver.is_terminated()
326 }
327}
328
329impl futures::Stream for DriverListsEventStream {
330 type Item = Result<DriverListsEvent, fidl::Error>;
331
332 fn poll_next(
333 mut self: std::pin::Pin<&mut Self>,
334 cx: &mut std::task::Context<'_>,
335 ) -> std::task::Poll<Option<Self::Item>> {
336 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
337 &mut self.event_receiver,
338 cx
339 )?) {
340 Some(buf) => std::task::Poll::Ready(Some(DriverListsEvent::decode(buf))),
341 None => std::task::Poll::Ready(None),
342 }
343 }
344}
345
346#[derive(Debug)]
347pub enum DriverListsEvent {}
348
349impl DriverListsEvent {
350 fn decode(
352 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
353 ) -> Result<DriverListsEvent, fidl::Error> {
354 let (bytes, _handles) = buf.split_mut();
355 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
356 debug_assert_eq!(tx_header.tx_id, 0);
357 match tx_header.ordinal {
358 _ => Err(fidl::Error::UnknownOrdinal {
359 ordinal: tx_header.ordinal,
360 protocol_name: <DriverListsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
361 }),
362 }
363 }
364}
365
366pub struct DriverListsRequestStream {
368 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
369 is_terminated: bool,
370}
371
372impl std::marker::Unpin for DriverListsRequestStream {}
373
374impl futures::stream::FusedStream for DriverListsRequestStream {
375 fn is_terminated(&self) -> bool {
376 self.is_terminated
377 }
378}
379
380impl fidl::endpoints::RequestStream for DriverListsRequestStream {
381 type Protocol = DriverListsMarker;
382 type ControlHandle = DriverListsControlHandle;
383
384 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
385 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
386 }
387
388 fn control_handle(&self) -> Self::ControlHandle {
389 DriverListsControlHandle { inner: self.inner.clone() }
390 }
391
392 fn into_inner(
393 self,
394 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
395 {
396 (self.inner, self.is_terminated)
397 }
398
399 fn from_inner(
400 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
401 is_terminated: bool,
402 ) -> Self {
403 Self { inner, is_terminated }
404 }
405}
406
407impl futures::Stream for DriverListsRequestStream {
408 type Item = Result<DriverListsRequest, fidl::Error>;
409
410 fn poll_next(
411 mut self: std::pin::Pin<&mut Self>,
412 cx: &mut std::task::Context<'_>,
413 ) -> std::task::Poll<Option<Self::Item>> {
414 let this = &mut *self;
415 if this.inner.check_shutdown(cx) {
416 this.is_terminated = true;
417 return std::task::Poll::Ready(None);
418 }
419 if this.is_terminated {
420 panic!("polled DriverListsRequestStream after completion");
421 }
422 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
423 |bytes, handles| {
424 match this.inner.channel().read_etc(cx, bytes, handles) {
425 std::task::Poll::Ready(Ok(())) => {}
426 std::task::Poll::Pending => return std::task::Poll::Pending,
427 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
428 this.is_terminated = true;
429 return std::task::Poll::Ready(None);
430 }
431 std::task::Poll::Ready(Err(e)) => {
432 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
433 e.into(),
434 ))))
435 }
436 }
437
438 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
440
441 std::task::Poll::Ready(Some(match header.ordinal {
442 0x63c3de40e768357 => {
443 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
444 let mut req = fidl::new_empty!(
445 fidl::encoding::EmptyPayload,
446 fidl::encoding::DefaultFuchsiaResourceDialect
447 );
448 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
449 let control_handle = DriverListsControlHandle { inner: this.inner.clone() };
450 Ok(DriverListsRequest::GetDriverLists {
451 responder: DriverListsGetDriverListsResponder {
452 control_handle: std::mem::ManuallyDrop::new(control_handle),
453 tx_id: header.tx_id,
454 },
455 })
456 }
457 _ => Err(fidl::Error::UnknownOrdinal {
458 ordinal: header.ordinal,
459 protocol_name:
460 <DriverListsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
461 }),
462 }))
463 },
464 )
465 }
466}
467
468#[derive(Debug)]
471pub enum DriverListsRequest {
472 GetDriverLists { responder: DriverListsGetDriverListsResponder },
473}
474
475impl DriverListsRequest {
476 #[allow(irrefutable_let_patterns)]
477 pub fn into_get_driver_lists(self) -> Option<(DriverListsGetDriverListsResponder)> {
478 if let DriverListsRequest::GetDriverLists { responder } = self {
479 Some((responder))
480 } else {
481 None
482 }
483 }
484
485 pub fn method_name(&self) -> &'static str {
487 match *self {
488 DriverListsRequest::GetDriverLists { .. } => "get_driver_lists",
489 }
490 }
491}
492
493#[derive(Debug, Clone)]
494pub struct DriverListsControlHandle {
495 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
496}
497
498impl fidl::endpoints::ControlHandle for DriverListsControlHandle {
499 fn shutdown(&self) {
500 self.inner.shutdown()
501 }
502 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
503 self.inner.shutdown_with_epitaph(status)
504 }
505
506 fn is_closed(&self) -> bool {
507 self.inner.channel().is_closed()
508 }
509 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
510 self.inner.channel().on_closed()
511 }
512
513 #[cfg(target_os = "fuchsia")]
514 fn signal_peer(
515 &self,
516 clear_mask: zx::Signals,
517 set_mask: zx::Signals,
518 ) -> Result<(), zx_status::Status> {
519 use fidl::Peered;
520 self.inner.channel().signal_peer(clear_mask, set_mask)
521 }
522}
523
524impl DriverListsControlHandle {}
525
526#[must_use = "FIDL methods require a response to be sent"]
527#[derive(Debug)]
528pub struct DriverListsGetDriverListsResponder {
529 control_handle: std::mem::ManuallyDrop<DriverListsControlHandle>,
530 tx_id: u32,
531}
532
533impl std::ops::Drop for DriverListsGetDriverListsResponder {
537 fn drop(&mut self) {
538 self.control_handle.shutdown();
539 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
541 }
542}
543
544impl fidl::endpoints::Responder for DriverListsGetDriverListsResponder {
545 type ControlHandle = DriverListsControlHandle;
546
547 fn control_handle(&self) -> &DriverListsControlHandle {
548 &self.control_handle
549 }
550
551 fn drop_without_shutdown(mut self) {
552 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
554 std::mem::forget(self);
556 }
557}
558
559impl DriverListsGetDriverListsResponder {
560 pub fn send(self, mut result: Result<(&[String], &[String]), i32>) -> Result<(), fidl::Error> {
564 let _result = self.send_raw(result);
565 if _result.is_err() {
566 self.control_handle.shutdown();
567 }
568 self.drop_without_shutdown();
569 _result
570 }
571
572 pub fn send_no_shutdown_on_err(
574 self,
575 mut result: Result<(&[String], &[String]), i32>,
576 ) -> Result<(), fidl::Error> {
577 let _result = self.send_raw(result);
578 self.drop_without_shutdown();
579 _result
580 }
581
582 fn send_raw(&self, mut result: Result<(&[String], &[String]), i32>) -> Result<(), fidl::Error> {
583 self.control_handle
584 .inner
585 .send::<fidl::encoding::ResultType<DriverListsGetDriverListsResponse, i32>>(
586 result,
587 self.tx_id,
588 0x63c3de40e768357,
589 fidl::encoding::DynamicFlags::empty(),
590 )
591 }
592}
593
594#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
595pub struct InternalMarker;
596
597impl fidl::endpoints::ProtocolMarker for InternalMarker {
598 type Proxy = InternalProxy;
599 type RequestStream = InternalRequestStream;
600 #[cfg(target_os = "fuchsia")]
601 type SynchronousProxy = InternalSynchronousProxy;
602
603 const DEBUG_NAME: &'static str = "fuchsia.driver.test.Internal";
604}
605impl fidl::endpoints::DiscoverableProtocolMarker for InternalMarker {}
606pub type InternalGetTestPackageResult =
607 Result<Option<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>, i32>;
608pub type InternalGetTestResolutionContextResult =
609 Result<Option<Box<fidl_fuchsia_component_resolution::Context>>, i32>;
610pub type InternalGetBootDirectoryResult =
611 Result<Option<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>, i32>;
612pub type InternalGetBootDriverOverridesResult = Result<Vec<String>, i32>;
613
614pub trait InternalProxyInterface: Send + Sync {
615 type GetTestPackageResponseFut: std::future::Future<Output = Result<InternalGetTestPackageResult, fidl::Error>>
616 + Send;
617 fn r#get_test_package(&self) -> Self::GetTestPackageResponseFut;
618 type GetTestResolutionContextResponseFut: std::future::Future<Output = Result<InternalGetTestResolutionContextResult, fidl::Error>>
619 + Send;
620 fn r#get_test_resolution_context(&self) -> Self::GetTestResolutionContextResponseFut;
621 type GetBootDirectoryResponseFut: std::future::Future<Output = Result<InternalGetBootDirectoryResult, fidl::Error>>
622 + Send;
623 fn r#get_boot_directory(&self) -> Self::GetBootDirectoryResponseFut;
624 type GetBootDriverOverridesResponseFut: std::future::Future<Output = Result<InternalGetBootDriverOverridesResult, fidl::Error>>
625 + Send;
626 fn r#get_boot_driver_overrides(&self) -> Self::GetBootDriverOverridesResponseFut;
627}
628#[derive(Debug)]
629#[cfg(target_os = "fuchsia")]
630pub struct InternalSynchronousProxy {
631 client: fidl::client::sync::Client,
632}
633
634#[cfg(target_os = "fuchsia")]
635impl fidl::endpoints::SynchronousProxy for InternalSynchronousProxy {
636 type Proxy = InternalProxy;
637 type Protocol = InternalMarker;
638
639 fn from_channel(inner: fidl::Channel) -> Self {
640 Self::new(inner)
641 }
642
643 fn into_channel(self) -> fidl::Channel {
644 self.client.into_channel()
645 }
646
647 fn as_channel(&self) -> &fidl::Channel {
648 self.client.as_channel()
649 }
650}
651
652#[cfg(target_os = "fuchsia")]
653impl InternalSynchronousProxy {
654 pub fn new(channel: fidl::Channel) -> Self {
655 let protocol_name = <InternalMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
656 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
657 }
658
659 pub fn into_channel(self) -> fidl::Channel {
660 self.client.into_channel()
661 }
662
663 pub fn wait_for_event(
666 &self,
667 deadline: zx::MonotonicInstant,
668 ) -> Result<InternalEvent, fidl::Error> {
669 InternalEvent::decode(self.client.wait_for_event(deadline)?)
670 }
671
672 pub fn r#get_test_package(
676 &self,
677 ___deadline: zx::MonotonicInstant,
678 ) -> Result<InternalGetTestPackageResult, fidl::Error> {
679 let _response = self.client.send_query::<
680 fidl::encoding::EmptyPayload,
681 fidl::encoding::ResultType<InternalGetTestPackageResponse, i32>,
682 >(
683 (),
684 0x298c1d6e57d57db8,
685 fidl::encoding::DynamicFlags::empty(),
686 ___deadline,
687 )?;
688 Ok(_response.map(|x| x.test_pkg_dir))
689 }
690
691 pub fn r#get_test_resolution_context(
694 &self,
695 ___deadline: zx::MonotonicInstant,
696 ) -> Result<InternalGetTestResolutionContextResult, fidl::Error> {
697 let _response = self.client.send_query::<
698 fidl::encoding::EmptyPayload,
699 fidl::encoding::ResultType<InternalGetTestResolutionContextResponse, i32>,
700 >(
701 (),
702 0x78e5d4f1fefd67b7,
703 fidl::encoding::DynamicFlags::empty(),
704 ___deadline,
705 )?;
706 Ok(_response.map(|x| x.context))
707 }
708
709 pub fn r#get_boot_directory(
713 &self,
714 ___deadline: zx::MonotonicInstant,
715 ) -> Result<InternalGetBootDirectoryResult, fidl::Error> {
716 let _response = self.client.send_query::<
717 fidl::encoding::EmptyPayload,
718 fidl::encoding::ResultType<InternalGetBootDirectoryResponse, i32>,
719 >(
720 (),
721 0x3e1969123c4dfb31,
722 fidl::encoding::DynamicFlags::empty(),
723 ___deadline,
724 )?;
725 Ok(_response.map(|x| x.boot_dir))
726 }
727
728 pub fn r#get_boot_driver_overrides(
729 &self,
730 ___deadline: zx::MonotonicInstant,
731 ) -> Result<InternalGetBootDriverOverridesResult, fidl::Error> {
732 let _response = self.client.send_query::<
733 fidl::encoding::EmptyPayload,
734 fidl::encoding::ResultType<InternalGetBootDriverOverridesResponse, i32>,
735 >(
736 (),
737 0x6a40991d8259e008,
738 fidl::encoding::DynamicFlags::empty(),
739 ___deadline,
740 )?;
741 Ok(_response.map(|x| x.boot_overrides))
742 }
743}
744
745#[cfg(target_os = "fuchsia")]
746impl From<InternalSynchronousProxy> for zx::Handle {
747 fn from(value: InternalSynchronousProxy) -> Self {
748 value.into_channel().into()
749 }
750}
751
752#[cfg(target_os = "fuchsia")]
753impl From<fidl::Channel> for InternalSynchronousProxy {
754 fn from(value: fidl::Channel) -> Self {
755 Self::new(value)
756 }
757}
758
759#[derive(Debug, Clone)]
760pub struct InternalProxy {
761 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
762}
763
764impl fidl::endpoints::Proxy for InternalProxy {
765 type Protocol = InternalMarker;
766
767 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
768 Self::new(inner)
769 }
770
771 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
772 self.client.into_channel().map_err(|client| Self { client })
773 }
774
775 fn as_channel(&self) -> &::fidl::AsyncChannel {
776 self.client.as_channel()
777 }
778}
779
780impl InternalProxy {
781 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
783 let protocol_name = <InternalMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
784 Self { client: fidl::client::Client::new(channel, protocol_name) }
785 }
786
787 pub fn take_event_stream(&self) -> InternalEventStream {
793 InternalEventStream { event_receiver: self.client.take_event_receiver() }
794 }
795
796 pub fn r#get_test_package(
800 &self,
801 ) -> fidl::client::QueryResponseFut<
802 InternalGetTestPackageResult,
803 fidl::encoding::DefaultFuchsiaResourceDialect,
804 > {
805 InternalProxyInterface::r#get_test_package(self)
806 }
807
808 pub fn r#get_test_resolution_context(
811 &self,
812 ) -> fidl::client::QueryResponseFut<
813 InternalGetTestResolutionContextResult,
814 fidl::encoding::DefaultFuchsiaResourceDialect,
815 > {
816 InternalProxyInterface::r#get_test_resolution_context(self)
817 }
818
819 pub fn r#get_boot_directory(
823 &self,
824 ) -> fidl::client::QueryResponseFut<
825 InternalGetBootDirectoryResult,
826 fidl::encoding::DefaultFuchsiaResourceDialect,
827 > {
828 InternalProxyInterface::r#get_boot_directory(self)
829 }
830
831 pub fn r#get_boot_driver_overrides(
832 &self,
833 ) -> fidl::client::QueryResponseFut<
834 InternalGetBootDriverOverridesResult,
835 fidl::encoding::DefaultFuchsiaResourceDialect,
836 > {
837 InternalProxyInterface::r#get_boot_driver_overrides(self)
838 }
839}
840
841impl InternalProxyInterface for InternalProxy {
842 type GetTestPackageResponseFut = fidl::client::QueryResponseFut<
843 InternalGetTestPackageResult,
844 fidl::encoding::DefaultFuchsiaResourceDialect,
845 >;
846 fn r#get_test_package(&self) -> Self::GetTestPackageResponseFut {
847 fn _decode(
848 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
849 ) -> Result<InternalGetTestPackageResult, fidl::Error> {
850 let _response = fidl::client::decode_transaction_body::<
851 fidl::encoding::ResultType<InternalGetTestPackageResponse, i32>,
852 fidl::encoding::DefaultFuchsiaResourceDialect,
853 0x298c1d6e57d57db8,
854 >(_buf?)?;
855 Ok(_response.map(|x| x.test_pkg_dir))
856 }
857 self.client
858 .send_query_and_decode::<fidl::encoding::EmptyPayload, InternalGetTestPackageResult>(
859 (),
860 0x298c1d6e57d57db8,
861 fidl::encoding::DynamicFlags::empty(),
862 _decode,
863 )
864 }
865
866 type GetTestResolutionContextResponseFut = fidl::client::QueryResponseFut<
867 InternalGetTestResolutionContextResult,
868 fidl::encoding::DefaultFuchsiaResourceDialect,
869 >;
870 fn r#get_test_resolution_context(&self) -> Self::GetTestResolutionContextResponseFut {
871 fn _decode(
872 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
873 ) -> Result<InternalGetTestResolutionContextResult, fidl::Error> {
874 let _response = fidl::client::decode_transaction_body::<
875 fidl::encoding::ResultType<InternalGetTestResolutionContextResponse, i32>,
876 fidl::encoding::DefaultFuchsiaResourceDialect,
877 0x78e5d4f1fefd67b7,
878 >(_buf?)?;
879 Ok(_response.map(|x| x.context))
880 }
881 self.client.send_query_and_decode::<
882 fidl::encoding::EmptyPayload,
883 InternalGetTestResolutionContextResult,
884 >(
885 (),
886 0x78e5d4f1fefd67b7,
887 fidl::encoding::DynamicFlags::empty(),
888 _decode,
889 )
890 }
891
892 type GetBootDirectoryResponseFut = fidl::client::QueryResponseFut<
893 InternalGetBootDirectoryResult,
894 fidl::encoding::DefaultFuchsiaResourceDialect,
895 >;
896 fn r#get_boot_directory(&self) -> Self::GetBootDirectoryResponseFut {
897 fn _decode(
898 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
899 ) -> Result<InternalGetBootDirectoryResult, fidl::Error> {
900 let _response = fidl::client::decode_transaction_body::<
901 fidl::encoding::ResultType<InternalGetBootDirectoryResponse, i32>,
902 fidl::encoding::DefaultFuchsiaResourceDialect,
903 0x3e1969123c4dfb31,
904 >(_buf?)?;
905 Ok(_response.map(|x| x.boot_dir))
906 }
907 self.client
908 .send_query_and_decode::<fidl::encoding::EmptyPayload, InternalGetBootDirectoryResult>(
909 (),
910 0x3e1969123c4dfb31,
911 fidl::encoding::DynamicFlags::empty(),
912 _decode,
913 )
914 }
915
916 type GetBootDriverOverridesResponseFut = fidl::client::QueryResponseFut<
917 InternalGetBootDriverOverridesResult,
918 fidl::encoding::DefaultFuchsiaResourceDialect,
919 >;
920 fn r#get_boot_driver_overrides(&self) -> Self::GetBootDriverOverridesResponseFut {
921 fn _decode(
922 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
923 ) -> Result<InternalGetBootDriverOverridesResult, fidl::Error> {
924 let _response = fidl::client::decode_transaction_body::<
925 fidl::encoding::ResultType<InternalGetBootDriverOverridesResponse, i32>,
926 fidl::encoding::DefaultFuchsiaResourceDialect,
927 0x6a40991d8259e008,
928 >(_buf?)?;
929 Ok(_response.map(|x| x.boot_overrides))
930 }
931 self.client.send_query_and_decode::<
932 fidl::encoding::EmptyPayload,
933 InternalGetBootDriverOverridesResult,
934 >(
935 (),
936 0x6a40991d8259e008,
937 fidl::encoding::DynamicFlags::empty(),
938 _decode,
939 )
940 }
941}
942
943pub struct InternalEventStream {
944 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
945}
946
947impl std::marker::Unpin for InternalEventStream {}
948
949impl futures::stream::FusedStream for InternalEventStream {
950 fn is_terminated(&self) -> bool {
951 self.event_receiver.is_terminated()
952 }
953}
954
955impl futures::Stream for InternalEventStream {
956 type Item = Result<InternalEvent, fidl::Error>;
957
958 fn poll_next(
959 mut self: std::pin::Pin<&mut Self>,
960 cx: &mut std::task::Context<'_>,
961 ) -> std::task::Poll<Option<Self::Item>> {
962 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
963 &mut self.event_receiver,
964 cx
965 )?) {
966 Some(buf) => std::task::Poll::Ready(Some(InternalEvent::decode(buf))),
967 None => std::task::Poll::Ready(None),
968 }
969 }
970}
971
972#[derive(Debug)]
973pub enum InternalEvent {}
974
975impl InternalEvent {
976 fn decode(
978 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
979 ) -> Result<InternalEvent, fidl::Error> {
980 let (bytes, _handles) = buf.split_mut();
981 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
982 debug_assert_eq!(tx_header.tx_id, 0);
983 match tx_header.ordinal {
984 _ => Err(fidl::Error::UnknownOrdinal {
985 ordinal: tx_header.ordinal,
986 protocol_name: <InternalMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
987 }),
988 }
989 }
990}
991
992pub struct InternalRequestStream {
994 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
995 is_terminated: bool,
996}
997
998impl std::marker::Unpin for InternalRequestStream {}
999
1000impl futures::stream::FusedStream for InternalRequestStream {
1001 fn is_terminated(&self) -> bool {
1002 self.is_terminated
1003 }
1004}
1005
1006impl fidl::endpoints::RequestStream for InternalRequestStream {
1007 type Protocol = InternalMarker;
1008 type ControlHandle = InternalControlHandle;
1009
1010 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1011 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1012 }
1013
1014 fn control_handle(&self) -> Self::ControlHandle {
1015 InternalControlHandle { inner: self.inner.clone() }
1016 }
1017
1018 fn into_inner(
1019 self,
1020 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1021 {
1022 (self.inner, self.is_terminated)
1023 }
1024
1025 fn from_inner(
1026 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1027 is_terminated: bool,
1028 ) -> Self {
1029 Self { inner, is_terminated }
1030 }
1031}
1032
1033impl futures::Stream for InternalRequestStream {
1034 type Item = Result<InternalRequest, fidl::Error>;
1035
1036 fn poll_next(
1037 mut self: std::pin::Pin<&mut Self>,
1038 cx: &mut std::task::Context<'_>,
1039 ) -> std::task::Poll<Option<Self::Item>> {
1040 let this = &mut *self;
1041 if this.inner.check_shutdown(cx) {
1042 this.is_terminated = true;
1043 return std::task::Poll::Ready(None);
1044 }
1045 if this.is_terminated {
1046 panic!("polled InternalRequestStream after completion");
1047 }
1048 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1049 |bytes, handles| {
1050 match this.inner.channel().read_etc(cx, bytes, handles) {
1051 std::task::Poll::Ready(Ok(())) => {}
1052 std::task::Poll::Pending => return std::task::Poll::Pending,
1053 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1054 this.is_terminated = true;
1055 return std::task::Poll::Ready(None);
1056 }
1057 std::task::Poll::Ready(Err(e)) => {
1058 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1059 e.into(),
1060 ))))
1061 }
1062 }
1063
1064 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1066
1067 std::task::Poll::Ready(Some(match header.ordinal {
1068 0x298c1d6e57d57db8 => {
1069 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1070 let mut req = fidl::new_empty!(
1071 fidl::encoding::EmptyPayload,
1072 fidl::encoding::DefaultFuchsiaResourceDialect
1073 );
1074 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1075 let control_handle = InternalControlHandle { inner: this.inner.clone() };
1076 Ok(InternalRequest::GetTestPackage {
1077 responder: InternalGetTestPackageResponder {
1078 control_handle: std::mem::ManuallyDrop::new(control_handle),
1079 tx_id: header.tx_id,
1080 },
1081 })
1082 }
1083 0x78e5d4f1fefd67b7 => {
1084 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1085 let mut req = fidl::new_empty!(
1086 fidl::encoding::EmptyPayload,
1087 fidl::encoding::DefaultFuchsiaResourceDialect
1088 );
1089 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1090 let control_handle = InternalControlHandle { inner: this.inner.clone() };
1091 Ok(InternalRequest::GetTestResolutionContext {
1092 responder: InternalGetTestResolutionContextResponder {
1093 control_handle: std::mem::ManuallyDrop::new(control_handle),
1094 tx_id: header.tx_id,
1095 },
1096 })
1097 }
1098 0x3e1969123c4dfb31 => {
1099 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1100 let mut req = fidl::new_empty!(
1101 fidl::encoding::EmptyPayload,
1102 fidl::encoding::DefaultFuchsiaResourceDialect
1103 );
1104 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1105 let control_handle = InternalControlHandle { inner: this.inner.clone() };
1106 Ok(InternalRequest::GetBootDirectory {
1107 responder: InternalGetBootDirectoryResponder {
1108 control_handle: std::mem::ManuallyDrop::new(control_handle),
1109 tx_id: header.tx_id,
1110 },
1111 })
1112 }
1113 0x6a40991d8259e008 => {
1114 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1115 let mut req = fidl::new_empty!(
1116 fidl::encoding::EmptyPayload,
1117 fidl::encoding::DefaultFuchsiaResourceDialect
1118 );
1119 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1120 let control_handle = InternalControlHandle { inner: this.inner.clone() };
1121 Ok(InternalRequest::GetBootDriverOverrides {
1122 responder: InternalGetBootDriverOverridesResponder {
1123 control_handle: std::mem::ManuallyDrop::new(control_handle),
1124 tx_id: header.tx_id,
1125 },
1126 })
1127 }
1128 _ => Err(fidl::Error::UnknownOrdinal {
1129 ordinal: header.ordinal,
1130 protocol_name:
1131 <InternalMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1132 }),
1133 }))
1134 },
1135 )
1136 }
1137}
1138
1139#[derive(Debug)]
1142pub enum InternalRequest {
1143 GetTestPackage {
1147 responder: InternalGetTestPackageResponder,
1148 },
1149 GetTestResolutionContext {
1152 responder: InternalGetTestResolutionContextResponder,
1153 },
1154 GetBootDirectory {
1158 responder: InternalGetBootDirectoryResponder,
1159 },
1160 GetBootDriverOverrides {
1161 responder: InternalGetBootDriverOverridesResponder,
1162 },
1163}
1164
1165impl InternalRequest {
1166 #[allow(irrefutable_let_patterns)]
1167 pub fn into_get_test_package(self) -> Option<(InternalGetTestPackageResponder)> {
1168 if let InternalRequest::GetTestPackage { responder } = self {
1169 Some((responder))
1170 } else {
1171 None
1172 }
1173 }
1174
1175 #[allow(irrefutable_let_patterns)]
1176 pub fn into_get_test_resolution_context(
1177 self,
1178 ) -> Option<(InternalGetTestResolutionContextResponder)> {
1179 if let InternalRequest::GetTestResolutionContext { responder } = self {
1180 Some((responder))
1181 } else {
1182 None
1183 }
1184 }
1185
1186 #[allow(irrefutable_let_patterns)]
1187 pub fn into_get_boot_directory(self) -> Option<(InternalGetBootDirectoryResponder)> {
1188 if let InternalRequest::GetBootDirectory { responder } = self {
1189 Some((responder))
1190 } else {
1191 None
1192 }
1193 }
1194
1195 #[allow(irrefutable_let_patterns)]
1196 pub fn into_get_boot_driver_overrides(
1197 self,
1198 ) -> Option<(InternalGetBootDriverOverridesResponder)> {
1199 if let InternalRequest::GetBootDriverOverrides { responder } = self {
1200 Some((responder))
1201 } else {
1202 None
1203 }
1204 }
1205
1206 pub fn method_name(&self) -> &'static str {
1208 match *self {
1209 InternalRequest::GetTestPackage { .. } => "get_test_package",
1210 InternalRequest::GetTestResolutionContext { .. } => "get_test_resolution_context",
1211 InternalRequest::GetBootDirectory { .. } => "get_boot_directory",
1212 InternalRequest::GetBootDriverOverrides { .. } => "get_boot_driver_overrides",
1213 }
1214 }
1215}
1216
1217#[derive(Debug, Clone)]
1218pub struct InternalControlHandle {
1219 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1220}
1221
1222impl fidl::endpoints::ControlHandle for InternalControlHandle {
1223 fn shutdown(&self) {
1224 self.inner.shutdown()
1225 }
1226 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1227 self.inner.shutdown_with_epitaph(status)
1228 }
1229
1230 fn is_closed(&self) -> bool {
1231 self.inner.channel().is_closed()
1232 }
1233 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1234 self.inner.channel().on_closed()
1235 }
1236
1237 #[cfg(target_os = "fuchsia")]
1238 fn signal_peer(
1239 &self,
1240 clear_mask: zx::Signals,
1241 set_mask: zx::Signals,
1242 ) -> Result<(), zx_status::Status> {
1243 use fidl::Peered;
1244 self.inner.channel().signal_peer(clear_mask, set_mask)
1245 }
1246}
1247
1248impl InternalControlHandle {}
1249
1250#[must_use = "FIDL methods require a response to be sent"]
1251#[derive(Debug)]
1252pub struct InternalGetTestPackageResponder {
1253 control_handle: std::mem::ManuallyDrop<InternalControlHandle>,
1254 tx_id: u32,
1255}
1256
1257impl std::ops::Drop for InternalGetTestPackageResponder {
1261 fn drop(&mut self) {
1262 self.control_handle.shutdown();
1263 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1265 }
1266}
1267
1268impl fidl::endpoints::Responder for InternalGetTestPackageResponder {
1269 type ControlHandle = InternalControlHandle;
1270
1271 fn control_handle(&self) -> &InternalControlHandle {
1272 &self.control_handle
1273 }
1274
1275 fn drop_without_shutdown(mut self) {
1276 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1278 std::mem::forget(self);
1280 }
1281}
1282
1283impl InternalGetTestPackageResponder {
1284 pub fn send(
1288 self,
1289 mut result: Result<
1290 Option<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>,
1291 i32,
1292 >,
1293 ) -> Result<(), fidl::Error> {
1294 let _result = self.send_raw(result);
1295 if _result.is_err() {
1296 self.control_handle.shutdown();
1297 }
1298 self.drop_without_shutdown();
1299 _result
1300 }
1301
1302 pub fn send_no_shutdown_on_err(
1304 self,
1305 mut result: Result<
1306 Option<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>,
1307 i32,
1308 >,
1309 ) -> Result<(), fidl::Error> {
1310 let _result = self.send_raw(result);
1311 self.drop_without_shutdown();
1312 _result
1313 }
1314
1315 fn send_raw(
1316 &self,
1317 mut result: Result<
1318 Option<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>,
1319 i32,
1320 >,
1321 ) -> Result<(), fidl::Error> {
1322 self.control_handle
1323 .inner
1324 .send::<fidl::encoding::ResultType<InternalGetTestPackageResponse, i32>>(
1325 result.map(|test_pkg_dir| (test_pkg_dir,)),
1326 self.tx_id,
1327 0x298c1d6e57d57db8,
1328 fidl::encoding::DynamicFlags::empty(),
1329 )
1330 }
1331}
1332
1333#[must_use = "FIDL methods require a response to be sent"]
1334#[derive(Debug)]
1335pub struct InternalGetTestResolutionContextResponder {
1336 control_handle: std::mem::ManuallyDrop<InternalControlHandle>,
1337 tx_id: u32,
1338}
1339
1340impl std::ops::Drop for InternalGetTestResolutionContextResponder {
1344 fn drop(&mut self) {
1345 self.control_handle.shutdown();
1346 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1348 }
1349}
1350
1351impl fidl::endpoints::Responder for InternalGetTestResolutionContextResponder {
1352 type ControlHandle = InternalControlHandle;
1353
1354 fn control_handle(&self) -> &InternalControlHandle {
1355 &self.control_handle
1356 }
1357
1358 fn drop_without_shutdown(mut self) {
1359 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1361 std::mem::forget(self);
1363 }
1364}
1365
1366impl InternalGetTestResolutionContextResponder {
1367 pub fn send(
1371 self,
1372 mut result: Result<Option<&fidl_fuchsia_component_resolution::Context>, i32>,
1373 ) -> Result<(), fidl::Error> {
1374 let _result = self.send_raw(result);
1375 if _result.is_err() {
1376 self.control_handle.shutdown();
1377 }
1378 self.drop_without_shutdown();
1379 _result
1380 }
1381
1382 pub fn send_no_shutdown_on_err(
1384 self,
1385 mut result: Result<Option<&fidl_fuchsia_component_resolution::Context>, i32>,
1386 ) -> Result<(), fidl::Error> {
1387 let _result = self.send_raw(result);
1388 self.drop_without_shutdown();
1389 _result
1390 }
1391
1392 fn send_raw(
1393 &self,
1394 mut result: Result<Option<&fidl_fuchsia_component_resolution::Context>, i32>,
1395 ) -> Result<(), fidl::Error> {
1396 self.control_handle.inner.send::<fidl::encoding::ResultType<
1397 InternalGetTestResolutionContextResponse,
1398 i32,
1399 >>(
1400 result.map(|context| (context,)),
1401 self.tx_id,
1402 0x78e5d4f1fefd67b7,
1403 fidl::encoding::DynamicFlags::empty(),
1404 )
1405 }
1406}
1407
1408#[must_use = "FIDL methods require a response to be sent"]
1409#[derive(Debug)]
1410pub struct InternalGetBootDirectoryResponder {
1411 control_handle: std::mem::ManuallyDrop<InternalControlHandle>,
1412 tx_id: u32,
1413}
1414
1415impl std::ops::Drop for InternalGetBootDirectoryResponder {
1419 fn drop(&mut self) {
1420 self.control_handle.shutdown();
1421 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1423 }
1424}
1425
1426impl fidl::endpoints::Responder for InternalGetBootDirectoryResponder {
1427 type ControlHandle = InternalControlHandle;
1428
1429 fn control_handle(&self) -> &InternalControlHandle {
1430 &self.control_handle
1431 }
1432
1433 fn drop_without_shutdown(mut self) {
1434 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1436 std::mem::forget(self);
1438 }
1439}
1440
1441impl InternalGetBootDirectoryResponder {
1442 pub fn send(
1446 self,
1447 mut result: Result<
1448 Option<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>,
1449 i32,
1450 >,
1451 ) -> Result<(), fidl::Error> {
1452 let _result = self.send_raw(result);
1453 if _result.is_err() {
1454 self.control_handle.shutdown();
1455 }
1456 self.drop_without_shutdown();
1457 _result
1458 }
1459
1460 pub fn send_no_shutdown_on_err(
1462 self,
1463 mut result: Result<
1464 Option<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>,
1465 i32,
1466 >,
1467 ) -> Result<(), fidl::Error> {
1468 let _result = self.send_raw(result);
1469 self.drop_without_shutdown();
1470 _result
1471 }
1472
1473 fn send_raw(
1474 &self,
1475 mut result: Result<
1476 Option<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>>,
1477 i32,
1478 >,
1479 ) -> Result<(), fidl::Error> {
1480 self.control_handle
1481 .inner
1482 .send::<fidl::encoding::ResultType<InternalGetBootDirectoryResponse, i32>>(
1483 result.map(|boot_dir| (boot_dir,)),
1484 self.tx_id,
1485 0x3e1969123c4dfb31,
1486 fidl::encoding::DynamicFlags::empty(),
1487 )
1488 }
1489}
1490
1491#[must_use = "FIDL methods require a response to be sent"]
1492#[derive(Debug)]
1493pub struct InternalGetBootDriverOverridesResponder {
1494 control_handle: std::mem::ManuallyDrop<InternalControlHandle>,
1495 tx_id: u32,
1496}
1497
1498impl std::ops::Drop for InternalGetBootDriverOverridesResponder {
1502 fn drop(&mut self) {
1503 self.control_handle.shutdown();
1504 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1506 }
1507}
1508
1509impl fidl::endpoints::Responder for InternalGetBootDriverOverridesResponder {
1510 type ControlHandle = InternalControlHandle;
1511
1512 fn control_handle(&self) -> &InternalControlHandle {
1513 &self.control_handle
1514 }
1515
1516 fn drop_without_shutdown(mut self) {
1517 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1519 std::mem::forget(self);
1521 }
1522}
1523
1524impl InternalGetBootDriverOverridesResponder {
1525 pub fn send(self, mut result: Result<&[String], i32>) -> Result<(), fidl::Error> {
1529 let _result = self.send_raw(result);
1530 if _result.is_err() {
1531 self.control_handle.shutdown();
1532 }
1533 self.drop_without_shutdown();
1534 _result
1535 }
1536
1537 pub fn send_no_shutdown_on_err(
1539 self,
1540 mut result: Result<&[String], i32>,
1541 ) -> Result<(), fidl::Error> {
1542 let _result = self.send_raw(result);
1543 self.drop_without_shutdown();
1544 _result
1545 }
1546
1547 fn send_raw(&self, mut result: Result<&[String], i32>) -> Result<(), fidl::Error> {
1548 self.control_handle.inner.send::<fidl::encoding::ResultType<
1549 InternalGetBootDriverOverridesResponse,
1550 i32,
1551 >>(
1552 result.map(|boot_overrides| (boot_overrides,)),
1553 self.tx_id,
1554 0x6a40991d8259e008,
1555 fidl::encoding::DynamicFlags::empty(),
1556 )
1557 }
1558}
1559
1560#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1561pub struct RealmMarker;
1562
1563impl fidl::endpoints::ProtocolMarker for RealmMarker {
1564 type Proxy = RealmProxy;
1565 type RequestStream = RealmRequestStream;
1566 #[cfg(target_os = "fuchsia")]
1567 type SynchronousProxy = RealmSynchronousProxy;
1568
1569 const DEBUG_NAME: &'static str = "fuchsia.driver.test.Realm";
1570}
1571impl fidl::endpoints::DiscoverableProtocolMarker for RealmMarker {}
1572pub type RealmStartResult = Result<(), i32>;
1573
1574pub trait RealmProxyInterface: Send + Sync {
1575 type StartResponseFut: std::future::Future<Output = Result<RealmStartResult, fidl::Error>>
1576 + Send;
1577 fn r#start(&self, args: RealmArgs) -> Self::StartResponseFut;
1578}
1579#[derive(Debug)]
1580#[cfg(target_os = "fuchsia")]
1581pub struct RealmSynchronousProxy {
1582 client: fidl::client::sync::Client,
1583}
1584
1585#[cfg(target_os = "fuchsia")]
1586impl fidl::endpoints::SynchronousProxy for RealmSynchronousProxy {
1587 type Proxy = RealmProxy;
1588 type Protocol = RealmMarker;
1589
1590 fn from_channel(inner: fidl::Channel) -> Self {
1591 Self::new(inner)
1592 }
1593
1594 fn into_channel(self) -> fidl::Channel {
1595 self.client.into_channel()
1596 }
1597
1598 fn as_channel(&self) -> &fidl::Channel {
1599 self.client.as_channel()
1600 }
1601}
1602
1603#[cfg(target_os = "fuchsia")]
1604impl RealmSynchronousProxy {
1605 pub fn new(channel: fidl::Channel) -> Self {
1606 let protocol_name = <RealmMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1607 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1608 }
1609
1610 pub fn into_channel(self) -> fidl::Channel {
1611 self.client.into_channel()
1612 }
1613
1614 pub fn wait_for_event(
1617 &self,
1618 deadline: zx::MonotonicInstant,
1619 ) -> Result<RealmEvent, fidl::Error> {
1620 RealmEvent::decode(self.client.wait_for_event(deadline)?)
1621 }
1622
1623 pub fn r#start(
1629 &self,
1630 mut args: RealmArgs,
1631 ___deadline: zx::MonotonicInstant,
1632 ) -> Result<RealmStartResult, fidl::Error> {
1633 let _response = self.client.send_query::<
1634 RealmStartRequest,
1635 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1636 >(
1637 (&mut args,),
1638 0x3dc6949d581e96fa,
1639 fidl::encoding::DynamicFlags::FLEXIBLE,
1640 ___deadline,
1641 )?
1642 .into_result::<RealmMarker>("start")?;
1643 Ok(_response.map(|x| x))
1644 }
1645}
1646
1647#[cfg(target_os = "fuchsia")]
1648impl From<RealmSynchronousProxy> for zx::Handle {
1649 fn from(value: RealmSynchronousProxy) -> Self {
1650 value.into_channel().into()
1651 }
1652}
1653
1654#[cfg(target_os = "fuchsia")]
1655impl From<fidl::Channel> for RealmSynchronousProxy {
1656 fn from(value: fidl::Channel) -> Self {
1657 Self::new(value)
1658 }
1659}
1660
1661#[derive(Debug, Clone)]
1662pub struct RealmProxy {
1663 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1664}
1665
1666impl fidl::endpoints::Proxy for RealmProxy {
1667 type Protocol = RealmMarker;
1668
1669 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1670 Self::new(inner)
1671 }
1672
1673 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1674 self.client.into_channel().map_err(|client| Self { client })
1675 }
1676
1677 fn as_channel(&self) -> &::fidl::AsyncChannel {
1678 self.client.as_channel()
1679 }
1680}
1681
1682impl RealmProxy {
1683 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1685 let protocol_name = <RealmMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1686 Self { client: fidl::client::Client::new(channel, protocol_name) }
1687 }
1688
1689 pub fn take_event_stream(&self) -> RealmEventStream {
1695 RealmEventStream { event_receiver: self.client.take_event_receiver() }
1696 }
1697
1698 pub fn r#start(
1704 &self,
1705 mut args: RealmArgs,
1706 ) -> fidl::client::QueryResponseFut<
1707 RealmStartResult,
1708 fidl::encoding::DefaultFuchsiaResourceDialect,
1709 > {
1710 RealmProxyInterface::r#start(self, args)
1711 }
1712}
1713
1714impl RealmProxyInterface for RealmProxy {
1715 type StartResponseFut = fidl::client::QueryResponseFut<
1716 RealmStartResult,
1717 fidl::encoding::DefaultFuchsiaResourceDialect,
1718 >;
1719 fn r#start(&self, mut args: RealmArgs) -> Self::StartResponseFut {
1720 fn _decode(
1721 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1722 ) -> Result<RealmStartResult, fidl::Error> {
1723 let _response = fidl::client::decode_transaction_body::<
1724 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, i32>,
1725 fidl::encoding::DefaultFuchsiaResourceDialect,
1726 0x3dc6949d581e96fa,
1727 >(_buf?)?
1728 .into_result::<RealmMarker>("start")?;
1729 Ok(_response.map(|x| x))
1730 }
1731 self.client.send_query_and_decode::<RealmStartRequest, RealmStartResult>(
1732 (&mut args,),
1733 0x3dc6949d581e96fa,
1734 fidl::encoding::DynamicFlags::FLEXIBLE,
1735 _decode,
1736 )
1737 }
1738}
1739
1740pub struct RealmEventStream {
1741 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1742}
1743
1744impl std::marker::Unpin for RealmEventStream {}
1745
1746impl futures::stream::FusedStream for RealmEventStream {
1747 fn is_terminated(&self) -> bool {
1748 self.event_receiver.is_terminated()
1749 }
1750}
1751
1752impl futures::Stream for RealmEventStream {
1753 type Item = Result<RealmEvent, fidl::Error>;
1754
1755 fn poll_next(
1756 mut self: std::pin::Pin<&mut Self>,
1757 cx: &mut std::task::Context<'_>,
1758 ) -> std::task::Poll<Option<Self::Item>> {
1759 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1760 &mut self.event_receiver,
1761 cx
1762 )?) {
1763 Some(buf) => std::task::Poll::Ready(Some(RealmEvent::decode(buf))),
1764 None => std::task::Poll::Ready(None),
1765 }
1766 }
1767}
1768
1769#[derive(Debug)]
1770pub enum RealmEvent {
1771 #[non_exhaustive]
1772 _UnknownEvent {
1773 ordinal: u64,
1775 },
1776}
1777
1778impl RealmEvent {
1779 fn decode(
1781 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1782 ) -> Result<RealmEvent, fidl::Error> {
1783 let (bytes, _handles) = buf.split_mut();
1784 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1785 debug_assert_eq!(tx_header.tx_id, 0);
1786 match tx_header.ordinal {
1787 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
1788 Ok(RealmEvent::_UnknownEvent { ordinal: tx_header.ordinal })
1789 }
1790 _ => Err(fidl::Error::UnknownOrdinal {
1791 ordinal: tx_header.ordinal,
1792 protocol_name: <RealmMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1793 }),
1794 }
1795 }
1796}
1797
1798pub struct RealmRequestStream {
1800 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1801 is_terminated: bool,
1802}
1803
1804impl std::marker::Unpin for RealmRequestStream {}
1805
1806impl futures::stream::FusedStream for RealmRequestStream {
1807 fn is_terminated(&self) -> bool {
1808 self.is_terminated
1809 }
1810}
1811
1812impl fidl::endpoints::RequestStream for RealmRequestStream {
1813 type Protocol = RealmMarker;
1814 type ControlHandle = RealmControlHandle;
1815
1816 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1817 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1818 }
1819
1820 fn control_handle(&self) -> Self::ControlHandle {
1821 RealmControlHandle { inner: self.inner.clone() }
1822 }
1823
1824 fn into_inner(
1825 self,
1826 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1827 {
1828 (self.inner, self.is_terminated)
1829 }
1830
1831 fn from_inner(
1832 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1833 is_terminated: bool,
1834 ) -> Self {
1835 Self { inner, is_terminated }
1836 }
1837}
1838
1839impl futures::Stream for RealmRequestStream {
1840 type Item = Result<RealmRequest, fidl::Error>;
1841
1842 fn poll_next(
1843 mut self: std::pin::Pin<&mut Self>,
1844 cx: &mut std::task::Context<'_>,
1845 ) -> std::task::Poll<Option<Self::Item>> {
1846 let this = &mut *self;
1847 if this.inner.check_shutdown(cx) {
1848 this.is_terminated = true;
1849 return std::task::Poll::Ready(None);
1850 }
1851 if this.is_terminated {
1852 panic!("polled RealmRequestStream after completion");
1853 }
1854 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1855 |bytes, handles| {
1856 match this.inner.channel().read_etc(cx, bytes, handles) {
1857 std::task::Poll::Ready(Ok(())) => {}
1858 std::task::Poll::Pending => return std::task::Poll::Pending,
1859 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1860 this.is_terminated = true;
1861 return std::task::Poll::Ready(None);
1862 }
1863 std::task::Poll::Ready(Err(e)) => {
1864 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1865 e.into(),
1866 ))))
1867 }
1868 }
1869
1870 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1872
1873 std::task::Poll::Ready(Some(match header.ordinal {
1874 0x3dc6949d581e96fa => {
1875 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1876 let mut req = fidl::new_empty!(
1877 RealmStartRequest,
1878 fidl::encoding::DefaultFuchsiaResourceDialect
1879 );
1880 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RealmStartRequest>(&header, _body_bytes, handles, &mut req)?;
1881 let control_handle = RealmControlHandle { inner: this.inner.clone() };
1882 Ok(RealmRequest::Start {
1883 args: req.args,
1884
1885 responder: RealmStartResponder {
1886 control_handle: std::mem::ManuallyDrop::new(control_handle),
1887 tx_id: header.tx_id,
1888 },
1889 })
1890 }
1891 _ if header.tx_id == 0
1892 && header
1893 .dynamic_flags()
1894 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
1895 {
1896 Ok(RealmRequest::_UnknownMethod {
1897 ordinal: header.ordinal,
1898 control_handle: RealmControlHandle { inner: this.inner.clone() },
1899 method_type: fidl::MethodType::OneWay,
1900 })
1901 }
1902 _ if header
1903 .dynamic_flags()
1904 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
1905 {
1906 this.inner.send_framework_err(
1907 fidl::encoding::FrameworkErr::UnknownMethod,
1908 header.tx_id,
1909 header.ordinal,
1910 header.dynamic_flags(),
1911 (bytes, handles),
1912 )?;
1913 Ok(RealmRequest::_UnknownMethod {
1914 ordinal: header.ordinal,
1915 control_handle: RealmControlHandle { inner: this.inner.clone() },
1916 method_type: fidl::MethodType::TwoWay,
1917 })
1918 }
1919 _ => Err(fidl::Error::UnknownOrdinal {
1920 ordinal: header.ordinal,
1921 protocol_name: <RealmMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1922 }),
1923 }))
1924 },
1925 )
1926 }
1927}
1928
1929#[derive(Debug)]
1932pub enum RealmRequest {
1933 Start { args: RealmArgs, responder: RealmStartResponder },
1939 #[non_exhaustive]
1941 _UnknownMethod {
1942 ordinal: u64,
1944 control_handle: RealmControlHandle,
1945 method_type: fidl::MethodType,
1946 },
1947}
1948
1949impl RealmRequest {
1950 #[allow(irrefutable_let_patterns)]
1951 pub fn into_start(self) -> Option<(RealmArgs, RealmStartResponder)> {
1952 if let RealmRequest::Start { args, responder } = self {
1953 Some((args, responder))
1954 } else {
1955 None
1956 }
1957 }
1958
1959 pub fn method_name(&self) -> &'static str {
1961 match *self {
1962 RealmRequest::Start { .. } => "start",
1963 RealmRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
1964 "unknown one-way method"
1965 }
1966 RealmRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
1967 "unknown two-way method"
1968 }
1969 }
1970 }
1971}
1972
1973#[derive(Debug, Clone)]
1974pub struct RealmControlHandle {
1975 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1976}
1977
1978impl fidl::endpoints::ControlHandle for RealmControlHandle {
1979 fn shutdown(&self) {
1980 self.inner.shutdown()
1981 }
1982 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1983 self.inner.shutdown_with_epitaph(status)
1984 }
1985
1986 fn is_closed(&self) -> bool {
1987 self.inner.channel().is_closed()
1988 }
1989 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1990 self.inner.channel().on_closed()
1991 }
1992
1993 #[cfg(target_os = "fuchsia")]
1994 fn signal_peer(
1995 &self,
1996 clear_mask: zx::Signals,
1997 set_mask: zx::Signals,
1998 ) -> Result<(), zx_status::Status> {
1999 use fidl::Peered;
2000 self.inner.channel().signal_peer(clear_mask, set_mask)
2001 }
2002}
2003
2004impl RealmControlHandle {}
2005
2006#[must_use = "FIDL methods require a response to be sent"]
2007#[derive(Debug)]
2008pub struct RealmStartResponder {
2009 control_handle: std::mem::ManuallyDrop<RealmControlHandle>,
2010 tx_id: u32,
2011}
2012
2013impl std::ops::Drop for RealmStartResponder {
2017 fn drop(&mut self) {
2018 self.control_handle.shutdown();
2019 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2021 }
2022}
2023
2024impl fidl::endpoints::Responder for RealmStartResponder {
2025 type ControlHandle = RealmControlHandle;
2026
2027 fn control_handle(&self) -> &RealmControlHandle {
2028 &self.control_handle
2029 }
2030
2031 fn drop_without_shutdown(mut self) {
2032 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2034 std::mem::forget(self);
2036 }
2037}
2038
2039impl RealmStartResponder {
2040 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2044 let _result = self.send_raw(result);
2045 if _result.is_err() {
2046 self.control_handle.shutdown();
2047 }
2048 self.drop_without_shutdown();
2049 _result
2050 }
2051
2052 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2054 let _result = self.send_raw(result);
2055 self.drop_without_shutdown();
2056 _result
2057 }
2058
2059 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2060 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
2061 fidl::encoding::EmptyStruct,
2062 i32,
2063 >>(
2064 fidl::encoding::FlexibleResult::new(result),
2065 self.tx_id,
2066 0x3dc6949d581e96fa,
2067 fidl::encoding::DynamicFlags::FLEXIBLE,
2068 )
2069 }
2070}
2071
2072mod internal {
2073 use super::*;
2074
2075 impl fidl::encoding::ResourceTypeMarker for InternalGetBootDirectoryResponse {
2076 type Borrowed<'a> = &'a mut Self;
2077 fn take_or_borrow<'a>(
2078 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2079 ) -> Self::Borrowed<'a> {
2080 value
2081 }
2082 }
2083
2084 unsafe impl fidl::encoding::TypeMarker for InternalGetBootDirectoryResponse {
2085 type Owned = Self;
2086
2087 #[inline(always)]
2088 fn inline_align(_context: fidl::encoding::Context) -> usize {
2089 4
2090 }
2091
2092 #[inline(always)]
2093 fn inline_size(_context: fidl::encoding::Context) -> usize {
2094 4
2095 }
2096 }
2097
2098 unsafe impl
2099 fidl::encoding::Encode<
2100 InternalGetBootDirectoryResponse,
2101 fidl::encoding::DefaultFuchsiaResourceDialect,
2102 > for &mut InternalGetBootDirectoryResponse
2103 {
2104 #[inline]
2105 unsafe fn encode(
2106 self,
2107 encoder: &mut fidl::encoding::Encoder<
2108 '_,
2109 fidl::encoding::DefaultFuchsiaResourceDialect,
2110 >,
2111 offset: usize,
2112 _depth: fidl::encoding::Depth,
2113 ) -> fidl::Result<()> {
2114 encoder.debug_check_bounds::<InternalGetBootDirectoryResponse>(offset);
2115 fidl::encoding::Encode::<
2117 InternalGetBootDirectoryResponse,
2118 fidl::encoding::DefaultFuchsiaResourceDialect,
2119 >::encode(
2120 (<fidl::encoding::Optional<
2121 fidl::encoding::Endpoint<
2122 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
2123 >,
2124 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2125 &mut self.boot_dir
2126 ),),
2127 encoder,
2128 offset,
2129 _depth,
2130 )
2131 }
2132 }
2133 unsafe impl<
2134 T0: fidl::encoding::Encode<
2135 fidl::encoding::Optional<
2136 fidl::encoding::Endpoint<
2137 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
2138 >,
2139 >,
2140 fidl::encoding::DefaultFuchsiaResourceDialect,
2141 >,
2142 >
2143 fidl::encoding::Encode<
2144 InternalGetBootDirectoryResponse,
2145 fidl::encoding::DefaultFuchsiaResourceDialect,
2146 > for (T0,)
2147 {
2148 #[inline]
2149 unsafe fn encode(
2150 self,
2151 encoder: &mut fidl::encoding::Encoder<
2152 '_,
2153 fidl::encoding::DefaultFuchsiaResourceDialect,
2154 >,
2155 offset: usize,
2156 depth: fidl::encoding::Depth,
2157 ) -> fidl::Result<()> {
2158 encoder.debug_check_bounds::<InternalGetBootDirectoryResponse>(offset);
2159 self.0.encode(encoder, offset + 0, depth)?;
2163 Ok(())
2164 }
2165 }
2166
2167 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2168 for InternalGetBootDirectoryResponse
2169 {
2170 #[inline(always)]
2171 fn new_empty() -> Self {
2172 Self {
2173 boot_dir: fidl::new_empty!(
2174 fidl::encoding::Optional<
2175 fidl::encoding::Endpoint<
2176 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
2177 >,
2178 >,
2179 fidl::encoding::DefaultFuchsiaResourceDialect
2180 ),
2181 }
2182 }
2183
2184 #[inline]
2185 unsafe fn decode(
2186 &mut self,
2187 decoder: &mut fidl::encoding::Decoder<
2188 '_,
2189 fidl::encoding::DefaultFuchsiaResourceDialect,
2190 >,
2191 offset: usize,
2192 _depth: fidl::encoding::Depth,
2193 ) -> fidl::Result<()> {
2194 decoder.debug_check_bounds::<Self>(offset);
2195 fidl::decode!(
2197 fidl::encoding::Optional<
2198 fidl::encoding::Endpoint<
2199 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
2200 >,
2201 >,
2202 fidl::encoding::DefaultFuchsiaResourceDialect,
2203 &mut self.boot_dir,
2204 decoder,
2205 offset + 0,
2206 _depth
2207 )?;
2208 Ok(())
2209 }
2210 }
2211
2212 impl fidl::encoding::ResourceTypeMarker for InternalGetTestPackageResponse {
2213 type Borrowed<'a> = &'a mut Self;
2214 fn take_or_borrow<'a>(
2215 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2216 ) -> Self::Borrowed<'a> {
2217 value
2218 }
2219 }
2220
2221 unsafe impl fidl::encoding::TypeMarker for InternalGetTestPackageResponse {
2222 type Owned = Self;
2223
2224 #[inline(always)]
2225 fn inline_align(_context: fidl::encoding::Context) -> usize {
2226 4
2227 }
2228
2229 #[inline(always)]
2230 fn inline_size(_context: fidl::encoding::Context) -> usize {
2231 4
2232 }
2233 }
2234
2235 unsafe impl
2236 fidl::encoding::Encode<
2237 InternalGetTestPackageResponse,
2238 fidl::encoding::DefaultFuchsiaResourceDialect,
2239 > for &mut InternalGetTestPackageResponse
2240 {
2241 #[inline]
2242 unsafe fn encode(
2243 self,
2244 encoder: &mut fidl::encoding::Encoder<
2245 '_,
2246 fidl::encoding::DefaultFuchsiaResourceDialect,
2247 >,
2248 offset: usize,
2249 _depth: fidl::encoding::Depth,
2250 ) -> fidl::Result<()> {
2251 encoder.debug_check_bounds::<InternalGetTestPackageResponse>(offset);
2252 fidl::encoding::Encode::<
2254 InternalGetTestPackageResponse,
2255 fidl::encoding::DefaultFuchsiaResourceDialect,
2256 >::encode(
2257 (<fidl::encoding::Optional<
2258 fidl::encoding::Endpoint<
2259 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
2260 >,
2261 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
2262 &mut self.test_pkg_dir
2263 ),),
2264 encoder,
2265 offset,
2266 _depth,
2267 )
2268 }
2269 }
2270 unsafe impl<
2271 T0: fidl::encoding::Encode<
2272 fidl::encoding::Optional<
2273 fidl::encoding::Endpoint<
2274 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
2275 >,
2276 >,
2277 fidl::encoding::DefaultFuchsiaResourceDialect,
2278 >,
2279 >
2280 fidl::encoding::Encode<
2281 InternalGetTestPackageResponse,
2282 fidl::encoding::DefaultFuchsiaResourceDialect,
2283 > for (T0,)
2284 {
2285 #[inline]
2286 unsafe fn encode(
2287 self,
2288 encoder: &mut fidl::encoding::Encoder<
2289 '_,
2290 fidl::encoding::DefaultFuchsiaResourceDialect,
2291 >,
2292 offset: usize,
2293 depth: fidl::encoding::Depth,
2294 ) -> fidl::Result<()> {
2295 encoder.debug_check_bounds::<InternalGetTestPackageResponse>(offset);
2296 self.0.encode(encoder, offset + 0, depth)?;
2300 Ok(())
2301 }
2302 }
2303
2304 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2305 for InternalGetTestPackageResponse
2306 {
2307 #[inline(always)]
2308 fn new_empty() -> Self {
2309 Self {
2310 test_pkg_dir: fidl::new_empty!(
2311 fidl::encoding::Optional<
2312 fidl::encoding::Endpoint<
2313 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
2314 >,
2315 >,
2316 fidl::encoding::DefaultFuchsiaResourceDialect
2317 ),
2318 }
2319 }
2320
2321 #[inline]
2322 unsafe fn decode(
2323 &mut self,
2324 decoder: &mut fidl::encoding::Decoder<
2325 '_,
2326 fidl::encoding::DefaultFuchsiaResourceDialect,
2327 >,
2328 offset: usize,
2329 _depth: fidl::encoding::Depth,
2330 ) -> fidl::Result<()> {
2331 decoder.debug_check_bounds::<Self>(offset);
2332 fidl::decode!(
2334 fidl::encoding::Optional<
2335 fidl::encoding::Endpoint<
2336 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
2337 >,
2338 >,
2339 fidl::encoding::DefaultFuchsiaResourceDialect,
2340 &mut self.test_pkg_dir,
2341 decoder,
2342 offset + 0,
2343 _depth
2344 )?;
2345 Ok(())
2346 }
2347 }
2348
2349 impl fidl::encoding::ResourceTypeMarker for RealmStartRequest {
2350 type Borrowed<'a> = &'a mut Self;
2351 fn take_or_borrow<'a>(
2352 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2353 ) -> Self::Borrowed<'a> {
2354 value
2355 }
2356 }
2357
2358 unsafe impl fidl::encoding::TypeMarker for RealmStartRequest {
2359 type Owned = Self;
2360
2361 #[inline(always)]
2362 fn inline_align(_context: fidl::encoding::Context) -> usize {
2363 8
2364 }
2365
2366 #[inline(always)]
2367 fn inline_size(_context: fidl::encoding::Context) -> usize {
2368 16
2369 }
2370 }
2371
2372 unsafe impl
2373 fidl::encoding::Encode<RealmStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
2374 for &mut RealmStartRequest
2375 {
2376 #[inline]
2377 unsafe fn encode(
2378 self,
2379 encoder: &mut fidl::encoding::Encoder<
2380 '_,
2381 fidl::encoding::DefaultFuchsiaResourceDialect,
2382 >,
2383 offset: usize,
2384 _depth: fidl::encoding::Depth,
2385 ) -> fidl::Result<()> {
2386 encoder.debug_check_bounds::<RealmStartRequest>(offset);
2387 fidl::encoding::Encode::<RealmStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
2389 (
2390 <RealmArgs as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.args),
2391 ),
2392 encoder, offset, _depth
2393 )
2394 }
2395 }
2396 unsafe impl<T0: fidl::encoding::Encode<RealmArgs, fidl::encoding::DefaultFuchsiaResourceDialect>>
2397 fidl::encoding::Encode<RealmStartRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
2398 for (T0,)
2399 {
2400 #[inline]
2401 unsafe fn encode(
2402 self,
2403 encoder: &mut fidl::encoding::Encoder<
2404 '_,
2405 fidl::encoding::DefaultFuchsiaResourceDialect,
2406 >,
2407 offset: usize,
2408 depth: fidl::encoding::Depth,
2409 ) -> fidl::Result<()> {
2410 encoder.debug_check_bounds::<RealmStartRequest>(offset);
2411 self.0.encode(encoder, offset + 0, depth)?;
2415 Ok(())
2416 }
2417 }
2418
2419 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
2420 for RealmStartRequest
2421 {
2422 #[inline(always)]
2423 fn new_empty() -> Self {
2424 Self {
2425 args: fidl::new_empty!(RealmArgs, fidl::encoding::DefaultFuchsiaResourceDialect),
2426 }
2427 }
2428
2429 #[inline]
2430 unsafe fn decode(
2431 &mut self,
2432 decoder: &mut fidl::encoding::Decoder<
2433 '_,
2434 fidl::encoding::DefaultFuchsiaResourceDialect,
2435 >,
2436 offset: usize,
2437 _depth: fidl::encoding::Depth,
2438 ) -> fidl::Result<()> {
2439 decoder.debug_check_bounds::<Self>(offset);
2440 fidl::decode!(
2442 RealmArgs,
2443 fidl::encoding::DefaultFuchsiaResourceDialect,
2444 &mut self.args,
2445 decoder,
2446 offset + 0,
2447 _depth
2448 )?;
2449 Ok(())
2450 }
2451 }
2452
2453 impl RealmArgs {
2454 #[inline(always)]
2455 fn max_ordinal_present(&self) -> u64 {
2456 if let Some(_) = self.platform_pid {
2457 return 22;
2458 }
2459 if let Some(_) = self.platform_vid {
2460 return 21;
2461 }
2462 if let Some(_) = self.devicetree {
2463 return 20;
2464 }
2465 if let Some(_) = self.boot_driver_components {
2466 return 19;
2467 }
2468 if let Some(_) = self.software_devices {
2469 return 18;
2470 }
2471 if let Some(_) = self.driver_index_stop_timeout_millis {
2472 return 17;
2473 }
2474 if let Some(_) = self.test_component {
2475 return 16;
2476 }
2477 if let Some(_) = self.dtr_exposes {
2478 return 15;
2479 }
2480 if let Some(_) = self.dtr_offers {
2481 return 14;
2482 }
2483 if let Some(_) = self.pkg {
2484 return 13;
2485 }
2486 if let Some(_) = self.exposes {
2487 return 12;
2488 }
2489 if let Some(_) = self.offers {
2490 return 11;
2491 }
2492 if let Some(_) = self.board_name {
2493 return 10;
2494 }
2495 if let Some(_) = self.driver_bind_eager {
2496 return 9;
2497 }
2498 if let Some(_) = self.driver_disable {
2499 return 8;
2500 }
2501 if let Some(_) = self.driver_log_level {
2502 return 7;
2503 }
2504 if let Some(_) = self.driver_tests_disable {
2505 return 6;
2506 }
2507 if let Some(_) = self.driver_tests_enable {
2508 return 5;
2509 }
2510 if let Some(_) = self.driver_tests_enable_all {
2511 return 4;
2512 }
2513 if let Some(_) = self.use_driver_framework_v2 {
2514 return 3;
2515 }
2516 if let Some(_) = self.root_driver {
2517 return 2;
2518 }
2519 if let Some(_) = self.boot {
2520 return 1;
2521 }
2522 0
2523 }
2524 }
2525
2526 impl fidl::encoding::ResourceTypeMarker for RealmArgs {
2527 type Borrowed<'a> = &'a mut Self;
2528 fn take_or_borrow<'a>(
2529 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
2530 ) -> Self::Borrowed<'a> {
2531 value
2532 }
2533 }
2534
2535 unsafe impl fidl::encoding::TypeMarker for RealmArgs {
2536 type Owned = Self;
2537
2538 #[inline(always)]
2539 fn inline_align(_context: fidl::encoding::Context) -> usize {
2540 8
2541 }
2542
2543 #[inline(always)]
2544 fn inline_size(_context: fidl::encoding::Context) -> usize {
2545 16
2546 }
2547 }
2548
2549 unsafe impl fidl::encoding::Encode<RealmArgs, fidl::encoding::DefaultFuchsiaResourceDialect>
2550 for &mut RealmArgs
2551 {
2552 unsafe fn encode(
2553 self,
2554 encoder: &mut fidl::encoding::Encoder<
2555 '_,
2556 fidl::encoding::DefaultFuchsiaResourceDialect,
2557 >,
2558 offset: usize,
2559 mut depth: fidl::encoding::Depth,
2560 ) -> fidl::Result<()> {
2561 encoder.debug_check_bounds::<RealmArgs>(offset);
2562 let max_ordinal: u64 = self.max_ordinal_present();
2564 encoder.write_num(max_ordinal, offset);
2565 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2566 if max_ordinal == 0 {
2568 return Ok(());
2569 }
2570 depth.increment()?;
2571 let envelope_size = 8;
2572 let bytes_len = max_ordinal as usize * envelope_size;
2573 #[allow(unused_variables)]
2574 let offset = encoder.out_of_line_offset(bytes_len);
2575 let mut _prev_end_offset: usize = 0;
2576 if 1 > max_ordinal {
2577 return Ok(());
2578 }
2579
2580 let cur_offset: usize = (1 - 1) * envelope_size;
2583
2584 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2586
2587 fidl::encoding::encode_in_envelope_optional::<
2592 fidl::encoding::Endpoint<
2593 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
2594 >,
2595 fidl::encoding::DefaultFuchsiaResourceDialect,
2596 >(
2597 self.boot.as_mut().map(
2598 <fidl::encoding::Endpoint<
2599 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
2600 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
2601 ),
2602 encoder,
2603 offset + cur_offset,
2604 depth,
2605 )?;
2606
2607 _prev_end_offset = cur_offset + envelope_size;
2608 if 2 > max_ordinal {
2609 return Ok(());
2610 }
2611
2612 let cur_offset: usize = (2 - 1) * envelope_size;
2615
2616 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2618
2619 fidl::encoding::encode_in_envelope_optional::<
2624 fidl::encoding::UnboundedString,
2625 fidl::encoding::DefaultFuchsiaResourceDialect,
2626 >(
2627 self.root_driver.as_ref().map(
2628 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
2629 ),
2630 encoder,
2631 offset + cur_offset,
2632 depth,
2633 )?;
2634
2635 _prev_end_offset = cur_offset + envelope_size;
2636 if 3 > max_ordinal {
2637 return Ok(());
2638 }
2639
2640 let cur_offset: usize = (3 - 1) * envelope_size;
2643
2644 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2646
2647 fidl::encoding::encode_in_envelope_optional::<
2652 bool,
2653 fidl::encoding::DefaultFuchsiaResourceDialect,
2654 >(
2655 self.use_driver_framework_v2
2656 .as_ref()
2657 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2658 encoder,
2659 offset + cur_offset,
2660 depth,
2661 )?;
2662
2663 _prev_end_offset = cur_offset + envelope_size;
2664 if 4 > max_ordinal {
2665 return Ok(());
2666 }
2667
2668 let cur_offset: usize = (4 - 1) * envelope_size;
2671
2672 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2674
2675 fidl::encoding::encode_in_envelope_optional::<
2680 bool,
2681 fidl::encoding::DefaultFuchsiaResourceDialect,
2682 >(
2683 self.driver_tests_enable_all
2684 .as_ref()
2685 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2686 encoder,
2687 offset + cur_offset,
2688 depth,
2689 )?;
2690
2691 _prev_end_offset = cur_offset + envelope_size;
2692 if 5 > max_ordinal {
2693 return Ok(());
2694 }
2695
2696 let cur_offset: usize = (5 - 1) * envelope_size;
2699
2700 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2702
2703 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, fidl::encoding::DefaultFuchsiaResourceDialect>(
2708 self.driver_tests_enable.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
2709 encoder, offset + cur_offset, depth
2710 )?;
2711
2712 _prev_end_offset = cur_offset + envelope_size;
2713 if 6 > max_ordinal {
2714 return Ok(());
2715 }
2716
2717 let cur_offset: usize = (6 - 1) * envelope_size;
2720
2721 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2723
2724 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, fidl::encoding::DefaultFuchsiaResourceDialect>(
2729 self.driver_tests_disable.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
2730 encoder, offset + cur_offset, depth
2731 )?;
2732
2733 _prev_end_offset = cur_offset + envelope_size;
2734 if 7 > max_ordinal {
2735 return Ok(());
2736 }
2737
2738 let cur_offset: usize = (7 - 1) * envelope_size;
2741
2742 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2744
2745 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<DriverLog>, fidl::encoding::DefaultFuchsiaResourceDialect>(
2750 self.driver_log_level.as_ref().map(<fidl::encoding::UnboundedVector<DriverLog> as fidl::encoding::ValueTypeMarker>::borrow),
2751 encoder, offset + cur_offset, depth
2752 )?;
2753
2754 _prev_end_offset = cur_offset + envelope_size;
2755 if 8 > max_ordinal {
2756 return Ok(());
2757 }
2758
2759 let cur_offset: usize = (8 - 1) * envelope_size;
2762
2763 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2765
2766 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, fidl::encoding::DefaultFuchsiaResourceDialect>(
2771 self.driver_disable.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
2772 encoder, offset + cur_offset, depth
2773 )?;
2774
2775 _prev_end_offset = cur_offset + envelope_size;
2776 if 9 > max_ordinal {
2777 return Ok(());
2778 }
2779
2780 let cur_offset: usize = (9 - 1) * envelope_size;
2783
2784 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2786
2787 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, fidl::encoding::DefaultFuchsiaResourceDialect>(
2792 self.driver_bind_eager.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
2793 encoder, offset + cur_offset, depth
2794 )?;
2795
2796 _prev_end_offset = cur_offset + envelope_size;
2797 if 10 > max_ordinal {
2798 return Ok(());
2799 }
2800
2801 let cur_offset: usize = (10 - 1) * envelope_size;
2804
2805 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2807
2808 fidl::encoding::encode_in_envelope_optional::<
2813 fidl::encoding::UnboundedString,
2814 fidl::encoding::DefaultFuchsiaResourceDialect,
2815 >(
2816 self.board_name.as_ref().map(
2817 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
2818 ),
2819 encoder,
2820 offset + cur_offset,
2821 depth,
2822 )?;
2823
2824 _prev_end_offset = cur_offset + envelope_size;
2825 if 11 > max_ordinal {
2826 return Ok(());
2827 }
2828
2829 let cur_offset: usize = (11 - 1) * envelope_size;
2832
2833 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2835
2836 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<Offer>, fidl::encoding::DefaultFuchsiaResourceDialect>(
2841 self.offers.as_ref().map(<fidl::encoding::UnboundedVector<Offer> as fidl::encoding::ValueTypeMarker>::borrow),
2842 encoder, offset + cur_offset, depth
2843 )?;
2844
2845 _prev_end_offset = cur_offset + envelope_size;
2846 if 12 > max_ordinal {
2847 return Ok(());
2848 }
2849
2850 let cur_offset: usize = (12 - 1) * envelope_size;
2853
2854 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2856
2857 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<Expose>, fidl::encoding::DefaultFuchsiaResourceDialect>(
2862 self.exposes.as_ref().map(<fidl::encoding::UnboundedVector<Expose> as fidl::encoding::ValueTypeMarker>::borrow),
2863 encoder, offset + cur_offset, depth
2864 )?;
2865
2866 _prev_end_offset = cur_offset + envelope_size;
2867 if 13 > max_ordinal {
2868 return Ok(());
2869 }
2870
2871 let cur_offset: usize = (13 - 1) * envelope_size;
2874
2875 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2877
2878 fidl::encoding::encode_in_envelope_optional::<
2883 fidl::encoding::Endpoint<
2884 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
2885 >,
2886 fidl::encoding::DefaultFuchsiaResourceDialect,
2887 >(
2888 self.pkg.as_mut().map(
2889 <fidl::encoding::Endpoint<
2890 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
2891 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
2892 ),
2893 encoder,
2894 offset + cur_offset,
2895 depth,
2896 )?;
2897
2898 _prev_end_offset = cur_offset + envelope_size;
2899 if 14 > max_ordinal {
2900 return Ok(());
2901 }
2902
2903 let cur_offset: usize = (14 - 1) * envelope_size;
2906
2907 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2909
2910 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl_fuchsia_component_test::Capability>, fidl::encoding::DefaultFuchsiaResourceDialect>(
2915 self.dtr_offers.as_ref().map(<fidl::encoding::UnboundedVector<fidl_fuchsia_component_test::Capability> as fidl::encoding::ValueTypeMarker>::borrow),
2916 encoder, offset + cur_offset, depth
2917 )?;
2918
2919 _prev_end_offset = cur_offset + envelope_size;
2920 if 15 > max_ordinal {
2921 return Ok(());
2922 }
2923
2924 let cur_offset: usize = (15 - 1) * envelope_size;
2927
2928 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2930
2931 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl_fuchsia_component_test::Capability>, fidl::encoding::DefaultFuchsiaResourceDialect>(
2936 self.dtr_exposes.as_ref().map(<fidl::encoding::UnboundedVector<fidl_fuchsia_component_test::Capability> as fidl::encoding::ValueTypeMarker>::borrow),
2937 encoder, offset + cur_offset, depth
2938 )?;
2939
2940 _prev_end_offset = cur_offset + envelope_size;
2941 if 16 > max_ordinal {
2942 return Ok(());
2943 }
2944
2945 let cur_offset: usize = (16 - 1) * envelope_size;
2948
2949 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2951
2952 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_component_resolution::Component, fidl::encoding::DefaultFuchsiaResourceDialect>(
2957 self.test_component.as_mut().map(<fidl_fuchsia_component_resolution::Component as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
2958 encoder, offset + cur_offset, depth
2959 )?;
2960
2961 _prev_end_offset = cur_offset + envelope_size;
2962 if 17 > max_ordinal {
2963 return Ok(());
2964 }
2965
2966 let cur_offset: usize = (17 - 1) * envelope_size;
2969
2970 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2972
2973 fidl::encoding::encode_in_envelope_optional::<
2978 i64,
2979 fidl::encoding::DefaultFuchsiaResourceDialect,
2980 >(
2981 self.driver_index_stop_timeout_millis
2982 .as_ref()
2983 .map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
2984 encoder,
2985 offset + cur_offset,
2986 depth,
2987 )?;
2988
2989 _prev_end_offset = cur_offset + envelope_size;
2990 if 18 > max_ordinal {
2991 return Ok(());
2992 }
2993
2994 let cur_offset: usize = (18 - 1) * envelope_size;
2997
2998 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3000
3001 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<SoftwareDevice, 20>, fidl::encoding::DefaultFuchsiaResourceDialect>(
3006 self.software_devices.as_ref().map(<fidl::encoding::Vector<SoftwareDevice, 20> as fidl::encoding::ValueTypeMarker>::borrow),
3007 encoder, offset + cur_offset, depth
3008 )?;
3009
3010 _prev_end_offset = cur_offset + envelope_size;
3011 if 19 > max_ordinal {
3012 return Ok(());
3013 }
3014
3015 let cur_offset: usize = (19 - 1) * envelope_size;
3018
3019 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3021
3022 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, fidl::encoding::DefaultFuchsiaResourceDialect>(
3027 self.boot_driver_components.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
3028 encoder, offset + cur_offset, depth
3029 )?;
3030
3031 _prev_end_offset = cur_offset + envelope_size;
3032 if 20 > max_ordinal {
3033 return Ok(());
3034 }
3035
3036 let cur_offset: usize = (20 - 1) * envelope_size;
3039
3040 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3042
3043 fidl::encoding::encode_in_envelope_optional::<
3048 fidl::encoding::HandleType<
3049 fidl::Vmo,
3050 { fidl::ObjectType::VMO.into_raw() },
3051 2147483648,
3052 >,
3053 fidl::encoding::DefaultFuchsiaResourceDialect,
3054 >(
3055 self.devicetree.as_mut().map(
3056 <fidl::encoding::HandleType<
3057 fidl::Vmo,
3058 { fidl::ObjectType::VMO.into_raw() },
3059 2147483648,
3060 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
3061 ),
3062 encoder,
3063 offset + cur_offset,
3064 depth,
3065 )?;
3066
3067 _prev_end_offset = cur_offset + envelope_size;
3068 if 21 > max_ordinal {
3069 return Ok(());
3070 }
3071
3072 let cur_offset: usize = (21 - 1) * envelope_size;
3075
3076 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3078
3079 fidl::encoding::encode_in_envelope_optional::<
3084 u32,
3085 fidl::encoding::DefaultFuchsiaResourceDialect,
3086 >(
3087 self.platform_vid.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
3088 encoder,
3089 offset + cur_offset,
3090 depth,
3091 )?;
3092
3093 _prev_end_offset = cur_offset + envelope_size;
3094 if 22 > max_ordinal {
3095 return Ok(());
3096 }
3097
3098 let cur_offset: usize = (22 - 1) * envelope_size;
3101
3102 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3104
3105 fidl::encoding::encode_in_envelope_optional::<
3110 u32,
3111 fidl::encoding::DefaultFuchsiaResourceDialect,
3112 >(
3113 self.platform_pid.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
3114 encoder,
3115 offset + cur_offset,
3116 depth,
3117 )?;
3118
3119 _prev_end_offset = cur_offset + envelope_size;
3120
3121 Ok(())
3122 }
3123 }
3124
3125 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for RealmArgs {
3126 #[inline(always)]
3127 fn new_empty() -> Self {
3128 Self::default()
3129 }
3130
3131 unsafe fn decode(
3132 &mut self,
3133 decoder: &mut fidl::encoding::Decoder<
3134 '_,
3135 fidl::encoding::DefaultFuchsiaResourceDialect,
3136 >,
3137 offset: usize,
3138 mut depth: fidl::encoding::Depth,
3139 ) -> fidl::Result<()> {
3140 decoder.debug_check_bounds::<Self>(offset);
3141 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3142 None => return Err(fidl::Error::NotNullable),
3143 Some(len) => len,
3144 };
3145 if len == 0 {
3147 return Ok(());
3148 };
3149 depth.increment()?;
3150 let envelope_size = 8;
3151 let bytes_len = len * envelope_size;
3152 let offset = decoder.out_of_line_offset(bytes_len)?;
3153 let mut _next_ordinal_to_read = 0;
3155 let mut next_offset = offset;
3156 let end_offset = offset + bytes_len;
3157 _next_ordinal_to_read += 1;
3158 if next_offset >= end_offset {
3159 return Ok(());
3160 }
3161
3162 while _next_ordinal_to_read < 1 {
3164 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3165 _next_ordinal_to_read += 1;
3166 next_offset += envelope_size;
3167 }
3168
3169 let next_out_of_line = decoder.next_out_of_line();
3170 let handles_before = decoder.remaining_handles();
3171 if let Some((inlined, num_bytes, num_handles)) =
3172 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3173 {
3174 let member_inline_size = <fidl::encoding::Endpoint<
3175 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
3176 > as fidl::encoding::TypeMarker>::inline_size(
3177 decoder.context
3178 );
3179 if inlined != (member_inline_size <= 4) {
3180 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3181 }
3182 let inner_offset;
3183 let mut inner_depth = depth.clone();
3184 if inlined {
3185 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3186 inner_offset = next_offset;
3187 } else {
3188 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3189 inner_depth.increment()?;
3190 }
3191 let val_ref = self.boot.get_or_insert_with(|| {
3192 fidl::new_empty!(
3193 fidl::encoding::Endpoint<
3194 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
3195 >,
3196 fidl::encoding::DefaultFuchsiaResourceDialect
3197 )
3198 });
3199 fidl::decode!(
3200 fidl::encoding::Endpoint<
3201 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
3202 >,
3203 fidl::encoding::DefaultFuchsiaResourceDialect,
3204 val_ref,
3205 decoder,
3206 inner_offset,
3207 inner_depth
3208 )?;
3209 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3210 {
3211 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3212 }
3213 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3214 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3215 }
3216 }
3217
3218 next_offset += envelope_size;
3219 _next_ordinal_to_read += 1;
3220 if next_offset >= end_offset {
3221 return Ok(());
3222 }
3223
3224 while _next_ordinal_to_read < 2 {
3226 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3227 _next_ordinal_to_read += 1;
3228 next_offset += envelope_size;
3229 }
3230
3231 let next_out_of_line = decoder.next_out_of_line();
3232 let handles_before = decoder.remaining_handles();
3233 if let Some((inlined, num_bytes, num_handles)) =
3234 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3235 {
3236 let member_inline_size =
3237 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
3238 decoder.context,
3239 );
3240 if inlined != (member_inline_size <= 4) {
3241 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3242 }
3243 let inner_offset;
3244 let mut inner_depth = depth.clone();
3245 if inlined {
3246 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3247 inner_offset = next_offset;
3248 } else {
3249 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3250 inner_depth.increment()?;
3251 }
3252 let val_ref = self.root_driver.get_or_insert_with(|| {
3253 fidl::new_empty!(
3254 fidl::encoding::UnboundedString,
3255 fidl::encoding::DefaultFuchsiaResourceDialect
3256 )
3257 });
3258 fidl::decode!(
3259 fidl::encoding::UnboundedString,
3260 fidl::encoding::DefaultFuchsiaResourceDialect,
3261 val_ref,
3262 decoder,
3263 inner_offset,
3264 inner_depth
3265 )?;
3266 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3267 {
3268 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3269 }
3270 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3271 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3272 }
3273 }
3274
3275 next_offset += envelope_size;
3276 _next_ordinal_to_read += 1;
3277 if next_offset >= end_offset {
3278 return Ok(());
3279 }
3280
3281 while _next_ordinal_to_read < 3 {
3283 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3284 _next_ordinal_to_read += 1;
3285 next_offset += envelope_size;
3286 }
3287
3288 let next_out_of_line = decoder.next_out_of_line();
3289 let handles_before = decoder.remaining_handles();
3290 if let Some((inlined, num_bytes, num_handles)) =
3291 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3292 {
3293 let member_inline_size =
3294 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3295 if inlined != (member_inline_size <= 4) {
3296 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3297 }
3298 let inner_offset;
3299 let mut inner_depth = depth.clone();
3300 if inlined {
3301 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3302 inner_offset = next_offset;
3303 } else {
3304 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3305 inner_depth.increment()?;
3306 }
3307 let val_ref = self.use_driver_framework_v2.get_or_insert_with(|| {
3308 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
3309 });
3310 fidl::decode!(
3311 bool,
3312 fidl::encoding::DefaultFuchsiaResourceDialect,
3313 val_ref,
3314 decoder,
3315 inner_offset,
3316 inner_depth
3317 )?;
3318 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3319 {
3320 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3321 }
3322 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3323 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3324 }
3325 }
3326
3327 next_offset += envelope_size;
3328 _next_ordinal_to_read += 1;
3329 if next_offset >= end_offset {
3330 return Ok(());
3331 }
3332
3333 while _next_ordinal_to_read < 4 {
3335 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3336 _next_ordinal_to_read += 1;
3337 next_offset += envelope_size;
3338 }
3339
3340 let next_out_of_line = decoder.next_out_of_line();
3341 let handles_before = decoder.remaining_handles();
3342 if let Some((inlined, num_bytes, num_handles)) =
3343 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3344 {
3345 let member_inline_size =
3346 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3347 if inlined != (member_inline_size <= 4) {
3348 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3349 }
3350 let inner_offset;
3351 let mut inner_depth = depth.clone();
3352 if inlined {
3353 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3354 inner_offset = next_offset;
3355 } else {
3356 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3357 inner_depth.increment()?;
3358 }
3359 let val_ref = self.driver_tests_enable_all.get_or_insert_with(|| {
3360 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
3361 });
3362 fidl::decode!(
3363 bool,
3364 fidl::encoding::DefaultFuchsiaResourceDialect,
3365 val_ref,
3366 decoder,
3367 inner_offset,
3368 inner_depth
3369 )?;
3370 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3371 {
3372 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3373 }
3374 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3375 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3376 }
3377 }
3378
3379 next_offset += envelope_size;
3380 _next_ordinal_to_read += 1;
3381 if next_offset >= end_offset {
3382 return Ok(());
3383 }
3384
3385 while _next_ordinal_to_read < 5 {
3387 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3388 _next_ordinal_to_read += 1;
3389 next_offset += envelope_size;
3390 }
3391
3392 let next_out_of_line = decoder.next_out_of_line();
3393 let handles_before = decoder.remaining_handles();
3394 if let Some((inlined, num_bytes, num_handles)) =
3395 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3396 {
3397 let member_inline_size = <fidl::encoding::UnboundedVector<
3398 fidl::encoding::UnboundedString,
3399 > as fidl::encoding::TypeMarker>::inline_size(
3400 decoder.context
3401 );
3402 if inlined != (member_inline_size <= 4) {
3403 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3404 }
3405 let inner_offset;
3406 let mut inner_depth = depth.clone();
3407 if inlined {
3408 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3409 inner_offset = next_offset;
3410 } else {
3411 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3412 inner_depth.increment()?;
3413 }
3414 let val_ref = self.driver_tests_enable.get_or_insert_with(|| {
3415 fidl::new_empty!(
3416 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
3417 fidl::encoding::DefaultFuchsiaResourceDialect
3418 )
3419 });
3420 fidl::decode!(
3421 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
3422 fidl::encoding::DefaultFuchsiaResourceDialect,
3423 val_ref,
3424 decoder,
3425 inner_offset,
3426 inner_depth
3427 )?;
3428 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3429 {
3430 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3431 }
3432 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3433 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3434 }
3435 }
3436
3437 next_offset += envelope_size;
3438 _next_ordinal_to_read += 1;
3439 if next_offset >= end_offset {
3440 return Ok(());
3441 }
3442
3443 while _next_ordinal_to_read < 6 {
3445 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3446 _next_ordinal_to_read += 1;
3447 next_offset += envelope_size;
3448 }
3449
3450 let next_out_of_line = decoder.next_out_of_line();
3451 let handles_before = decoder.remaining_handles();
3452 if let Some((inlined, num_bytes, num_handles)) =
3453 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3454 {
3455 let member_inline_size = <fidl::encoding::UnboundedVector<
3456 fidl::encoding::UnboundedString,
3457 > as fidl::encoding::TypeMarker>::inline_size(
3458 decoder.context
3459 );
3460 if inlined != (member_inline_size <= 4) {
3461 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3462 }
3463 let inner_offset;
3464 let mut inner_depth = depth.clone();
3465 if inlined {
3466 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3467 inner_offset = next_offset;
3468 } else {
3469 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3470 inner_depth.increment()?;
3471 }
3472 let val_ref = self.driver_tests_disable.get_or_insert_with(|| {
3473 fidl::new_empty!(
3474 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
3475 fidl::encoding::DefaultFuchsiaResourceDialect
3476 )
3477 });
3478 fidl::decode!(
3479 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
3480 fidl::encoding::DefaultFuchsiaResourceDialect,
3481 val_ref,
3482 decoder,
3483 inner_offset,
3484 inner_depth
3485 )?;
3486 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3487 {
3488 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3489 }
3490 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3491 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3492 }
3493 }
3494
3495 next_offset += envelope_size;
3496 _next_ordinal_to_read += 1;
3497 if next_offset >= end_offset {
3498 return Ok(());
3499 }
3500
3501 while _next_ordinal_to_read < 7 {
3503 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3504 _next_ordinal_to_read += 1;
3505 next_offset += envelope_size;
3506 }
3507
3508 let next_out_of_line = decoder.next_out_of_line();
3509 let handles_before = decoder.remaining_handles();
3510 if let Some((inlined, num_bytes, num_handles)) =
3511 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3512 {
3513 let member_inline_size = <fidl::encoding::UnboundedVector<DriverLog> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3514 if inlined != (member_inline_size <= 4) {
3515 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3516 }
3517 let inner_offset;
3518 let mut inner_depth = depth.clone();
3519 if inlined {
3520 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3521 inner_offset = next_offset;
3522 } else {
3523 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3524 inner_depth.increment()?;
3525 }
3526 let val_ref = self.driver_log_level.get_or_insert_with(|| {
3527 fidl::new_empty!(
3528 fidl::encoding::UnboundedVector<DriverLog>,
3529 fidl::encoding::DefaultFuchsiaResourceDialect
3530 )
3531 });
3532 fidl::decode!(
3533 fidl::encoding::UnboundedVector<DriverLog>,
3534 fidl::encoding::DefaultFuchsiaResourceDialect,
3535 val_ref,
3536 decoder,
3537 inner_offset,
3538 inner_depth
3539 )?;
3540 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3541 {
3542 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3543 }
3544 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3545 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3546 }
3547 }
3548
3549 next_offset += envelope_size;
3550 _next_ordinal_to_read += 1;
3551 if next_offset >= end_offset {
3552 return Ok(());
3553 }
3554
3555 while _next_ordinal_to_read < 8 {
3557 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3558 _next_ordinal_to_read += 1;
3559 next_offset += envelope_size;
3560 }
3561
3562 let next_out_of_line = decoder.next_out_of_line();
3563 let handles_before = decoder.remaining_handles();
3564 if let Some((inlined, num_bytes, num_handles)) =
3565 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3566 {
3567 let member_inline_size = <fidl::encoding::UnboundedVector<
3568 fidl::encoding::UnboundedString,
3569 > as fidl::encoding::TypeMarker>::inline_size(
3570 decoder.context
3571 );
3572 if inlined != (member_inline_size <= 4) {
3573 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3574 }
3575 let inner_offset;
3576 let mut inner_depth = depth.clone();
3577 if inlined {
3578 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3579 inner_offset = next_offset;
3580 } else {
3581 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3582 inner_depth.increment()?;
3583 }
3584 let val_ref = self.driver_disable.get_or_insert_with(|| {
3585 fidl::new_empty!(
3586 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
3587 fidl::encoding::DefaultFuchsiaResourceDialect
3588 )
3589 });
3590 fidl::decode!(
3591 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
3592 fidl::encoding::DefaultFuchsiaResourceDialect,
3593 val_ref,
3594 decoder,
3595 inner_offset,
3596 inner_depth
3597 )?;
3598 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3599 {
3600 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3601 }
3602 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3603 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3604 }
3605 }
3606
3607 next_offset += envelope_size;
3608 _next_ordinal_to_read += 1;
3609 if next_offset >= end_offset {
3610 return Ok(());
3611 }
3612
3613 while _next_ordinal_to_read < 9 {
3615 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3616 _next_ordinal_to_read += 1;
3617 next_offset += envelope_size;
3618 }
3619
3620 let next_out_of_line = decoder.next_out_of_line();
3621 let handles_before = decoder.remaining_handles();
3622 if let Some((inlined, num_bytes, num_handles)) =
3623 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3624 {
3625 let member_inline_size = <fidl::encoding::UnboundedVector<
3626 fidl::encoding::UnboundedString,
3627 > as fidl::encoding::TypeMarker>::inline_size(
3628 decoder.context
3629 );
3630 if inlined != (member_inline_size <= 4) {
3631 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3632 }
3633 let inner_offset;
3634 let mut inner_depth = depth.clone();
3635 if inlined {
3636 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3637 inner_offset = next_offset;
3638 } else {
3639 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3640 inner_depth.increment()?;
3641 }
3642 let val_ref = self.driver_bind_eager.get_or_insert_with(|| {
3643 fidl::new_empty!(
3644 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
3645 fidl::encoding::DefaultFuchsiaResourceDialect
3646 )
3647 });
3648 fidl::decode!(
3649 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
3650 fidl::encoding::DefaultFuchsiaResourceDialect,
3651 val_ref,
3652 decoder,
3653 inner_offset,
3654 inner_depth
3655 )?;
3656 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3657 {
3658 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3659 }
3660 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3661 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3662 }
3663 }
3664
3665 next_offset += envelope_size;
3666 _next_ordinal_to_read += 1;
3667 if next_offset >= end_offset {
3668 return Ok(());
3669 }
3670
3671 while _next_ordinal_to_read < 10 {
3673 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3674 _next_ordinal_to_read += 1;
3675 next_offset += envelope_size;
3676 }
3677
3678 let next_out_of_line = decoder.next_out_of_line();
3679 let handles_before = decoder.remaining_handles();
3680 if let Some((inlined, num_bytes, num_handles)) =
3681 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3682 {
3683 let member_inline_size =
3684 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
3685 decoder.context,
3686 );
3687 if inlined != (member_inline_size <= 4) {
3688 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3689 }
3690 let inner_offset;
3691 let mut inner_depth = depth.clone();
3692 if inlined {
3693 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3694 inner_offset = next_offset;
3695 } else {
3696 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3697 inner_depth.increment()?;
3698 }
3699 let val_ref = self.board_name.get_or_insert_with(|| {
3700 fidl::new_empty!(
3701 fidl::encoding::UnboundedString,
3702 fidl::encoding::DefaultFuchsiaResourceDialect
3703 )
3704 });
3705 fidl::decode!(
3706 fidl::encoding::UnboundedString,
3707 fidl::encoding::DefaultFuchsiaResourceDialect,
3708 val_ref,
3709 decoder,
3710 inner_offset,
3711 inner_depth
3712 )?;
3713 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3714 {
3715 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3716 }
3717 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3718 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3719 }
3720 }
3721
3722 next_offset += envelope_size;
3723 _next_ordinal_to_read += 1;
3724 if next_offset >= end_offset {
3725 return Ok(());
3726 }
3727
3728 while _next_ordinal_to_read < 11 {
3730 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3731 _next_ordinal_to_read += 1;
3732 next_offset += envelope_size;
3733 }
3734
3735 let next_out_of_line = decoder.next_out_of_line();
3736 let handles_before = decoder.remaining_handles();
3737 if let Some((inlined, num_bytes, num_handles)) =
3738 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3739 {
3740 let member_inline_size = <fidl::encoding::UnboundedVector<Offer> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3741 if inlined != (member_inline_size <= 4) {
3742 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3743 }
3744 let inner_offset;
3745 let mut inner_depth = depth.clone();
3746 if inlined {
3747 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3748 inner_offset = next_offset;
3749 } else {
3750 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3751 inner_depth.increment()?;
3752 }
3753 let val_ref = self.offers.get_or_insert_with(|| {
3754 fidl::new_empty!(
3755 fidl::encoding::UnboundedVector<Offer>,
3756 fidl::encoding::DefaultFuchsiaResourceDialect
3757 )
3758 });
3759 fidl::decode!(
3760 fidl::encoding::UnboundedVector<Offer>,
3761 fidl::encoding::DefaultFuchsiaResourceDialect,
3762 val_ref,
3763 decoder,
3764 inner_offset,
3765 inner_depth
3766 )?;
3767 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3768 {
3769 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3770 }
3771 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3772 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3773 }
3774 }
3775
3776 next_offset += envelope_size;
3777 _next_ordinal_to_read += 1;
3778 if next_offset >= end_offset {
3779 return Ok(());
3780 }
3781
3782 while _next_ordinal_to_read < 12 {
3784 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3785 _next_ordinal_to_read += 1;
3786 next_offset += envelope_size;
3787 }
3788
3789 let next_out_of_line = decoder.next_out_of_line();
3790 let handles_before = decoder.remaining_handles();
3791 if let Some((inlined, num_bytes, num_handles)) =
3792 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3793 {
3794 let member_inline_size = <fidl::encoding::UnboundedVector<Expose> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3795 if inlined != (member_inline_size <= 4) {
3796 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3797 }
3798 let inner_offset;
3799 let mut inner_depth = depth.clone();
3800 if inlined {
3801 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3802 inner_offset = next_offset;
3803 } else {
3804 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3805 inner_depth.increment()?;
3806 }
3807 let val_ref = self.exposes.get_or_insert_with(|| {
3808 fidl::new_empty!(
3809 fidl::encoding::UnboundedVector<Expose>,
3810 fidl::encoding::DefaultFuchsiaResourceDialect
3811 )
3812 });
3813 fidl::decode!(
3814 fidl::encoding::UnboundedVector<Expose>,
3815 fidl::encoding::DefaultFuchsiaResourceDialect,
3816 val_ref,
3817 decoder,
3818 inner_offset,
3819 inner_depth
3820 )?;
3821 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3822 {
3823 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3824 }
3825 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3826 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3827 }
3828 }
3829
3830 next_offset += envelope_size;
3831 _next_ordinal_to_read += 1;
3832 if next_offset >= end_offset {
3833 return Ok(());
3834 }
3835
3836 while _next_ordinal_to_read < 13 {
3838 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3839 _next_ordinal_to_read += 1;
3840 next_offset += envelope_size;
3841 }
3842
3843 let next_out_of_line = decoder.next_out_of_line();
3844 let handles_before = decoder.remaining_handles();
3845 if let Some((inlined, num_bytes, num_handles)) =
3846 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3847 {
3848 let member_inline_size = <fidl::encoding::Endpoint<
3849 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
3850 > as fidl::encoding::TypeMarker>::inline_size(
3851 decoder.context
3852 );
3853 if inlined != (member_inline_size <= 4) {
3854 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3855 }
3856 let inner_offset;
3857 let mut inner_depth = depth.clone();
3858 if inlined {
3859 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3860 inner_offset = next_offset;
3861 } else {
3862 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3863 inner_depth.increment()?;
3864 }
3865 let val_ref = self.pkg.get_or_insert_with(|| {
3866 fidl::new_empty!(
3867 fidl::encoding::Endpoint<
3868 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
3869 >,
3870 fidl::encoding::DefaultFuchsiaResourceDialect
3871 )
3872 });
3873 fidl::decode!(
3874 fidl::encoding::Endpoint<
3875 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
3876 >,
3877 fidl::encoding::DefaultFuchsiaResourceDialect,
3878 val_ref,
3879 decoder,
3880 inner_offset,
3881 inner_depth
3882 )?;
3883 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3884 {
3885 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3886 }
3887 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3888 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3889 }
3890 }
3891
3892 next_offset += envelope_size;
3893 _next_ordinal_to_read += 1;
3894 if next_offset >= end_offset {
3895 return Ok(());
3896 }
3897
3898 while _next_ordinal_to_read < 14 {
3900 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3901 _next_ordinal_to_read += 1;
3902 next_offset += envelope_size;
3903 }
3904
3905 let next_out_of_line = decoder.next_out_of_line();
3906 let handles_before = decoder.remaining_handles();
3907 if let Some((inlined, num_bytes, num_handles)) =
3908 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3909 {
3910 let member_inline_size = <fidl::encoding::UnboundedVector<
3911 fidl_fuchsia_component_test::Capability,
3912 > as fidl::encoding::TypeMarker>::inline_size(
3913 decoder.context
3914 );
3915 if inlined != (member_inline_size <= 4) {
3916 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3917 }
3918 let inner_offset;
3919 let mut inner_depth = depth.clone();
3920 if inlined {
3921 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3922 inner_offset = next_offset;
3923 } else {
3924 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3925 inner_depth.increment()?;
3926 }
3927 let val_ref = self.dtr_offers.get_or_insert_with(|| {
3928 fidl::new_empty!(
3929 fidl::encoding::UnboundedVector<fidl_fuchsia_component_test::Capability>,
3930 fidl::encoding::DefaultFuchsiaResourceDialect
3931 )
3932 });
3933 fidl::decode!(
3934 fidl::encoding::UnboundedVector<fidl_fuchsia_component_test::Capability>,
3935 fidl::encoding::DefaultFuchsiaResourceDialect,
3936 val_ref,
3937 decoder,
3938 inner_offset,
3939 inner_depth
3940 )?;
3941 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3942 {
3943 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3944 }
3945 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3946 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3947 }
3948 }
3949
3950 next_offset += envelope_size;
3951 _next_ordinal_to_read += 1;
3952 if next_offset >= end_offset {
3953 return Ok(());
3954 }
3955
3956 while _next_ordinal_to_read < 15 {
3958 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3959 _next_ordinal_to_read += 1;
3960 next_offset += envelope_size;
3961 }
3962
3963 let next_out_of_line = decoder.next_out_of_line();
3964 let handles_before = decoder.remaining_handles();
3965 if let Some((inlined, num_bytes, num_handles)) =
3966 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3967 {
3968 let member_inline_size = <fidl::encoding::UnboundedVector<
3969 fidl_fuchsia_component_test::Capability,
3970 > as fidl::encoding::TypeMarker>::inline_size(
3971 decoder.context
3972 );
3973 if inlined != (member_inline_size <= 4) {
3974 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3975 }
3976 let inner_offset;
3977 let mut inner_depth = depth.clone();
3978 if inlined {
3979 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3980 inner_offset = next_offset;
3981 } else {
3982 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3983 inner_depth.increment()?;
3984 }
3985 let val_ref = self.dtr_exposes.get_or_insert_with(|| {
3986 fidl::new_empty!(
3987 fidl::encoding::UnboundedVector<fidl_fuchsia_component_test::Capability>,
3988 fidl::encoding::DefaultFuchsiaResourceDialect
3989 )
3990 });
3991 fidl::decode!(
3992 fidl::encoding::UnboundedVector<fidl_fuchsia_component_test::Capability>,
3993 fidl::encoding::DefaultFuchsiaResourceDialect,
3994 val_ref,
3995 decoder,
3996 inner_offset,
3997 inner_depth
3998 )?;
3999 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4000 {
4001 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4002 }
4003 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4004 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4005 }
4006 }
4007
4008 next_offset += envelope_size;
4009 _next_ordinal_to_read += 1;
4010 if next_offset >= end_offset {
4011 return Ok(());
4012 }
4013
4014 while _next_ordinal_to_read < 16 {
4016 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4017 _next_ordinal_to_read += 1;
4018 next_offset += envelope_size;
4019 }
4020
4021 let next_out_of_line = decoder.next_out_of_line();
4022 let handles_before = decoder.remaining_handles();
4023 if let Some((inlined, num_bytes, num_handles)) =
4024 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4025 {
4026 let member_inline_size = <fidl_fuchsia_component_resolution::Component as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4027 if inlined != (member_inline_size <= 4) {
4028 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4029 }
4030 let inner_offset;
4031 let mut inner_depth = depth.clone();
4032 if inlined {
4033 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4034 inner_offset = next_offset;
4035 } else {
4036 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4037 inner_depth.increment()?;
4038 }
4039 let val_ref = self.test_component.get_or_insert_with(|| {
4040 fidl::new_empty!(
4041 fidl_fuchsia_component_resolution::Component,
4042 fidl::encoding::DefaultFuchsiaResourceDialect
4043 )
4044 });
4045 fidl::decode!(
4046 fidl_fuchsia_component_resolution::Component,
4047 fidl::encoding::DefaultFuchsiaResourceDialect,
4048 val_ref,
4049 decoder,
4050 inner_offset,
4051 inner_depth
4052 )?;
4053 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4054 {
4055 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4056 }
4057 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4058 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4059 }
4060 }
4061
4062 next_offset += envelope_size;
4063 _next_ordinal_to_read += 1;
4064 if next_offset >= end_offset {
4065 return Ok(());
4066 }
4067
4068 while _next_ordinal_to_read < 17 {
4070 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4071 _next_ordinal_to_read += 1;
4072 next_offset += envelope_size;
4073 }
4074
4075 let next_out_of_line = decoder.next_out_of_line();
4076 let handles_before = decoder.remaining_handles();
4077 if let Some((inlined, num_bytes, num_handles)) =
4078 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4079 {
4080 let member_inline_size =
4081 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4082 if inlined != (member_inline_size <= 4) {
4083 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4084 }
4085 let inner_offset;
4086 let mut inner_depth = depth.clone();
4087 if inlined {
4088 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4089 inner_offset = next_offset;
4090 } else {
4091 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4092 inner_depth.increment()?;
4093 }
4094 let val_ref = self.driver_index_stop_timeout_millis.get_or_insert_with(|| {
4095 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
4096 });
4097 fidl::decode!(
4098 i64,
4099 fidl::encoding::DefaultFuchsiaResourceDialect,
4100 val_ref,
4101 decoder,
4102 inner_offset,
4103 inner_depth
4104 )?;
4105 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4106 {
4107 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4108 }
4109 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4110 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4111 }
4112 }
4113
4114 next_offset += envelope_size;
4115 _next_ordinal_to_read += 1;
4116 if next_offset >= end_offset {
4117 return Ok(());
4118 }
4119
4120 while _next_ordinal_to_read < 18 {
4122 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4123 _next_ordinal_to_read += 1;
4124 next_offset += envelope_size;
4125 }
4126
4127 let next_out_of_line = decoder.next_out_of_line();
4128 let handles_before = decoder.remaining_handles();
4129 if let Some((inlined, num_bytes, num_handles)) =
4130 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4131 {
4132 let member_inline_size = <fidl::encoding::Vector<SoftwareDevice, 20> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4133 if inlined != (member_inline_size <= 4) {
4134 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4135 }
4136 let inner_offset;
4137 let mut inner_depth = depth.clone();
4138 if inlined {
4139 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4140 inner_offset = next_offset;
4141 } else {
4142 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4143 inner_depth.increment()?;
4144 }
4145 let val_ref =
4146 self.software_devices.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<SoftwareDevice, 20>, fidl::encoding::DefaultFuchsiaResourceDialect));
4147 fidl::decode!(fidl::encoding::Vector<SoftwareDevice, 20>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
4148 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4149 {
4150 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4151 }
4152 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4153 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4154 }
4155 }
4156
4157 next_offset += envelope_size;
4158 _next_ordinal_to_read += 1;
4159 if next_offset >= end_offset {
4160 return Ok(());
4161 }
4162
4163 while _next_ordinal_to_read < 19 {
4165 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4166 _next_ordinal_to_read += 1;
4167 next_offset += envelope_size;
4168 }
4169
4170 let next_out_of_line = decoder.next_out_of_line();
4171 let handles_before = decoder.remaining_handles();
4172 if let Some((inlined, num_bytes, num_handles)) =
4173 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4174 {
4175 let member_inline_size = <fidl::encoding::UnboundedVector<
4176 fidl::encoding::UnboundedString,
4177 > as fidl::encoding::TypeMarker>::inline_size(
4178 decoder.context
4179 );
4180 if inlined != (member_inline_size <= 4) {
4181 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4182 }
4183 let inner_offset;
4184 let mut inner_depth = depth.clone();
4185 if inlined {
4186 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4187 inner_offset = next_offset;
4188 } else {
4189 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4190 inner_depth.increment()?;
4191 }
4192 let val_ref = self.boot_driver_components.get_or_insert_with(|| {
4193 fidl::new_empty!(
4194 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
4195 fidl::encoding::DefaultFuchsiaResourceDialect
4196 )
4197 });
4198 fidl::decode!(
4199 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
4200 fidl::encoding::DefaultFuchsiaResourceDialect,
4201 val_ref,
4202 decoder,
4203 inner_offset,
4204 inner_depth
4205 )?;
4206 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4207 {
4208 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4209 }
4210 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4211 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4212 }
4213 }
4214
4215 next_offset += envelope_size;
4216 _next_ordinal_to_read += 1;
4217 if next_offset >= end_offset {
4218 return Ok(());
4219 }
4220
4221 while _next_ordinal_to_read < 20 {
4223 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4224 _next_ordinal_to_read += 1;
4225 next_offset += envelope_size;
4226 }
4227
4228 let next_out_of_line = decoder.next_out_of_line();
4229 let handles_before = decoder.remaining_handles();
4230 if let Some((inlined, num_bytes, num_handles)) =
4231 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4232 {
4233 let member_inline_size = <fidl::encoding::HandleType<
4234 fidl::Vmo,
4235 { fidl::ObjectType::VMO.into_raw() },
4236 2147483648,
4237 > as fidl::encoding::TypeMarker>::inline_size(
4238 decoder.context
4239 );
4240 if inlined != (member_inline_size <= 4) {
4241 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4242 }
4243 let inner_offset;
4244 let mut inner_depth = depth.clone();
4245 if inlined {
4246 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4247 inner_offset = next_offset;
4248 } else {
4249 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4250 inner_depth.increment()?;
4251 }
4252 let val_ref =
4253 self.devicetree.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
4254 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
4255 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4256 {
4257 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4258 }
4259 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4260 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4261 }
4262 }
4263
4264 next_offset += envelope_size;
4265 _next_ordinal_to_read += 1;
4266 if next_offset >= end_offset {
4267 return Ok(());
4268 }
4269
4270 while _next_ordinal_to_read < 21 {
4272 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4273 _next_ordinal_to_read += 1;
4274 next_offset += envelope_size;
4275 }
4276
4277 let next_out_of_line = decoder.next_out_of_line();
4278 let handles_before = decoder.remaining_handles();
4279 if let Some((inlined, num_bytes, num_handles)) =
4280 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4281 {
4282 let member_inline_size =
4283 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4284 if inlined != (member_inline_size <= 4) {
4285 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4286 }
4287 let inner_offset;
4288 let mut inner_depth = depth.clone();
4289 if inlined {
4290 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4291 inner_offset = next_offset;
4292 } else {
4293 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4294 inner_depth.increment()?;
4295 }
4296 let val_ref = self.platform_vid.get_or_insert_with(|| {
4297 fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect)
4298 });
4299 fidl::decode!(
4300 u32,
4301 fidl::encoding::DefaultFuchsiaResourceDialect,
4302 val_ref,
4303 decoder,
4304 inner_offset,
4305 inner_depth
4306 )?;
4307 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4308 {
4309 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4310 }
4311 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4312 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4313 }
4314 }
4315
4316 next_offset += envelope_size;
4317 _next_ordinal_to_read += 1;
4318 if next_offset >= end_offset {
4319 return Ok(());
4320 }
4321
4322 while _next_ordinal_to_read < 22 {
4324 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4325 _next_ordinal_to_read += 1;
4326 next_offset += envelope_size;
4327 }
4328
4329 let next_out_of_line = decoder.next_out_of_line();
4330 let handles_before = decoder.remaining_handles();
4331 if let Some((inlined, num_bytes, num_handles)) =
4332 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4333 {
4334 let member_inline_size =
4335 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4336 if inlined != (member_inline_size <= 4) {
4337 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4338 }
4339 let inner_offset;
4340 let mut inner_depth = depth.clone();
4341 if inlined {
4342 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4343 inner_offset = next_offset;
4344 } else {
4345 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4346 inner_depth.increment()?;
4347 }
4348 let val_ref = self.platform_pid.get_or_insert_with(|| {
4349 fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect)
4350 });
4351 fidl::decode!(
4352 u32,
4353 fidl::encoding::DefaultFuchsiaResourceDialect,
4354 val_ref,
4355 decoder,
4356 inner_offset,
4357 inner_depth
4358 )?;
4359 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4360 {
4361 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4362 }
4363 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4364 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4365 }
4366 }
4367
4368 next_offset += envelope_size;
4369
4370 while next_offset < end_offset {
4372 _next_ordinal_to_read += 1;
4373 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4374 next_offset += envelope_size;
4375 }
4376
4377 Ok(())
4378 }
4379 }
4380}